[HIDPARSE]

- Use report value when report item bitcount > 1
[KBDHID]
- Print raw report
- KBDHID starts to receive normal keys and modifier keys

svn path=/branches/usb-bringup-trunk/; revision=55364
This commit is contained in:
Johannes Anderwald 2012-02-01 10:36:19 +00:00
parent 2cc2771f69
commit 205e63a314
3 changed files with 26 additions and 4 deletions

View file

@ -94,6 +94,15 @@ KbdHid_ReadCompletion(
return STATUS_MORE_PROCESSING_REQUIRED;
}
//
// print out raw report
//
ASSERT(DeviceExtension->ReportLength >= 9);
DPRINT1("[KBDHID] ReadCompletion %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", DeviceExtension->Report[0], DeviceExtension->Report[1], DeviceExtension->Report[2],
DeviceExtension->Report[3], DeviceExtension->Report[4], DeviceExtension->Report[5],
DeviceExtension->Report[6], DeviceExtension->Report[7], DeviceExtension->Report[8]);
/* get current usages */
ButtonLength = DeviceExtension->UsageListLength;
Status = HidP_GetUsagesEx(HidP_Input, HIDP_LINK_COLLECTION_UNSPECIFIED, DeviceExtension->CurrentUsageList, &ButtonLength, DeviceExtension->PreparsedData, DeviceExtension->Report, DeviceExtension->ReportLength);

View file

@ -455,7 +455,20 @@ HidParser_GetUsagesWithReport(
//
// store usage and page
//
UsageAndPage[ItemCount].Usage = (ReportItem->UsageMinimum & 0xFFFF);
if (ReportItem->BitCount == 1)
{
//
// use usage minimum
//
UsageAndPage[ItemCount].Usage =(ReportItem->UsageMinimum & 0xFFFF);
}
else
{
//
// use value from control
//
UsageAndPage[ItemCount].Usage = (USHORT)Data;
}
UsageAndPage[ItemCount].UsagePage = CurrentUsagePage;
}
ItemCount++;
@ -691,13 +704,14 @@ HidParser_TranslateUsage(
//
// invalid lookup or no scan code available
//
DPRINT1("No Scan code for Usage %x\n", Usage);
return HIDPARSER_STATUS_I8042_TRANS_UNKNOWN;
}
//
// FIXME: translate modifier states
//
DPRINT1("Usage %x ScanCode %x\n", Usage, ScanCode);
HidParser_DispatchKey((PCHAR)&ScanCode, KeyAction, InsertCodesProcedure, InsertCodesContext);
//

View file

@ -683,9 +683,8 @@ HidParser_TranslateUsageAndPagesToI8042ScanCodes(
else
{
//
// invalid page
// invalid page / end of usage list page
//
DPRINT1("[HIDPARSE] Error unexpected usage page %x\n", ChangedUsageList[Index].UsagePage);
return HIDP_STATUS_I8042_TRANS_UNKNOWN;
}