/* Submit a USB get HID report request for the USB device specified by UsbIo, Interface, ReportId, and ReportType, and return the report in the buffer specified by Report. If UsbIo is NULL, then ASSERT(). If Report is NULL, then ASSERT(). */
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)
/* Submit a USB get HID report request for the USB device specified by UsbIo, Interface, ReportId, and ReportType, and return the report in the buffer specified by Report. If UsbIo is NULL, then ASSERT(). If Report is NULL, then ASSERT(). */
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)
{
  UINT32                  Status;
  EFI_STATUS              Result;
  EFI_USB_DEVICE_REQUEST  Request;
  ASSERT (UsbIo != NULL);
  ASSERT (Report != NULL);
  Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE;
  Request.Request     = EFI_USB_GET_REPORT_REQUEST;
  Request.Value       = (UINT16)((ReportType << 8) | ReportId);
  Request.Index       = Interface;
  Request.Length      = ReportLen;
  Result = UsbIo->UsbControlTransfer (
                    UsbIo,
                    &Request,
                    EfiUsbDataIn,
                    PcdGet32 (PcdUsbTransferTimeoutValue),
                    Report,
                    ReportLen,
                    &Status
                    );
  return Result;
}