-- CHANGED -- To stop compilation errors I changed all *.c files to *.cpp. I have not tested this to see if it actually works. --- Updated FAT File System driver. Features include: * Updated to R0.09 - Sep 06, 2011 [[http://elm-chan.org/fsw/ff/00index_e.html]] * Bug fixes from Stéphane Bausseron ** [[http://mbed.org/forum/mbed/topic/2273/?page=1#comment-11521]] ** [[http://mbed.org/forum/mbed/topic/2307]] * Long filename support enabled and exposed through mbed SDK.
Fork of FatFileSystem by
FATFileHandle.h@1:8263aa1f626a, 2015-02-09 (annotated)
- Committer:
- bridadan
- Date:
- Mon Feb 09 16:02:31 2015 +0000
- Revision:
- 1:8263aa1f626a
- Parent:
- 0:6ceefe1c53e4
Attempting to fix program for K64F platform.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AdamGreen | 0:6ceefe1c53e4 | 1 | /* mbed Microcontroller Library - FATFileHandle |
AdamGreen | 0:6ceefe1c53e4 | 2 | * Copyright (c) 2008, sford |
AdamGreen | 0:6ceefe1c53e4 | 3 | */ |
AdamGreen | 0:6ceefe1c53e4 | 4 | |
AdamGreen | 0:6ceefe1c53e4 | 5 | #ifndef MBED_FATFILEHANDLE_H |
AdamGreen | 0:6ceefe1c53e4 | 6 | #define MBED_FATFILEHANDLE_H |
AdamGreen | 0:6ceefe1c53e4 | 7 | |
AdamGreen | 0:6ceefe1c53e4 | 8 | #include "FileHandle.h" |
AdamGreen | 0:6ceefe1c53e4 | 9 | #include "ff.h" |
AdamGreen | 0:6ceefe1c53e4 | 10 | |
AdamGreen | 0:6ceefe1c53e4 | 11 | namespace mbed { |
AdamGreen | 0:6ceefe1c53e4 | 12 | |
AdamGreen | 0:6ceefe1c53e4 | 13 | class FATFileHandle : public FileHandle { |
AdamGreen | 0:6ceefe1c53e4 | 14 | public: |
AdamGreen | 0:6ceefe1c53e4 | 15 | |
AdamGreen | 0:6ceefe1c53e4 | 16 | FATFileHandle(FIL fh); |
AdamGreen | 0:6ceefe1c53e4 | 17 | virtual int close(); |
AdamGreen | 0:6ceefe1c53e4 | 18 | virtual ssize_t write(const void* buffer, size_t length); |
AdamGreen | 0:6ceefe1c53e4 | 19 | virtual ssize_t read(void* buffer, size_t length); |
AdamGreen | 0:6ceefe1c53e4 | 20 | virtual int isatty(); |
AdamGreen | 0:6ceefe1c53e4 | 21 | virtual off_t lseek(off_t position, int whence); |
AdamGreen | 0:6ceefe1c53e4 | 22 | virtual int fsync(); |
AdamGreen | 0:6ceefe1c53e4 | 23 | virtual off_t flen(); |
AdamGreen | 0:6ceefe1c53e4 | 24 | |
AdamGreen | 0:6ceefe1c53e4 | 25 | protected: |
AdamGreen | 0:6ceefe1c53e4 | 26 | |
AdamGreen | 0:6ceefe1c53e4 | 27 | FIL _fh; |
AdamGreen | 0:6ceefe1c53e4 | 28 | |
AdamGreen | 0:6ceefe1c53e4 | 29 | }; |
AdamGreen | 0:6ceefe1c53e4 | 30 | |
AdamGreen | 0:6ceefe1c53e4 | 31 | } |
AdamGreen | 0:6ceefe1c53e4 | 32 | |
AdamGreen | 0:6ceefe1c53e4 | 33 | #endif |