summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichal smulski <michal.smulski@ooma.com>2010-04-24 16:50:27 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-04-24 16:51:14 +0200
commit48e282aa00e8746a3e5e4234c915a4c5f9909063 (patch)
tree23f3d973a9359797b999838aaeb45af2593c19d7 /src
parentcc5f3c85de7632a32f41b435c54b83487a3aa622 (diff)
downloadopenocd_libswd-48e282aa00e8746a3e5e4234c915a4c5f9909063.tar.gz
openocd_libswd-48e282aa00e8746a3e5e4234c915a4c5f9909063.tar.bz2
openocd_libswd-48e282aa00e8746a3e5e4234c915a4c5f9909063.tar.xz
openocd_libswd-48e282aa00e8746a3e5e4234c915a4c5f9909063.zip
adapter: allow adjusting srst assert with
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/adapter.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c
index b262a9a7..50e2a022 100644
--- a/src/jtag/adapter.c
+++ b/src/jtag/adapter.c
@@ -366,6 +366,23 @@ COMMAND_HANDLER(handle_adapter_nsrst_delay_command)
return ERROR_OK;
}
+COMMAND_HANDLER(handle_adapter_nsrst_assert_width_command)
+{
+ if (CMD_ARGC > 1)
+ return ERROR_COMMAND_SYNTAX_ERROR;
+ if (CMD_ARGC == 1)
+ {
+ unsigned width;
+ COMMAND_PARSE_NUMBER(uint, CMD_ARGV[0], width);
+
+ jtag_set_nsrst_assert_width(width);
+ }
+ command_print(CMD_CTX, "adapter_nsrst_assert_width: %u", jtag_get_nsrst_assert_width());
+ return ERROR_OK;
+}
+
+
+
COMMAND_HANDLER(handle_adapter_khz_command)
{
if (CMD_ARGC > 1)
@@ -421,6 +438,13 @@ static const struct command_registration interface_command_handlers[] = {
.usage = "[milliseconds]",
},
{
+ .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 = "interface",
.handler = handle_interface_command,
.mode = COMMAND_CONFIG,