summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jtag/adapter.c3
-rw-r--r--src/jtag/core.c2
-rw-r--r--src/jtag/drivers/ft2232.c2
-rw-r--r--src/jtag/interface.h2
-rw-r--r--src/transport/transport.c4
-rw-r--r--src/transport/transport.h9
6 files changed, 14 insertions, 8 deletions
diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c
index 628bfaee..7cacd62f 100644
--- a/src/jtag/adapter.c
+++ b/src/jtag/adapter.c
@@ -50,7 +50,6 @@
*/
extern struct jtag_interface *jtag_interface;
-const char *jtag_only[] = { "jtag", NULL };
static int
jim_adapter_name(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
@@ -169,7 +168,7 @@ COMMAND_HANDLER(handle_interface_command)
"which transports it allows; assuming "
"legacy JTAG-only", jtag_interface->name);
retval = allow_transports(CMD_CTX, jtag_interface->transports
- ? jtag_interface->transports : jtag_only);
+ ? jtag_interface->transports : oocd_transport_jtag_only);
if (ERROR_OK != retval)
return retval;
diff --git a/src/jtag/core.c b/src/jtag/core.c
index b26701e3..1345de8f 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -1384,7 +1384,7 @@ int adapter_init(struct command_context *cmd_ctx)
LOG_ERROR("Adapter driver '%s' did not declare "
"which transports it allows; assuming "
"JTAG-only", jtag->name);
- retval = allow_transports(cmd_ctx, jtag_only);
+ retval = allow_transports(cmd_ctx, oocd_transport_jtag_only);
if (retval != ERROR_OK)
return retval;
}
diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c
index 215c13e8..8ceaa645 100644
--- a/src/jtag/drivers/ft2232.c
+++ b/src/jtag/drivers/ft2232.c
@@ -4683,7 +4683,7 @@ struct jtag_interface ft2232_interface = {
.name = "ft2232",
.supported = DEBUG_CAP_TMS_SEQ,
.commands = ft2232_command_handlers,
- .transports = jtag_only,
+ .transports = oocd_transport_jtag_only,
.init = ft2232_init,
.quit = ft2232_quit,
diff --git a/src/jtag/interface.h b/src/jtag/interface.h
index 9c30352c..d98751df 100644
--- a/src/jtag/interface.h
+++ b/src/jtag/interface.h
@@ -328,8 +328,6 @@ struct jtag_interface {
};
-extern const char *jtag_only[];
-
extern const struct swd_driver *swd;
#endif // OPENOCD_JTAG_INTERFACE_H
diff --git a/src/transport/transport.c b/src/transport/transport.c
index 3a0cdd36..32a95e4a 100644
--- a/src/transport/transport.c
+++ b/src/transport/transport.c
@@ -69,6 +69,10 @@ static const char **allowed_transports;
/** * The transport being used for the current OpenOCD session. */
static struct transport *session_transport;
+/** Transport names definitions. */
+const char *oocd_transport_jtag_only[] = { "jtag", NULL };
+const char *oocd_transport_swd_only[] = { "swd" , NULL };
+
static int transport_select(struct command_context *ctx, const char *name)
{
int retval;
diff --git a/src/transport/transport.h b/src/transport/transport.h
index 73b872f6..2702b9ef 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -17,8 +17,8 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef TRANSPORT_H
-#define TRANSPORT_H
+#ifndef OOCD_TRANSPORT_H
+#define OOCD_TRANSPORT_H
#include "helper/command.h"
@@ -100,4 +100,9 @@ int allow_transports(struct command_context *ctx, const char **vector);
bool transports_are_declared(void);
+extern const char *oocd_transport_jtag_only[];
+extern const char *oocd_transport_swd_only[];
+
+
+
#endif