aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/bitbang.c
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-08-17 14:53:15 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-08-17 14:53:15 +0000
commit5fcd1d704cea078f6651e8e928ce7ff67b283882 (patch)
tree2adc2d71513793359bef126d05448f0e22a259be /src/jtag/bitbang.c
parent9a830747b2324cc1f319c32399e76f759bd5f0e6 (diff)
downloadriscv-openocd-5fcd1d704cea078f6651e8e928ce7ff67b283882.zip
riscv-openocd-5fcd1d704cea078f6651e8e928ce7ff67b283882.tar.gz
riscv-openocd-5fcd1d704cea078f6651e8e928ce7ff67b283882.tar.bz2
- 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
Diffstat (limited to 'src/jtag/bitbang.c')
-rw-r--r--src/jtag/bitbang.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jtag/bitbang.c b/src/jtag/bitbang.c
index 3d49d18..2065f62 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 {