Efi_usb_io_protocol.usbgetconfigdescriptor(), Usbgetconfigdescriptor(), Func – Intel Extensible Firmware Interface User Manual
Page 596

Extensible Firmware Interface Specification
14-56 12/01/02
Version
1.10
EFI_USB_IO_PROTOCOL.UsbGetConfigDescriptor()
Summary
Retrieves the USB Device Configuration Descriptor.
Prototype
typedef
EFI_STATUS
(EFIAPI *EFI_USB_IO_GET_CONFIG_DESCRIPTOR) (
IN EFI_USB_IO_PROTOCOL
*This,
OUT EFI_USB_CONFIG_DESCRIPTOR
*ConfigurationDescriptor
);
Parameters
This
A pointer to the
instance. Type
EFI_USB_IO_PROTOCOL
is defined in Section 14.2.5.
ConfigurationDescriptor
A pointer to the caller allocated USB Active Configuration
Descriptor. See “Related Definitions” for a detailed
description.
Related Definitions
//
// See USB1.1 for detail descrption.
//
typedef struct {
UINT8
Length;
UINT8
DescriptorType;
UINT16
TotalLength;
UINT8
NumInterfaces;
UINT8
ConfigurationValue;
UINT8
Configuration;
UINT8
Attributes;
UINT8
MaxPower;
} EFI_USB_CONFIG_DESCRIPTOR;
Description
This function is used to retrieve the active configuration that the USB device is currently using. If
ConfigurationDescriptor
is
NULL
, then
EFI_INVALID_PARAMETER
is returned. If the
USB controller does not contain an active configuration, then
EFI_NOT_FOUND
is returned.
Otherwise, the active configuration is returned in
ConfigurationDescriptor
, and
EFI_SUCCESS
is returned.
Status Code Returned
EFI_SUCCESS
The active configuration descriptor was retrieved successfully.
EFI_INVALID_PARAMETER
ConfigurationDescriptor
is NULL.
EFI_NOT_FOUND
An active configuration descriptor cannot be found. The device may not
be configured.