(self, device, configuration = 0)
r"""Initialize the configuration object.

        The device parameter is the device object returned by the find()
        function. The configuration parameter is the logical index of the
        configuration (not the bConfigurationValue field). By "logical index"
        we mean the relative order of the configurations returned by the
        peripheral as a result of GET_DESCRIPTOR request.
r"""Initialize the configuration object.
r Initialize the configuration object .
def __init__(self, device, configuration = 0):
        r"""Initialize the configuration object.

        The device parameter is the device object returned by the find()
        function. The configuration parameter is the logical index of the
        configuration (not the bConfigurationValue field). By "logical index"
        we mean the relative order of the configurations returned by the
        peripheral as a result of GET_DESCRIPTOR request.
        """
        self.device = device
        self.index = configuration

        backend = device._ctx.backend

        desc = backend.get_configuration_descriptor(
                self.device._ctx.dev,
                configuration
            )

        _set_attr(
                desc,
                self,
                (
                    'bLength',
                    'bDescriptorType',
                    'wTotalLength',
                    'bNumInterfaces',
                    'bConfigurationValue',
                    'iConfiguration',
                    'bmAttributes',
                    'bMaxPower',
                    'extra_descriptors'
                )
            )
def __init__ ( self , device , configuration = 0 ) : self . device = device self . index = configuration backend = device . _ctx . backend desc = backend . get_configuration_descriptor ( self . device . _ctx . dev , configuration ) _set_attr ( desc , self , ( 'bLength' , 'bDescriptorType' , 'wTotalLength' , 'bNumInterfaces' , 'bConfigurationValue' , 'iConfiguration' , 'bmAttributes' , 'bMaxPower' , 'extra_descriptors' ) )