(self, device, interface = 0,
            alternate_setting = 0, configuration = 0)
r"""Initialize the interface 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). The interface
        parameter is the interface logical index (not the bInterfaceNumber
        field) and alternate_setting is the alternate setting logical index
        (not the bAlternateSetting value). An interface may have only one
        alternate setting. In this case, the alternate_setting parameter
        should be zero.  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 interface object.
r Initialize the interface object .
def __init__(self, device, interface = 0,
            alternate_setting = 0, configuration = 0):
        r"""Initialize the interface 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). The interface
        parameter is the interface logical index (not the bInterfaceNumber
        field) and alternate_setting is the alternate setting logical index
        (not the bAlternateSetting value). An interface may have only one
        alternate setting. In this case, the alternate_setting parameter
        should be zero.  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.alternate_index = alternate_setting
        self.index = interface
        self.configuration = configuration

        backend = device._ctx.backend

        desc = backend.get_interface_descriptor(
                    self.device._ctx.dev,
                    interface,
                    alternate_setting,
                    configuration
                )

        _set_attr(
                desc,
                self,
                (
                    'bLength',
                    'bDescriptorType',
                    'bInterfaceNumber',
                    'bAlternateSetting',
                    'bNumEndpoints',
                    'bInterfaceClass',
                    'bInterfaceSubClass',
                    'bInterfaceProtocol',
                    'iInterface',
                    'extra_descriptors'
                )
            )
def __init__ ( self , device , interface = 0 , alternate_setting = 0 , configuration = 0 ) : self . device = device self . alternate_index = alternate_setting self . index = interface self . configuration = configuration backend = device . _ctx . backend desc = backend . get_interface_descriptor ( self . device . _ctx . dev , interface , alternate_setting , configuration ) _set_attr ( desc , self , ( 'bLength' , 'bDescriptorType' , 'bInterfaceNumber' , 'bAlternateSetting' , 'bNumEndpoints' , 'bInterfaceClass' , 'bInterfaceSubClass' , 'bInterfaceProtocol' , 'iInterface' , 'extra_descriptors' ) )