CDY version that shares functionality with Counter

Dependencies:   SDFileSystem_HelloWorld mbed FATFileSystem

Committer:
Charles David Young
Date:
Sun Nov 04 18:44:51 2018 -0700
Revision:
0:aa13e1c335cd
create new repo for show2me

Who changed what in which revision?

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