/* Set the device's configuration. This function changes the device's internal state. UsbSelectConfig changes the Usb bus's internal state. */
EFI_STATUS UsbSetConfig(IN USB_DEVICE *UsbDev, IN UINT8 ConfigIndex)
/* Set the device's configuration. This function changes the device's internal state. UsbSelectConfig changes the Usb bus's internal state. */
EFI_STATUS UsbSetConfig(IN USB_DEVICE *UsbDev, IN UINT8 ConfigIndex)
{
  EFI_STATUS  Status;
  Status = UsbCtrlRequest (
             UsbDev,
             EfiUsbNoData,
             USB_REQ_TYPE_STANDARD,
             USB_TARGET_DEVICE,
             USB_REQ_SET_CONFIG,
             ConfigIndex,
             0,
             NULL,
             0
             );
  return Status;
}