Fix USB_SetHIDReportItemInfo() function.

Bits applying loop worked incorrect on large reports. Seems to me like a
copy/paste problem from USB_GetHIDReportItemInfo().
This commit is contained in:
e-chip 2016-09-28 14:12:33 +06:00
parent def392aca0
commit 66db760a33

View File

@ -364,8 +364,8 @@ void USB_SetHIDReportItemInfo(uint8_t* ReportData,
while (DataBitsRem--)
{
if (ReportItem->Value & (1 << (CurrentBit % 8)))
ReportData[CurrentBit / 8] |= BitMask;
if (ReportItem->Value & BitMask)
ReportData[CurrentBit / 8] |= (1 << (CurrentBit % 8));
CurrentBit++;
BitMask <<= 1;