USBHost library

Dependencies:   FATFileSystem mbed-rtos

Fork of USBHost by mbed official

Revision:
4:b320d68e98e7
Parent:
0:a554658735bf
Child:
8:93da8ea2708b
--- a/USBHost/USBHALHost.cpp	Wed Mar 06 17:50:07 2013 +0000
+++ b/USBHost/USBHALHost.cpp	Tue Mar 12 17:23:37 2013 +0000
@@ -127,7 +127,7 @@
     // Check for any connected devices
     if (LPC_USB->HcRhPortStatus1 & OR_RH_PORT_CCS) {
         //Device connected
-        wait_ms(100);
+        wait_ms(150);
         USB_DBG("Device connected (%08x)\n\r", LPC_USB->HcRhPortStatus1);
         deviceConnected(0, 1, LPC_USB->HcRhPortStatus1 & OR_RH_PORT_LSDA);
     }
@@ -250,7 +250,7 @@
 
 void USBHALHost::resetRootHub() {
     // Initiate port reset
-    LPC_USB->HcRhPortStatus1 = OR_RH_PORT_PRS; 
+    LPC_USB->HcRhPortStatus1 = OR_RH_PORT_PRS;
     
     while (LPC_USB->HcRhPortStatus1 & OR_RH_PORT_PRS);
     
@@ -282,8 +282,8 @@
                     //Root device connected
                     if (LPC_USB->HcRhPortStatus1 & OR_RH_PORT_CCS) { 
                         
-                        // wait 100ms to avoid bounce
-                        wait_ms(100);
+                        // wait 150ms to avoid bounce
+                        wait_ms(150);
                         
                         //Hub 0 (root hub), Port 1 (count starts at 1), Low or High speed
                         deviceConnected(0, 1, LPC_USB->HcRhPortStatus1 & OR_RH_PORT_LSDA); 
@@ -296,8 +296,8 @@
                             usb_hcca->DoneHead = 0;
                         }
                         
-                        // wait 100ms to avoid bounce
-                        wait_ms(100);
+                        // wait 200ms to avoid bounce
+                        wait_ms(200);
                         
                         deviceDisconnected(0, 1, NULL, usb_hcca->DoneHead & 0xFFFFFFFE);
                         
@@ -322,4 +322,3 @@
         }
     }
 }
-