adapter: use bitmask for driver's transports
In every driver, replace the array of strings with a bitmask that lists the supported transports. Add an extra field to carry the former first listed transport as a "preferred" transport. It would be used as default when no command 'transport select' is used. This keeps backward compatibility with scripts that do not define the transport, relying on such default. Change-Id: I4976583f1a38fdcc1f85045023dc7c629001f743 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8675 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
This commit is contained in:
@@ -95,9 +95,12 @@ struct transport *get_current_transport(void);
|
||||
|
||||
const char *get_current_transport_name(void);
|
||||
|
||||
const char *transport_name(unsigned int id);
|
||||
|
||||
int transport_register_commands(struct command_context *ctx);
|
||||
|
||||
int allow_transports(struct command_context *ctx, const char * const *vector);
|
||||
int allow_transports(struct command_context *ctx, unsigned int transport_ids,
|
||||
unsigned int transport_preferred_id);
|
||||
|
||||
bool transport_is_jtag(void);
|
||||
bool transport_is_swd(void);
|
||||
|
||||
Reference in New Issue
Block a user