Fixed compilation error in incomplete BluetoothHost demo.
[pub/USBasp.git] / Demos / Device / LowLevel / GenericHID / GenericHID.c
index a604bbe..f467494 100644 (file)
@@ -94,18 +94,24 @@ void EVENT_USB_Disconnect(void)
  */\r
 void EVENT_USB_ConfigurationChanged(void)\r
 {\r
-       /* Setup Generic IN Report Endpoint */\r
-       Endpoint_ConfigureEndpoint(GENERIC_IN_EPNUM, EP_TYPE_INTERRUPT,\r
-                                      ENDPOINT_DIR_IN, GENERIC_EPSIZE,\r
-                                  ENDPOINT_BANK_SINGLE);\r
-\r
-       /* Setup Generic OUT Report Endpoint */\r
-       Endpoint_ConfigureEndpoint(GENERIC_OUT_EPNUM, EP_TYPE_INTERRUPT,\r
-                                      ENDPOINT_DIR_OUT, GENERIC_EPSIZE,\r
-                                  ENDPOINT_BANK_SINGLE);\r
-\r
        /* Indicate USB connected and ready */\r
        LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
+\r
+       /* Setup Generic IN Report Endpoint */\r
+       if (!(Endpoint_ConfigureEndpoint(GENERIC_IN_EPNUM, EP_TYPE_INTERRUPT,\r
+                                            ENDPOINT_DIR_IN, GENERIC_EPSIZE,\r
+                                        ENDPOINT_BANK_SINGLE)))\r
+       {\r
+               LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
+       }\r
+       \r
+       /* Setup Generic OUT Report Endpoint */\r
+       if (!(Endpoint_ConfigureEndpoint(GENERIC_OUT_EPNUM, EP_TYPE_INTERRUPT,\r
+                                            ENDPOINT_DIR_OUT, GENERIC_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
@@ -164,7 +170,7 @@ void EVENT_USB_UnhandledControlPacket(void)
 \r
 /** Function to process the lest received report from the host.\r
  *\r
- *  \param DataArray  Pointer to a buffer where the last report data is stored\r
+ *  \param[in] DataArray  Pointer to a buffer where the last report data is stored\r
  */\r
 void ProcessGenericHIDReport(uint8_t* DataArray)\r
 {\r
@@ -180,7 +186,7 @@ void ProcessGenericHIDReport(uint8_t* DataArray)
 \r
 /** Function to create the next report to send back to the host at the next reporting interval.\r
  *\r
- *  \param DataArray  Pointer to a buffer where the next report data should be stored\r
+ *  \param[out] DataArray  Pointer to a buffer where the next report data should be stored\r
  */\r
 void CreateGenericHIDReport(uint8_t* DataArray)\r
 {\r