Added new USB_DeviceState variable to keep track of the current Device mode USB state.
[pub/lufa.git] / Demos / Host / LowLevel / MouseHost / MouseHost.c
index 5340aa1..b98f4bf 100644 (file)
@@ -226,9 +226,6 @@ void Mouse_HID_Task(void)
                                break;\r
                        }\r
                        \r
-                       USB_HostState = HOST_STATE_Configured;\r
-                       break;\r
-               case HOST_STATE_Configured:\r
                        /* HID class request to set the mouse protocol to the Boot Protocol */\r
                        USB_ControlRequest = (USB_Request_Header_t)\r
                                {\r
@@ -257,10 +254,10 @@ void Mouse_HID_Task(void)
                        }\r
 \r
                        puts_P(PSTR("Mouse Enumerated.\r\n"));\r
-                       \r
-                       USB_HostState = HOST_STATE_Ready;\r
+\r
+                       USB_HostState = HOST_STATE_Configured;\r
                        break;\r
-               case HOST_STATE_Ready:\r
+               case HOST_STATE_Configured:\r
                        /* If a report has been received, read and process it */\r
                        ReadNextReport();\r
 \r