Uses a more recent version of official mbed libraries than that of Neil Thiessen
Dependencies: FATFileSystem
Dependents: ThermalWake STM32F407VET6_SDCard STM32F407VET6_SD_HTTP_Server ZZ_SSL_Main_L476 ... more
Fork of SDFileSystem by
FATFileSystem/FATDirHandle.h@11:67ddc53e3983, 2014-08-14 (annotated)
- Committer:
- neilt6
- Date:
- Thu Aug 14 22:27:07 2014 +0000
- Revision:
- 11:67ddc53e3983
Major performance improvements with custom FATFileSystem
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
neilt6 | 11:67ddc53e3983 | 1 | /* mbed Microcontroller Library |
neilt6 | 11:67ddc53e3983 | 2 | * Copyright (c) 2006-2012 ARM Limited |
neilt6 | 11:67ddc53e3983 | 3 | * |
neilt6 | 11:67ddc53e3983 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
neilt6 | 11:67ddc53e3983 | 5 | * of this software and associated documentation files (the "Software"), to deal |
neilt6 | 11:67ddc53e3983 | 6 | * in the Software without restriction, including without limitation the rights |
neilt6 | 11:67ddc53e3983 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
neilt6 | 11:67ddc53e3983 | 8 | * copies of the Software, and to permit persons to whom the Software is |
neilt6 | 11:67ddc53e3983 | 9 | * furnished to do so, subject to the following conditions: |
neilt6 | 11:67ddc53e3983 | 10 | * |
neilt6 | 11:67ddc53e3983 | 11 | * The above copyright notice and this permission notice shall be included in |
neilt6 | 11:67ddc53e3983 | 12 | * all copies or substantial portions of the Software. |
neilt6 | 11:67ddc53e3983 | 13 | * |
neilt6 | 11:67ddc53e3983 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
neilt6 | 11:67ddc53e3983 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
neilt6 | 11:67ddc53e3983 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
neilt6 | 11:67ddc53e3983 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
neilt6 | 11:67ddc53e3983 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
neilt6 | 11:67ddc53e3983 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
neilt6 | 11:67ddc53e3983 | 20 | * SOFTWARE. |
neilt6 | 11:67ddc53e3983 | 21 | */ |
neilt6 | 11:67ddc53e3983 | 22 | #ifndef MBED_FATDIRHANDLE_H |
neilt6 | 11:67ddc53e3983 | 23 | #define MBED_FATDIRHANDLE_H |
neilt6 | 11:67ddc53e3983 | 24 | |
neilt6 | 11:67ddc53e3983 | 25 | #include "DirHandle.h" |
neilt6 | 11:67ddc53e3983 | 26 | |
neilt6 | 11:67ddc53e3983 | 27 | using namespace mbed; |
neilt6 | 11:67ddc53e3983 | 28 | |
neilt6 | 11:67ddc53e3983 | 29 | class FATDirHandle : public DirHandle { |
neilt6 | 11:67ddc53e3983 | 30 | |
neilt6 | 11:67ddc53e3983 | 31 | public: |
neilt6 | 11:67ddc53e3983 | 32 | FATDirHandle(const FATFS_DIR &the_dir); |
neilt6 | 11:67ddc53e3983 | 33 | virtual int closedir(); |
neilt6 | 11:67ddc53e3983 | 34 | virtual struct dirent *readdir(); |
neilt6 | 11:67ddc53e3983 | 35 | virtual void rewinddir(); |
neilt6 | 11:67ddc53e3983 | 36 | virtual off_t telldir(); |
neilt6 | 11:67ddc53e3983 | 37 | virtual void seekdir(off_t location); |
neilt6 | 11:67ddc53e3983 | 38 | |
neilt6 | 11:67ddc53e3983 | 39 | private: |
neilt6 | 11:67ddc53e3983 | 40 | FATFS_DIR dir; |
neilt6 | 11:67ddc53e3983 | 41 | struct dirent cur_entry; |
neilt6 | 11:67ddc53e3983 | 42 | |
neilt6 | 11:67ddc53e3983 | 43 | }; |
neilt6 | 11:67ddc53e3983 | 44 | |
neilt6 | 11:67ddc53e3983 | 45 | #endif |