We have this global called cur_state that all the drivers are 
manipulating by direct assignment.    This makes it hard to trap or 
watch these changes.   I am proposing a pair of functions which would be 
used instead:


set_current_state( tap_state_t )
tap_state_t get_current_state();


I am happy to do all the global edits to put these in.   Then cur_state 
would be made static i.e. private.  The value then is that we can add 
debug logging to the set_current_state() and get a good feel for state 
transitions when required.  We have a nice debug facility in 
_DEBUG_JTAG_IO_ but nothing similar for state tracking.

What do folks think?   Would such a patch be accepted?

Any better names wanted?

Dick



_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to