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.
Dependencies: BufferedSerial FatFileSystemCpp mbed
Diff: USBHostLite/usbhost_lpc17xx.cpp
- Revision:
- 15:830fc953edd9
- Parent:
- 9:7214e3c3e5f8
- Child:
- 22:0dd9c1b5664a
--- a/USBHostLite/usbhost_lpc17xx.cpp Thu Feb 25 17:54:04 2021 +0000
+++ b/USBHostLite/usbhost_lpc17xx.cpp Mon Mar 08 17:29:31 2021 +0000
@@ -369,9 +369,10 @@
USB_INT32S rc;
PRINT_Log("Connect a Mass Storage device\n");
- while (!HOST_RhscIntr)
- __WFI();
- Host_DelayMS(100); /* USB 2.0 spec says atleast 50ms delay beore port reset */
+ if (!HOST_RhscIntr)
+ return 0;
+
+ Host_DelayMS(100); /* USB 2.0 spec says atleast 50ms delay beore port reset */
LPC_USB->HcRhPortStatus1 = OR_RH_PORT_PRS; // Initiate port reset
while (LPC_USB->HcRhPortStatus1 & OR_RH_PORT_PRS)
__WFI(); // Wait for port reset to complete...