drivers/presto: Group adapter commands
Use a command group 'presto' with subcommands instead of individual commands with 'presto_' prefix. The old commands are still available for backward compatibility but marked as deprecated. Change-Id: I883d8d87fd457d29cee8d12cd80f2e6c405e8f42 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/6390 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
4a5045b143
commit
48f34382e3
|
@ -3033,7 +3033,7 @@ parport cable wiggler
|
|||
|
||||
@deffn {Interface Driver} {presto}
|
||||
ASIX PRESTO USB JTAG programmer.
|
||||
@deffn {Config Command} {presto_serial} serial_string
|
||||
@deffn {Config Command} {presto serial} serial_string
|
||||
Configures the USB serial number of the Presto device to use.
|
||||
@end deffn
|
||||
@end deffn
|
||||
|
|
|
@ -519,9 +519,9 @@ COMMAND_HANDLER(presto_handle_serial_command)
|
|||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static const struct command_registration presto_command_handlers[] = {
|
||||
static const struct command_registration presto_subcommand_handlers[] = {
|
||||
{
|
||||
.name = "presto_serial",
|
||||
.name = "serial",
|
||||
.handler = presto_handle_serial_command,
|
||||
.mode = COMMAND_CONFIG,
|
||||
.help = "Configure USB serial number of Presto device.",
|
||||
|
@ -530,6 +530,17 @@ static const struct command_registration presto_command_handlers[] = {
|
|||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
static const struct command_registration presto_command_handlers[] = {
|
||||
{
|
||||
.name = "presto",
|
||||
.mode = COMMAND_ANY,
|
||||
.help = "perform presto management",
|
||||
.chain = presto_subcommand_handlers,
|
||||
.usage = "",
|
||||
},
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
static int presto_jtag_init(void)
|
||||
{
|
||||
if (presto_open(presto_serial) != ERROR_OK) {
|
||||
|
|
|
@ -309,4 +309,10 @@ proc parport_toggling_time args {
|
|||
eval parport toggling_time $args
|
||||
}
|
||||
|
||||
lappend _telnet_autocomplete_skip presto_serial
|
||||
proc presto_serial args {
|
||||
echo "DEPRECATED! use 'presto serial' not 'presto_serial'"
|
||||
eval presto serial $args
|
||||
}
|
||||
|
||||
# END MIGRATION AIDS
|
||||
|
|
Loading…
Reference in New Issue