pyusb icon indicating copy to clipboard operation
pyusb copied to clipboard

libusb_set_option

Open danielhrisca opened this issue 3 years ago • 2 comments

I'm trying to set the pipe timout value for a windusb device. libusb-1 set this using the function libusb_set_option which is not available from pyusb. Is there any chance to expose this function?

danielhrisca avatar Jul 06 '22 14:07 danielhrisca

Since we generally only have a single LibUSB instance per process, I'm reluctant to simply expose that functionality: one caller (say, in one of your dependencies) could easily break expectations of all other callers.

Still, it's something we should have at a low level (see #381 for another use case). When I looked into it, I got stuck on how to properly support the va_list... do you know how to solve that?


All that said, I'm not sure what you meant by setting a pipe timeout with libusb_set_option. None of the libusb_option variants appears to have anything to do with that... is there another, less obvious, option list I'm not aware of?

jonasmalacofilho avatar Jul 06 '22 21:07 jonasmalacofilho

There is no libusb_option items related to pipe time out. https://libusb.sourceforge.io/api-1.0/group__libusb__lib.html#ga07d4ec54cf575d672ba94c72b3c0de7c

mcuee avatar Jul 09 '22 02:07 mcuee