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:
parent
a54ed0085b
commit
0fcbe22c9e
18 changed files with 172 additions and 82 deletions
|
@ -203,12 +203,12 @@ void CDC_Host_USBTask(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo)
|
|||
case HOST_STATE_Addressed:
|
||||
if ((ErrorCode = CDC_Host_ProcessConfigDescriptor(CDCInterfaceInfo)) != CDC_ENUMERROR_NoError)
|
||||
{
|
||||
USB_HostState = HOST_STATE_Unattached;
|
||||
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
|
||||
}
|
||||
|
||||
if ((ErrorCode = USB_Host_SetDeviceConfiguration(1)) != HOST_SENDCONTROL_Successful)
|
||||
{
|
||||
USB_HostState = HOST_STATE_Unattached;
|
||||
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
|
||||
}
|
||||
|
||||
USB_HostState = HOST_STATE_Configured;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue