Closed WeiminWangKolmostar closed 6 months ago
Update: I found python-libusb1 does set libusb_transfer's members (see here)
So the following code can be used to set the libusb_transfer.flags
:
transfer = usb_device_handle.getTransfer()
transfer._USBTransfer__transfer.contents.flags = 1 # LIBUSB_TRANSFER_SHORT_NOT_OK
Add a PR to provide a method to do this.
First, thanks for your awesome work.
I noticed that libusb doesn't provide an api to set the
flag
member oflibusb_transfer
, and python-libusb1 doesn't expose thelibusb_transfer
's members (code).So is there a way to set
libusb_transfer.flags
in python-libusb1.