X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/def392aca09dd0d5a29c1c390accb44ff76db280..66db760a3338667bfdd02eb24e0e7f1319ca3ec1:/LUFA/Drivers/USB/Class/Common/HIDParser.c?ds=inline diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index c01ceaf78..00100a64a 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -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;