aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYann Vernier <yann.vernier@orsoc.se>2012-12-11 12:52:24 +0100
committerSpencer Oliver <spen@spen-soft.co.uk>2013-04-11 16:14:18 +0000
commit441914978d1b0debc2c40ef5a660165d53baad27 (patch)
tree50bd67ec16487fb0a25b93104f954c7c0e820a6d /src
parent50c93152123feec0f0a063ffb18cd7d91069c115 (diff)
ft2232: fix input scan ending in drshift/irshift
The final bit was incorrectly added as output data, even if no data was to be written. Changed it to match handling of other bits. Change-Id: I91e5ba0c932876bfb579c22e6c7ef0300baa1534 Signed-off-by: Yann Vernier <yann.vernier@orsoc.se> Reviewed-on: http://openocd.zylin.com/1049 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/drivers/ft2232.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c
index 9a40ed9a..4b3360fe 100644
--- a/src/jtag/drivers/ft2232.c
+++ b/src/jtag/drivers/ft2232.c
@@ -1061,7 +1061,8 @@ static void ft2232_add_scan(bool ir_scan, enum scan_type type, uint8_t *buffer,
/* LOG_DEBUG("added TDI bits (i %i)", bits_left - 1); */
}
buffer_write(0x0);
- buffer_write(last_bit);
+ if (type != SCAN_IN)
+ buffer_write(last_bit);
} else {
int tms_bits;
int tms_count;