Demonstration of a very simple unix-like shell. Based on integrating both Klaus Bu\'s SDHCFileSystem and the FATFileSystem library out of Thomas Hamilton\'s SDCard program. Result: you get high capacity + a plethora of filesystem functions.
FATDirHandle.h
00001 /* mbed Microcontroller Library - FATDirHandle 00002 Copyright (c) 2008, sford */ 00003 00004 //Modified by Thomas Hamilton, Copyright 2010 00005 00006 #ifndef MBED_FATDIRHANDLE_H 00007 #define MBED_FATDIRHANDLE_H 00008 00009 #include "stdint.h" 00010 #include "ff.h" 00011 #include "mbed.h" 00012 #include "DirHandle.h" 00013 #include <stdio.h> 00014 00015 class FATDirHandle : public DirHandle 00016 { 00017 private: 00018 FAT_DIR DirectoryObject; 00019 struct dirent CurrentEntry; 00020 00021 public: 00022 FATDirHandle(FAT_DIR InputDirStr); 00023 virtual int closedir(); 00024 virtual struct dirent* readdir(); 00025 virtual void rewinddir(); 00026 virtual off_t telldir(); 00027 virtual void seekdir(off_t location); 00028 }; 00029 00030 #endif
Generated on Wed Jul 13 2022 08:04:37 by
1.7.2