Browse Source

drivers/vsllink: Group adapter commands

Use a command group 'vsllink' with subcommands instead of individual
commands with 'vsllink_' prefix.

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

Change-Id: I59273bd7cd08c9801e4a9b3de7beaa86ca854622
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6393
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
jim
Marc Schink 2 years ago
committed by Antonio Borneo
parent
commit
347af768ed
2 changed files with 54 additions and 7 deletions
  1. +18
    -7
      src/jtag/drivers/vsllink.c
  2. +36
    -0
      src/jtag/startup.tcl

+ 18
- 7
src/jtag/drivers/vsllink.c View File

@@ -887,44 +887,44 @@ static void vsllink_debug_buffer(uint8_t *buffer, int length)
}
}

static const struct command_registration vsllink_command_handlers[] = {
static const struct command_registration vsllink_subcommand_handlers[] = {
{
.name = "vsllink_usb_vid",
.name = "usb_vid",
.handler = &vsllink_handle_usb_vid_command,
.mode = COMMAND_CONFIG,
.help = "Set USB VID",
.usage = "<vid>",
},
{
.name = "vsllink_usb_pid",
.name = "usb_pid",
.handler = &vsllink_handle_usb_pid_command,
.mode = COMMAND_CONFIG,
.help = "Set USB PID",
.usage = "<pid>",
},
{
.name = "vsllink_usb_serial",
.name = "usb_serial",
.handler = &vsllink_handle_usb_serial_command,
.mode = COMMAND_CONFIG,
.help = "Set or disable check for USB serial",
.usage = "[<serial>]",
},
{
.name = "vsllink_usb_bulkin",
.name = "usb_bulkin",
.handler = &vsllink_handle_usb_bulkin_command,
.mode = COMMAND_CONFIG,
.help = "Set USB input endpoint",
.usage = "<ep_in>",
},
{
.name = "vsllink_usb_bulkout",
.name = "usb_bulkout",
.handler = &vsllink_handle_usb_bulkout_command,
.mode = COMMAND_CONFIG,
.help = "Set USB output endpoint",
.usage = "<ep_out>",
},
{
.name = "vsllink_usb_interface",
.name = "usb_interface",
.handler = &vsllink_handle_usb_interface_command,
.mode = COMMAND_CONFIG,
.help = "Set USB output interface",
@@ -933,6 +933,17 @@ static const struct command_registration vsllink_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};

static const struct command_registration vsllink_command_handlers[] = {
{
.name = "vsllink",
.mode = COMMAND_ANY,
.help = "perform vsllink management",
.chain = vsllink_subcommand_handlers,
.usage = "",
},
COMMAND_REGISTRATION_DONE
};

static const char * const vsllink_transports[] = {"jtag", "swd", NULL};

static const struct swd_driver vsllink_swd_driver = {


+ 36
- 0
src/jtag/startup.tcl View File

@@ -327,4 +327,40 @@ proc ulink_download_firmware args {
eval ulink download_firmware $args
}

lappend _telnet_autocomplete_skip vsllink_usb_vid
proc vsllink_usb_vid args {
echo "DEPRECATED! use 'vsllink usb_vid' not 'vsllink_usb_vid'"
eval vsllink usb_vid $args
}

lappend _telnet_autocomplete_skip vsllink_usb_pid
proc vsllink_usb_pid args {
echo "DEPRECATED! use 'vsllink usb_pid' not 'vsllink_usb_pid'"
eval vsllink usb_pid $args
}

lappend _telnet_autocomplete_skip vsllink_usb_serial
proc vsllink_usb_serial args {
echo "DEPRECATED! use 'vsllink usb_serial' not 'vsllink_usb_serial'"
eval vsllink usb_serial $args
}

lappend _telnet_autocomplete_skip vsllink_usb_bulkin
proc vsllink_usb_bulkin args {
echo "DEPRECATED! use 'vsllink usb_bulkin' not 'vsllink_usb_bulkin'"
eval vsllink usb_bulkin $args
}

lappend _telnet_autocomplete_skip vsllink_usb_bulkout
proc vsllink_usb_bulkout args {
echo "DEPRECATED! use 'vsllink usb_bulkout' not 'vsllink_usb_bulkout'"
eval vsllink usb_bulkout $args
}

lappend _telnet_autocomplete_skip vsllink_usb_interface
proc vsllink_usb_interface args {
echo "DEPRECATED! use 'vsllink usb_interface' not 'vsllink_usb_interface'"
eval vsllink usb_interface $args
}

# END MIGRATION AIDS

Loading…
Cancel
Save