diff options
author | kc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-25 15:56:15 +0000 |
---|---|---|
committer | kc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-25 15:56:15 +0000 |
commit | 29bff0929cde9f10b5abbb8065647263eb0a6191 (patch) | |
tree | 3708c33987170692b448f21bcbb32bc4879e456a /src/svf/svf.c | |
parent | 3c27bc8774ecff51bcc0cd4175b93a0229810833 (diff) | |
download | riscv-openocd-29bff0929cde9f10b5abbb8065647263eb0a6191.zip riscv-openocd-29bff0929cde9f10b5abbb8065647263eb0a6191.tar.gz riscv-openocd-29bff0929cde9f10b5abbb8065647263eb0a6191.tar.bz2 |
Author: Simon Qian <simonqian@SimonQian.com>
- add tap_state_svf_name since tap_state_name doesn't use SVF standard names
git-svn-id: svn://svn.berlios.de/openocd/trunk@1912 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/svf/svf.c')
-rw-r--r-- | src/svf/svf.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/svf/svf.c b/src/svf/svf.c index 0552c12..3b92c08 100644 --- a/src/svf/svf.c +++ b/src/svf/svf.c @@ -218,6 +218,34 @@ void svf_free_xxd_para(svf_xxr_para_t *para) } } +static const char* tap_state_svf_name(tap_state_t state) +{ + const char* ret; + + switch( state ) + { + case TAP_RESET: ret = "RESET"; break; + case TAP_IDLE: ret = "IDLE"; break; + case TAP_DRSELECT: ret = "DRSELECT"; break; + case TAP_DRCAPTURE: ret = "DRCAPTURE"; break; + case TAP_DRSHIFT: ret = "DRSHIFT"; break; + case TAP_DREXIT1: ret = "DREXIT1"; break; + case TAP_DRPAUSE: ret = "DRPAUSE"; break; + case TAP_DREXIT2: ret = "DREXIT2"; break; + case TAP_DRUPDATE: ret = "DRUPDATE"; break; + case TAP_IRSELECT: ret = "IRSELECT"; break; + case TAP_IRCAPTURE: ret = "IRCAPTURE"; break; + case TAP_IRSHIFT: ret = "IRSHIFT"; break; + case TAP_IREXIT1: ret = "IREXIT1"; break; + case TAP_IRPAUSE: ret = "IRPAUSE"; break; + case TAP_IREXIT2: ret = "IREXIT2"; break; + case TAP_IRUPDATE: ret = "IRUPDATE"; break; + default: ret = "???"; break; + } + + return ret; +} + static int handle_svf_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { #define SVF_NUM_OF_OPTIONS 1 @@ -305,7 +333,7 @@ static int handle_svf_command(struct command_context_s *cmd_ctx, char *cmd, char memcpy(&svf_para, &svf_para_init, sizeof(svf_para)); for (i = 0; i < (int)dimof(svf_tap_state_name); i++) { - svf_tap_state_name[i] = (char *)tap_state_name(i); + svf_tap_state_name[i] = (char *)tap_state_svf_name(i); } // TAP_RESET jtag_add_tlr(); |