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. --- Projects/MissileLauncher/MissileLauncher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Projects/MissileLauncher') diff --git a/Projects/MissileLauncher/MissileLauncher.c b/Projects/MissileLauncher/MissileLauncher.c index 192ca3340..046c132f0 100644 --- a/Projects/MissileLauncher/MissileLauncher.c +++ b/Projects/MissileLauncher/MissileLauncher.c @@ -318,7 +318,7 @@ void HID_Host_Task(void) LEDs_SetAllLEDs(LEDMASK_USB_ERROR); /* Wait until USB device disconnected */ - while (USB_IsConnected); + USB_HostState = HOST_STATE_WaitForDeviceRemoval; break; } @@ -329,7 +329,7 @@ void HID_Host_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