Fixed host state machine not enabling Auto VBUS mode when HOST_DEVICE_SETTLE_DELAY_MS is set to zero.
This commit is contained in:
parent
e4bf986bb3
commit
59ed10273c
2 changed files with 7 additions and 5 deletions
|
@ -67,9 +67,13 @@ 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();
|
||||
|
||||
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue