diff options
author | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-02-27 06:59:35 +0000 |
---|---|---|
committer | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-02-27 06:59:35 +0000 |
commit | 796fa81a2b361fa0606f141906734672c910b343 (patch) | |
tree | c723b22f757cfe49beca8cf1d0c4ac5dca996592 /src | |
parent | 5a15c6d8079ac3e8b0677ae9665e841856a42772 (diff) | |
download | riscv-openocd-796fa81a2b361fa0606f141906734672c910b343.zip riscv-openocd-796fa81a2b361fa0606f141906734672c910b343.tar.gz riscv-openocd-796fa81a2b361fa0606f141906734672c910b343.tar.bz2 |
- fix bug in ft2232 pathmove (thanks to Michael Bruck for the patch)
git-svn-id: svn://svn.berlios.de/openocd/trunk@357 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/ft2232.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index d5c4af2..1a05867 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -459,12 +459,14 @@ void ft2232_add_pathmove(pathmove_command_t *cmd) tms_byte = 0x0; int bit_count = 0; + int num_states_batch = num_states > 7 ? 7 : num_states; + /* command "Clock Data to TMS/CS Pin (no Read)" */ BUFFER_ADD = 0x4b; /* number of states remaining */ - BUFFER_ADD = (num_states % 7) - 1; + BUFFER_ADD = num_states_batch - 1; - while (num_states % 7) + while (num_states_batch--) { if (tap_transitions[cur_state].low == cmd->path[state_count]) buf_set_u32(&tms_byte, bit_count++, 1, 0x0); |