This is an automated email from Gerrit.

Marc Schink ([email protected]) just uploaded a new patch set to Gerrit, which you 
can find at http://openocd.zylin.com/6387

-- gerrit

commit 97d1fbe6f55d966fe30056f001c6ca4020f5f675
Author: Marc Schink <[email protected]>
Date:   Fri Jul 30 17:50:21 2021 +0200

    drivers/openjtag: Group adapter commands
    
    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 <[email protected]>

diff --git a/doc/openocd.texi b/doc/openocd.texi
index 1b24757..c3963d6 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -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
diff --git a/src/jtag/drivers/openjtag.c b/src/jtag/drivers/openjtag.c
index 7efb0e5..b107684 100644
--- a/src/jtag/drivers/openjtag.c
+++ b/src/jtag/drivers/openjtag.c
@@ -872,14 +872,14 @@ COMMAND_HANDLER(openjtag_handle_variant_command)
 
 static const struct command_registration openjtag_command_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",
diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl
index 19ee64c..28e1557 100644
--- a/src/jtag/startup.tcl
+++ b/src/jtag/startup.tcl
@@ -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'"

-- 

Reply via email to