I'd like to understand jtag_add_end_state(). As some readers
may know, I want to remove it after 0.2(plan posted).

Q: If we didn't have jtag_add_end_state() today, why would we
add it?

Q: what does it achieve that a global variable doesn't?

Q: isn't jtag_add_end_state()  overused? I.e. if I *only*
want to modify the endstate for a particular call, then
why would I want to use jtag_add_end_state()?

Q: did you know that all jtag_add_xxx() fn's *modify* the
end state as a side effect? The endstate argument is
just a shortcut for not invoking jtag_add_end_state()
beforehand?

Q: If I need to modify jtag_add_end_state() in some lower level
function, should I save and restore it?

To me it is just a wrapped global variable that causes code to be hard
to read & maintain.

The idea is to remove TAP_INVALID
as a valid argument. This will reduce complexity of the
API and allow us to remove a hundred or two from the
centarl JTAG code reducing complexity significantly
(there isn't much left aftwerwards.


-- 
Øyvind Harboe
Embedded software and hardware consulting services
http://consulting.zylin.com
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to