Implementation of a LocalFileSystem using S25FL216K serial flash memory. Currently only 256kB available!
Fork of S25FL216K_USBFileSystem by
Diff: Flash_USBFileSystem.h
- Revision:
- 0:9056eb697726
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Flash_USBFileSystem.h Wed Jul 31 19:18:22 2013 +0000 @@ -0,0 +1,28 @@ +#ifndef S25FL216K_USB +#define S25FL216K_USB + +#include "mbed.h" +#include "USBFileSystem.h" +#include "S25FL216K.h" + +/** Local filesystem made with S25FL216K serial flash memory + USBFileSystem library +*/ +class FlashUSB : public USBFileSystem { +public: + + FlashUSB(PinName mosi, PinName miso, PinName sclk, PinName cs); + 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