(self, endpoint, buffer_or_len, callback=None, user_data=None,
            timeout=0)
Setup transfer for bulk use.

        endpoint
            Endpoint to submit transfer to. Defines transfer direction (see
            libusb1.LIBUSB_ENDPOINT_OUT and libusb1.LIBUSB_ENDPOINT_IN)).
        buffer_or_len
            Either a string (when sending data), or expected data length (when
            receiving data)
        callback
            Callback function to be invoked on transfer completion.
            Called with transfer as parameter, return value ignored.
        user_data
            User data to pass to callback function.
        timeout
            Transfer timeout in milliseconds. 0 to disable.
Setup transfer for bulk use.
Setup transfer for bulk use .
def setBulk(self, endpoint, buffer_or_len, callback=None, user_data=None,
            timeout=0):
        """
        Setup transfer for bulk use.

        endpoint
            Endpoint to submit transfer to. Defines transfer direction (see
            libusb1.LIBUSB_ENDPOINT_OUT and libusb1.LIBUSB_ENDPOINT_IN)).
        buffer_or_len
            Either a string (when sending data), or expected data length (when
            receiving data)
        callback
            Callback function to be invoked on transfer completion.
            Called with transfer as parameter, return value ignored.
        user_data
            User data to pass to callback function.
        timeout
            Transfer timeout in milliseconds. 0 to disable.
        """
        if self.__submitted:
            raise ValueError('Cannot alter a submitted transfer')
        if self.__doomed:
            raise DoomedTransferError('Cannot reuse a doomed transfer')
        string_buffer = create_binary_buffer(buffer_or_len)
        self.__initialized = False
        self.__transfer_buffer = string_buffer
        self.__user_data = user_data
        libusb1.libusb_fill_bulk_transfer(self.__transfer, self.__handle,
            endpoint, string_buffer, sizeof(string_buffer),
            self.__ctypesCallbackWrapper, None, timeout)
        self.__callback = callback
        self.__initialized = True
def setBulk ( self , endpoint , buffer_or_len , callback = None , user_data = None , timeout = 0 ) : if self . __submitted : raise ValueError ( 'Cannot alter a submitted transfer' ) if self . __doomed : raise DoomedTransferError ( 'Cannot reuse a doomed transfer' ) string_buffer = create_binary_buffer ( buffer_or_len ) self . __initialized = False self . __transfer_buffer = string_buffer self . __user_data = user_data libusb1 . libusb_fill_bulk_transfer ( self . __transfer , self . __handle , endpoint , string_buffer , sizeof ( string_buffer ) , self . __ctypesCallbackWrapper , None , timeout ) self . __callback = callback self . __initialized = True