Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: F401RE-USBHostMIDI_RecieveExample
Fork of F401RE-USBHost by
Diff: USBHostMSD.h
- Revision:
- 2:0cdac6bcc534
- Parent:
- 1:c072d9e580b0
diff -r c072d9e580b0 -r 0cdac6bcc534 USBHostMSD.h
--- a/USBHostMSD.h Tue Jan 21 08:59:28 2014 +0000
+++ b/USBHostMSD.h Thu Jan 23 08:32:54 2014 +0000
@@ -164,17 +164,11 @@
}
USB_TYPE bulkRead(USBDeviceConnected * dev, USBEndpoint * ep, uint8_t * buf, uint32_t len, bool blocking = true) {
- for(int retry = 2; retry > 0; retry--) {
- int result = host->BulkRead(buf, len);
- if (result >= 0) {
- return USB_TYPE_OK;
- }
- USB_DBG2("result=%d %02x", result, host->LastStatus);
- if (host->LastStatus != Bus_Timeout) {
- break;
- }
- wait_ms(10);
+ int result = host->BulkRead(buf, len);
+ if (result >= 0) {
+ return USB_TYPE_OK;
}
+ //USB_DBG2("result=%d %02x", result, host->LastStatus);
return USB_TYPE_ERROR;
}
