Changeset 37388 in vbox for trunk/src/VBox/Devices/Input/UsbKbd.cpp
- Timestamp:
- Jun 8, 2011 3:49:55 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72173
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/UsbKbd.cpp
r36445 r37388 43 43 /** @name USB HID specific descriptor types 44 44 * @{ */ 45 #define DT_IF_HID_DESCRIPTOR 0x21 45 46 #define DT_IF_HID_REPORT 0x22 46 47 /** @} */ … … 318 319 /* .MaxPower = */ 50 /* 100mA */ 319 320 }, 320 NULL, 321 &g_aUsbHidInterfaces[0] 321 NULL, /* pvMore */ 322 &g_aUsbHidInterfaces[0], 323 NULL /* pvOriginal */ 322 324 }; 323 325 … … 904 906 AssertReturn(u8HidCode <= VBOX_USB_MAX_USAGE_CODE, VERR_INTERNAL_ERROR); 905 907 906 Log RelFlowFunc(("key %s: 0x%x->0x%x\n",908 LogFlowFunc(("key %s: 0x%x->0x%x\n", 907 909 fKeyDown ? "down" : "up", u8KeyCode, u8HidCode)); 908 910 … … 1084 1086 switch (pSetup->wValue >> 8) 1085 1087 { 1088 case DT_IF_HID_DESCRIPTOR: 1089 { 1090 uint32_t cbCopy; 1091 1092 /* Returned data is written after the setup message. */ 1093 cbCopy = pUrb->cbData - sizeof(*pSetup); 1094 cbCopy = RT_MIN(cbCopy, sizeof(g_UsbHidIfHidDesc)); 1095 Log(("usbHidKbd: GET_DESCRIPTOR DT_IF_HID_DESCRIPTOR wValue=%#x wIndex=%#x cbCopy=%#x\n", pSetup->wValue, pSetup->wIndex, cbCopy)); 1096 memcpy(&pUrb->abData[sizeof(*pSetup)], &g_UsbHidIfHidDesc, cbCopy); 1097 return usbHidCompleteOk(pThis, pUrb, cbCopy + sizeof(*pSetup)); 1098 } 1099 1086 1100 case DT_IF_HID_REPORT: 1101 { 1087 1102 uint32_t cbCopy; 1088 1103 … … 1093 1108 memcpy(&pUrb->abData[sizeof(*pSetup)], &g_UsbHidReportDesc, cbCopy); 1094 1109 return usbHidCompleteOk(pThis, pUrb, cbCopy + sizeof(*pSetup)); 1110 } 1111 1095 1112 default: 1096 1113 Log(("usbHid: GET_DESCRIPTOR, huh? wValue=%#x wIndex=%#x\n", pSetup->wValue, pSetup->wIndex));
Note:
See TracChangeset
for help on using the changeset viewer.