On Thu, Jun 9, 2011 at 10:57 PM, Andreas Fritiofson
<andreas.fritiofson at gmail.com
<https://lists.berlios.de/mailman/listinfo/openocd-development>> wrote:
>/ ft2232_init really refers to init of the openocd driver, while
/>/ ft2232_init_{libftdi,ftd2xx} refers to init of the ftdi subsystem including
/>/ hardware (using either of the libraries). Different inits, hence "one" and
/>/ "all" is not the suitable distinction. How about ft2232_init_ftdi that could
/>/ be interpreted as initializing the ftdi library, the ftdi chip or the ftdi
/>/ handle, all of which are true?
/
The current organization for me is okay - there is a standard
ft2232_init() function that call ft2232_init_ftdi() if the program was
built with libftdi or ft2232_init_ftd2xx() if the program was built
with libftd2xx. There is no need to complicate this behavior as
exactly the complication was the problem with previous patches.
Please let //ft2232_init_{libftdi,ftd2xx} .
Maybe we will have D2XX open source in next future :-) , and the both
libftdi and d2xx could be loaded dynamically.
//
Please remember guys also to properly fix the ft2232_quit() as Laurent
proposed, this is also necessary to bring interface to default state
on quit :-)
And not only the specific layout, but the mpsse must be reseted.
We have to make sure to put the dongle at is initial state as if it was
just plugged in the computer.
Gotos are okay in presented case where avoiding gotos bring
unnecessary complication.
Go with goto ... it is only code style :-)
Best regards! :-)
Tomek
Laurent
http://www.amontec.com/jtagkey.shtml
Amontec JTAGkey-2 making JTAG a snap
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development