Preliminary main mbed library for nexpaq development

Committer:
nexpaq
Date:
Fri Nov 04 20:54:50 2016 +0000
Revision:
1:d96dbedaebdb
Parent:
0:6c56fb4bc5f0
Removed extra directories for other platforms

Who changed what in which revision?

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