aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-01 23:01:24 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-01 23:01:24 +0000
commita88871bc6ad13561d9e60fbd9152b8f0c05329b1 (patch)
tree1d6e0db86dc55b47c80ad5766c58d6e2a94b163d
parent35082f788b457b8f5fde9943d9b4246592f29c1d (diff)
downloadriscv-openocd-a88871bc6ad13561d9e60fbd9152b8f0c05329b1.zip
riscv-openocd-a88871bc6ad13561d9e60fbd9152b8f0c05329b1.tar.gz
riscv-openocd-a88871bc6ad13561d9e60fbd9152b8f0c05329b1.tar.bz2
Encapsulate JTAG Cable API and interface structure, plan for new header file.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1984 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/jtag/amt_jtagaccel.c1
-rw-r--r--src/jtag/arm-jtag-ew.c1
-rw-r--r--src/jtag/at91rm9200.c1
-rw-r--r--src/jtag/bitbang.c1
-rw-r--r--src/jtag/bitq.c1
-rw-r--r--src/jtag/dummy.c1
-rw-r--r--src/jtag/ep93xx.c1
-rw-r--r--src/jtag/ft2232.c1
-rw-r--r--src/jtag/gw16012.c1
-rw-r--r--src/jtag/jlink.c1
-rw-r--r--src/jtag/jtag.c1
-rw-r--r--src/jtag/jtag.h8
-rw-r--r--src/jtag/parport.c1
-rw-r--r--src/jtag/presto.c1
-rw-r--r--src/jtag/rlink/rlink.c1
-rw-r--r--src/jtag/usbprog.c1
-rw-r--r--src/jtag/vsllink.c1
-rw-r--r--src/jtag/zy1000.c1
-rw-r--r--src/xsvf/xsvf.c1
19 files changed, 26 insertions, 0 deletions
diff --git a/src/jtag/amt_jtagaccel.c b/src/jtag/amt_jtagaccel.c
index 0271c01..df44da0 100644
--- a/src/jtag/amt_jtagaccel.c
+++ b/src/jtag/amt_jtagaccel.c
@@ -21,6 +21,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
diff --git a/src/jtag/arm-jtag-ew.c b/src/jtag/arm-jtag-ew.c
index 180f40d..a997956 100644
--- a/src/jtag/arm-jtag-ew.c
+++ b/src/jtag/arm-jtag-ew.c
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include <usb.h>
diff --git a/src/jtag/at91rm9200.c b/src/jtag/at91rm9200.c
index 9f15b1a..d324978 100644
--- a/src/jtag/at91rm9200.c
+++ b/src/jtag/at91rm9200.c
@@ -21,6 +21,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include "bitbang.h"
diff --git a/src/jtag/bitbang.c b/src/jtag/bitbang.c
index ce4fa19..9d50dcc 100644
--- a/src/jtag/bitbang.c
+++ b/src/jtag/bitbang.c
@@ -25,6 +25,7 @@
#endif
#include "bitbang.h"
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
/**
diff --git a/src/jtag/bitq.c b/src/jtag/bitq.c
index eaf7a63..40b704b 100644
--- a/src/jtag/bitq.c
+++ b/src/jtag/bitq.c
@@ -21,6 +21,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "bitq.h"
diff --git a/src/jtag/dummy.c b/src/jtag/dummy.c
index bbed1d4..cc799fa 100644
--- a/src/jtag/dummy.c
+++ b/src/jtag/dummy.c
@@ -21,6 +21,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include "bitbang.h"
diff --git a/src/jtag/ep93xx.c b/src/jtag/ep93xx.c
index 1f42231..0ac4c2f 100644
--- a/src/jtag/ep93xx.c
+++ b/src/jtag/ep93xx.c
@@ -21,6 +21,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include "bitbang.h"
diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c
index 779923e..b441598 100644
--- a/src/jtag/ft2232.c
+++ b/src/jtag/ft2232.c
@@ -40,6 +40,7 @@
#endif
/* project specific includes */
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include "time_support.h"
diff --git a/src/jtag/gw16012.c b/src/jtag/gw16012.c
index f5f8b86..8d59e25 100644
--- a/src/jtag/gw16012.c
+++ b/src/jtag/gw16012.c
@@ -21,6 +21,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c
index 4a800f7..accc6b5 100644
--- a/src/jtag/jlink.c
+++ b/src/jtag/jlink.c
@@ -25,6 +25,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include <usb.h>
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 303b434..d0cb433 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -29,6 +29,7 @@
#endif
#define INCLUDE_JTAG_MINIDRIVER_H
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#ifdef HAVE_STRINGS_H
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index 81d8748..83ce28a 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -105,6 +105,8 @@ typedef struct tap_transition_s
//extern tap_transition_t tap_transitions[16]; /* describe the TAP state diagram */
+#ifdef INCLUDE_JTAG_INTERFACE_H
+
/*-----<Cable Helper API>-------------------------------------------*/
/* The "Cable Helper API" is what the cable drivers can use to help implement
@@ -254,6 +256,8 @@ static inline tap_state_t jtag_debug_state_machine(const void *tms_buf,
/*-----</Cable Helper API>------------------------------------------*/
+#endif // INCLUDE_JTAG_INTERFACE_H
+
extern tap_state_t cmd_queue_end_state; /* finish DR scans in dr_end_state */
extern tap_state_t cmd_queue_cur_state; /* current TAP state */
@@ -428,6 +432,8 @@ enum reset_line_mode {
LINE_PUSH_PULL = 0x1,
};
+#ifdef INCLUDE_JTAG_INTERFACE_H
+
typedef struct jtag_interface_s
{
char* name;
@@ -477,6 +483,8 @@ typedef struct jtag_interface_s
int (*srst_asserted)(int* srst_asserted);
} jtag_interface_t;
+#endif // INCLUDE_JTAG_INTERFACE_H
+
enum jtag_event {
JTAG_TRST_ASSERTED
};
diff --git a/src/jtag/parport.c b/src/jtag/parport.c
index 74c0120..4bb5e74 100644
--- a/src/jtag/parport.c
+++ b/src/jtag/parport.c
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include "bitbang.h"
diff --git a/src/jtag/presto.c b/src/jtag/presto.c
index 334db76..56543e6 100644
--- a/src/jtag/presto.c
+++ b/src/jtag/presto.c
@@ -25,6 +25,7 @@
#include "windows.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include "time_support.h"
#include "bitq.h"
diff --git a/src/jtag/rlink/rlink.c b/src/jtag/rlink/rlink.c
index 7cebfcd..adb5f34 100644
--- a/src/jtag/rlink/rlink.c
+++ b/src/jtag/rlink/rlink.c
@@ -28,6 +28,7 @@
#endif
/* project specific includes */
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include "rlink.h"
#include "st7.h"
diff --git a/src/jtag/usbprog.c b/src/jtag/usbprog.c
index dfde295..7e84390 100644
--- a/src/jtag/usbprog.c
+++ b/src/jtag/usbprog.c
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include <usb.h>
diff --git a/src/jtag/vsllink.c b/src/jtag/vsllink.c
index 79444a9..b3a475b 100644
--- a/src/jtag/vsllink.c
+++ b/src/jtag/vsllink.c
@@ -26,6 +26,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
#include <usb.h>
diff --git a/src/jtag/zy1000.c b/src/jtag/zy1000.c
index 3db893a..cfe40f4 100644
--- a/src/jtag/zy1000.c
+++ b/src/jtag/zy1000.c
@@ -21,6 +21,7 @@
#endif
#define INCLUDE_JTAG_MINIDRIVER_H
+#define INCLUDE_JTAG_INTERFACE_H
#include "embeddedice.h"
#include "bitbang.h"
diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c
index 0ec9f4d..6d35591 100644
--- a/src/xsvf/xsvf.c
+++ b/src/xsvf/xsvf.c
@@ -41,6 +41,7 @@
#include "config.h"
#endif
+#define INCLUDE_JTAG_INTERFACE_H
#include "xsvf.h"
#include "jtag.h"