transport: use a bitmask for the transport

Move the transport's names in a local array in the transport
framework.

Replace the string struct transport::name, that identifies the
transport, with a bitmask where each bit corresponds to one of the
available transports.

Change-Id: I6bdf7264d5979c355299f63fcf80bf54dcd95cee
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8674
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
This commit is contained in:
Antonio Borneo
2024-12-22 17:06:12 +01:00
parent 9a5de74423
commit 236208a5ff
7 changed files with 102 additions and 31 deletions

View File

@@ -136,7 +136,7 @@ static int swim_transport_init(struct command_context *cmd_ctx)
}
static struct transport swim_transport = {
.name = "swim",
.id = TRANSPORT_SWIM,
.select = swim_transport_select,
.init = swim_transport_init,
};