drivers/openjtag: Group adapter commands 87/6387/3
authorMarc Schink <dev@zapb.de>
Fri, 30 Jul 2021 15:50:21 +0000 (17:50 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 14 Aug 2021 12:33:07 +0000 (13:33 +0100)
Use a command group 'openjtag' with subcommands instead of individual
commands with 'openjtag_' prefix.

The old commands are still available for backward compatibility but
marked as deprecated.

Change-Id: Ie1b1bf0b7c03e7703cfb074e554288384bf7b1b9
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6387
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
doc/openocd.texi
src/jtag/drivers/openjtag.c
src/jtag/startup.tcl

index 1b247578ed2c54f422acf68ad9f00e4a7d49e413..c3963d6cbd9aac82a46ad99120981b18e9b097cc 100644 (file)
@@ -3298,7 +3298,7 @@ See @file{interface/sysfsgpio-raspberrypi.cfg} for a sample config.
 OpenJTAG compatible USB adapter.
 This defines some driver-specific commands:
 
-@deffn {Config Command} {openjtag_variant} variant
+@deffn {Config Command} {openjtag variant} variant
 Specifies the variant of the OpenJTAG adapter (see @uref{http://www.openjtag.org/}).
 Currently valid @var{variant} values include:
 
@@ -3309,7 +3309,7 @@ Currently valid @var{variant} values include:
 @end itemize
 @end deffn
 
-@deffn {Config Command} {openjtag_device_desc} string
+@deffn {Config Command} {openjtag device_desc} string
 The USB device description string of the adapter.
 This value is only used with the standard variant.
 @end deffn
index 7efb0e5e01fa8133980c99ee3c904e286a3b7d6b..123134f51338095b0db525fdd6675b1a0fbbc460 100644 (file)
@@ -870,16 +870,16 @@ COMMAND_HANDLER(openjtag_handle_variant_command)
        return ERROR_OK;
 }
 
-static const struct command_registration openjtag_command_handlers[] = {
+static const struct command_registration openjtag_subcommand_handlers[] = {
        {
-               .name = "openjtag_device_desc",
+               .name = "device_desc",
                .handler = openjtag_handle_device_desc_command,
                .mode = COMMAND_CONFIG,
                .help = "set the USB device description of the OpenJTAG",
                .usage = "description-string",
        },
        {
-               .name = "openjtag_variant",
+               .name = "variant",
                .handler = openjtag_handle_variant_command,
                .mode = COMMAND_CONFIG,
                .help = "set the OpenJTAG variant",
@@ -888,6 +888,17 @@ static const struct command_registration openjtag_command_handlers[] = {
        COMMAND_REGISTRATION_DONE
 };
 
+static const struct command_registration openjtag_command_handlers[] = {
+       {
+               .name = "openjtag",
+               .mode = COMMAND_ANY,
+               .help = "perform openjtag management",
+               .chain = openjtag_subcommand_handlers,
+               .usage = "",
+       },
+       COMMAND_REGISTRATION_DONE
+};
+
 static struct jtag_interface openjtag_interface = {
        .execute_queue = openjtag_execute_queue,
 };
index d6413e48fb3bb9f5dba95a6e376a3fcb146e5dc4..f2e4ec35342d490e8f8765256d666cb85328d1ed 100644 (file)
@@ -261,6 +261,18 @@ proc ftdi_tdo_sample_edge args {
        eval ftdi tdo_sample_edge $args
 }
 
+lappend _telnet_autocomplete_skip openjtag_device_desc
+proc openjtag_device_desc args {
+       echo "DEPRECATED! use 'openjtag device_desc' not 'openjtag_device_desc'"
+       eval openjtag device_desc $args
+}
+
+lappend _telnet_autocomplete_skip openjtag_variant
+proc openjtag_variant args {
+       echo "DEPRECATED! use 'openjtag variant' not 'openjtag_variant'"
+       eval openjtag variant $args
+}
+
 lappend _telnet_autocomplete_skip parport_port
 proc parport_port args {
        echo "DEPRECATED! use 'parport port' not 'parport_port'"

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)