aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2016-09-28 18:39:55 +1000
committerGitHub <noreply@github.com>2016-09-28 18:39:55 +1000
commit477326edc6bf2875e0c27581141d54118f7b474b (patch)
tree89410fcdef931c6f9a3b515bb4f260623b2979b2
parentdef392aca09dd0d5a29c1c390accb44ff76db280 (diff)
parent66db760a3338667bfdd02eb24e0e7f1319ca3ec1 (diff)
downloadlufa-477326edc6bf2875e0c27581141d54118f7b474b.tar.gz
lufa-477326edc6bf2875e0c27581141d54118f7b474b.tar.bz2
lufa-477326edc6bf2875e0c27581141d54118f7b474b.zip
Merge pull request #89 from e-chip/master
Fix incorrect serialization in USB_SetHIDReportItemInfo() function (thanks to e-chip).
-rw-r--r--LUFA/Drivers/USB/Class/Common/HIDParser.c4
1 files changed, 2 insertions, 2 deletions
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;