adapter: allow adjusting srst assert with
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
parent
cc5f3c85de
commit
48e282aa00
|
@ -366,6 +366,23 @@ COMMAND_HANDLER(handle_adapter_nsrst_delay_command)
|
||||||
return ERROR_OK;
|
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)
|
COMMAND_HANDLER(handle_adapter_khz_command)
|
||||||
{
|
{
|
||||||
if (CMD_ARGC > 1)
|
if (CMD_ARGC > 1)
|
||||||
|
@ -420,6 +437,13 @@ static const struct command_registration interface_command_handlers[] = {
|
||||||
.help = "delay after deasserting SRST in ms",
|
.help = "delay after deasserting SRST in ms",
|
||||||
.usage = "[milliseconds]",
|
.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",
|
.name = "interface",
|
||||||
.handler = handle_interface_command,
|
.handler = handle_interface_command,
|
||||||
|
|
Loading…
Reference in New Issue