ahmed ahmed
/
samir2_alti_logger
dd
FileSystem/FatFileSystem/FATFileHandle.h@0:caecb0d1e7d3, 2015-04-08 (annotated)
- Committer:
- pfe
- Date:
- Wed Apr 08 08:27:55 2015 +0000
- Revision:
- 0:caecb0d1e7d3
ddd
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pfe | 0:caecb0d1e7d3 | 1 | /* mbed Microcontroller Library - FATFileHandle |
pfe | 0:caecb0d1e7d3 | 2 | * Copyright (c) 2008, sford |
pfe | 0:caecb0d1e7d3 | 3 | */ |
pfe | 0:caecb0d1e7d3 | 4 | |
pfe | 0:caecb0d1e7d3 | 5 | #ifndef MBED_FATFILEHANDLE_H |
pfe | 0:caecb0d1e7d3 | 6 | #define MBED_FATFILEHANDLE_H |
pfe | 0:caecb0d1e7d3 | 7 | |
pfe | 0:caecb0d1e7d3 | 8 | #include "FileHandle.h" |
pfe | 0:caecb0d1e7d3 | 9 | #include "ff.h" |
pfe | 0:caecb0d1e7d3 | 10 | |
pfe | 0:caecb0d1e7d3 | 11 | namespace mbed { |
pfe | 0:caecb0d1e7d3 | 12 | |
pfe | 0:caecb0d1e7d3 | 13 | class FATFileHandle : public FileHandle { |
pfe | 0:caecb0d1e7d3 | 14 | public: |
pfe | 0:caecb0d1e7d3 | 15 | |
pfe | 0:caecb0d1e7d3 | 16 | FATFileHandle(FIL fh); |
pfe | 0:caecb0d1e7d3 | 17 | virtual int close(); |
pfe | 0:caecb0d1e7d3 | 18 | virtual ssize_t write(const void* buffer, size_t length); |
pfe | 0:caecb0d1e7d3 | 19 | virtual ssize_t read(void* buffer, size_t length); |
pfe | 0:caecb0d1e7d3 | 20 | virtual int isatty(); |
pfe | 0:caecb0d1e7d3 | 21 | virtual off_t lseek(off_t position, int whence); |
pfe | 0:caecb0d1e7d3 | 22 | virtual int fsync(); |
pfe | 0:caecb0d1e7d3 | 23 | virtual off_t flen(); |
pfe | 0:caecb0d1e7d3 | 24 | |
pfe | 0:caecb0d1e7d3 | 25 | protected: |
pfe | 0:caecb0d1e7d3 | 26 | |
pfe | 0:caecb0d1e7d3 | 27 | FIL _fh; |
pfe | 0:caecb0d1e7d3 | 28 | |
pfe | 0:caecb0d1e7d3 | 29 | }; |
pfe | 0:caecb0d1e7d3 | 30 | |
pfe | 0:caecb0d1e7d3 | 31 | } |
pfe | 0:caecb0d1e7d3 | 32 | |
pfe | 0:caecb0d1e7d3 | 33 | #endif |