Implementation of a LocalFileSystem using S25FL216K serial flash memory. Currently only 256kB available!
Fork of S25FL216K_USBFileSystem by
Flash_USBFileSystem.h@4:2642d0729f55, 2014-12-19 (annotated)
- Committer:
- mkilivan
- Date:
- Fri Dec 19 14:45:04 2014 +0000
- Revision:
- 4:2642d0729f55
- Parent:
- 0:9056eb697726
Remove USB part
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sissors | 0:9056eb697726 | 1 | #ifndef S25FL216K_USB |
Sissors | 0:9056eb697726 | 2 | #define S25FL216K_USB |
Sissors | 0:9056eb697726 | 3 | |
Sissors | 0:9056eb697726 | 4 | #include "mbed.h" |
Sissors | 0:9056eb697726 | 5 | #include "USBFileSystem.h" |
Sissors | 0:9056eb697726 | 6 | #include "S25FL216K.h" |
Sissors | 0:9056eb697726 | 7 | |
Sissors | 0:9056eb697726 | 8 | /** Local filesystem made with S25FL216K serial flash memory + USBFileSystem library |
Sissors | 0:9056eb697726 | 9 | */ |
Sissors | 0:9056eb697726 | 10 | class FlashUSB : public USBFileSystem { |
Sissors | 0:9056eb697726 | 11 | public: |
Sissors | 0:9056eb697726 | 12 | |
Sissors | 0:9056eb697726 | 13 | FlashUSB(PinName mosi, PinName miso, PinName sclk, PinName cs); |
Sissors | 0:9056eb697726 | 14 | virtual int disk_initialize(); |
Sissors | 0:9056eb697726 | 15 | virtual int _disk_write(const uint8_t * data, uint64_t block); |
Sissors | 0:9056eb697726 | 16 | virtual int disk_read(uint8_t * data, uint64_t block); |
Sissors | 0:9056eb697726 | 17 | virtual int _disk_status(); |
Sissors | 0:9056eb697726 | 18 | virtual int disk_sync(); |
Sissors | 0:9056eb697726 | 19 | virtual uint64_t disk_sectors(); |
Sissors | 0:9056eb697726 | 20 | |
Sissors | 0:9056eb697726 | 21 | protected: |
Sissors | 0:9056eb697726 | 22 | int _status; |
Sissors | 0:9056eb697726 | 23 | S25FL216K flash; |
Sissors | 0:9056eb697726 | 24 | |
Sissors | 0:9056eb697726 | 25 | |
Sissors | 0:9056eb697726 | 26 | }; |
Sissors | 0:9056eb697726 | 27 | |
Sissors | 0:9056eb697726 | 28 | #endif |