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:
Dean Camera 2009-07-13 05:34:43 +00:00
parent a54ed0085b
commit 0fcbe22c9e
18 changed files with 172 additions and 82 deletions

View file

@ -213,7 +213,7 @@ void Keyboard_HID_Task(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
/* Wait until USB device disconnected */
while (USB_IsConnected);
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
break;
}
@ -227,7 +227,7 @@ void Keyboard_HID_Task(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
/* Wait until USB device disconnected */
while (USB_IsConnected);
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
break;
}
@ -257,7 +257,7 @@ void Keyboard_HID_Task(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
/* Wait until USB device disconnected */
while (USB_IsConnected);
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
break;
}