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:
@@ -421,7 +421,7 @@ uint8_t HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceI
|
||||
return HID_ERROR_LOGICAL | ErrorCode;
|
||||
}
|
||||
|
||||
uint8_t LargestReportSizeBits = HIDInterfaceInfo->Config.HIDParserData->LargestReportSizeBits;
|
||||
uint16_t LargestReportSizeBits = HIDInterfaceInfo->Config.HIDParserData->LargestReportSizeBits;
|
||||
HIDInterfaceInfo->State.LargestReportSize = (LargestReportSizeBits >> 3) + ((LargestReportSizeBits & 0x07) != 0);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user