summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-07 21:06:22 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-07 21:06:22 +0000
commit9103bbbcb5927723d7bd160ea2eb831b11f29a18 (patch)
tree03df4ca0e787aeee2d1475bd9130bd8b34bb7cf7 /src
parent225ac18450830ff130e2d14a1bbceebb758a399d (diff)
downloadopenocd_libswd-9103bbbcb5927723d7bd160ea2eb831b11f29a18.tar.gz
openocd_libswd-9103bbbcb5927723d7bd160ea2eb831b11f29a18.tar.bz2
openocd_libswd-9103bbbcb5927723d7bd160ea2eb831b11f29a18.tar.xz
openocd_libswd-9103bbbcb5927723d7bd160ea2eb831b11f29a18.zip
reset event is synonym for post_reset event.
git-svn-id: svn://svn.berlios.de/openocd/trunk@769 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/target/target.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/target/target.c b/src/target/target.c
index da70f3ea..a37f56f7 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -226,7 +226,7 @@ int target_init_handler(struct target_s *target, enum target_event event, void *
{
target_unregister_event_callback(target_init_handler, priv);
- target_invoke_script(cmd_ctx, target, "reset");
+ target_invoke_script(cmd_ctx, target, "post_reset");
jtag_execute_queue();
}
@@ -1490,12 +1490,19 @@ int handle_target_script_command(struct command_context_s *cmd_ctx, char *cmd, c
return ERROR_COMMAND_SYNTAX_ERROR;
}
+ const char *event=args[1];
+ if (strcmp("reset", event)==0)
+ {
+ /* synonymous */
+ event="post_reset";
+ }
+
/* Define a tcl procedure which we'll invoke upon some event */
command_run_linef(cmd_ctx,
"proc target_%s_%d {} {"
"openocd {script %s}"
"}",
- args[1],
+ event,
get_num_by_target(target),
args[2]);