Merge pull request #89 from e-chip/master

Fix incorrect serialization in USB_SetHIDReportItemInfo() function (thanks to e-chip).
pull/1469/head
Dean Camera 8 years ago committed by GitHub
commit 477326edc6

@ -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;

Loading…
Cancel
Save