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.
USBHost/FATFileSystem/FATFileHandle.h@0:6ce9c65992e5, 2015-04-15 (annotated)
- Committer:
- dylancachan
- Date:
- Wed Apr 15 06:23:18 2015 +0000
- Revision:
- 0:6ce9c65992e5
telemetre
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| dylancachan | 0:6ce9c65992e5 | 1 | /* mbed Microcontroller Library | 
| dylancachan | 0:6ce9c65992e5 | 2 | * Copyright (c) 2006-2012 ARM Limited | 
| dylancachan | 0:6ce9c65992e5 | 3 | * | 
| dylancachan | 0:6ce9c65992e5 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy | 
| dylancachan | 0:6ce9c65992e5 | 5 | * of this software and associated documentation files (the "Software"), to deal | 
| dylancachan | 0:6ce9c65992e5 | 6 | * in the Software without restriction, including without limitation the rights | 
| dylancachan | 0:6ce9c65992e5 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | 
| dylancachan | 0:6ce9c65992e5 | 8 | * copies of the Software, and to permit persons to whom the Software is | 
| dylancachan | 0:6ce9c65992e5 | 9 | * furnished to do so, subject to the following conditions: | 
| dylancachan | 0:6ce9c65992e5 | 10 | * | 
| dylancachan | 0:6ce9c65992e5 | 11 | * The above copyright notice and this permission notice shall be included in | 
| dylancachan | 0:6ce9c65992e5 | 12 | * all copies or substantial portions of the Software. | 
| dylancachan | 0:6ce9c65992e5 | 13 | * | 
| dylancachan | 0:6ce9c65992e5 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 
| dylancachan | 0:6ce9c65992e5 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 
| dylancachan | 0:6ce9c65992e5 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 
| dylancachan | 0:6ce9c65992e5 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 
| dylancachan | 0:6ce9c65992e5 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | 
| dylancachan | 0:6ce9c65992e5 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | 
| dylancachan | 0:6ce9c65992e5 | 20 | * SOFTWARE. | 
| dylancachan | 0:6ce9c65992e5 | 21 | */ | 
| dylancachan | 0:6ce9c65992e5 | 22 | #ifndef MBED_FATFILEHANDLE_H | 
| dylancachan | 0:6ce9c65992e5 | 23 | #define MBED_FATFILEHANDLE_H | 
| dylancachan | 0:6ce9c65992e5 | 24 | |
| dylancachan | 0:6ce9c65992e5 | 25 | #include "FileHandle.h" | 
| dylancachan | 0:6ce9c65992e5 | 26 | |
| dylancachan | 0:6ce9c65992e5 | 27 | using namespace mbed; | 
| dylancachan | 0:6ce9c65992e5 | 28 | |
| dylancachan | 0:6ce9c65992e5 | 29 | class FATFileHandle : public FileHandle { | 
| dylancachan | 0:6ce9c65992e5 | 30 | public: | 
| dylancachan | 0:6ce9c65992e5 | 31 | |
| dylancachan | 0:6ce9c65992e5 | 32 | FATFileHandle(FIL fh); | 
| dylancachan | 0:6ce9c65992e5 | 33 | virtual int close(); | 
| dylancachan | 0:6ce9c65992e5 | 34 | virtual ssize_t write(const void* buffer, size_t length); | 
| dylancachan | 0:6ce9c65992e5 | 35 | virtual ssize_t read(void* buffer, size_t length); | 
| dylancachan | 0:6ce9c65992e5 | 36 | virtual int isatty(); | 
| dylancachan | 0:6ce9c65992e5 | 37 | virtual off_t lseek(off_t position, int whence); | 
| dylancachan | 0:6ce9c65992e5 | 38 | virtual int fsync(); | 
| dylancachan | 0:6ce9c65992e5 | 39 | virtual off_t flen(); | 
| dylancachan | 0:6ce9c65992e5 | 40 | |
| dylancachan | 0:6ce9c65992e5 | 41 | protected: | 
| dylancachan | 0:6ce9c65992e5 | 42 | |
| dylancachan | 0:6ce9c65992e5 | 43 | FIL _fh; | 
| dylancachan | 0:6ce9c65992e5 | 44 | |
| dylancachan | 0:6ce9c65992e5 | 45 | }; | 
| dylancachan | 0:6ce9c65992e5 | 46 | |
| dylancachan | 0:6ce9c65992e5 | 47 | #endif |