/* Submit a USB set HID report idle request for the USB device specified by UsbIo, Interface, and ReportId, and set the idle rate to the value specified by Duration. If UsbIo is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbSetIdleRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, IN UINT8 ReportId, IN UINT8 Duration)
/* Submit a USB set HID report idle request for the USB device specified by UsbIo, Interface, and ReportId, and set the idle rate to the value specified by Duration. If UsbIo is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbSetIdleRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, IN UINT8 ReportId, IN UINT8 Duration)
{
  UINT32                  Status;
  EFI_STATUS              Result;
  EFI_USB_DEVICE_REQUEST  Request;
  ASSERT (UsbIo != NULL);
  Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE;
  Request.Request     = EFI_USB_SET_IDLE_REQUEST;
  Request.Value       = (UINT16)((Duration << 8) | ReportId);
  Request.Index       = Interface;
  Request.Length      = 0;
  Result = UsbIo->UsbControlTransfer (
                    UsbIo,
                    &Request,
                    EfiUsbNoData,
                    PcdGet32 (PcdUsbTransferTimeoutValue),
                    NULL,
                    0,
                    &Status
                    );
  return Result;
}