On Thu, May 29, 2014 at 7:18 AM, Steve Soloski <ssoloski@xxxxxxxxxxxxxx> wrote:
> My test is fairly simple - open and close the device 50 times. The logic is
> very straightforward (error checking removed for clarity):
>
> for (i=0; i<50; i++) {
> struct ftdi_context *dev = ftdi_new();
> ftdi_set_interface(dev, INTERFACE_B);
>
> ftdi_usb_open(dev, PICAM_USB_VID, PICAM_USB_PID);
I believe you need to reverse the order of the previous two
calls. You need to open the device and then set_interface.
> ftdi_usb_close(dev);
> ftdi_free(dev);
> }
--
Xiaofan
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|