On Wed, May 13, 2009 at 6:19 PM, Magnus Lundin <lun...@mlu.mine.nu> wrote: > Øyvind Harboe wrote: >> On Wed, May 13, 2009 at 4:40 PM, David Brownell <davi...@pacbell.net> wrote: >> >>> On Wednesday 13 May 2009, Magnus Lundin wrote: >>> >>>> Not always, TAP_INVALID is really TAP_DONTCARE >>>> >>> I was wondering about that. Someone should rename it >>> so it's no longer nonsense. >>> >> >> The point is to do away with "don't care", "default" and global variables. >> >> There will be a well defined state that the TAP controller moves to after a >> scan. The calling code defines this. >> >> > Correct, and as there is just one end_state that must be the same for > all taps on one interface, the natural place is in the interface structure. > As the current jtag can only handle one interface for now nothing breaks > with the satic variable in jtag.c, but that is not a very nice > implementation.
What I'm missing from your explanation is *why* the end state should not or can not be defined by the calling code. Why does the interface need to have a concept of default end state? > Clean up the implementation, dont mess upp the calling code. As far as I can see(currently) it is the API that is broken(introduces unecessary global state), there is nothing fundamentally wrong about the implementation(which can always be nicer I guess). Generally I want to see functionality that can be synthesized moved out of the API and into helper fn's or into the calling code. -- Øyvind Harboe Embedded software and hardware consulting services http://consulting.zylin.com _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development