Added new USB_DeviceState variable to keep track of the current Device mode USB state.
[pub/USBasp.git] / Demos / Host / LowLevel / KeyboardHost / KeyboardHost.c
index c2d8dd4..273cd71 100644 (file)
@@ -230,9 +230,6 @@ void Keyboard_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 keyboard protocol to the Boot Protocol */\r
                        USB_ControlRequest = (USB_Request_Header_t)\r
                                {\r
@@ -262,9 +259,9 @@ void Keyboard_HID_Task(void)
 \r
                        puts_P(PSTR("Keyboard Enumerated.\r\n"));\r
 \r
-                       USB_HostState = HOST_STATE_Ready;\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