On Tue, Jun 12, 2018 at 12:15 AM, Paul Fertser <[email protected]> wrote: > Hello Xiaofan, > > Thank you for the information. > > On Mon, Jun 11, 2018 at 09:47:24PM +0800, Xiaofan Chen wrote: >> https://github.com/libusb/libusb/wiki/Windows#Driver_Installation > > IMHO it would be so much nicer if libusb included autodetection for > that... It seems like a layering violation to offload the decision > regarding selected backend to the application. In what case can it be > useful? >
Hi Paul, Actually 1.0.22 is already an improvement over 1.0.21. In version 1.0.21, in order to use usbdk backend, you have to build with --enable-usbdk option. In version 1.0.22, libusb can detect the pretense of usbdk and use it if the user wants to use it by calling libusb_set_option(). On the other hand, I think you have a point, libusb can probably be more intelligent and choose to use usbdk if it is available but not WinUSB/libusbK even when the user does not call libusb_set_option(). Let me check in the libusb-devel mailing list. Ref: http://libusb.sourceforge.net/api-1.0/group__libusb__lib.html#ga07d4ec54cf575d672ba94c72b3c0de7c enum libusb_option Available option values for libusb_set_option(). Enumerator LIBUSB_OPTION_LOG_LEVEL Set the log message verbosity. ... LIBUSB_OPTION_USE_USBDK Use the UsbDk backend for a specific context, if available. This option should be set immediately after calling libusb_init(), otherwise unspecified behavior may occur. Only valid on Windows. -- Xiaofan ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
