amt_jtagaccel: use register_commands()
Use register_commands() with command_registration array.
This commit is contained in:
parent
e2f23c5437
commit
48429dcfad
|
@ -540,16 +540,27 @@ COMMAND_HANDLER(amt_jtagaccel_handle_rtck_command)
|
||||||
return ERROR_OK;
|
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)
|
static int amt_jtagaccel_register_commands(struct command_context *cmd_ctx)
|
||||||
{
|
{
|
||||||
COMMAND_REGISTER(cmd_ctx, NULL, "parport_port",
|
return register_commands(cmd_ctx, NULL, amtjtagaccel_command_handlers);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct jtag_interface amt_jtagaccel_interface = {
|
struct jtag_interface amt_jtagaccel_interface = {
|
||||||
|
|
Loading…
Reference in New Issue