SD Card Interface class. Log raw data bytes to memory addresses of your choice, or format the card and use the FAT file system to write files.

Dependencies:   mbed

Committer:
Blaze513
Date:
Sun Jan 16 09:20:30 2011 +0000
Revision:
6:ddf09d859ed7
Parent:
4:9a5878d316d5
gave access to Initialization function to FAT module.
added disk formatting functionality.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Blaze513 4:9a5878d316d5 1 /* mbed Microcontroller Library - FATFileHandle
Blaze513 4:9a5878d316d5 2 Copyright (c) 2008, sford */
Blaze513 4:9a5878d316d5 3
Blaze513 4:9a5878d316d5 4 //Modified by Thomas Hamilton, Copyright 2010
Blaze513 4:9a5878d316d5 5
Blaze513 4:9a5878d316d5 6 #ifndef MBED_FATFILEHANDLE_H
Blaze513 4:9a5878d316d5 7 #define MBED_FATFILEHANDLE_H
Blaze513 4:9a5878d316d5 8
Blaze513 4:9a5878d316d5 9 #include "stdint.h"
Blaze513 4:9a5878d316d5 10 #include "ff.h"
Blaze513 4:9a5878d316d5 11 #include "mbed.h"
Blaze513 4:9a5878d316d5 12 #include "FileHandle.h"
Blaze513 4:9a5878d316d5 13 #include <stdio.h>
Blaze513 4:9a5878d316d5 14
Blaze513 4:9a5878d316d5 15 class FATFileHandle : public FileHandle
Blaze513 4:9a5878d316d5 16 {
Blaze513 4:9a5878d316d5 17 private:
Blaze513 4:9a5878d316d5 18 FAT_FIL FileObject;
Blaze513 4:9a5878d316d5 19
Blaze513 4:9a5878d316d5 20 public:
Blaze513 4:9a5878d316d5 21 FATFileHandle(FAT_FIL InputFilStr);
Blaze513 4:9a5878d316d5 22 virtual ssize_t write(const void* buffer, size_t length);
Blaze513 4:9a5878d316d5 23 virtual int close();
Blaze513 4:9a5878d316d5 24 virtual ssize_t read(void* buffer, size_t length);
Blaze513 4:9a5878d316d5 25 virtual int isatty();
Blaze513 4:9a5878d316d5 26 virtual off_t lseek(off_t offset, int whence);
Blaze513 4:9a5878d316d5 27 virtual int fsync();
Blaze513 4:9a5878d316d5 28 virtual off_t flen();
Blaze513 4:9a5878d316d5 29 };
Blaze513 4:9a5878d316d5 30
Blaze513 1:94c648931f84 31 #endif