(self, device, endpoint, interface = 0,
                    alternate_setting = 0, configuration = 0)
r"""Initialize the Endpoint object.

        The device parameter is the device object returned by the find()
        function. endpoint is the endpoint logical index (not the endpoint
        address). 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 Endpoint object.
r Initialize the Endpoint object .
def __init__(self, device, endpoint, interface = 0,
                    alternate_setting = 0, configuration = 0):
        r"""Initialize the Endpoint object.

        The device parameter is the device object returned by the find()
        function. endpoint is the endpoint logical index (not the endpoint
        address). 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.index = endpoint

        backend = device._ctx.backend

        desc = backend.get_endpoint_descriptor(
                    device._ctx.dev,
                    endpoint,
                    interface,
                    alternate_setting,
                    configuration
                )

        _set_attr(
                desc,
                self,
                (
                    'bLength',
                    'bDescriptorType',
                    'bEndpointAddress',
                    'bmAttributes',
                    'wMaxPacketSize',
                    'bInterval',
                    'bRefresh',
                    'bSynchAddress',
                    'extra_descriptors'
                )
            )
def __init__ ( self , device , endpoint , interface = 0 , alternate_setting = 0 , configuration = 0 ) : self . device = device self . index = endpoint backend = device . _ctx . backend desc = backend . get_endpoint_descriptor ( device . _ctx . dev , endpoint , interface , alternate_setting , configuration ) _set_attr ( desc , self , ( 'bLength' , 'bDescriptorType' , 'bEndpointAddress' , 'bmAttributes' , 'wMaxPacketSize' , 'bInterval' , 'bRefresh' , 'bSynchAddress' , 'extra_descriptors' ) )