Fixed host state machine not enabling Auto VBUS mode when HOST_DEVICE_SETTLE_DELAY_MS...
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 24 Nov 2009 08:54:41 +0000 (08:54 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 24 Nov 2009 08:54:41 +0000 (08:54 +0000)
LUFA/Drivers/USB/LowLevel/Host.c
LUFA/ManPages/ChangeLog.txt

index 9186f1c..1e22ffc 100644 (file)
@@ -67,10 +67,14 @@ void USB_Host_ProcessNextHostState(void)
                        break;\r
                case HOST_STATE_Powered_WaitForDeviceSettle:\r
                        #if HOST_DEVICE_SETTLE_DELAY_MS > 0\r
-                       _delay_ms(1);\r
-\r
                        if (!(WaitMSRemaining--))\r
                        {\r
+                               _delay_ms(1);\r
+                               break;\r
+                       }\r
+                       else\r
+                       #endif\r
+                       {\r
                                USB_Host_VBUS_Manual_Off();\r
 \r
                                USB_OTGPAD_On();\r
@@ -79,9 +83,6 @@ void USB_Host_ProcessNextHostState(void)
                                \r
                                USB_HostState = HOST_STATE_Powered_WaitForConnect;\r
                        }\r
-                       #else\r
-                       USB_HostState = HOST_STATE_Powered_WaitForConnect;                      \r
-                       #endif\r
                        \r
                        break;\r
                case HOST_STATE_Powered_WaitForConnect:         \r
index 5cb7862..5dc83cc 100644 (file)
@@ -27,6 +27,7 @@
   *  - Fixed misnamed SI_Host_USBTask() and SI_Host_ConfigurePipes() functions\r
   *  - Fixed broken USB_GetNextDescriptor() function causing the descriptor to jump ahead double the expected amount\r
   *  - Fixed Pipe_IsEndpointBound() not masking the given Endpoint Address against PIPE_EPNUM_MASK\r
+  *  - Fixed host state machine not enabling Auto VBUS mode when HOST_DEVICE_SETTLE_DELAY_MS is set to zero\r
   *\r
   *  \section Sec_ChangeLog091122 Version 091122\r
   *\r