jtag/adapter: add command 'adapter serial'

Several adapter define their own command to specify the USB serial
number or serial string to be used during USB search.

Define a general command 'adapter serial' to be proposed as
replacement of the driver specific ones.
No driver is changed so far to use it.

Change-Id: I7631687a4163ccc63a9bdf3ad1fcb300fc483d3a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6647
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2021-10-07 19:27:31 +02:00
parent f66a16c4a0
commit 0343ae7cc7
3 changed files with 35 additions and 0 deletions

View File

@@ -55,4 +55,7 @@ int adapter_config_rclk(unsigned int fallback_speed_khz);
/** Retrieves the clock speed of the adapter in kHz. */
unsigned int adapter_get_speed_khz(void);
/** Retrieves the serial number set with command 'adapter serial' */
const char *adapter_get_required_serial(void);
#endif /* OPENOCD_JTAG_ADAPTER_H */