Print out really long scan values.

__archive__
Tim Newsome 2016-05-31 16:03:51 -07:00
parent 63f6999b6d
commit 40e42c5a04
1 changed files with 12 additions and 4 deletions

View File

@ -438,13 +438,21 @@ static void debug_jtag_io_value(const char *prefix, const uint8_t *value,
return;
}
char buf[80];
char buf[33];
char *bufp = buf;
unsigned int chars = (num_bits + 3) / 4;
for (unsigned int i = 0; i < chars && i < 79; i++) {
for (unsigned int i = 0; i < chars; i++) {
if (i && (i % 32) == 0) {
DEBUG_JTAG_IO(" %s%s", prefix, buf);
bufp = buf;
}
int start_bit = 4 * (chars - i - 1);
sprintf(buf + i, "%01x", buf_get_u32(value, start_bit, 4));
sprintf(bufp, "%01x", buf_get_u32(value, start_bit, 4));
bufp++;
}
if (bufp != buf) {
DEBUG_JTAG_IO(" %s%s", prefix, buf);
}
DEBUG_JTAG_IO(" %s%s", prefix, buf);
}
#endif