diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-03 00:33:22 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-03 00:33:22 +0000 |
commit | f7d011a955d993173f76ff707f4db9cdc1006cb5 (patch) | |
tree | 420345c21a889bb90bf6f728f2dad7427cd52fe6 /src | |
parent | f0b1b206cdba41ce2322db680f37c27ff3ae3478 (diff) | |
download | openocd_libswd-f7d011a955d993173f76ff707f4db9cdc1006cb5.tar.gz openocd_libswd-f7d011a955d993173f76ff707f4db9cdc1006cb5.tar.bz2 openocd_libswd-f7d011a955d993173f76ff707f4db9cdc1006cb5.tar.xz openocd_libswd-f7d011a955d993173f76ff707f4db9cdc1006cb5.zip |
Add missed accessor for checking the current TMS table.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2011 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/interface.h | 2 | ||||
-rw-r--r-- | src/jtag/jtag.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/jtag/interface.h b/src/jtag/interface.h index db0dfb70..cc6ba42d 100644 --- a/src/jtag/interface.h +++ b/src/jtag/interface.h @@ -169,6 +169,8 @@ 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. +bool tap_uses_new_tms_table(void); #ifdef _DEBUG_JTAG_IO_ /** diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index de4173e4..89b90449 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -3227,6 +3227,10 @@ void tap_use_new_tms_table(bool use_new) { tms_seqs = use_new ? &short_tms_seqs : &old_tms_seqs; } +bool tap_uses_new_tms_table(void) +{ + return tms_seqs == &short_tms_seqs; +} static int handle_tms_sequence_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { @@ -3246,7 +3250,8 @@ static int handle_tms_sequence_command(struct command_context_s *cmd_ctx, char * tap_use_new_tms_table(use_new_table); } - command_print(cmd_ctx, "tms sequence is %s", (tms_seqs==&short_tms_seqs) ? "short": "long"); + command_print(cmd_ctx, "tms sequence is %s", + tap_uses_new_tms_table() ? "short": "long"); return ERROR_OK; } |