USBDevice library fork to add multi-function (e.g. Keyboard(HID) + Virtual COM Port(CDC)) usb support.
Fork of USBDevice by
Diff: USBMSD/USBMSD.cpp
- Revision:
- 29:b7a0ea455a0c
- Parent:
- 18:78bdbce94509
- Child:
- 47:a0cd9646ecd1
diff -r c09a0c9bf425 -r b7a0ea455a0c USBMSD/USBMSD.cpp --- 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);