Added multiple Report ID support to the HID class driver. Removed OUT endpoint suppor...
[pub/USBasp.git] / Demos / Device / Keyboard / Keyboard.c
index 923dd71..bebad12 100644 (file)
@@ -48,9 +48,6 @@ USB_ClassInfo_HID_t Keyboard_HID_Interface =
         .ReportINEndpointNumber  = KEYBOARD_EPNUM,\r
         .ReportINEndpointSize    = KEYBOARD_EPSIZE,\r
 \r
         .ReportINEndpointNumber  = KEYBOARD_EPNUM,\r
         .ReportINEndpointSize    = KEYBOARD_EPSIZE,\r
 \r
-        .ReportOUTEndpointNumber = KEYBOARD_LEDS_EPNUM,\r
-        .ReportOUTEndpointSize   = KEYBOARD_EPSIZE,\r
-        \r
                .ReportINBufferSize      = sizeof(USB_KeyboardReport_Data_t),\r
 \r
         .IdleCount               = 500,\r
                .ReportINBufferSize      = sizeof(USB_KeyboardReport_Data_t),\r
 \r
         .IdleCount               = 500,\r
@@ -136,7 +133,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
  *\r
  *  \return Number of bytes written in the report (or zero if no report is to be sent\r
  */\r
  *\r
  *  \return Number of bytes written in the report (or zero if no report is to be sent\r
  */\r
-uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, void* ReportData)\r
+uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t* ReportID, void* ReportData)\r
 {\r
     USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;\r
     \r
 {\r
     USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;\r
     \r
@@ -168,7 +165,8 @@ uint16_t CALLBACK_USB_HID_CreateNextHIDReport(USB_ClassInfo_HID_t* HIDInterfaceI
  *  \param ReportData  Pointer to a buffer where the created report has been stored\r
  *  \param ReportSize  Size in bytes of the received HID report\r
  */\r
  *  \param ReportData  Pointer to a buffer where the created report has been stored\r
  *  \param ReportSize  Size in bytes of the received HID report\r
  */\r
-void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, void* ReportData, uint16_t ReportSize)\r
+void CALLBACK_USB_HID_ProcessReceivedHIDReport(USB_ClassInfo_HID_t* HIDInterfaceInfo, uint8_t ReportID,\r
+                                               void* ReportData, uint16_t ReportSize)\r
 {\r
     uint8_t  LEDMask   = LEDS_NO_LEDS;\r
     uint8_t* LEDReport = (uint8_t*)ReportData;\r
 {\r
     uint8_t  LEDMask   = LEDS_NO_LEDS;\r
     uint8_t* LEDReport = (uint8_t*)ReportData;\r