Dependencies: PinDetect TextLCD mbed mRotaryEncoder
FATFileSystem/Interface/FATFileHandle.h@0:afb2650fb49a, 2012-02-13 (annotated)
- Committer:
- cicklaus
- Date:
- Mon Feb 13 02:11:20 2012 +0000
- Revision:
- 0:afb2650fb49a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cicklaus | 0:afb2650fb49a | 1 | /* mbed Microcontroller Library - FATFileHandle |
cicklaus | 0:afb2650fb49a | 2 | Copyright (c) 2008, sford */ |
cicklaus | 0:afb2650fb49a | 3 | |
cicklaus | 0:afb2650fb49a | 4 | //Modified by Thomas Hamilton, Copyright 2010 |
cicklaus | 0:afb2650fb49a | 5 | |
cicklaus | 0:afb2650fb49a | 6 | #ifndef MBED_FATFILEHANDLE_H |
cicklaus | 0:afb2650fb49a | 7 | #define MBED_FATFILEHANDLE_H |
cicklaus | 0:afb2650fb49a | 8 | |
cicklaus | 0:afb2650fb49a | 9 | #include "stdint.h" |
cicklaus | 0:afb2650fb49a | 10 | #include "ff.h" |
cicklaus | 0:afb2650fb49a | 11 | #include "mbed.h" |
cicklaus | 0:afb2650fb49a | 12 | #include "FileHandle.h" |
cicklaus | 0:afb2650fb49a | 13 | #include <stdio.h> |
cicklaus | 0:afb2650fb49a | 14 | |
cicklaus | 0:afb2650fb49a | 15 | class FATFileHandle : public FileHandle |
cicklaus | 0:afb2650fb49a | 16 | { |
cicklaus | 0:afb2650fb49a | 17 | private: |
cicklaus | 0:afb2650fb49a | 18 | FAT_FIL FileObject; |
cicklaus | 0:afb2650fb49a | 19 | |
cicklaus | 0:afb2650fb49a | 20 | public: |
cicklaus | 0:afb2650fb49a | 21 | FATFileHandle(FAT_FIL InputFilStr); |
cicklaus | 0:afb2650fb49a | 22 | virtual ssize_t write(const void* buffer, size_t length); |
cicklaus | 0:afb2650fb49a | 23 | virtual int close(); |
cicklaus | 0:afb2650fb49a | 24 | virtual ssize_t read(void* buffer, size_t length); |
cicklaus | 0:afb2650fb49a | 25 | virtual int isatty(); |
cicklaus | 0:afb2650fb49a | 26 | virtual off_t lseek(off_t offset, int whence); |
cicklaus | 0:afb2650fb49a | 27 | virtual int fsync(); |
cicklaus | 0:afb2650fb49a | 28 | virtual off_t flen(); |
cicklaus | 0:afb2650fb49a | 29 | }; |
cicklaus | 0:afb2650fb49a | 30 | |
cicklaus | 0:afb2650fb49a | 31 | #endif |