aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/LowLevel/Host.c
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Host.c')
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Host.c b/LUFA/Drivers/USB/LowLevel/Host.c
index 9186f1c79..1e22ffcb7 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.c
+++ b/LUFA/Drivers/USB/LowLevel/Host.c
@@ -67,10 +67,14 @@ void USB_Host_ProcessNextHostState(void)
break;
case HOST_STATE_Powered_WaitForDeviceSettle:
#if HOST_DEVICE_SETTLE_DELAY_MS > 0
- _delay_ms(1);
-
if (!(WaitMSRemaining--))
{
+ _delay_ms(1);
+ break;
+ }
+ else
+ #endif
+ {
USB_Host_VBUS_Manual_Off();
USB_OTGPAD_On();
@@ -79,9 +83,6 @@ void USB_Host_ProcessNextHostState(void)
USB_HostState = HOST_STATE_Powered_WaitForConnect;
}
- #else
- USB_HostState = HOST_STATE_Powered_WaitForConnect;
- #endif
break;
case HOST_STATE_Powered_WaitForConnect: