From: Xiaofan C. <xia...@gm...> - 2013-01-07 01:47:02
|
On Mon, Jan 7, 2013 at 6:46 AM, Nathan Hjelm <hj...@me...> wrote: > On Jan 5, 2013, at 7:22 PM, Xiaofan Chen <xia...@gm...> wrote: > >> On Sun, Jan 6, 2013 at 2:49 AM, Nathan Hjelm <hj...@me...> wrote: >>> Since we are adding to the API for 1.0.15 maybe now would be >>> a time to talk about whether we should add an API call to force >>> reenumeration of the device? Something like: >>> >>> int libusb_device_reenumerate (struct libusb_device *dev); >>> >>> This call would invalidate the libusb_device and any associated >>> handles (same with libusb_reset). Thoughts? >> >> Yes I agree. In fact, I was thinking of the same thing. > > Is there a Linux or Windows equivalent to USBDeviceReEnumerate? Take note that WinUSB does not support reset at all. libusb0.sys will support it and in fact, libusb-win32's usb_reset will cause re-enumeration. We add a new usb_reset_ex API in libusb-win32 1.2.5.0 release which supports three types of reset but I think it will cause re-enumeration as well. http://sourceforge.net/p/libusb-win32/code/413/tree/trunk/libusb/src/lusb0_usb.h#l243 As for Linux, I am not so sure. Alan Stern should be able to advise. -- Xiaofan |