Implementation of a LocalFileSystem using S25FL216K serial flash memory. Currently only 256kB available!

Dependencies:   S25FL216K USBFileSystem

Dependents:   S25FL216K_HelloWorld

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Flash_USBFileSystem.h Source File

Flash_USBFileSystem.h

00001 #ifndef S25FL216K_USB
00002 #define S25FL216K_USB
00003  
00004 #include "mbed.h"
00005 #include "USBFileSystem.h"
00006 #include "S25FL216K.h"
00007 
00008 /** Local filesystem made with S25FL216K serial flash memory + USBFileSystem library
00009 */
00010 class FlashUSB : public USBFileSystem {
00011 public:
00012    
00013     FlashUSB(PinName mosi, PinName miso, PinName sclk, PinName cs);
00014     virtual int disk_initialize();
00015     virtual int _disk_write(const uint8_t * data, uint64_t block);
00016     virtual int disk_read(uint8_t * data, uint64_t block);    
00017     virtual int _disk_status();
00018     virtual int disk_sync();
00019     virtual uint64_t disk_sectors();
00020     
00021 protected:
00022     int _status;
00023     S25FL216K flash;
00024     
00025  
00026 };
00027  
00028 #endif