From 5fcd1d704cea078f6651e8e928ce7ff67b283882 Mon Sep 17 00:00:00 2001 From: drath Date: Thu, 17 Aug 2006 14:53:15 +0000 Subject: - renamed jtag_interface_t.support_statemove to jtag_interface_t.support_pathmove (it is used to indicate jtag_add_pathmove support) - fixed small bug in str7x.c that printed an address instead of the target number in an error message - added support for Olimex ARM-USB-OCD. The new ft2232 layout is called "olimex-jtag" git-svn-id: svn://svn.berlios.de/openocd/trunk@87 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/jtag/bitbang.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/jtag/bitbang.c') diff --git a/src/jtag/bitbang.c b/src/jtag/bitbang.c index 3d49d186..2065f62a 100644 --- a/src/jtag/bitbang.c +++ b/src/jtag/bitbang.c @@ -142,7 +142,11 @@ void bitbang_scan(int ir_scan, enum scan_type type, u8 *buffer, int scan_size) for (bit_cnt = 0; bit_cnt < scan_size; bit_cnt++) { - if ((buffer[bit_cnt/8] >> (bit_cnt % 8)) & 0x1) { + /* if we're just reading the scan, but don't care about the output + * default to outputting 'low', this also makes valgrind traces more readable, + * as it removes the dependency on an uninitialised value + */ + if ((type != SCAN_IN) && ((buffer[bit_cnt/8] >> (bit_cnt % 8)) & 0x1)) { bitbang_interface->write(0, (bit_cnt==scan_size-1) ? 1 : 0, 1); bitbang_interface->write(1, (bit_cnt==scan_size-1) ? 1 : 0, 1); } else { -- cgit v1.2.3-18-g5258