aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-09-22 08:07:48 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-09-22 08:07:48 +0000
commit849b9535e7f4ca84aa909cfb9e985ae29f14be72 (patch)
treee111d99889ec320913fcfb3ff9c695dc31c740b4 /LUFA/Drivers/USB/Class
parent576f40f5aec3d7e48ed949fd24494b6cfb3ec93f (diff)
downloadlufa-849b9535e7f4ca84aa909cfb9e985ae29f14be72.tar.gz
lufa-849b9535e7f4ca84aa909cfb9e985ae29f14be72.tar.bz2
lufa-849b9535e7f4ca84aa909cfb9e985ae29f14be72.zip
Add new error condition to the HID Report Parser for when a report is parsed but no unfiltered items are encountered (i.e. nothing of interest in the device report). Make all host HID "WithParser" demos print the new error condition.
Diffstat (limited to 'LUFA/Drivers/USB/Class')
-rw-r--r--LUFA/Drivers/USB/Class/Host/HIDParser.c3
-rw-r--r--LUFA/Drivers/USB/Class/Host/HIDParser.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/HIDParser.c b/LUFA/Drivers/USB/Class/Host/HIDParser.c
index 450f6afb0..4d433e56e 100644
--- a/LUFA/Drivers/USB/Class/Host/HIDParser.c
+++ b/LUFA/Drivers/USB/Class/Host/HIDParser.c
@@ -296,6 +296,9 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID
}
}
+ if (!(ParserData->TotalReportItems))
+ return HID_PARSE_NoUnfilteredReportItems;
+
return HID_PARSE_Successful;
}
diff --git a/LUFA/Drivers/USB/Class/Host/HIDParser.h b/LUFA/Drivers/USB/Class/Host/HIDParser.h
index 2ee3f7032..4322c5106 100644
--- a/LUFA/Drivers/USB/Class/Host/HIDParser.h
+++ b/LUFA/Drivers/USB/Class/Host/HIDParser.h
@@ -144,6 +144,7 @@
HID_PARSE_InsufficientCollectionPaths = 5, /**< More than \ref HID_MAX_COLLECTIONS collections in the report. */
HID_PARSE_UsageStackOverflow = 6, /**< More than \ref HID_USAGE_STACK_DEPTH usages listed in a row. */
HID_PARSE_InsufficientReportIDItems = 7, /**< More than \ref HID_MAX_REPORT_IDS report IDs in the device. */
+ HID_PARSE_NoUnfilteredReportItems = 8, /**< All report items from the device were filtered by the filtering callback routine. */
};
/* Type Defines: */