From bef20db2b251b7aee94e7cfed6d3186fcd94339d Mon Sep 17 00:00:00 2001 From: Dean 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. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@642 d5102386-fcda-11dd-9fdb-3debd5008f28 --- Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Demos/Host/LowLevel/MouseHostWithParser') diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c index d7a94710..1e931232 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c @@ -149,7 +149,7 @@ void Mouse_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 Mouse_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 Mouse_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