My fork of the FATFileSystem (working)
Fork of FATFileSystem by
FATFileHandle.h@5:ecf9ff7e4ef2, 2013-01-08 (annotated)
- Committer:
- s_moriya
- Date:
- Tue Jan 08 10:53:42 2013 +0000
- Revision:
- 5:ecf9ff7e4ef2
- Parent:
- 0:97df4125f18d
1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_unsupported | 0:97df4125f18d | 1 | /* mbed Microcontroller Library - FATFileHandle |
mbed_unsupported | 0:97df4125f18d | 2 | * Copyright (c) 2008, sford |
mbed_unsupported | 0:97df4125f18d | 3 | */ |
mbed_unsupported | 0:97df4125f18d | 4 | |
mbed_unsupported | 0:97df4125f18d | 5 | #ifndef MBED_FATFILEHANDLE_H |
mbed_unsupported | 0:97df4125f18d | 6 | #define MBED_FATFILEHANDLE_H |
mbed_unsupported | 0:97df4125f18d | 7 | |
mbed_unsupported | 0:97df4125f18d | 8 | #include "FileHandle.h" |
mbed_unsupported | 0:97df4125f18d | 9 | #include "ff.h" |
mbed_unsupported | 0:97df4125f18d | 10 | |
mbed_unsupported | 0:97df4125f18d | 11 | namespace mbed { |
mbed_unsupported | 0:97df4125f18d | 12 | |
mbed_unsupported | 0:97df4125f18d | 13 | class FATFileHandle : public FileHandle { |
mbed_unsupported | 0:97df4125f18d | 14 | public: |
mbed_unsupported | 0:97df4125f18d | 15 | |
mbed_unsupported | 0:97df4125f18d | 16 | FATFileHandle(FIL fh); |
mbed_unsupported | 0:97df4125f18d | 17 | virtual int close(); |
mbed_unsupported | 0:97df4125f18d | 18 | virtual ssize_t write(const void* buffer, size_t length); |
mbed_unsupported | 0:97df4125f18d | 19 | virtual ssize_t read(void* buffer, size_t length); |
mbed_unsupported | 0:97df4125f18d | 20 | virtual int isatty(); |
mbed_unsupported | 0:97df4125f18d | 21 | virtual off_t lseek(off_t position, int whence); |
mbed_unsupported | 0:97df4125f18d | 22 | virtual int fsync(); |
mbed_unsupported | 0:97df4125f18d | 23 | virtual off_t flen(); |
mbed_unsupported | 0:97df4125f18d | 24 | |
mbed_unsupported | 0:97df4125f18d | 25 | protected: |
mbed_unsupported | 0:97df4125f18d | 26 | |
mbed_unsupported | 0:97df4125f18d | 27 | FIL _fh; |
mbed_unsupported | 0:97df4125f18d | 28 | |
mbed_unsupported | 0:97df4125f18d | 29 | }; |
mbed_unsupported | 0:97df4125f18d | 30 | |
mbed_unsupported | 0:97df4125f18d | 31 | } |
mbed_unsupported | 0:97df4125f18d | 32 | |
mbed_unsupported | 0:97df4125f18d | 33 | #endif |