aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-09-01 15:46:46 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-09-01 15:46:46 +0000
commit0fdc1a2bc66f97048b94b967e80cd294189fca62 (patch)
tree42ff402ed95449fe8b1c1417eed14603fef84a49
parent113df4878b305759df30f4f0d434830fba3fc57f (diff)
downloadlufa-0fdc1a2bc66f97048b94b967e80cd294189fca62.tar.gz
lufa-0fdc1a2bc66f97048b94b967e80cd294189fca62.tar.bz2
lufa-0fdc1a2bc66f97048b94b967e80cd294189fca62.zip
Changed HIDParser to only zero out important values in the Parsed HID Report Item Information structure to save cycles.
-rw-r--r--LUFA/Drivers/USB/Class/Host/HIDParser.c9
-rw-r--r--LUFA/ManPages/ChangeLog.txt1
2 files changed, 8 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/HIDParser.c b/LUFA/Drivers/USB/Class/Host/HIDParser.c
index 3fbad6508..241e17a05 100644
--- a/LUFA/Drivers/USB/Class/Host/HIDParser.c
+++ b/LUFA/Drivers/USB/Class/Host/HIDParser.c
@@ -46,8 +46,13 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID
#endif
HID_CollectionPath_t* CurrCollectionPath = NULL;
- memset(ParserData, 0x00, sizeof(HID_ReportInfo_t));
- memset(StateTable, 0x00, sizeof(StateTable));
+ ParserData->TotalReportItems = 0;
+ ParserData->UsingMultipleReports = false;
+
+ for (uint8_t CurrCollection = 0; CurrCollection < HID_MAX_COLLECTIONS; CurrCollection++)
+ ParserData->CollectionPaths[CurrCollection].Parent = NULL;
+
+ memset(&StateTable[0], 0x00, sizeof(HID_StateTable_t));
while (ReportSize)
{
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt
index d62a31cc8..d42ad45e4 100644
--- a/LUFA/ManPages/ChangeLog.txt
+++ b/LUFA/ManPages/ChangeLog.txt
@@ -31,6 +31,7 @@
* - Altered the SCSI commands in the LowLevel Mass Storage Host to save on FLASH space by reducing function calls
* - Changed the parameters and behaviour of the USB_GetDeviceConfigDescriptor() function so that it now performs size checks
* and data validations internally, to simplify user code
+ * - Changed HIDParser to only zero out important values in the Parsed HID Report Item Information structure to save cycles
*
* <b>Fixed:</b>
* - Fixed possible lockup in the CDC device class driver, when the host sends data that is a multiple of the