aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-11-24 08:54:41 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-11-24 08:54:41 +0000
commit59ed10273c4f37079564d08a51bea2af1c10b96b (patch)
tree1c8e71dd4b8b049629b19615d8ec498cf4ef2d81 /LUFA
parente4bf986bb351121a39076a7c85c09cd40b43f123 (diff)
downloadlufa-59ed10273c4f37079564d08a51bea2af1c10b96b.tar.gz
lufa-59ed10273c4f37079564d08a51bea2af1c10b96b.tar.bz2
lufa-59ed10273c4f37079564d08a51bea2af1c10b96b.zip
Fixed host state machine not enabling Auto VBUS mode when HOST_DEVICE_SETTLE_DELAY_MS is set to zero.
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.c11
-rw-r--r--LUFA/ManPages/ChangeLog.txt1
2 files changed, 7 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:
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt
index 5cb786296..5dc83cc65 100644
--- a/LUFA/ManPages/ChangeLog.txt
+++ b/LUFA/ManPages/ChangeLog.txt
@@ -27,6 +27,7 @@
* - Fixed misnamed SI_Host_USBTask() and SI_Host_ConfigurePipes() functions
* - Fixed broken USB_GetNextDescriptor() function causing the descriptor to jump ahead double the expected amount
* - Fixed Pipe_IsEndpointBound() not masking the given Endpoint Address against PIPE_EPNUM_MASK
+ * - Fixed host state machine not enabling Auto VBUS mode when HOST_DEVICE_SETTLE_DELAY_MS is set to zero
*
* \section Sec_ChangeLog091122 Version 091122
*