Corrected new Pipe_IsEndpointBound() function.
[pub/USBasp.git] / Demos / Host / ClassDriver / CDCHost / CDCHost.c
index 65f490f..7881d3c 100644 (file)
@@ -54,6 +54,7 @@ USB_ClassInfo_CDC_Host_t VirtualSerial_CDC_Interface =
                                // Leave all state values to their defaults                     \r
                        }\r
        };\r
+\r
        \r
 /** Main program entry point. This routine configures the hardware required by the application, then\r
  *  starts the scheduler to run the application tasks.\r
@@ -71,7 +72,9 @@ int main(void)
                switch (USB_HostState)\r
                {\r
                        case HOST_STATE_Addressed:\r
-                               if (!(CDC_Host_ConfigurePipes(&VirtualSerial_CDC_Interface)))\r
+                               LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);\r
+                       \r
+                               if (CDC_Host_ConfigurePipes(&VirtualSerial_CDC_Interface, 512) != CDC_ENUMERROR_NoError)\r
                                {\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
@@ -88,9 +91,6 @@ int main(void)
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
                        case HOST_STATE_Configured:\r
-                               USB_HostState = HOST_STATE_Ready;\r
-                               break;\r
-                       case HOST_STATE_Ready:\r
                                break;\r
                }\r
        \r