Hi all! The recent activity surrounding the ft2232 driver makes it obvious that there are lots of bugfixes and structural improvements that need to be done. Unfortunately, trying to understand the code or even just browsing around in it is complicated by the fact that its cluttered with functions related to the different layouts.
I plan to break out all the layout specific code to a separate file, making the remaining core ft2232 code easier to work with. The question is, what's a suitable interface between the layout functions and the core ft2232 functions? As a matter of fact I made the separation one and a half years ago, but never got around to completing the patchset. At the time, everything the layout functions required from the core ft2232 code boiled down to appending to the ft2232 command buffer. Pretty clean and probably a suitable interface, assuming things haven't changed too much. The black sheep, now and then, is the signalyzer layout. Its layout functions uses the ftd2xx API directly, requiring access to the ftdi handle and probably a bunch of other data. Many functions are unimplemented for libftdi. It is also an exercise in code duplication with lots of repetitive snippets of code. Trivial refactoring could reduce the number of lines by half or so. Questions to this list: 1) Since this means moving a lot of code around, it's prudent to ask if anyone have ongoing work that could interfere with a change like this. 2) Any thoughts on the interface between the layout functions and the core ft2232 code? 3) What to do with the signalyzer code? I have no idea what this interface is. Is it used at all? Should we adapt 2) to its requirements or let it remain in ft2232.c? Maybe split it out to a completely separate driver, if it's so different? /Andreas
_______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
