Added new USB_DeviceState variable to keep track of the current Device mode USB state.
[pub/USBasp.git] / Demos / Host / LowLevel / MouseHostWithParser / MouseHostWithParser.c
index 42865e5..63fce0d 100644 (file)
@@ -166,9 +166,6 @@ void Mouse_HID_Task(void)
                                break;\r
                        }\r
                        \r
                                break;\r
                        }\r
                        \r
-                       USB_HostState = HOST_STATE_Configured;\r
-                       break;\r
-               case HOST_STATE_Configured:\r
                        puts_P(PSTR("Processing HID Report.\r\n"));\r
 \r
                        /* Get and process the device's first HID report descriptor */\r
                        puts_P(PSTR("Processing HID Report.\r\n"));\r
 \r
                        /* Get and process the device's first HID report descriptor */\r
@@ -186,10 +183,10 @@ void Mouse_HID_Task(void)
                        }\r
 \r
                        puts_P(PSTR("Mouse Enumerated.\r\n"));\r
                        }\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
                        break;\r
-               case HOST_STATE_Ready:\r
+               case HOST_STATE_Configured:\r
                        /* Select and unfreeze mouse data pipe */\r
                        Pipe_SelectPipe(MOUSE_DATAPIPE);        \r
                        Pipe_Unfreeze();\r
                        /* Select and unfreeze mouse data pipe */\r
                        Pipe_SelectPipe(MOUSE_DATAPIPE);        \r
                        Pipe_Unfreeze();\r