summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2010-03-15 08:42:26 -0700
committerDavid Brownell <dbrownell@users.sourceforge.net>2010-03-15 08:42:26 -0700
commit1bd3ae398646da1107e00e0651abbf9691d2d9ff (patch)
tree4ad64cabcc323aa357173dc6202ddbf2dbfd3d81 /src
parentb559b273b526b3077b3ca219eecc8df9f86efac0 (diff)
downloadopenocd+libswd-1bd3ae398646da1107e00e0651abbf9691d2d9ff.tar.gz
openocd+libswd-1bd3ae398646da1107e00e0651abbf9691d2d9ff.tar.bz2
openocd+libswd-1bd3ae398646da1107e00e0651abbf9691d2d9ff.tar.xz
openocd+libswd-1bd3ae398646da1107e00e0651abbf9691d2d9ff.zip
rename jtag_nsrst_assert_width as adapter_nsrst_assert_width
Globally rename "jtag_nsrst_assert_width" as "adapter_nsrst_assert_width", and move it out of the "jtag" command group ... it needs to be used with non-JTAG transports Includes a migration aid (in jtag/startup.tcl) so that old user scripts won't break. That aid should Sunset in about a year. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/core.c10
-rw-r--r--src/jtag/startup.tcl2
-rw-r--r--src/jtag/tcl.c20
3 files changed, 17 insertions, 15 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c
index bb11ff15..9792280b 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -95,7 +95,7 @@ static int jtag_verify = 1;
/* how long the OpenOCD should wait before attempting JTAG communication after reset lines deasserted (in ms) */
static int adapter_nsrst_delay = 0; /* default to no nSRST delay */
static int jtag_ntrst_delay = 0; /* default to no nTRST delay */
-static int jtag_nsrst_assert_width = 0; /* width of assertion */
+static int adapter_nsrst_assert_width = 0; /* width of assertion */
static int jtag_ntrst_assert_width = 0; /* width of assertion */
/**
@@ -699,8 +699,8 @@ void jtag_add_reset(int req_tlr_or_trst, int req_srst)
if (jtag_srst)
{
LOG_DEBUG("SRST line asserted");
- if (jtag_nsrst_assert_width)
- jtag_add_sleep(jtag_nsrst_assert_width * 1000);
+ if (adapter_nsrst_assert_width)
+ jtag_add_sleep(adapter_nsrst_assert_width * 1000);
}
else {
LOG_DEBUG("SRST line released");
@@ -1714,11 +1714,11 @@ unsigned jtag_get_ntrst_delay(void)
void jtag_set_nsrst_assert_width(unsigned delay)
{
- jtag_nsrst_assert_width = delay;
+ adapter_nsrst_assert_width = delay;
}
unsigned jtag_get_nsrst_assert_width(void)
{
- return jtag_nsrst_assert_width;
+ return adapter_nsrst_assert_width;
}
void jtag_set_ntrst_assert_width(unsigned delay)
{
diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl
index 42fbe4f6..3a36886d 100644
--- a/src/jtag/startup.tcl
+++ b/src/jtag/startup.tcl
@@ -84,4 +84,6 @@ proc srst_asserted {} {
#
proc jtag_khz args { eval adapter_khz $args }
proc jtag_nsrst_delay args { eval adapter_nsrst_delay $args }
+proc jtag_nsrst_assert_width args { eval adapter_nsrst_assert_width $args }
+
# END MIGRATION AIDS
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index d587922b..686eb3e8 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -1321,7 +1321,7 @@ COMMAND_HANDLER(handle_jtag_ntrst_delay_command)
return ERROR_OK;
}
-COMMAND_HANDLER(handle_jtag_nsrst_assert_width_command)
+COMMAND_HANDLER(handle_adapter_nsrst_assert_width_command)
{
if (CMD_ARGC > 1)
return ERROR_COMMAND_SYNTAX_ERROR;
@@ -1332,7 +1332,7 @@ COMMAND_HANDLER(handle_jtag_nsrst_assert_width_command)
jtag_set_nsrst_assert_width(delay);
}
- command_print(CMD_CTX, "jtag_nsrst_assert_width: %u", jtag_get_nsrst_assert_width());
+ command_print(CMD_CTX, "adapter_nsrst_assert_width: %u", jtag_get_nsrst_assert_width());
return ERROR_OK;
}
@@ -1619,10 +1619,17 @@ static const struct command_registration interface_command_handlers[] = {
.usage = "[khz]",
},
{
+ .name = "adapter_nsrst_assert_width",
+ .handler = handle_adapter_nsrst_assert_width_command,
+ .mode = COMMAND_ANY,
+ .help = "delay after asserting SRST in ms",
+ .usage = "[milliseconds]",
+ },
+ {
.name = "adapter_nsrst_delay",
.handler = handle_adapter_nsrst_delay_command,
.mode = COMMAND_ANY,
- .help = "delay after deasserting srst in ms",
+ .help = "delay after deasserting SRST in ms",
.usage = "[milliseconds]",
},
{
@@ -1681,13 +1688,6 @@ static const struct command_registration jtag_command_handlers[] = {
.usage = "[milliseconds]",
},
{
- .name = "jtag_nsrst_assert_width",
- .handler = handle_jtag_nsrst_assert_width_command,
- .mode = COMMAND_ANY,
- .help = "delay after asserting srst in ms",
- .usage = "[milliseconds]",
- },
- {
.name = "jtag_ntrst_assert_width",
.handler = handle_jtag_ntrst_assert_width_command,
.mode = COMMAND_ANY,