return HIDPARSER_STATUS_INVALID_REPORT_LENGTH;
}
- for(Index = 0; Index < Report->ItemCount; Index++)
+ for (Index = 0; Index < Report->ItemCount; Index++)
{
//
// get report item
ASSERT(ReportItem->ByteOffset < ReportDescriptorLength);
//
- // FIXME: support items with variable bitlength
+ // one extra shift for skipping the prepended report id
//
- ASSERT(ReportItem->BitCount == 16);
- Data = (ReportDescriptor[ReportItem->ByteOffset +1] & 0xFF) | (ReportDescriptor[ReportItem->ByteOffset +2] & 0xFF) << 8;
+ Data = 0;
+ Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset + 1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
//
// shift data
return HIDPARSER_STATUS_INVALID_REPORT_LENGTH;
}
- for(Index = 0; Index < Report->ItemCount; Index++)
+ for (Index = 0; Index < Report->ItemCount; Index++)
{
//
// get report item
// one extra shift for skipping the prepended report id
//
Data = 0;
- Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset +1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
- Data = ReportDescriptor[ReportItem->ByteOffset + 1];
+ Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset + 1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
//
// shift data
//
return CustomerScanCodes[i].ScanCode;
}
-
}
//