From 0fcbe22c9eb68f5769bf57469e1bcf9b340d0ae3 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 13 Jul 2009 05:34:43 +0000 Subject: 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. --- Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c') diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c index 4e78b0de9..2ef15e7b8 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -148,7 +148,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; } @@ -163,7 +163,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; } @@ -182,7 +182,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; } -- cgit v1.2.3