On Mon, Jul 27, 2009 at 5:47 PM, Uwe Bonnes<[email protected]> wrote: > Is there perhaps an API to find out if setting the configuration is needed? > > Perhaps we can make the code dependant on that? >
If libftdi switches to libusb 1.0 (it should be trival to switch to the synchronous API of libusb 1.0), then you can use this API function: libusb_get_configuration. You check if the configuration is valid (typically 1), then you can skip libusb_set_configuration(). If it is zero, then you call libusb_set_configuration(). http://libusb.sourceforge.net/api-1.0/group__dev.html There are other advantages to switch to libusb 1.0 since it supports asynchronous transfer. Currently it is only working under Linux and Mac OS X. For libusb 0.1, there is no direct API function to do this. But you can probably do similar things. -- Xiaofan http://mcuee.blogspot.com -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
