test

Dependencies:   mbed-rtos

Dependents:   Production_version1_0 Production_ver1_0 USBHost_TEST USBHost_Test5 ... more

Fork of USBHost by mbed official

Revision:
4:b320d68e98e7
Parent:
0:a554658735bf
Child:
8:93da8ea2708b
diff -r 0f5c32575eb8 -r b320d68e98e7 USBHost/USBHALHost.cpp
--- 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 @@
         }
     }
 }
-