diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-20 19:53:28 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-24 21:37:33 -0800 |
commit | 48429dcfad4c05dc03fd94484da1078b30afd4f3 (patch) | |
tree | 37536c3b904097473c3dec2c190b52ec08639b75 /src | |
parent | e2f23c54373097098ef0b59377299d7382f4c58a (diff) | |
download | openocd_libswd-48429dcfad4c05dc03fd94484da1078b30afd4f3.tar.gz openocd_libswd-48429dcfad4c05dc03fd94484da1078b30afd4f3.tar.bz2 openocd_libswd-48429dcfad4c05dc03fd94484da1078b30afd4f3.tar.xz openocd_libswd-48429dcfad4c05dc03fd94484da1078b30afd4f3.zip |
amt_jtagaccel: use register_commands()
Use register_commands() with command_registration array.
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/amt_jtagaccel.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/jtag/amt_jtagaccel.c b/src/jtag/amt_jtagaccel.c index 0aabdc91..c3f32795 100644 --- a/src/jtag/amt_jtagaccel.c +++ b/src/jtag/amt_jtagaccel.c @@ -540,16 +540,27 @@ COMMAND_HANDLER(amt_jtagaccel_handle_rtck_command) return ERROR_OK; } +static const struct command_registration amtjtagaccel_command_handlers[] = { + { + .name = "parport_port", + .handler = &amt_jtagaccel_handle_parport_port_command, + .mode = COMMAND_CONFIG, + .help = "configure the parallel port to use", + .usage = "<port_num>", + }, + { + .name = "parport_port", + .handler = &amt_jtagaccel_handle_rtck_command, + .mode = COMMAND_CONFIG, + .help = "enable RTCK", + .usage = "<enable|disable>", + }, + COMMAND_REGISTRATION_DONE +}; + static int amt_jtagaccel_register_commands(struct command_context *cmd_ctx) { - COMMAND_REGISTER(cmd_ctx, NULL, "parport_port", - amt_jtagaccel_handle_parport_port_command, COMMAND_CONFIG, - NULL); - COMMAND_REGISTER(cmd_ctx, NULL, "rtck", - amt_jtagaccel_handle_rtck_command, COMMAND_CONFIG, - NULL); - - return ERROR_OK; + return register_commands(cmd_ctx, NULL, amtjtagaccel_command_handlers); } struct jtag_interface amt_jtagaccel_interface = { |