diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-18 20:21:53 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-18 20:21:53 +0000 |
commit | 5b9c07e9185d2c3b47e4a741186dff9a2bc9c5de (patch) | |
tree | 25e48ef82b1df0c3c87228c0ef102fdc1706ecd0 /src | |
parent | fd780d43f585688d8cdd567151c9fccbbdc01e40 (diff) | |
download | openocd_libswd-5b9c07e9185d2c3b47e4a741186dff9a2bc9c5de.tar.gz openocd_libswd-5b9c07e9185d2c3b47e4a741186dff9a2bc9c5de.tar.bz2 openocd_libswd-5b9c07e9185d2c3b47e4a741186dff9a2bc9c5de.tar.xz openocd_libswd-5b9c07e9185d2c3b47e4a741186dff9a2bc9c5de.zip |
use tap_get_tms_path_len() instead of fix # of 7.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1831 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/bitbang.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jtag/bitbang.c b/src/jtag/bitbang.c index 9cb7edc0..a4c2c439 100644 --- a/src/jtag/bitbang.c +++ b/src/jtag/bitbang.c @@ -77,8 +77,9 @@ static void bitbang_state_move(int skip) { int i=0, tms=0; u8 tms_scan = tap_get_tms_path(tap_get_state(), tap_get_end_state()); - - for (i = skip; i < 7; i++) + int tms_count = tap_get_tms_path_len(tap_get_state(), tap_get_end_state()); + + for (i = skip; i < tms_count; i++) { tms = (tms_scan >> i) & 1; bitbang_interface->write(0, tms, 0); |