From ad9225bdd34230e13333be5d4c29e4f96abc9b2b Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 4 Jan 2018 20:12:48 +1100 Subject: Update copyrights for 2018. --- LUFA/Drivers/USB/Class/Common/HIDParser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'LUFA/Drivers/USB/Class/Common/HIDParser.c') diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index 62f10c4e2..04fd7609e 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, 2018. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2018 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 -- cgit v1.2.3 From 6447bda0efad694b06b18c4cf9182482be427ef8 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 17 Jun 2018 15:39:20 +1000 Subject: Fixed HID report parser corruption when parsing PUSH and POP report item elements. --- LUFA/Drivers/USB/Class/Common/HIDParser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'LUFA/Drivers/USB/Class/Common/HIDParser.c') diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index 04fd7609e..87eaf7c67 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -92,7 +92,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, memcpy((CurrStateTable + 1), CurrStateTable, - sizeof(HID_ReportItem_t)); + sizeof(HID_StateTable_t)); CurrStateTable++; break; -- cgit v1.2.3 From 10163f4607dda747cbcd7ce89c0ce9ce477b3ec6 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 9 Dec 2018 13:31:04 +1100 Subject: Fix HID report parser incorrectly decoding 32-bit USAGE elements. --- LUFA/Drivers/USB/Class/Common/HIDParser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'LUFA/Drivers/USB/Class/Common/HIDParser.c') diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index 87eaf7c67..08f894e6b 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -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; -- cgit v1.2.3 From 101ed6b74e0d6549e53a7c8216147af37ffc70df Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 8 Jan 2019 19:59:41 +1100 Subject: Documentation: Update copyrights to 2019. --- LUFA/Drivers/USB/Class/Common/HIDParser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'LUFA/Drivers/USB/Class/Common/HIDParser.c') diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index 08f894e6b..fe2ebc1d5 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, 2018. + Copyright (C) Dean Camera, 2019. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2018 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 -- cgit v1.2.3 From 7bb19fb19c536ae0a43edf383266bc22efd78561 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 3 Jul 2019 07:40:48 -0700 Subject: Fix issue with gcc 8.10 compiler (qmk#2914) --- LUFA/Drivers/USB/Class/Common/HIDParser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'LUFA/Drivers/USB/Class/Common/HIDParser.c') diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index fe2ebc1d5..18c345655 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -90,7 +90,7 @@ 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_StateTable_t)); @@ -386,4 +386,3 @@ uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData, return 0; } - -- cgit v1.2.3