libftdi Archives

Subject: Re: Knowing how many ports the chip has

From: "E.S. Rosenberg" <es.rosenberg+libftdi.i2net@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 22 Apr 2014 17:20:24 +0300



2014-04-22 10:18 GMT+03:00 Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>:
Hi Eli,

On Friday, 18. April 2014 14:20:07 E.S. Rosenberg wrote:
> Hi all,
> Going through the documentation I'm having a hard time figuring out how to
> know what the number of ports on my ftdi board is (obviously I know that
> I have 4 but on the program level).
>
> udev shows that there are 4 ports so it clearly has a way, but I'm
> scouring the libftdi API to no avail, there is a function to set what
> interface/port to use but no function to verify that the interface
> actually exists before trying to set it...
>
> Any pointers would be appreciated.

I think the easiest way to solve this is to look at the chip type,
see "ftdi->type". Then your program can decide how many ports to look for.
Ok, thanks.
Another question:
From what I gather for each port I want to use I need to create another ftdi_context, is this correct?
Thanks,
Eli

Cheers,
Thomas


--
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