summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorTomek CEDRO <cederom@tlen.pl>2011-06-25 14:16:06 +0200
committerTomek CEDRO <cederom@tlen.pl>2011-06-25 14:16:06 +0200
commit2c7b391eb3179f6c095890741214afcf8dc6ff29 (patch)
treea79216abe804ffa9234370e5dd8ab05b6e028911 /src/transport
parent202a2abedf4ab87e9ae61b6ede5db615f0c1a131 (diff)
downloadopenocd_libswd-2c7b391eb3179f6c095890741214afcf8dc6ff29.tar.gz
openocd_libswd-2c7b391eb3179f6c095890741214afcf8dc6ff29.tar.bz2
openocd_libswd-2c7b391eb3179f6c095890741214afcf8dc6ff29.tar.xz
openocd_libswd-2c7b391eb3179f6c095890741214afcf8dc6ff29.zip
TRANSPORT: Supported transport names lists are now declared by src/transport.h and defined by src/transport.c. Multiple definitions of 'jtag_only' were removed and code was updated to use 'oocd_transport_jtag_only' (also updated headers if necessary) as defined by src/transport.
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/transport.c4
-rw-r--r--src/transport/transport.h9
2 files changed, 11 insertions, 2 deletions
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