diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2019-07-07 10:59:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-07 10:59:58 -0700 |
commit | 04a7f66421ac141a8927491fa61e4f8e425accad (patch) | |
tree | 027bafce1cd12c31e84a758bea24d5fdb78226cb /LUFA/Drivers/USB/Class/Common/HIDParser.c | |
parent | d0fd80affba97b37eb00c650e87cb5982a4f260e (diff) | |
parent | 57edb9b0976fad82bfd0384b16c6c3269e0d19ce (diff) | |
download | lufa-04a7f66421ac141a8927491fa61e4f8e425accad.tar.gz lufa-04a7f66421ac141a8927491fa61e4f8e425accad.tar.bz2 lufa-04a7f66421ac141a8927491fa61e4f8e425accad.zip |
Merge pull request #2 from drashna/master
Update LUFA repo from upstream
Diffstat (limited to 'LUFA/Drivers/USB/Class/Common/HIDParser.c')
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/HIDParser.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index 62f10c4e2..18c345655 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2017. + Copyright (C) Dean Camera, 2019. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2019 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -90,9 +90,9 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, if (CurrStateTable == &StateTable[HID_STATETABLE_STACK_DEPTH - 1]) return HID_PARSE_HIDStackOverflow; - memcpy((CurrStateTable + 1), + memmove((CurrStateTable + 1), CurrStateTable, - sizeof(HID_ReportItem_t)); + sizeof(HID_StateTable_t)); CurrStateTable++; break; @@ -105,9 +105,6 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, break; case HID_RI_USAGE_PAGE(0): - if ((HIDReportItem & HID_RI_DATA_SIZE_MASK) == HID_RI_DATA_BITS_32) - CurrStateTable->Attributes.Usage.Page = (ReportItemData >> 16); - CurrStateTable->Attributes.Usage.Page = ReportItemData; break; @@ -178,6 +175,9 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, if (UsageListSize == HID_USAGE_STACK_DEPTH) return HID_PARSE_UsageListOverflow; + if ((HIDReportItem & HID_RI_DATA_SIZE_MASK) == HID_RI_DATA_BITS_32) + CurrStateTable->Attributes.Usage.Page = (ReportItemData >> 16); + UsageList[UsageListSize++] = ReportItemData; break; @@ -386,4 +386,3 @@ uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData, return 0; } - |