summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-20 20:11:58 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-24 21:37:33 -0800
commit779bdbe797b9c25b9f297b4f29500e847baf28c3 (patch)
tree1e23c62c013e9534f33a1686476299d64c6fdacd /src
parent3ab599a7e43af7350b380e7ffcc5fdcd75b42a65 (diff)
downloadopenocd_libswd-779bdbe797b9c25b9f297b4f29500e847baf28c3.tar.gz
openocd_libswd-779bdbe797b9c25b9f297b4f29500e847baf28c3.tar.bz2
openocd_libswd-779bdbe797b9c25b9f297b4f29500e847baf28c3.tar.xz
openocd_libswd-779bdbe797b9c25b9f297b4f29500e847baf28c3.zip
gw16012: use register_commands()
Use register_commands() with command registration array.
Diffstat (limited to 'src')
-rw-r--r--src/jtag/gw16012.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/jtag/gw16012.c b/src/jtag/gw16012.c
index bc0e4724..0e495f92 100644
--- a/src/jtag/gw16012.c
+++ b/src/jtag/gw16012.c
@@ -562,13 +562,20 @@ 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>",
+ },
+ COMMAND_REGISTRATION_DONE
+};
+
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, gw16012_command_handlers);
}
struct jtag_interface gw16012_interface = {