Adaptation of the official mbed USBHost repository to work with the LPC4088 Display Module
Dependents: DMSupport DMSupport DMSupport DMSupport
Fork of DM_USBHost by
Diff: USBHost/USBHALHost.cpp
- Revision:
- 32:f2d129436056
- Parent:
- 31:9a462d032742
- Child:
- 33:819bbf04163b
--- a/USBHost/USBHALHost.cpp Tue Feb 17 10:36:26 2015 +0100 +++ b/USBHost/USBHALHost.cpp Wed Oct 23 06:58:55 2019 +0000 @@ -122,7 +122,7 @@ //Cut power LPC_SC->PCONP &= ~(1UL<<31); - Thread::wait(1000); + ThisThread::sleep_for(1000); // turn on power for USB LPC_SC->PCONP |= (1UL<<31); @@ -166,7 +166,7 @@ USB_DBG("initialize OHCI\n"); // Wait 100 ms before apply reset - Thread::wait(100); + ThisThread::sleep_for(100); LPC_USB->HcControl = 0; // HARDWARE RESET LPC_USB->HcControlHeadED = 0; // Initialize Control list head to Zero @@ -206,7 +206,7 @@ if (LPC_USB->HcRhPortStatus2 & OR_RH_PORT_CCS) { //Device connected - Thread::wait(150); + ThisThread::sleep_for(150); USB_DBG("Device connected (%08x)\n\r", LPC_USB->HcRhPortStatus2); deviceConnected(0, 2, LPC_USB->HcRhPortStatus2 & OR_RH_PORT_LSDA); } @@ -331,7 +331,7 @@ DigitalOut usb2_vbus_en(P0_12); usb2_vbus_en = 1; - Thread::wait(100); /* USB 2.0 spec says at least 50ms delay before port reset */ + ThisThread::sleep_for(100); /* USB 2.0 spec says at least 50ms delay before port reset */ // Initiate port reset LPC_USB->HcRhPortStatus1 = OR_RH_PORT_PRS; @@ -352,7 +352,7 @@ LPC_USB->HcRhPortStatus2 = OR_RH_PORT_PRSC; usb2_vbus_en = 1; - Thread::wait(200); /* Wait for at least 100 MS after port reset */ + ThisThread::sleep_for(200); /* Wait for at least 100 MS after port reset */ } @@ -379,7 +379,7 @@ if (LPC_USB->HcRhPortStatus2 & OR_RH_PORT_CCS) { // wait 150ms to avoid bounce - wait_ms(150); + ThisThread::sleep_for(150); //Hub 0 (root hub), Port 2 (count starts at 1), Low or High speed deviceConnected(0, 2, LPC_USB->HcRhPortStatus2 & OR_RH_PORT_LSDA); @@ -393,7 +393,7 @@ } // wait 200ms to avoid bounce - wait_ms(200); + ThisThread::sleep_for(200); deviceDisconnected(0, 2, NULL, usb_hcca->DoneHead & 0xFFFFFFFE);