Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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
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