How to use the odrive.usbbulk_transport.USBBulkTransport function in odrive

To help you get started, we’ve selected a few odrive 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 madcowswe / ODrive / tools / odrive / core.py View on Github external
def channel_from_usb_device(usb_device, printer=noprint):
    """
    Inits an ODrive Protocol channel from a PyUSB device object.
    """
    bulk_device = odrive.usbbulk_transport.USBBulkTransport(usb_device, printer)
    printer(bulk_device.info())
    bulk_device.init()
    return odrive.protocol.Channel(
            "USB device bus {} device {}".format(usb_device.bus, usb_device.address),
            bulk_device, bulk_device)