From 99fd47950335a0bc146b7fcf090e4a490cc81ffd Mon Sep 17 00:00:00 2001 From: zwelch Date: Fri, 5 Jun 2009 00:04:12 +0000 Subject: Add accessors for reset delays; use them in jim command handlers. git-svn-id: svn://svn.berlios.de/openocd/trunk@2059 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/jtag/jtag.c | 15 +++++++++++++-- src/jtag/jtag.h | 2 ++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index 28883c7c..d256b8bd 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -2085,7 +2085,7 @@ static int handle_jtag_nsrst_delay_command(struct command_context_s *cmd_ctx, ch } else { - jtag_nsrst_delay = strtoul(args[0], NULL, 0); + jtag_set_nsrst_delay(strtoul(args[0], NULL, 0)); } return ERROR_OK; @@ -2100,12 +2100,13 @@ static int handle_jtag_ntrst_delay_command(struct command_context_s *cmd_ctx, ch } else { - jtag_ntrst_delay = strtoul(args[0], NULL, 0); + jtag_set_ntrst_delay(strtoul(args[0], NULL, 0)); } return ERROR_OK; } + static int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { int retval=ERROR_OK; @@ -2699,3 +2700,13 @@ int jtag_add_statemove(tap_state_t goal_state) return retval; } +void jtag_set_nsrst_delay(unsigned delay) +{ + jtag_nsrst_delay = delay; +} +void jtag_set_ntrst_delay(unsigned delay) +{ + jtag_ntrst_delay = delay; +} + + diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index ba82df7c..341f7702 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -642,6 +642,8 @@ extern int jtag_add_statemove(tap_state_t goal_state); /// @returns the number of times the scan queue has been flushed int jtag_get_flush_queue_count(void); +void jtag_set_nsrst_delay(unsigned delay); +void jtag_set_ntrst_delay(unsigned delay); void jtag_set_speed_khz(unsigned speed); unsigned jtag_get_speed_khz(void); -- cgit v1.2.3