/* Submit a USB get interface request for the USB device specified by UsbIo, and Interface, and place the result in the buffer specified by AlternateSetting. The status of the transfer is returned in Status. If UsbIo is NULL, then ASSERT(). If AlternateSetting is NULL, then ASSERT(). If Status is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbGetInterface(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT16 Interface, OUT UINT16 *AlternateSetting, OUT UINT32 *Status)
/* Submit a USB get interface request for the USB device specified by UsbIo, and Interface, and place the result in the buffer specified by AlternateSetting. The status of the transfer is returned in Status. If UsbIo is NULL, then ASSERT(). If AlternateSetting is NULL, then ASSERT(). If Status is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbGetInterface(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT16 Interface, OUT UINT16 *AlternateSetting, OUT UINT32 *Status)
{
  EFI_USB_DEVICE_REQUEST  DevReq;
  ASSERT (UsbIo != NULL);
  ASSERT (AlternateSetting != NULL);
  ASSERT (Status != NULL);
  *AlternateSetting = 0;
  ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));
  DevReq.RequestType = USB_DEV_GET_INTERFACE_REQ_TYPE;
  DevReq.Request     = USB_REQ_GET_INTERFACE;
  DevReq.Index       = Interface;
  DevReq.Length      = 1;
  return UsbIo->UsbControlTransfer (
                  UsbIo,
                  &DevReq,
                  EfiUsbDataIn,
                  PcdGet32 (PcdUsbTransferTimeoutValue),
                  AlternateSetting,
                  1,
                  Status
                  );
}