USB device stack
Dependents: mbed-mX-USB-TEST1 USBMSD_SD_HID_HelloWorld HidTest MIDI_usb_bridge ... more
Legacy Warning
This is an mbed 2 library. To learn more about mbed OS 5, visit the docs.
Pull requests against this repository are no longer supported. Please raise against mbed OS 5 as documented above.
Diff: USBMSD/USBMSD.cpp
- Revision:
- 29:b7a0ea455a0c
- Parent:
- 18:78bdbce94509
- Child:
- 47:a0cd9646ecd1
--- a/USBMSD/USBMSD.cpp Tue Aug 05 20:15:19 2014 +0100 +++ b/USBMSD/USBMSD.cpp Mon Aug 18 13:45:19 2014 +0100 @@ -232,7 +232,7 @@ // if the array is filled, write it in memory if (!((addr + size)%BlockSize)) { if (!(disk_status() & WRITE_PROTECT)) { - disk_write(page, addr/BlockSize); + disk_write(page, addr/BlockSize, 1); } } @@ -257,7 +257,7 @@ // beginning of a new block -> load a whole block in RAM if (!(addr%BlockSize)) - disk_read(page, addr/BlockSize); + disk_read(page, addr/BlockSize, 1); // info are in RAM -> no need to re-read memory for (n = 0; n < size; n++) { @@ -505,7 +505,7 @@ // we read an entire block if (!(addr%BlockSize)) - disk_read(page, addr/BlockSize); + disk_read(page, addr/BlockSize, 1); // write data which are in RAM writeNB(EPBULK_IN, &page[addr%BlockSize], n, MAX_PACKET_SIZE_EPBULK);