From 814183a5c41cad14b83c29c9473084e6d1a11d9b Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 23 Oct 2009 01:00:32 -0700 Subject: SVF: clean up, mostly for TAP state name handling - Use the name mappings all the other code uses: + name-to-state ... needed to add one special case + state-to-name - Improve various diagnostics: + don't complain about a "valid" state when the issue is actually that it must be "stable" + say which command was affected - Misc: + make more private data and code be static + use public DIM() not private dimof() + shorten the affected lines Re the mappings, this means we're more generous in inputs we accept, since case won't matter. Also our output diagnostics will be a smidgeon more informative, saying "RUN/IDLE" not just "IDLE" (emphasizing that there can be side effects). Signed-off-by: David Brownell --- src/jtag/jtag.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/jtag/jtag.h') diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index 7253c3ea..1dae00fa 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -102,7 +102,10 @@ typedef enum tap_state * Function tap_state_name * Returns a string suitable for display representing the JTAG tap_state */ -const char* tap_state_name(tap_state_t state); +const char *tap_state_name(tap_state_t state); + +/// Provides user-friendly name lookup of TAP states. +tap_state_t tap_state_by_name(const char *name); /// The current TAP state of the pending JTAG command queue. extern tap_state_t cmd_queue_cur_state; -- cgit v1.2.3