gw16012: use register_commands()

Use register_commands() with command registration array.
This commit is contained in:
Zachary T Welch 2009-11-20 20:11:58 -08:00
parent 3ab599a7e4
commit 779bdbe797
1 changed files with 12 additions and 5 deletions

View File

@ -562,13 +562,20 @@ COMMAND_HANDLER(gw16012_handle_parport_port_command)
return ERROR_OK; return ERROR_OK;
} }
static const struct command_registration gw16012_command_handlers[] = {
{
.name = "parport_port",
.handler = &gw16012_handle_parport_port_command,
.mode = COMMAND_CONFIG,
.help = "configure the parallel port to use",
.usage = "<port_num>",
},
COMMAND_REGISTRATION_DONE
};
static int gw16012_register_commands(struct command_context *cmd_ctx) static int gw16012_register_commands(struct command_context *cmd_ctx)
{ {
COMMAND_REGISTER(cmd_ctx, NULL, "parport_port", return register_commands(cmd_ctx, NULL, gw16012_command_handlers);
gw16012_handle_parport_port_command, COMMAND_CONFIG,
NULL);
return ERROR_OK;
} }
struct jtag_interface gw16012_interface = { struct jtag_interface gw16012_interface = {