summaryrefslogtreecommitdiff
path: root/src/flash/tms470.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-20 11:26:35 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-24 21:37:29 -0800
commit833e7f5248778bcb31b4db1a1b91160995415203 (patch)
tree7d5d5fa143b74f4989cc3226a0958e983cb1d2b5 /src/flash/tms470.c
parentf7e1f2df74b599903a6fb2d2ace94c3f1ef06097 (diff)
downloadopenocd+libswd-833e7f5248778bcb31b4db1a1b91160995415203.tar.gz
openocd+libswd-833e7f5248778bcb31b4db1a1b91160995415203.tar.bz2
openocd+libswd-833e7f5248778bcb31b4db1a1b91160995415203.tar.xz
openocd+libswd-833e7f5248778bcb31b4db1a1b91160995415203.zip
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/flash/tms470.c')
-rw-r--r--src/flash/tms470.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/flash/tms470.c b/src/flash/tms470.c
index f6f3900f..bf58f1db 100644
--- a/src/flash/tms470.c
+++ b/src/flash/tms470.c
@@ -819,11 +819,11 @@ static int tms470_erase_sector(struct flash_bank *bank, int sector)
static int tms470_register_commands(struct command_context *cmd_ctx)
{
- struct command *tms470_cmd = register_command(cmd_ctx, NULL, "tms470", NULL, COMMAND_ANY, "applies to TI tms470 family");
+ struct command *tms470_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "tms470", NULL, COMMAND_ANY, "applies to TI tms470 family");
- register_command(cmd_ctx, tms470_cmd, "flash_keyset", tms470_handle_flash_keyset_command, COMMAND_ANY, "tms470 flash_keyset <key0> <key1> <key2> <key3>");
- register_command(cmd_ctx, tms470_cmd, "osc_megahertz", tms470_handle_osc_megahertz_command, COMMAND_ANY, "tms470 osc_megahertz <MHz>");
- register_command(cmd_ctx, tms470_cmd, "plldis", tms470_handle_plldis_command, COMMAND_ANY, "tms470 plldis <0/1>");
+ COMMAND_REGISTER(cmd_ctx, tms470_cmd, "flash_keyset", tms470_handle_flash_keyset_command, COMMAND_ANY, "tms470 flash_keyset <key0> <key1> <key2> <key3>");
+ COMMAND_REGISTER(cmd_ctx, tms470_cmd, "osc_megahertz", tms470_handle_osc_megahertz_command, COMMAND_ANY, "tms470 osc_megahertz <MHz>");
+ COMMAND_REGISTER(cmd_ctx, tms470_cmd, "plldis", tms470_handle_plldis_command, COMMAND_ANY, "tms470 plldis <0/1>");
return ERROR_OK;
}