summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-07 05:22:25 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-07 05:22:25 +0000
commit401d6472cc654a0c25bd7efe9072b9ecb2efe75d (patch)
tree63856a3f4aac6466ea311d73df91a3da2977758f /src
parent0b08845e3fdd79c1ddf0ed3e98623eaff5f65188 (diff)
downloadopenocd_libswd-401d6472cc654a0c25bd7efe9072b9ecb2efe75d.tar.gz
openocd_libswd-401d6472cc654a0c25bd7efe9072b9ecb2efe75d.tar.bz2
openocd_libswd-401d6472cc654a0c25bd7efe9072b9ecb2efe75d.tar.xz
openocd_libswd-401d6472cc654a0c25bd7efe9072b9ecb2efe75d.zip
Factoring of jtag_examine_chain for maintainability:
- Move definition of maximum JTAG chain size closer to its only uses. git-svn-id: svn://svn.berlios.de/openocd/trunk@2079 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/jtag/jtag.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 2b6d37ba..42112cb6 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -84,10 +84,6 @@ int jtag_verify = 1;
static int jtag_nsrst_delay = 0; /* default to no nSRST delay */
static int jtag_ntrst_delay = 0; /* default to no nTRST delay */
-/* maximum number of JTAG devices expected in the chain
- */
-#define JTAG_MAX_CHAIN_SIZE 20
-
/* callbacks to inform high-level handlers about JTAG state changes */
jtag_event_callback_t *jtag_event_callbacks;
@@ -943,6 +939,9 @@ void jtag_sleep(u32 us)
alive_sleep(us/1000);
}
+/// maximum number of JTAG devices expected in the chain
+#define JTAG_MAX_CHAIN_SIZE 20
+
#define EXTRACT_MFG(X) (((X) & 0xffe) >> 1)
#define EXTRACT_PART(X) (((X) & 0xffff000) >> 12)
#define EXTRACT_VER(X) (((X) & 0xf0000000) >> 28)