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