57 ASSERT (UsbIo !=
NULL);
58 ASSERT (HidDescriptor !=
NULL);
60 Request.RequestType = USB_HID_GET_DESCRIPTOR_REQ_TYPE;
61 Request.Request = USB_REQ_GET_DESCRIPTOR;
62 Request.Value = (UINT16)(USB_DESC_TYPE_HID << 8);
63 Request.Index = Interface;
66 Result = UsbIo->UsbControlTransfer (
70 PcdGet32 (PcdUsbTransferTimeoutValue),
105 IN UINT16 DescriptorLength,
106 OUT UINT8 *DescriptorBuffer
113 ASSERT (UsbIo !=
NULL);
114 ASSERT (DescriptorBuffer !=
NULL);
119 Request.RequestType = USB_HID_GET_DESCRIPTOR_REQ_TYPE;
120 Request.Request = USB_REQ_GET_DESCRIPTOR;
121 Request.Value = (UINT16)(USB_DESC_TYPE_REPORT << 8);
122 Request.Index = Interface;
123 Request.Length = DescriptorLength;
125 Result = UsbIo->UsbControlTransfer (
129 PcdGet32 (PcdUsbTransferTimeoutValue),
167 ASSERT (UsbIo !=
NULL);
168 ASSERT (Protocol !=
NULL);
173 Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE;
174 Request.Request = EFI_USB_GET_PROTOCOL_REQUEST;
176 Request.Index = Interface;
179 Result = UsbIo->UsbControlTransfer (
183 PcdGet32 (PcdUsbTransferTimeoutValue),
220 ASSERT (UsbIo !=
NULL);
225 Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE;
226 Request.Request = EFI_USB_SET_PROTOCOL_REQUEST;
227 Request.Value = Protocol;
228 Request.Index = Interface;
231 Result = UsbIo->UsbControlTransfer (
235 PcdGet32 (PcdUsbTransferTimeoutValue),
273 ASSERT (UsbIo !=
NULL);
277 Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE;
278 Request.Request = EFI_USB_SET_IDLE_REQUEST;
279 Request.Value = (UINT16)((Duration << 8) | ReportId);
280 Request.Index = Interface;
283 Result = UsbIo->UsbControlTransfer (
287 PcdGet32 (PcdUsbTransferTimeoutValue),
326 ASSERT (UsbIo !=
NULL);
327 ASSERT (Duration !=
NULL);
331 Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE;
332 Request.Request = EFI_USB_GET_IDLE_REQUEST;
333 Request.Value = ReportId;
334 Request.Index = Interface;
337 Result = UsbIo->UsbControlTransfer (
341 PcdGet32 (PcdUsbTransferTimeoutValue),
386 ASSERT (UsbIo !=
NULL);
387 ASSERT (Report !=
NULL);
392 Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE;
393 Request.Request = EFI_USB_SET_REPORT_REQUEST;
394 Request.Value = (UINT16)((ReportType << 8) | ReportId);
395 Request.Index = Interface;
396 Request.Length = ReportLen;
398 Result = UsbIo->UsbControlTransfer (
402 PcdGet32 (PcdUsbTransferTimeoutValue),
450 ASSERT (UsbIo !=
NULL);
451 ASSERT (Report !=
NULL);
456 Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE;
457 Request.Request = EFI_USB_GET_REPORT_REQUEST;
458 Request.Value = (UINT16)((ReportType << 8) | ReportId);
459 Request.Index = Interface;
460 Request.Length = ReportLen;
462 Result = UsbIo->UsbControlTransfer (
466 PcdGet32 (PcdUsbTransferTimeoutValue),
EFI_STATUS EFIAPI UsbGetReportDescriptor(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, IN UINT16 DescriptorLength, OUT UINT8 *DescriptorBuffer)
EFI_STATUS EFIAPI UsbSetReportRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, IN UINT8 ReportId, IN UINT8 ReportType, IN UINT16 ReportLen, IN UINT8 *Report)
EFI_STATUS EFIAPI UsbSetProtocolRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, IN UINT8 Protocol)
EFI_STATUS EFIAPI UsbGetReportRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, IN UINT8 ReportId, IN UINT8 ReportType, IN UINT16 ReportLen, OUT UINT8 *Report)
EFI_STATUS EFIAPI UsbGetProtocolRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, OUT UINT8 *Protocol)
EFI_STATUS EFIAPI UsbSetIdleRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, IN UINT8 ReportId, IN UINT8 Duration)
EFI_STATUS EFIAPI UsbGetHidDescriptor(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor)
EFI_STATUS EFIAPI UsbGetIdleRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, IN UINT8 ReportId, OUT UINT8 *Duration)
#define PcdGet32(TokenName)
struct hid_descriptor EFI_USB_HID_DESCRIPTOR