summaryrefslogtreecommitdiff
path: root/src/pld
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2010-01-08 23:23:55 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2010-01-08 23:23:55 -0800
commit973cd9a299d904ab22bb089319beab65c339d783 (patch)
tree5f835d58e391fdad5ee26757eae6f5a1e9fe988e /src/pld
parent2a76c1bcf94f8ed00c9e744a5405d0ac07cdc85a (diff)
downloadopenocd_libswd-973cd9a299d904ab22bb089319beab65c339d783.tar.gz
openocd_libswd-973cd9a299d904ab22bb089319beab65c339d783.tar.bz2
openocd_libswd-973cd9a299d904ab22bb089319beab65c339d783.tar.xz
openocd_libswd-973cd9a299d904ab22bb089319beab65c339d783.zip
PLD: usage/help updates
Make "usage" messages use the same EBNF as the User's Guide; no angle brackets. Improve and correct various helptexts. Don't use "&function"; a function's name is its address. Remove a couple instances of pointless whitespace, shrink a few overlong lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/pld')
-rw-r--r--src/pld/pld.c21
-rw-r--r--src/pld/virtex2.c4
2 files changed, 13 insertions, 12 deletions
diff --git a/src/pld/pld.c b/src/pld/pld.c
index 6a0bd93d..5ed7596c 100644
--- a/src/pld/pld.c
+++ b/src/pld/pld.c
@@ -76,7 +76,7 @@ COMMAND_HANDLER(handle_pld_device_command)
/* register pld specific commands */
int retval;
if (pld_drivers[i]->commands) {
- retval = register_commands(CMD_CTX, NULL,
+ retval = register_commands(CMD_CTX, NULL,
pld_drivers[i]->commands);
if (ERROR_OK != retval)
{
@@ -89,10 +89,12 @@ COMMAND_HANDLER(handle_pld_device_command)
c->driver = pld_drivers[i];
c->next = NULL;
- retval = CALL_COMMAND_HANDLER(pld_drivers[i]->pld_device_command, c);
+ retval = CALL_COMMAND_HANDLER(
+ pld_drivers[i]->pld_device_command, c);
if (ERROR_OK != retval)
{
- LOG_ERROR("'%s' driver rejected pld device", CMD_ARGV[0]);
+ LOG_ERROR("'%s' driver rejected pld device",
+ CMD_ARGV[0]);
free(c);
return ERROR_OK;
}
@@ -191,16 +193,16 @@ COMMAND_HANDLER(handle_pld_load_command)
static const struct command_registration pld_exec_command_handlers[] = {
{
.name = "devices",
- .handler = &handle_pld_devices_command,
+ .handler = handle_pld_devices_command,
.mode = COMMAND_EXEC,
.help = "list configured pld devices",
},
{
.name = "load",
- .handler = &handle_pld_load_command,
+ .handler = handle_pld_load_command,
.mode = COMMAND_EXEC,
.help = "load configuration file into PLD",
- .usage = "<device#> <file>",
+ .usage = "pld_num filename",
},
COMMAND_REGISTRATION_DONE
};
@@ -234,14 +236,14 @@ static const struct command_registration pld_config_command_handlers[] = {
{
.name = "device",
.mode = COMMAND_CONFIG,
- .handler = &handle_pld_device_command,
+ .handler = handle_pld_device_command,
.help = "configure a PLD device",
- .usage = "<driver> ...",
+ .usage = "driver_name [driver_args ... ]",
},
{
.name = "init",
.mode = COMMAND_CONFIG,
- .handler = &handle_pld_init_command,
+ .handler = handle_pld_init_command,
.help = "initialize PLD devices",
},
COMMAND_REGISTRATION_DONE
@@ -251,7 +253,6 @@ static const struct command_registration pld_command_handler[] = {
.name = "pld",
.mode = COMMAND_ANY,
.help = "programmable logic device commands",
-
.chain = pld_config_command_handlers,
},
COMMAND_REGISTRATION_DONE
diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c
index 77eb8669..bbf6b667 100644
--- a/src/pld/virtex2.c
+++ b/src/pld/virtex2.c
@@ -237,9 +237,9 @@ static const struct command_registration virtex2_exec_command_handlers[] = {
{
.name = "read_stat",
.mode = COMMAND_EXEC,
- .handler = &virtex2_handle_read_stat_command,
+ .handler = virtex2_handle_read_stat_command,
.help = "read status register",
- .usage = "<device_id>",
+ .usage = "pld_num",
},
COMMAND_REGISTRATION_DONE
};