Implementation of a LocalFileSystem using S25FL216K serial flash memory. Currently only 256kB available!
Fork of S25FL216K_USBFileSystem by
Diff: Flash_FileSystem.h
- Revision:
- 5:c8918e47c566
diff -r 2642d0729f55 -r c8918e47c566 Flash_FileSystem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Flash_FileSystem.h Tue Dec 23 21:36:32 2014 +0000 @@ -0,0 +1,28 @@ +#ifndef S25FL216K_USB +#define S25FL216K_USB + +#include "mbed.h" +#include "FATFileSystem.h" +#include "S25FL216K.h" + +/** Local filesystem made with S25FL216K serial flash memory + FATFileSystem library +*/ +class FlashSPI : public FATFileSystem { +public: + + FlashSPI(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* n); + virtual int disk_initialize(); + virtual int disk_write(const uint8_t * data, uint64_t block); + virtual int disk_read(uint8_t * data, uint64_t block); + virtual int disk_status(); + virtual int disk_sync(); + virtual uint64_t disk_sectors(); + +protected: + int _status; + S25FL216K flash; + + +}; + +#endif