jtag/hla, jtag/stlink: switch to command 'adapter serial'
The driver hla defines the command 'hla_serial' to specify the serial string of the adapter. The driver st-link defines the command 'st-link serial' to specify the serial string of the adapter. Remove and deprecate the driver commands and use 'adapter serial'. Change-Id: I9505c398a77125b1ebf4ba71da7baf4d663b75be Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6657 Tested-by: jenkins
This commit is contained in:
@@ -38,7 +38,6 @@
|
||||
static struct hl_interface_s hl_if = {
|
||||
.param = {
|
||||
.device_desc = NULL,
|
||||
.serial = NULL,
|
||||
.vid = { 0 },
|
||||
.pid = { 0 },
|
||||
.transport = HL_TRANSPORT_UNKNOWN,
|
||||
@@ -136,7 +135,6 @@ static int hl_interface_quit(void)
|
||||
jtag_command_queue_reset();
|
||||
|
||||
free((void *)hl_if.param.device_desc);
|
||||
free((void *)hl_if.param.serial);
|
||||
|
||||
return ERROR_OK;
|
||||
}
|
||||
@@ -238,19 +236,6 @@ COMMAND_HANDLER(hl_interface_handle_device_desc_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
COMMAND_HANDLER(hl_interface_handle_serial_command)
|
||||
{
|
||||
LOG_DEBUG("hl_interface_handle_serial_command");
|
||||
|
||||
if (CMD_ARGC == 1) {
|
||||
hl_if.param.serial = strdup(CMD_ARGV[0]);
|
||||
} else {
|
||||
LOG_ERROR("expected exactly one argument to hl_serial <serial-number>");
|
||||
}
|
||||
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
COMMAND_HANDLER(hl_interface_handle_layout_command)
|
||||
{
|
||||
LOG_DEBUG("hl_interface_handle_layout_command");
|
||||
@@ -354,13 +339,6 @@ static const struct command_registration hl_interface_command_handlers[] = {
|
||||
.help = "set the device description of the adapter",
|
||||
.usage = "description_string",
|
||||
},
|
||||
{
|
||||
.name = "hla_serial",
|
||||
.handler = &hl_interface_handle_serial_command,
|
||||
.mode = COMMAND_CONFIG,
|
||||
.help = "set the serial number of the adapter",
|
||||
.usage = "serial_string",
|
||||
},
|
||||
{
|
||||
.name = "hla_layout",
|
||||
.handler = &hl_interface_handle_layout_command,
|
||||
|
||||
@@ -34,8 +34,6 @@ extern const char *hl_transports[];
|
||||
struct hl_interface_param_s {
|
||||
/** */
|
||||
const char *device_desc;
|
||||
/** */
|
||||
const char *serial;
|
||||
/** List of recognised VIDs */
|
||||
uint16_t vid[HLA_MAX_USB_IDS + 1];
|
||||
/** List of recognised PIDs */
|
||||
|
||||
Reference in New Issue
Block a user