diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-20 11:26:35 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-24 21:37:29 -0800 |
commit | 833e7f5248778bcb31b4db1a1b91160995415203 (patch) | |
tree | 7d5d5fa143b74f4989cc3226a0958e983cb1d2b5 /src/target/armv7a.c | |
parent | f7e1f2df74b599903a6fb2d2ace94c3f1ef06097 (diff) | |
download | riscv-openocd-833e7f5248778bcb31b4db1a1b91160995415203.zip riscv-openocd-833e7f5248778bcb31b4db1a1b91160995415203.tar.gz riscv-openocd-833e7f5248778bcb31b4db1a1b91160995415203.tar.bz2 |
use COMMAND_REGISTER macro
Replaces direct calls to register_command() with a macro, to allow
its parameters to be changed and callers updated in phases.
Diffstat (limited to 'src/target/armv7a.c')
-rw-r--r-- | src/target/armv7a.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/target/armv7a.c b/src/target/armv7a.c index 1d13779..6763863 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -148,26 +148,26 @@ int armv7a_register_commands(struct command_context *cmd_ctx) { struct command *arm_adi_v5_dap_cmd; - arm_adi_v5_dap_cmd = register_command(cmd_ctx, NULL, "dap", + arm_adi_v5_dap_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "dap", NULL, COMMAND_ANY, "cortex dap specific commands"); - register_command(cmd_ctx, arm_adi_v5_dap_cmd, "info", + COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "info", handle_dap_info_command, COMMAND_EXEC, "dap info for ap [num], " "default currently selected AP"); - register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apsel", + COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apsel", handle_dap_apsel_command, COMMAND_EXEC, "select a different AP [num] (default 0)"); - register_command(cmd_ctx, arm_adi_v5_dap_cmd, "apid", + COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "apid", handle_dap_apid_command, COMMAND_EXEC, "return id reg from AP [num], " "default currently selected AP"); - register_command(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr", + COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "baseaddr", handle_dap_baseaddr_command, COMMAND_EXEC, "return debug base address from AP [num], " "default currently selected AP"); - register_command(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess", + COMMAND_REGISTER(cmd_ctx, arm_adi_v5_dap_cmd, "memaccess", handle_dap_memaccess_command, COMMAND_EXEC, "set/get number of extra tck for mem-ap memory " "bus access [0-255]"); |