How to use the libusb1.libusb_device_handle_p 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 open(self):
        """
        Open device.
        Returns an USBDeviceHandle instance.
        """
        handle = libusb1.libusb_device_handle_p()
        result = libusb1.libusb_open(self.device_p, byref(handle))
        if result:
            raise libusb1.USBError(result)
        return USBDeviceHandle(self.__context, handle, self)
github kozec / sc-controller / scc / lib / usb1.py View on Github external
def open(self):
        """
        Open device.
        Returns an USBDeviceHandle instance.
        """
        handle = libusb1.libusb_device_handle_p()
        mayRaiseUSBError(libusb1.libusb_open(self.device_p, byref(handle)))
        result = USBDeviceHandle(self.__context, handle, self)
        self.__close_set.add(result)
        return result
github glaubitz / linux-minidisc / netmd / usb1.py View on Github external
def open(self):
        """
        Open device.
        Returns an USBDeviceHandle instance.
        """
        handle = libusb1.libusb_device_handle_p()
        result = libusb1.libusb_open(self.device_p, byref(handle))
        if result:
            raise libusb1.USBError(result)
        return USBDeviceHandle(self.__context, handle)