CALLBACK_HID_Device_CreateHIDReport(HIDInterfaceInfo, &ReportID, ReportType, ReportData, &ReportSize);
if (HIDInterfaceInfo->Config.PrevReportINBuffer != NULL)
- memcpy(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportData, HIDInterfaceInfo->Config.PrevReportINBufferSize);
-
+ {
+ memcpy(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportData,
+ HIDInterfaceInfo->Config.PrevReportINBufferSize);
+ }
+
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
Endpoint_ClearSETUP();
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(ReportData, ReportSize);
Endpoint_ClearIN();
-
- CALLBACK_HID_Device_ProcessHIDReport(HIDInterfaceInfo, ReportID, ReportType, ReportData, ReportSize);
+
+ CALLBACK_HID_Device_ProcessHIDReport(HIDInterfaceInfo, ReportID, ReportType,
+ &ReportData[ReportID ? 1 : 0], ReportSize - (ReportID ? 1 : 0));
}
break;