diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-20 19:56:02 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-24 21:37:33 -0800 |
commit | 0af32bb9381c9fe3f6be425c7fedfc88d4590178 (patch) | |
tree | eed6c2609ee77b24bf3f6c670b052cf8640e5316 /src | |
parent | 48429dcfad4c05dc03fd94484da1078b30afd4f3 (diff) | |
download | openocd_libswd-0af32bb9381c9fe3f6be425c7fedfc88d4590178.tar.gz openocd_libswd-0af32bb9381c9fe3f6be425c7fedfc88d4590178.tar.bz2 openocd_libswd-0af32bb9381c9fe3f6be425c7fedfc88d4590178.tar.xz openocd_libswd-0af32bb9381c9fe3f6be425c7fedfc88d4590178.zip |
arm-jtag-ew: use register_commands()
Uses register_commands() with command registration array.
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/arm-jtag-ew.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/jtag/arm-jtag-ew.c b/src/jtag/arm-jtag-ew.c index f2393713..ef2b04f2 100644 --- a/src/jtag/arm-jtag-ew.c +++ b/src/jtag/arm-jtag-ew.c @@ -502,12 +502,19 @@ COMMAND_HANDLER(armjtagew_handle_armjtagew_info_command) return ERROR_OK; } +static const struct command_registration armjtagew_command_handlers[] = { + { + .name = "armjtagew_info", + .handler = &armjtagew_handle_armjtagew_info_command, + .mode = COMMAND_EXEC, + .help = "query armjtagew info", + }, + COMMAND_REGISTRATION_DONE +}; + static int armjtagew_register_commands(struct command_context *cmd_ctx) { - COMMAND_REGISTER(cmd_ctx, NULL, "armjtagew_info", - &armjtagew_handle_armjtagew_info_command, COMMAND_EXEC, - "query armjtagew info"); - return ERROR_OK; + return register_commands(cmd_ctx, NULL, armjtagew_command_handlers); } struct jtag_interface armjtagew_interface = { |