return ERROR_COMMAND_SYNTAX_ERROR;
}
- target = get_target(args[0]);
+ target = get_target(CMD_ARGV[0]);
if (!target)
{
- LOG_ERROR("ETB: target '%s' not defined", args[0]);
+ LOG_ERROR("ETB: target '%s' not defined", CMD_ARGV[0]);
return ERROR_FAIL;
}
arm = target_to_arm(target);
if (!is_arm(arm))
{
- command_print(cmd_ctx, "ETB: '%s' isn't an ARM", args[0]);
+ command_print(CMD_CTX, "ETB: '%s' isn't an ARM", CMD_ARGV[0]);
return ERROR_FAIL;
}
- tap = jtag_tap_by_string(args[1]);
+ tap = jtag_tap_by_string(CMD_ARGV[1]);
if (tap == NULL)
{
- command_print(cmd_ctx, "ETB: TAP %s does not exist", args[1]);
+ command_print(CMD_CTX, "ETB: TAP %s does not exist", CMD_ARGV[1]);
return ERROR_FAIL;
}
static int etb_register_commands(struct command_context *cmd_ctx)
{
- struct command *etb_cmd = register_command(cmd_ctx, NULL, "etb",
+ struct command *etb_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "etb",
NULL, COMMAND_ANY, "Embedded Trace Buffer");
- register_command(cmd_ctx, etb_cmd, "config",
+ COMMAND_REGISTER(cmd_ctx, etb_cmd, "config",
handle_etb_config_command, COMMAND_CONFIG,
NULL);