Simon Ford
/
fat
FATFileHandle.h@1:208803a150b2, 2012-01-12 (annotated)
- Committer:
- simon
- Date:
- Thu Jan 12 12:59:33 2012 +0000
- Revision:
- 1:208803a150b2
- Parent:
- 0:560a6744936c
fix on line 61 of diskio, sector -> s
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon | 0:560a6744936c | 1 | /* mbed Microcontroller Library - FATFileHandle |
simon | 0:560a6744936c | 2 | * Copyright (c) 2008, sford |
simon | 0:560a6744936c | 3 | */ |
simon | 0:560a6744936c | 4 | |
simon | 0:560a6744936c | 5 | #ifndef MBED_FATFILEHANDLE_H |
simon | 0:560a6744936c | 6 | #define MBED_FATFILEHANDLE_H |
simon | 0:560a6744936c | 7 | |
simon | 0:560a6744936c | 8 | #include "FileHandle.h" |
simon | 0:560a6744936c | 9 | #include "ff.h" |
simon | 0:560a6744936c | 10 | |
simon | 0:560a6744936c | 11 | namespace mbed { |
simon | 0:560a6744936c | 12 | |
simon | 0:560a6744936c | 13 | class FATFileHandle : public FileHandle { |
simon | 0:560a6744936c | 14 | public: |
simon | 0:560a6744936c | 15 | |
simon | 0:560a6744936c | 16 | FATFileHandle(FIL fh); |
simon | 0:560a6744936c | 17 | virtual int close(); |
simon | 0:560a6744936c | 18 | virtual ssize_t write(const void* buffer, size_t length); |
simon | 0:560a6744936c | 19 | virtual ssize_t read(void* buffer, size_t length); |
simon | 0:560a6744936c | 20 | virtual int isatty(); |
simon | 0:560a6744936c | 21 | virtual off_t lseek(off_t position, int whence); |
simon | 0:560a6744936c | 22 | virtual int fsync(); |
simon | 0:560a6744936c | 23 | virtual off_t flen(); |
simon | 0:560a6744936c | 24 | |
simon | 0:560a6744936c | 25 | protected: |
simon | 0:560a6744936c | 26 | |
simon | 0:560a6744936c | 27 | FIL _fh; |
simon | 0:560a6744936c | 28 | |
simon | 0:560a6744936c | 29 | }; |
simon | 0:560a6744936c | 30 | |
simon | 0:560a6744936c | 31 | } |
simon | 0:560a6744936c | 32 | |
simon | 0:560a6744936c | 33 | #endif |