![](/media/cache/profiles/3ec0e2c7f4536e7ce9e9ce183b1de9e8.jpg.50x50_q85.jpg)
RAMDisk example for the USBFileSystem
Dependencies: mbed USBFileSystem
Fork of USBFileSystem_RAMDISK_HelloWorld by
Diff: RAM_DISK/USBMSD_Ram.cpp
- Revision:
- 4:69b7cece8e72
- Parent:
- 2:1c8a3c4ba703
- Child:
- 5:9261d5bd633b
--- a/RAM_DISK/USBMSD_Ram.cpp Wed Oct 23 20:34:52 2013 +0000 +++ b/RAM_DISK/USBMSD_Ram.cpp Sun Jan 18 21:32:10 2015 +0000 @@ -251,12 +251,12 @@ return 0; } -int USBMSD_Ram::_disk_write(const uint8_t * buffer, uint64_t block_number) { +int USBMSD_Ram::_disk_write(const uint8_t * buffer, uint64_t block_number, uint8_t count) { memcpy((void *)&disk_image[block_number*512], buffer, 512); return 0; } -int USBMSD_Ram::disk_read(uint8_t * buffer, uint64_t block_number) { +int USBMSD_Ram::disk_read(uint8_t * buffer, uint64_t block_number, uint8_t count) { memcpy(buffer, &disk_image[block_number*512], 512); return 0; }