First working version of a FATFileSystem compatible Chan FAT v0.8 implementation. This is intended to use with long file names and RTOS support. For now long file names work but RTOS support is still untested.

Dependents:   USB_MSC USB_CDC_MSD_Hello TFTPServerTest DMXStation ... more

Committer:
NeoBelerophon
Date:
Fri Feb 04 21:14:33 2011 +0000
Revision:
2:629e4be333f3
Parent:
1:0edb6732d53d
getdir() did not work -> remove

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NeoBelerophon 0:8ea634413549 1 /* mbed Microcontroller Library - FATDirHandle
NeoBelerophon 0:8ea634413549 2 * Copyright (c) 2008, sford
NeoBelerophon 0:8ea634413549 3 */
NeoBelerophon 0:8ea634413549 4
NeoBelerophon 0:8ea634413549 5 #ifndef MBED_FATDIRHANDLE_H
NeoBelerophon 0:8ea634413549 6 #define MBED_FATDIRHANDLE_H
NeoBelerophon 0:8ea634413549 7
NeoBelerophon 0:8ea634413549 8 #include "DirHandle.h"
NeoBelerophon 0:8ea634413549 9 #include "ff.h"
NeoBelerophon 0:8ea634413549 10
NeoBelerophon 0:8ea634413549 11 namespace mbed {
NeoBelerophon 0:8ea634413549 12
NeoBelerophon 0:8ea634413549 13 class FATDirHandle : public DirHandle {
NeoBelerophon 0:8ea634413549 14
NeoBelerophon 0:8ea634413549 15 public:
NeoBelerophon 0:8ea634413549 16 FATDirHandle(const DIR_t &the_dir);
NeoBelerophon 0:8ea634413549 17 virtual int closedir();
NeoBelerophon 0:8ea634413549 18 virtual struct dirent *readdir();
NeoBelerophon 0:8ea634413549 19 virtual void rewinddir();
NeoBelerophon 0:8ea634413549 20 virtual off_t telldir();
NeoBelerophon 0:8ea634413549 21 virtual void seekdir(off_t location);
NeoBelerophon 0:8ea634413549 22
NeoBelerophon 0:8ea634413549 23 private:
NeoBelerophon 0:8ea634413549 24 DIR_t dir;
NeoBelerophon 0:8ea634413549 25 struct dirent cur_entry;
NeoBelerophon 0:8ea634413549 26
NeoBelerophon 0:8ea634413549 27 };
NeoBelerophon 0:8ea634413549 28
NeoBelerophon 0:8ea634413549 29 }
NeoBelerophon 0:8ea634413549 30
NeoBelerophon 0:8ea634413549 31 #endif