PLD: usage/help updates
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 9 Jan 2010 07:23:55 +0000 (23:23 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 9 Jan 2010 07:23:55 +0000 (23:23 -0800)
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>
src/pld/pld.c
src/pld/virtex2.c

index 6a0bd93dcc917e444a720cdadfa9c488cf9082d3..5ed7596c77335f5912b769495d781515465a3412 100644 (file)
@@ -76,7 +76,7 @@ COMMAND_HANDLER(handle_pld_device_command)
                        /* register pld specific commands */
                        int retval;
                        if (pld_drivers[i]->commands) {
                        /* 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)
                                {
                                                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;
 
                        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)
                        {
                        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;
                        }
                                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",
 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",
                .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",
                .mode = COMMAND_EXEC,
                .help = "load configuration file into PLD",
-               .usage = "<device#> <file>",
+               .usage = "pld_num filename",
        },
        COMMAND_REGISTRATION_DONE
 };
        },
        COMMAND_REGISTRATION_DONE
 };
@@ -234,14 +236,14 @@ static const struct command_registration pld_config_command_handlers[] = {
        {
                .name = "device",
                .mode = COMMAND_CONFIG,
        {
                .name = "device",
                .mode = COMMAND_CONFIG,
-               .handler = &handle_pld_device_command,
+               .handler = handle_pld_device_command,
                .help = "configure a PLD device",
                .help = "configure a PLD device",
-               .usage = "<driver> ...",
+               .usage = "driver_name [driver_args ... ]",
        },
        {
                .name = "init",
                .mode = COMMAND_CONFIG,
        },
        {
                .name = "init",
                .mode = COMMAND_CONFIG,
-               .handler = &handle_pld_init_command,
+               .handler = handle_pld_init_command,
                .help = "initialize PLD devices",
        },
        COMMAND_REGISTRATION_DONE
                .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",
                .name = "pld",
                .mode = COMMAND_ANY,
                .help = "programmable logic device commands",
-
                .chain = pld_config_command_handlers,
        },
        COMMAND_REGISTRATION_DONE
                .chain = pld_config_command_handlers,
        },
        COMMAND_REGISTRATION_DONE
index 77eb8669974f5a36f34f2c87d15820b2a2a11ea3..bbf6b66751548d2eb49bf7e2f67619321592c4aa 100644 (file)
@@ -237,9 +237,9 @@ static const struct command_registration virtex2_exec_command_handlers[] = {
        {
                .name = "read_stat",
                .mode = COMMAND_EXEC,
        {
                .name = "read_stat",
                .mode = COMMAND_EXEC,
-               .handler = &virtex2_handle_read_stat_command,
+               .handler = virtex2_handle_read_stat_command,
                .help = "read status register",
                .help = "read status register",
-               .usage = "<device_id>",
+               .usage = "pld_num",
        },
        COMMAND_REGISTRATION_DONE
 };
        },
        COMMAND_REGISTRATION_DONE
 };

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)