Commit 0fdc1a2b authored by Dean Camera's avatar Dean Camera
Browse files

Changed HIDParser to only zero out important values in the Parsed HID Report...

Changed HIDParser to only zero out important values in the Parsed HID Report Item Information structure to save cycles.
parent 113df487
...@@ -46,8 +46,13 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID ...@@ -46,8 +46,13 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID
#endif #endif
HID_CollectionPath_t* CurrCollectionPath = NULL; HID_CollectionPath_t* CurrCollectionPath = NULL;
memset(ParserData, 0x00, sizeof(HID_ReportInfo_t)); ParserData->TotalReportItems = 0;
memset(StateTable, 0x00, sizeof(StateTable)); 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) while (ReportSize)
{ {
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
* - Altered the SCSI commands in the LowLevel Mass Storage Host to save on FLASH space by reducing function calls * - 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 * - 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 * 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> * <b>Fixed:</b>
* - Fixed possible lockup in the CDC device class driver, when the host sends data that is a multiple of the * - Fixed possible lockup in the CDC device class driver, when the host sends data that is a multiple of the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment