summaryrefslogtreecommitdiff
path: root/src/jtag/bitq.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-18 20:25:19 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-18 20:25:19 +0000
commit7ad67c8b341cc2bd769275a8d8050ae1e7be9481 (patch)
tree92f118e20df10549f4dc318c14ad5b776de6db53 /src/jtag/bitq.c
parent23fd80f2b658395d24056f6b84c8483f428ab33d (diff)
downloadopenocd+libswd-7ad67c8b341cc2bd769275a8d8050ae1e7be9481.tar.gz
openocd+libswd-7ad67c8b341cc2bd769275a8d8050ae1e7be9481.tar.bz2
openocd+libswd-7ad67c8b341cc2bd769275a8d8050ae1e7be9481.tar.xz
openocd+libswd-7ad67c8b341cc2bd769275a8d8050ae1e7be9481.zip
use tap_get_tms_path_len() instead of fix # of 7. Not tested if this builds, but at least we're looking at a build error instead of a runtime error.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1833 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/bitq.c')
-rw-r--r--src/jtag/bitq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jtag/bitq.c b/src/jtag/bitq.c
index af17b638..b196ffc0 100644
--- a/src/jtag/bitq.c
+++ b/src/jtag/bitq.c
@@ -161,8 +161,9 @@ void bitq_state_move(tap_state_t new_state)
}
tms_scan = tap_get_tms_path(tap_get_state(), new_state);
+ int tms_count = tap_get_tms_path_len(tap_get_state(), tap_get_end_state());
- for (i = 0; i<7; i++)
+ for (i = 0; i<tms_count; i++)
{
bitq_io(tms_scan & 1, 0, 0);
tms_scan >>= 1;