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.
Dependents: SD_USB_FS_HelloWorld S25FL216K_USBFileSystem USBFileSystem_RAMDISK_HelloWorld
FATFileSystem/FATDirHandle.h@2:9af05743d551, 2013-10-23 (annotated)
- Committer:
- Sissors
- Date:
- Wed Oct 23 20:32:07 2013 +0000
- Revision:
- 2:9af05743d551
FATFileSystem 'Tiny' option enabled -> Primary to solve a buffering issue when USB writes a file, also reduces RAM consumed
;
; USBDevice back to main branch
;
; USBMode 1 is default now
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| Sissors | 2:9af05743d551 | 1 | /* mbed Microcontroller Library | 
| Sissors | 2:9af05743d551 | 2 | * Copyright (c) 2006-2012 ARM Limited | 
| Sissors | 2:9af05743d551 | 3 | * | 
| Sissors | 2:9af05743d551 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy | 
| Sissors | 2:9af05743d551 | 5 | * of this software and associated documentation files (the "Software"), to deal | 
| Sissors | 2:9af05743d551 | 6 | * in the Software without restriction, including without limitation the rights | 
| Sissors | 2:9af05743d551 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | 
| Sissors | 2:9af05743d551 | 8 | * copies of the Software, and to permit persons to whom the Software is | 
| Sissors | 2:9af05743d551 | 9 | * furnished to do so, subject to the following conditions: | 
| Sissors | 2:9af05743d551 | 10 | * | 
| Sissors | 2:9af05743d551 | 11 | * The above copyright notice and this permission notice shall be included in | 
| Sissors | 2:9af05743d551 | 12 | * all copies or substantial portions of the Software. | 
| Sissors | 2:9af05743d551 | 13 | * | 
| Sissors | 2:9af05743d551 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 
| Sissors | 2:9af05743d551 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 
| Sissors | 2:9af05743d551 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 
| Sissors | 2:9af05743d551 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 
| Sissors | 2:9af05743d551 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | 
| Sissors | 2:9af05743d551 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | 
| Sissors | 2:9af05743d551 | 20 | * SOFTWARE. | 
| Sissors | 2:9af05743d551 | 21 | */ | 
| Sissors | 2:9af05743d551 | 22 | #ifndef MBED_FATDIRHANDLE_H | 
| Sissors | 2:9af05743d551 | 23 | #define MBED_FATDIRHANDLE_H | 
| Sissors | 2:9af05743d551 | 24 | |
| Sissors | 2:9af05743d551 | 25 | #include "DirHandle.h" | 
| Sissors | 2:9af05743d551 | 26 | |
| Sissors | 2:9af05743d551 | 27 | using namespace mbed; | 
| Sissors | 2:9af05743d551 | 28 | |
| Sissors | 2:9af05743d551 | 29 | class FATDirHandle : public DirHandle { | 
| Sissors | 2:9af05743d551 | 30 | |
| Sissors | 2:9af05743d551 | 31 | public: | 
| Sissors | 2:9af05743d551 | 32 | FATDirHandle(const FATFS_DIR &the_dir); | 
| Sissors | 2:9af05743d551 | 33 | virtual int closedir(); | 
| Sissors | 2:9af05743d551 | 34 | virtual struct dirent *readdir(); | 
| Sissors | 2:9af05743d551 | 35 | virtual void rewinddir(); | 
| Sissors | 2:9af05743d551 | 36 | virtual off_t telldir(); | 
| Sissors | 2:9af05743d551 | 37 | virtual void seekdir(off_t location); | 
| Sissors | 2:9af05743d551 | 38 | |
| Sissors | 2:9af05743d551 | 39 | private: | 
| Sissors | 2:9af05743d551 | 40 | FATFS_DIR dir; | 
| Sissors | 2:9af05743d551 | 41 | struct dirent cur_entry; | 
| Sissors | 2:9af05743d551 | 42 | |
| Sissors | 2:9af05743d551 | 43 | }; | 
| Sissors | 2:9af05743d551 | 44 | |
| Sissors | 2:9af05743d551 | 45 | #endif |