Added new HOST_STATE_WaitForDeviceRemoval host state machine state for non-blocking...
[pub/lufa.git] / LUFA / Drivers / USB / LowLevel / Host.c
index 037e6d8..78a9ca8 100644 (file)
@@ -66,6 +66,7 @@ void USB_Host_ProcessNextHostState(void)
                        USB_HostState = HOST_STATE_Attached_WaitForDeviceSettle;\r
                        break;\r
                case HOST_STATE_Attached_WaitForDeviceSettle:\r
+                       #if HOST_DEVICE_SETTLE_DELAY_MS > 0\r
                        _delay_ms(1);\r
 \r
                        if (!(WaitMSRemaining--))\r
@@ -78,6 +79,9 @@ void USB_Host_ProcessNextHostState(void)
                                \r
                                USB_HostState = HOST_STATE_Attached_WaitForConnect;\r
                        }\r
+                       #else\r
+                       USB_HostState = HOST_STATE_Attached_WaitForConnect;                     \r
+                       #endif\r
                        \r
                        break;\r
                case HOST_STATE_Attached_WaitForConnect:                \r