libftdi Archives

Subject: Re: ftdi_usb_close() error

From: Mikael Krus <mk@xxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Thu, 07 Oct 2010 17:59:21 +0200


Michael Plante skrev 2010-10-07 17:54:
Mikael Krus wrote:
I have a FT2232H chip where I intend to use interface_B in MPSSE mode.
If I use ftdi_set_interface() specifying INTERFACE_B, later on when
closing the device I always get an error (-1) but with error string set
to: all fine.

This only happens with INTERFACE_B not INTERFACE_A.

Why does this happen?
Am I misunderstanding something?

I'll try to attach my piece of code.
You need to call ftdi_set_interface before calling ftdi_usb_open_dev.
You've opened A, but then tried to close B.
Oh, so lets say I want to use both interfaces (A and B), I need to open them separately and keep one context for each interface?

Thanks for your help, I'm quite new to this!
Michael


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx



--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
Current Thread