projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AVRISP-MKII Clone: Add length checks to SPI Multi and XPROG read/write commands.
[pub/lufa.git]
/
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
c01ceaf
..
3456302
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Common/HIDParser.c
+++ b/
LUFA/Drivers/USB/Class/Common/HIDParser.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 20
16
.
+ Copyright (C) Dean Camera, 20
21
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 20
16
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 20
21
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
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-92,7
+92,7
@@
uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
memcpy((CurrStateTable + 1),
CurrStateTable,
memcpy((CurrStateTable + 1),
CurrStateTable,
- sizeof(HID_
ReportItem
_t));
+ sizeof(HID_
StateTable
_t));
CurrStateTable++;
break;
CurrStateTable++;
break;
@@
-105,9
+105,6
@@
uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
break;
case HID_RI_USAGE_PAGE(0):
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;
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 (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;
UsageList[UsageListSize++] = ReportItemData;
break;
@@
-364,8
+364,8
@@
void USB_SetHIDReportItemInfo(uint8_t* ReportData,
while (DataBitsRem--)
{
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;
CurrentBit++;
BitMask <<= 1;