/* Submit a USB get HID protocol request for the USB device specified by UsbIo and Interface and return the protocol retrieved in Protocol. If UsbIo is NULL, then ASSERT(). If Protocol is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbGetProtocolRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, OUT UINT8 *Protocol)
/* Submit a USB get HID protocol request for the USB device specified by UsbIo and Interface and return the protocol retrieved in Protocol. If UsbIo is NULL, then ASSERT(). If Protocol is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbGetProtocolRequest(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, OUT UINT8 *Protocol)
{
  UINT32                  Status;
  EFI_STATUS              Result;
  EFI_USB_DEVICE_REQUEST  Request;
  ASSERT (UsbIo != NULL);
  ASSERT (Protocol != NULL);
  Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE;
  Request.Request     = EFI_USB_GET_PROTOCOL_REQUEST;
  Request.Value       = 0;
  Request.Index       = Interface;
  Request.Length      = 1;
  Result = UsbIo->UsbControlTransfer (
                    UsbIo,
                    &Request,
                    EfiUsbDataIn,
                    PcdGet32 (PcdUsbTransferTimeoutValue),
                    Protocol,
                    sizeof (UINT8),
                    &Status
                    );
  return Result;
}