diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-08-11 11:19:22 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-08-11 11:19:22 +0000 |
commit | df29aa37c05ff0251bd17f54c750bac56d7279b7 (patch) | |
tree | 257159f76c4d94e65771bb86abcbde6538e3c03c /LUFA/Drivers/USB/Class/Host/HIDParser.c | |
parent | a7ade9f28dac6b42e2a85823ec80d5539c176667 (diff) | |
download | lufa-df29aa37c05ff0251bd17f54c750bac56d7279b7.tar.gz lufa-df29aa37c05ff0251bd17f54c750bac56d7279b7.tar.bz2 lufa-df29aa37c05ff0251bd17f54c750bac56d7279b7.zip |
Added flag to the HID report parser to indicate if a device has multiple reports.
SetIdle requests to the HID device driver with a 0 idle period (send changes only) now only affect the requested HID interface within the device, not all HID interfaces.
Apply correct fix to the HID report parser for PUSH items - current HID item attribute stack was being copied in the wrong direction.
Fixed HID report parser not resetting the FEATURE item count when a REPORT ID item is encountered.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Host/HIDParser.c')
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/HIDParser.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/HIDParser.c b/LUFA/Drivers/USB/Class/Host/HIDParser.c index 7ec003f27..fdce8e577 100644 --- a/LUFA/Drivers/USB/Class/Host/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Host/HIDParser.c @@ -81,8 +81,8 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID if (CurrStateTable == &StateTable[HID_STATETABLE_STACK_DEPTH - 1])
return HID_PARSE_HIDStackOverflow;
- memcpy(CurrStateTable,
- (CurrStateTable + 1),
+ memcpy((CurrStateTable + 1),
+ CurrStateTable,
sizeof(HID_ReportItem_t));
CurrStateTable++;
@@ -122,8 +122,13 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID break;
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID):
CurrStateTable->ReportID = ReportItemData;
- BitOffsetIn = 0;
- BitOffsetOut = 0;
+ ParserData->UsingMultipleReports = true;
+ BitOffsetIn = 0;
+ BitOffsetOut = 0;
+
+ #if defined(HID_ENABLE_FEATURE_PROCESSING)
+ BitOffsetFeature = 0;
+ #endif
break;
case (TYPE_LOCAL | TAG_LOCAL_USAGE):
if (UsageStackSize == HID_USAGE_STACK_DEPTH)
|