avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-chat] Re: FTDI programmer device name space--suggestions?


From: Joerg Wunsch
Subject: [avr-chat] Re: FTDI programmer device name space--suggestions?
Date: Sat, 24 Sep 2005 22:20:17 +0200
User-agent: Mutt/1.4.2.1i

As Johnathan Corgan wrote:

> ... and I'm struggling with what "name space" I should use to
> designate the "port" (-P command line parameter.)

Hard to tell.

For the JTAG ICE mkII that can be connected both through a serial port
or through USB, I've chosen to treat names starting with "usb" as
special.  Normal serial port names start either with "/dev/" or "com",
so that should be distinct enough.

The USB code then scans the busses and devices for the JTAG ICE's
vendor/product ID.  The first Atmel JTAG ICE that has been found will
be used.  In order to support more than one device, I added the option
to append the device's serial number to the string, like
"usb:00:a0:00:00:1b:ac", as the serial number is really what
distinguishes these devices.  The colons within the serial number are
optional, and the match is done right-to-left, so the above could
usually be written as "usb:1bac" as well.

> Under Windows, using FTD2XX, the open call to access an FTDI device
> on the bus takes an integer device number, which corresponds to the
> order the bus scan finds FTDI chips.

As this is both nothing the use could guess immediately, I'd avoid
that.  After all, if the user has three devices connected, how does he
tell which one would be the first in the scan?  If there's anything
else you could use to distinguish them, pick another attribute.

> Under Linux, using libftdi, the open call takes an integer vendor
> ID/product ID pair, optionally qualifying them with a device name
> string or serial number string.

But the vendor/product pair is fixed in your case, isn't it?  (As it
is in my JTAG ICE case.)

> Finally, certain FTDI parts are dual-interface, and one must choose
> which interface.

Hmm, in my serial number model, I'd add another :0 or :1 specifier
then.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]