Added new HOST_STATE_WaitForDeviceRemoval host state machine state for non-blocking disabling of device communications until the device has been removed (for use when an error occurs or communications with the device have completed). Changed over all host mode demos to use the new state.
Added verbose documentation for each of the USB Host state machine states.
This commit is contained in:
@@ -66,6 +66,7 @@ void USB_Host_ProcessNextHostState(void)
|
||||
USB_HostState = HOST_STATE_Attached_WaitForDeviceSettle;
|
||||
break;
|
||||
case HOST_STATE_Attached_WaitForDeviceSettle:
|
||||
#if HOST_DEVICE_SETTLE_DELAY_MS > 0
|
||||
_delay_ms(1);
|
||||
|
||||
if (!(WaitMSRemaining--))
|
||||
@@ -78,6 +79,9 @@ void USB_Host_ProcessNextHostState(void)
|
||||
|
||||
USB_HostState = HOST_STATE_Attached_WaitForConnect;
|
||||
}
|
||||
#else
|
||||
USB_HostState = HOST_STATE_Attached_WaitForConnect;
|
||||
#endif
|
||||
|
||||
break;
|
||||
case HOST_STATE_Attached_WaitForConnect:
|
||||
|
||||
Reference in New Issue
Block a user