diff options
author | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2006-08-17 14:53:15 +0000 |
---|---|---|
committer | drath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2006-08-17 14:53:15 +0000 |
commit | 5fcd1d704cea078f6651e8e928ce7ff67b283882 (patch) | |
tree | 2adc2d71513793359bef126d05448f0e22a259be /src/jtag/bitbang.c | |
parent | 9a830747b2324cc1f319c32399e76f759bd5f0e6 (diff) |
- 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.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 { |