Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed USBMSD_SD USBDevice
ChaNFS/FATFileHandle.h@7:6494da2a5c60, 2011-11-14 (annotated)
- Committer:
- samux
- Date:
- Mon Nov 14 12:08:32 2011 +0000
- Revision:
- 7:6494da2a5c60
will try to use ChaNFSSD
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| samux |
7:6494da2a5c60 | 1 | /* mbed Microcontroller Library - FATFileHandle |
| samux |
7:6494da2a5c60 | 2 | * Copyright (c) 2008, sford |
| samux |
7:6494da2a5c60 | 3 | */ |
| samux |
7:6494da2a5c60 | 4 | |
| samux |
7:6494da2a5c60 | 5 | #ifndef MBED_FATFILEHANDLE_H |
| samux |
7:6494da2a5c60 | 6 | #define MBED_FATFILEHANDLE_H |
| samux |
7:6494da2a5c60 | 7 | |
| samux |
7:6494da2a5c60 | 8 | #include "FileHandle.h" |
| samux |
7:6494da2a5c60 | 9 | #include "ff.h" |
| samux |
7:6494da2a5c60 | 10 | |
| samux |
7:6494da2a5c60 | 11 | namespace mbed { |
| samux |
7:6494da2a5c60 | 12 | |
| samux |
7:6494da2a5c60 | 13 | class FATFileHandle : public FileHandle { |
| samux |
7:6494da2a5c60 | 14 | public: |
| samux |
7:6494da2a5c60 | 15 | |
| samux |
7:6494da2a5c60 | 16 | FATFileHandle(FIL_t fh); |
| samux |
7:6494da2a5c60 | 17 | virtual int close(); |
| samux |
7:6494da2a5c60 | 18 | virtual ssize_t write(const void* buffer, size_t length); |
| samux |
7:6494da2a5c60 | 19 | virtual ssize_t read(void* buffer, size_t length); |
| samux |
7:6494da2a5c60 | 20 | virtual int isatty(); |
| samux |
7:6494da2a5c60 | 21 | virtual off_t lseek(off_t position, int whence); |
| samux |
7:6494da2a5c60 | 22 | virtual int fsync(); |
| samux |
7:6494da2a5c60 | 23 | virtual off_t flen(); |
| samux |
7:6494da2a5c60 | 24 | |
| samux |
7:6494da2a5c60 | 25 | protected: |
| samux |
7:6494da2a5c60 | 26 | |
| samux |
7:6494da2a5c60 | 27 | FIL_t _fh; |
| samux |
7:6494da2a5c60 | 28 | |
| samux |
7:6494da2a5c60 | 29 | }; |
| samux |
7:6494da2a5c60 | 30 | |
| samux |
7:6494da2a5c60 | 31 | } |
| samux |
7:6494da2a5c60 | 32 | |
| samux |
7:6494da2a5c60 | 33 | #endif |