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