X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b71ff7c8cd68209a74c8690f4d190cc634ef8fb3..59ed10273c4f37079564d08a51bea2af1c10b96b:/Demos/Device/ClassDriver/GenericHID/GenericHID.c?ds=sidebyside diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.c b/Demos/Device/ClassDriver/GenericHID/GenericHID.c index c27558b9e..7ff886e73 100644 --- a/Demos/Device/ClassDriver/GenericHID/GenericHID.c +++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.c @@ -42,9 +42,9 @@ uint8_t PrevHIDReportBuffer[GENERIC_REPORT_SIZE]; /** Structure to contain reports from the host, so that they can be echoed back upon request */ struct { - uint8_t ReportID; + uint8_t ReportID; uint16_t ReportSize; - uint8_t ReportData[GENERIC_REPORT_SIZE]; + uint8_t ReportData[GENERIC_REPORT_SIZE]; } HIDReportEcho; /** LUFA HID Class driver interface configuration and state information. This structure is @@ -55,13 +55,14 @@ USB_ClassInfo_HID_Device_t Generic_HID_Interface = { .Config = { - .InterfaceNumber = 0, + .InterfaceNumber = 0, - .ReportINEndpointNumber = GENERIC_IN_EPNUM, - .ReportINEndpointSize = GENERIC_EPSIZE, + .ReportINEndpointNumber = GENERIC_IN_EPNUM, + .ReportINEndpointSize = GENERIC_EPSIZE, + .ReportINEndpointDoubleBank = false, - .PrevReportINBuffer = PrevHIDReportBuffer, - .PrevReportINBufferSize = sizeof(PrevHIDReportBuffer), + .PrevReportINBuffer = PrevHIDReportBuffer, + .PrevReportINBufferSize = sizeof(PrevHIDReportBuffer), }, }; @@ -141,7 +142,7 @@ void EVENT_USB_Device_StartOfFrame(void) * \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent */ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, - void* ReportData, uint16_t* ReportSize) + const uint8_t ReportType, void* ReportData, uint16_t* ReportSize) { if (HIDReportEcho.ReportID) *ReportID = HIDReportEcho.ReportID;