]> git.sur5r.net Git - openocd/commitdiff
Add accessors for reset delays; use them in jim command handlers.
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 5 Jun 2009 00:04:12 +0000 (00:04 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 5 Jun 2009 00:04:12 +0000 (00:04 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@2059 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c
src/jtag/jtag.h

index 28883c7c5c0cfd72d98771e2b53c5df9b505e5a3..d256b8bd0ffd8de340a1de5869377a96564100e6 100644 (file)
@@ -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;
+}
+
+
index ba82df7c2c70ecaf30f8f96d1cdd1df593b27dc1..341f7702c479d13c48f4a9c6890e7e26e2c9bc6d 100644 (file)
@@ -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);