Some minor whitespace corrections.
[pub/USBasp.git] / Demos / Device / LowLevel / AudioInput / AudioInput.c
index 7757ef1..50e7f4d 100644 (file)
@@ -109,13 +109,16 @@ void EVENT_USB_Disconnect(void)
  */\r
 void EVENT_USB_ConfigurationChanged(void)\r
 {\r
-       /* Setup audio stream endpoint */\r
-       Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPNUM, EP_TYPE_ISOCHRONOUS,\r
-                                      ENDPOINT_DIR_IN, AUDIO_STREAM_EPSIZE,\r
-                                  ENDPOINT_BANK_DOUBLE);\r
-\r
        /* Indicate USB connected and ready */\r
        LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+\r
+       /* Setup audio stream endpoint */\r
+       if (!(Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPNUM, EP_TYPE_ISOCHRONOUS,\r
+                                            ENDPOINT_DIR_IN, AUDIO_STREAM_EPSIZE,\r
+                                        ENDPOINT_BANK_DOUBLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
 }\r
 \r
 /** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific\r