mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Fixed USB_GetHIDReportSize() returning the number of bits in the specified report instead of bytes.
Moved the USB_GetHIDReportItemInfo() calls into the main report item passing loop in the *HostWithParser demos - it is fast enough not to effect performance, and avoids duplicate code. Make Webserver project report the LUFA version as part of the HTTP header.
This commit is contained in:
@@ -340,8 +340,10 @@ uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData, const uint8_t
|
||||
{
|
||||
for (uint8_t i = 0; i < HID_MAX_REPORT_IDS; i++)
|
||||
{
|
||||
uint16_t ReportSizeBits = ParserData->ReportIDSizes[i].ReportSizeBits[ReportType];
|
||||
|
||||
if (ParserData->ReportIDSizes[i].ReportID == ReportID)
|
||||
return ParserData->ReportIDSizes[i].ReportSizeBits[ReportType];
|
||||
return ((ReportSizeBits >> 3) + ((ReportSizeBits & 0x07) ? 1 : 0));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user