diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-13 05:34:43 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-13 05:34:43 +0000 |
commit | 0fcbe22c9eb68f5769bf57469e1bcf9b340d0ae3 (patch) | |
tree | 3c9c1613def7ed9c299d197c9a97fe7622eb987d /LUFA/Drivers/USB/Class/Host | |
parent | a54ed0085b29f81946f3652bd412103292da7589 (diff) | |
download | lufa-0fcbe22c9eb68f5769bf57469e1bcf9b340d0ae3.tar.gz lufa-0fcbe22c9eb68f5769bf57469e1bcf9b340d0ae3.tar.bz2 lufa-0fcbe22c9eb68f5769bf57469e1bcf9b340d0ae3.zip |
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.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Host')
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/CDC.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.c b/LUFA/Drivers/USB/Class/Host/CDC.c index 943cb7363..688143c08 100644 --- a/LUFA/Drivers/USB/Class/Host/CDC.c +++ b/LUFA/Drivers/USB/Class/Host/CDC.c @@ -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;
|