Fixed HID Parser's largest report size bit count not including the size of the last parsed report item.
Fixed HID host driver's largest HID report size count corrupt when the number of report bits exceeds 255.
This commit is contained in:
parent
d881e0cbf6
commit
99ff27e403
4 changed files with 5 additions and 3 deletions
|
@ -255,8 +255,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
|
|||
|
||||
CurrReportIDInfo->ReportSizeBits[NewReportItem.ItemType] += CurrStateTable->Attributes.BitSize;
|
||||
|
||||
if (ParserData->LargestReportSizeBits < NewReportItem.BitOffset)
|
||||
ParserData->LargestReportSizeBits = NewReportItem.BitOffset;
|
||||
ParserData->LargestReportSizeBits = MAX(ParserData->LargestReportSizeBits, CurrReportIDInfo->ReportSizeBits[NewReportItem.ItemType]);
|
||||
|
||||
if (ParserData->TotalReportItems == HID_MAX_REPORTITEMS)
|
||||
return HID_PARSE_InsufficientReportItems;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue