drivers: xds110: Clean up command syntax and documentation
[openocd.git] / src / jtag / drivers / xds110.c
index 085d85f4c3c76807dfce92be28b258fca8de7fc2..9ca200e79b2e9e0896565ef3c850cb97d2dc9cd9 100644 (file)
@@ -2028,11 +2028,8 @@ COMMAND_HANDLER(xds110_handle_serial_command)
                        xds110.serial[i] = (char)serial[i];
 
                xds110.serial[len] = 0;
-       } else {
-               LOG_ERROR("XDS110: expected exactly one argument to xds110_serial "
-                       "<serial-number>");
-               return ERROR_FAIL;
-       }
+       } else
+               return ERROR_COMMAND_SYNTAX_ERROR;
 
        return ERROR_OK;
 }
@@ -2053,11 +2050,8 @@ COMMAND_HANDLER(xds110_handle_supply_voltage_command)
                        return ERROR_FAIL;
                }
                xds110.voltage = voltage;
-       } else {
-               LOG_ERROR("XDS110: expected one argument to xds110_supply_voltage "
-                       "<millivolts>");
-               return ERROR_FAIL;
-       }
+       } else
+               return ERROR_COMMAND_SYNTAX_ERROR;
 
        return ERROR_OK;
 }
@@ -2067,33 +2061,33 @@ static const struct command_registration xds110_subcommand_handlers[] = {
                .name = "info",
                .handler = &xds110_handle_info_command,
                .mode = COMMAND_EXEC,
-               .usage = "",
                .help = "show XDS110 info",
-       },
-       COMMAND_REGISTRATION_DONE
-};
-
-static const struct command_registration xds110_command_handlers[] = {
-       {
-               .name = "xds110",
-               .mode = COMMAND_ANY,
-               .help = "perform XDS110 management",
-               .usage = "<cmd>",
-               .chain = xds110_subcommand_handlers,
+               .usage = "",
        },
        {
-               .name = "xds110_serial",
+               .name = "serial",
                .handler = &xds110_handle_serial_command,
                .mode = COMMAND_CONFIG,
                .help = "set the XDS110 probe serial number",
                .usage = "serial_string",
        },
        {
-               .name = "xds110_supply_voltage",
+               .name = "supply",
                .handler = &xds110_handle_supply_voltage_command,
                .mode = COMMAND_CONFIG,
                .help = "set the XDS110 probe supply voltage",
-               .usage = "supply_voltage (millivolts)",
+               .usage = "voltage_in_millivolts",
+       },
+       COMMAND_REGISTRATION_DONE
+};
+
+static const struct command_registration xds110_command_handlers[] = {
+       {
+               .name = "xds110",
+               .mode = COMMAND_ANY,
+               .help = "perform XDS110 management",
+               .usage = "",
+               .chain = xds110_subcommand_handlers,
        },
        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)