Use register_commands() with command registration array. Signed-off-by: Zachary T Welch <z...@superlucidity.net> --- src/jtag/gw16012.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/jtag/gw16012.c b/src/jtag/gw16012.c index bc0e472..5118562 100644 --- a/src/jtag/gw16012.c +++ b/src/jtag/gw16012.c @@ -562,13 +562,21 @@ COMMAND_HANDLER(gw16012_handle_parport_port_command) 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>", + }, + }; + static int gw16012_register_commands(struct command_context *cmd_ctx) { - COMMAND_REGISTER(cmd_ctx, NULL, "parport_port", - gw16012_handle_parport_port_command, COMMAND_CONFIG, - NULL); - - return ERROR_OK; + return register_commands(cmd_ctx, NULL, + ARRAY_SIZE(gw16012_command_handlers), + gw16012_command_handlers); } struct jtag_interface gw16012_interface = { -- 1.6.4.4 _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development