![](/media/cache/profiles/8e5e15c4e6d09c8333a17843461041a9.jpg.50x50_q85.jpg)
Web server based weather station using Sparkfun Weather Meters.
Dependencies: FatFileSystem mbed WeatherMeters SDFileSystem
FatFileSystem/FATFileHandle.h@0:616601bde9fb, 2012-02-23 (annotated)
- Committer:
- AdamGreen
- Date:
- Thu Feb 23 21:38:39 2012 +0000
- Revision:
- 0:616601bde9fb
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AdamGreen | 0:616601bde9fb | 1 | /* mbed Microcontroller Library - FATFileHandle |
AdamGreen | 0:616601bde9fb | 2 | * Copyright (c) 2008, sford |
AdamGreen | 0:616601bde9fb | 3 | */ |
AdamGreen | 0:616601bde9fb | 4 | |
AdamGreen | 0:616601bde9fb | 5 | #ifndef MBED_FATFILEHANDLE_H |
AdamGreen | 0:616601bde9fb | 6 | #define MBED_FATFILEHANDLE_H |
AdamGreen | 0:616601bde9fb | 7 | |
AdamGreen | 0:616601bde9fb | 8 | #include "FileHandle.h" |
AdamGreen | 0:616601bde9fb | 9 | #include "ff.h" |
AdamGreen | 0:616601bde9fb | 10 | |
AdamGreen | 0:616601bde9fb | 11 | namespace mbed { |
AdamGreen | 0:616601bde9fb | 12 | |
AdamGreen | 0:616601bde9fb | 13 | class FATFileHandle : public FileHandle { |
AdamGreen | 0:616601bde9fb | 14 | public: |
AdamGreen | 0:616601bde9fb | 15 | |
AdamGreen | 0:616601bde9fb | 16 | FATFileHandle(FIL fh); |
AdamGreen | 0:616601bde9fb | 17 | virtual int close(); |
AdamGreen | 0:616601bde9fb | 18 | virtual ssize_t write(const void* buffer, size_t length); |
AdamGreen | 0:616601bde9fb | 19 | virtual ssize_t read(void* buffer, size_t length); |
AdamGreen | 0:616601bde9fb | 20 | virtual int isatty(); |
AdamGreen | 0:616601bde9fb | 21 | virtual off_t lseek(off_t position, int whence); |
AdamGreen | 0:616601bde9fb | 22 | virtual int fsync(); |
AdamGreen | 0:616601bde9fb | 23 | virtual off_t flen(); |
AdamGreen | 0:616601bde9fb | 24 | |
AdamGreen | 0:616601bde9fb | 25 | protected: |
AdamGreen | 0:616601bde9fb | 26 | |
AdamGreen | 0:616601bde9fb | 27 | FIL _fh; |
AdamGreen | 0:616601bde9fb | 28 | |
AdamGreen | 0:616601bde9fb | 29 | }; |
AdamGreen | 0:616601bde9fb | 30 | |
AdamGreen | 0:616601bde9fb | 31 | } |
AdamGreen | 0:616601bde9fb | 32 | |
AdamGreen | 0:616601bde9fb | 33 | #endif |