summaryrefslogtreecommitdiff
path: root/src/jtag
diff options
context:
space:
mode:
Diffstat (limited to 'src/jtag')
-rw-r--r--src/jtag/interface.c4
-rw-r--r--src/jtag/interface.h3
-rw-r--r--src/jtag/jtag.h5
3 files changed, 8 insertions, 4 deletions
diff --git a/src/jtag/interface.c b/src/jtag/interface.c
index e83a7723..fcdb8ee7 100644
--- a/src/jtag/interface.c
+++ b/src/jtag/interface.c
@@ -365,6 +365,10 @@ tap_state_t tap_state_by_name(const char *name)
{
tap_state_t x;
+ /* standard SVF name is "IDLE" */
+ if (0 == strcasecmp(name, "IDLE"))
+ return TAP_IDLE;
+
for (x = 0 ; x < TAP_NUM_STATES ; x++) {
/* be nice to the human */
if (0 == strcasecmp(name, tap_state_name(x))) {
diff --git a/src/jtag/interface.h b/src/jtag/interface.h
index 899f1631..afe21086 100644
--- a/src/jtag/interface.h
+++ b/src/jtag/interface.h
@@ -160,9 +160,6 @@ bool tap_is_state_stable(tap_state_t astate);
*/
tap_state_t tap_state_transition(tap_state_t current_state, bool tms);
-/// Provides user-friendly name lookup of TAP states.
-tap_state_t tap_state_by_name(const char *name);
-
/// Allow switching between old and new TMS tables. @see tap_get_tms_path
void tap_use_new_tms_table(bool use_new);
/// @returns True if new TMS table is active; false otherwise.
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;