summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:55:24 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-08 10:55:24 +0000
commitc75ef1cd375ba5d0281b05f29437c6eaf92864d6 (patch)
tree01cab06132b117a8b83d52b472e858926d1c85ab /src
parentae0ba6f355ea2227aadc062365979664eae19280 (diff)
downloadopenocd+libswd-c75ef1cd375ba5d0281b05f29437c6eaf92864d6.tar.gz
openocd+libswd-c75ef1cd375ba5d0281b05f29437c6eaf92864d6.tar.bz2
openocd+libswd-c75ef1cd375ba5d0281b05f29437c6eaf92864d6.tar.xz
openocd+libswd-c75ef1cd375ba5d0281b05f29437c6eaf92864d6.zip
Extend handle_jtag_n{s,t}rst_delay_command routines:
- Add support to display the reset delays too, like the other commands. - Always show the values, so users can see if they are being redundant. git-svn-id: svn://svn.berlios.de/openocd/trunk@2113 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/jtag/jtag.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 885585fd..91430b6e 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -2115,24 +2115,22 @@ next:
static int handle_jtag_nsrst_delay_command(struct command_context_s *cmd_ctx,
char *cmd, char **args, int argc)
{
- if (argc != 1)
- {
- LOG_ERROR("jtag_nsrst_delay <ms> -- command requires one argument");
+ if (argc > 1)
return ERROR_COMMAND_SYNTAX_ERROR;
- }
- jtag_set_nsrst_delay(strtoul(args[0], NULL, 0));
+ if (argc == 1)
+ jtag_set_nsrst_delay(strtoul(args[0], NULL, 0));
+ command_print(cmd_ctx, "jtag_nsrst_delay: %u", jtag_get_nsrst_delay());
return ERROR_OK;
}
static int handle_jtag_ntrst_delay_command(struct command_context_s *cmd_ctx,
char *cmd, char **args, int argc)
{
- if (argc != 1)
- {
- LOG_ERROR("jtag_ntrst_delay <ms> -- command requires one argument");
+ if (argc > 1)
return ERROR_COMMAND_SYNTAX_ERROR;
- }
- jtag_set_ntrst_delay(strtoul(args[0], NULL, 0));
+ if (argc == 1)
+ jtag_set_ntrst_delay(strtoul(args[0], NULL, 0));
+ command_print(cmd_ctx, "jtag_ntrst_delay: %u", jtag_get_ntrst_delay());
return ERROR_OK;
}