/* Submit a USB set configuration request for the USB device specified by UsbIo and set the device configuration to the value specified by ConfigurationValue. The status of the transfer is returned in Status. If UsbIo is NULL, then ASSERT(). If Status is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbSetConfiguration(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT16 ConfigurationValue, OUT UINT32 *Status)
/* Submit a USB set configuration request for the USB device specified by UsbIo and set the device configuration to the value specified by ConfigurationValue. The status of the transfer is returned in Status. If UsbIo is NULL, then ASSERT(). If Status is NULL, then ASSERT(). */
EFI_STATUS EFIAPI UsbSetConfiguration(IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT16 ConfigurationValue, OUT UINT32 *Status)
{
  EFI_USB_DEVICE_REQUEST  DevReq;
  ASSERT (UsbIo != NULL);
  ASSERT (Status != NULL);
  ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));
  DevReq.RequestType = USB_DEV_SET_CONFIGURATION_REQ_TYPE;
  DevReq.Request     = USB_REQ_SET_CONFIG;
  DevReq.Value       = ConfigurationValue;
  return UsbIo->UsbControlTransfer (
                  UsbIo,
                  &DevReq,
                  EfiUsbNoData,
                  PcdGet32 (PcdUsbTransferTimeoutValue),
                  NULL,
                  0,
                  Status
                  );
}