fork from va009039/USBLocalFileSystem
Dependents: 11u35_usbLocalFilesystem
Fork of USBLocalFileSystem by
Diff: src/StorageInterface.h
- Branch:
- branch
- Revision:
- 2:97c314eae8b8
- Parent:
- 0:39eb4d5b97df
- Child:
- 11:c396747794c6
--- a/src/StorageInterface.h Sun May 04 00:23:05 2014 +0000 +++ b/src/StorageInterface.h Tue May 06 15:42:30 2014 +0900 @@ -3,24 +3,18 @@ class StorageInterface { public: StorageInterface() { - onUpdate = NULL; + report_read_count = 0; + report_write_count = 0; + report_sectors_count = 0; + report_size_count = 0; } virtual int storage_read(uint8_t* data, uint32_t block) = 0; virtual int storage_write(const uint8_t* data, uint32_t block) = 0; virtual uint32_t storage_sectors() = 0; virtual uint32_t storage_size() = 0; - - void attachEvent(void (*ptr)()) { - if (ptr != NULL) { - onUpdate = ptr; - } - } -protected: - void (*onUpdate)(); - void update() { - if (onUpdate) { - (*onUpdate)(); - } - } + __IO int report_read_count; + __IO int report_write_count; + __IO int report_sectors_count; + __IO int report_size_count; };