Configuration (Class)

class usbx.Configuration

USB device configuration information.

This object is the root object for information originating from the configuration descriptor provided by the USB device.

attributes: int

Configuration attributes (bmAttributes of USB configuration descriptor).

configuration_value: int

Value/number of this configuration (bConfigurationValue of USB configuration descriptor).

functions: list[CompositeFunction]

USB composite functions.

get_function(number: int) CompositeFunction | None

Find the USB composite function the interface with number number belongs to.

Parameters:

number – USB interface number.

Returns:

USB composite function, or None if there is no function for the given interface number.

get_interface(number: int) Interface | None

Get the USB interface with number number.

Parameters:

number – USB interface number.

Returns:

USB interface, or None if there is no interface with the given number.

interfaces: list[Interface]

USB interfaces.

max_power: int

Maximum Power Consumption in 2mA units (bMaxPower of USB configuration descriptor).