Added new USB_DeviceState variable to keep track of the current Device mode USB state.
[pub/lufa.git] / Demos / Host / LowLevel / PrinterHost / PrinterHost.c
index 3b145a6..bbda0c2 100644 (file)
@@ -195,9 +195,6 @@ void USB_Printer_Host(void)
                                }\r
                        }\r
                        \r
-                       USB_HostState = HOST_STATE_Configured;\r
-                       break;\r
-               case HOST_STATE_Configured:\r
                        puts_P(PSTR("Retrieving Device ID...\r\n"));\r
                \r
                        char DeviceIDString[256];\r
@@ -217,10 +214,10 @@ void USB_Printer_Host(void)
                        printf_P(PSTR("Printer Device ID: %s\r\n"), DeviceIDString);\r
 \r
                        puts_P(PSTR("Printer 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
                        /* Indicate device busy via the status LEDs */\r
                        LEDs_SetAllLEDs(LEDMASK_USB_BUSY);\r
                \r