USB Host Driver with Socket Modem support. Works with revision 323 of mbed-src but broken with any later version.

Dependencies:   FATFileSystem

Fork of F401RE-USBHost by Norimasa Okamoto

Revision:
20:9827f135ccb6
Parent:
14:b167f2b97cb7
--- a/USBHostMSD/USBHostMSD.cpp	Sun Jul 20 11:00:24 2014 +0000
+++ b/USBHostMSD/USBHostMSD.cpp	Sun May 10 09:55:16 2015 +0000
@@ -323,24 +323,24 @@
     return readCapacity();
 }
 
-int USBHostMSD::disk_write(const uint8_t *buffer, uint64_t block_number) {
-    USB_DBG("FILESYSTEM: write block: %lld", block_number);
+int USBHostMSD::disk_write(const uint8_t *buffer, uint64_t sector, uint8_t count) {
+    USB_DBG("FILESYSTEM: write sector: %lld, count: %d", sector, count);
     if (!disk_init) {
         disk_initialize();
     }
     if (!disk_init)
         return -1;
-    return dataTransfer((uint8_t *)buffer, block_number, 1, HOST_TO_DEVICE);
+    return dataTransfer((uint8_t *)buffer, sector, count, HOST_TO_DEVICE);
 }
 
-int USBHostMSD::disk_read(uint8_t * buffer, uint64_t block_number) {
-    USB_DBG("FILESYSTEM: read block %lld", block_number);
+int USBHostMSD::disk_read(uint8_t * buffer, uint64_t sector, uint8_t count) {
+    USB_DBG("FILESYSTEM: read sector: %lld, count: %d", sector, count);
     if (!disk_init) {
         disk_initialize();
     }
     if (!disk_init)
         return -1;
-    return dataTransfer((uint8_t *)buffer, block_number, 1, DEVICE_TO_HOST);
+    return dataTransfer((uint8_t *)buffer, sector, count, DEVICE_TO_HOST);
 }
 
 uint64_t USBHostMSD::disk_sectors() {