Fixed compilation error in incomplete BluetoothHost demo.
[pub/USBasp.git] / Demos / Device / LowLevel / Mouse / Mouse.c
index 4221536..c0989c5 100644 (file)
@@ -119,13 +119,16 @@ void EVENT_USB_Disconnect(void)
  */ \r
 void EVENT_USB_ConfigurationChanged(void)\r
 {\r
-       /* Setup Mouse Report Endpoint */\r
-       Endpoint_ConfigureEndpoint(MOUSE_EPNUM, EP_TYPE_INTERRUPT,\r
-                                      ENDPOINT_DIR_IN, MOUSE_EPSIZE,\r
-                                  ENDPOINT_BANK_SINGLE);\r
-\r
        /* Indicate USB connected and ready */\r
        LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+       \r
+       /* Setup Mouse Report Endpoint */\r
+       if (!(Endpoint_ConfigureEndpoint(MOUSE_EPNUM, EP_TYPE_INTERRUPT,\r
+                                            ENDPOINT_DIR_IN, MOUSE_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\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
@@ -235,7 +238,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
 \r
 /** Fills the given HID report data structure with the next HID report to send to the host.\r
  *\r
- *  \param ReportData  Pointer to a HID report data structure to be filled\r
+ *  \param[out] ReportData  Pointer to a HID report data structure to be filled\r
  */\r
 void CreateMouseReport(USB_MouseReport_Data_t* ReportData)\r
 {\r