diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-02-28 20:40:46 +0100 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-03-02 19:04:00 +0100 |
commit | b992dd58f1bef87c35e942efef6070915dc74a37 (patch) | |
tree | 08b3aa93e786d74013e396a15447cd3ede673f8e | |
parent | 99cd373019c51af9f623b71fa17b3f3aa29e1b73 (diff) | |
download | openocd+libswd-b992dd58f1bef87c35e942efef6070915dc74a37.tar.gz openocd+libswd-b992dd58f1bef87c35e942efef6070915dc74a37.tar.bz2 openocd+libswd-b992dd58f1bef87c35e942efef6070915dc74a37.tar.xz openocd+libswd-b992dd58f1bef87c35e942efef6070915dc74a37.zip |
jlink: switch commands to subcommands
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
-rw-r--r-- | doc/openocd.texi | 4 | ||||
-rw-r--r-- | src/jtag/drivers/jlink.c | 16 |
2 files changed, 15 insertions, 5 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi index 7772d788..5b123860 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -2319,9 +2319,9 @@ This is a write-once setting. @deffn {Interface Driver} {jlink} Segger jlink USB adapter -@c command: jlink_info +@c command: jlink info @c dumps status -@c command: jlink_hw_jtag (2|3) +@c command: jlink hw_jtag (2|3) @c sets version 2 or 3 @end deffn diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c index b182b614..8a2c5ab3 100644 --- a/src/jtag/drivers/jlink.c +++ b/src/jtag/drivers/jlink.c @@ -656,15 +656,15 @@ COMMAND_HANDLER(jlink_handle_jlink_hw_jtag_command) return ERROR_OK; } -static const struct command_registration jlink_command_handlers[] = { +static const struct command_registration jlink_subcommand_handlers[] = { { - .name = "jlink_info", + .name = "info", .handler = &jlink_handle_jlink_info_command, .mode = COMMAND_EXEC, .help = "show jlink info", }, { - .name = "jlink_hw_jtag", + .name = "hw_jtag", .handler = &jlink_handle_jlink_hw_jtag_command, .mode = COMMAND_EXEC, .help = "access J-Link HW JTAG command version", @@ -673,6 +673,16 @@ static const struct command_registration jlink_command_handlers[] = { COMMAND_REGISTRATION_DONE }; +static const struct command_registration jlink_command_handlers[] = { + { + .name = "jlink", + .mode = COMMAND_ANY, + .help = "perform jlink management", + .chain = jlink_subcommand_handlers, + }, + COMMAND_REGISTRATION_DONE +}; + struct jtag_interface jlink_interface = { .name = "jlink", .commands = jlink_command_handlers, |