How to use the libusb1.libusb_bulk_transfer function in libusb1

To help you get started, we’ve selected a few libusb1 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Tinkerforge / brickd / src / brickd / libusb / usb1.py View on Github external
def _bulkTransfer(self, endpoint, data, length, timeout):
        transferred = c_int()
        result = libusb1.libusb_bulk_transfer(self.__handle, endpoint,
            data, length, byref(transferred), timeout)
        if result:
            raise libusb1.USBError(result)
        return transferred.value
github glaubitz / linux-minidisc / netmd / usb1.py View on Github external
def _bulkTransfer(self, endpoint, data, length, timeout):
        transferred = c_int()
        result = libusb1.libusb_bulk_transfer(self.__handle, endpoint,
            data, length, byref(transferred), timeout)
        if result:
            raise libusb1.USBError(result)
        return transferred.value
github kozec / sc-controller / scc / lib / usb1.py View on Github external
def _bulkTransfer(self, endpoint, data, length, timeout):
        transferred = c_int()
        mayRaiseUSBError(libusb1.libusb_bulk_transfer(
            self.__handle, endpoint, data, length, byref(transferred), timeout,
        ))
        return transferred.value