drivers/jtag_dpi: Group adapter commands

Use a command group 'jtag_dpi' with subcommands instead of individual
commands with 'jtag_dpi_' prefix.

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

Change-Id: I19271546235a3c6737f975976a0bf0a2f66cbbe7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6394
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Marc Schink
2021-07-30 18:24:03 +02:00
committed by Antonio Borneo
parent 347af768ed
commit 08ce499f14
3 changed files with 28 additions and 5 deletions

View File

@@ -373,16 +373,16 @@ COMMAND_HANDLER(jtag_dpi_set_address)
return ERROR_OK;
}
static const struct command_registration jtag_dpi_command_handlers[] = {
static const struct command_registration jtag_dpi_subcommand_handlers[] = {
{
.name = "jtag_dpi_set_port",
.name = "set_port",
.handler = &jtag_dpi_set_port,
.mode = COMMAND_CONFIG,
.help = "set the port of the DPI server",
.usage = "[port]",
},
{
.name = "jtag_dpi_set_address",
.name = "set_address",
.handler = &jtag_dpi_set_address,
.mode = COMMAND_CONFIG,
.help = "set the address of the DPI server",
@@ -391,6 +391,17 @@ static const struct command_registration jtag_dpi_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
static const struct command_registration jtag_dpi_command_handlers[] = {
{
.name = "jtag_dpi",
.mode = COMMAND_ANY,
.help = "perform jtag_dpi management",
.chain = jtag_dpi_subcommand_handlers,
.usage = "",
},
COMMAND_REGISTRATION_DONE
};
static struct jtag_interface jtag_dpi_interface = {
.supported = DEBUG_CAP_TMS_SEQ,
.execute_queue = jtag_dpi_execute_queue,