int ret = info.drv->read(info.drv, buf, size, bytes_read);
char *str = hexdump(buf, *bytes_read);
- DEBUG_JTAG_IO("(size=%d, buf=[%s]) -> %u", size, str,
+ LOG_DEBUG_IO("(size=%d, buf=[%s]) -> %u", size, str,
*bytes_read);
free(str);
return ret;
int ret = info.drv->write(info.drv, buf, size, bytes_written);
char *str = hexdump(buf, *bytes_written);
- DEBUG_JTAG_IO("(size=%d, buf=[%s]) -> %u", size, str,
+ LOG_DEBUG_IO("(size=%d, buf=[%s]) -> %u", size, str,
*bytes_written);
free(str);
return ret;
info.buf[info.bufidx++] = abyte;
if (nb_buf_remaining() == 0)
ublast_flush_buffer();
- DEBUG_JTAG_IO("(byte=0x%02x)", abyte);
+ LOG_DEBUG_IO("(byte=0x%02x)", abyte);
}
/**
{
uint8_t out;
- DEBUG_JTAG_IO("(tms=%d)", !!tms);
+ LOG_DEBUG_IO("(tms=%d)", !!tms);
info.tms = !!tms;
info.tdi = 0;
out = ublast_build_out(SCAN_OUT);
{
uint8_t out = ublast_build_out(SCAN_OUT);
- DEBUG_JTAG_IO(".");
+ LOG_DEBUG_IO(".");
ublast_queue_byte(out);
}
{
uint8_t out;
- DEBUG_JTAG_IO("(tdi=%d)", !!tdi);
+ LOG_DEBUG_IO("(tdi=%d)", !!tdi);
info.tdi = !!tdi;
out = ublast_build_out(SCAN_OUT);
{
uint8_t out;
- DEBUG_JTAG_IO("(tdi=%d)", !!tdi);
+ LOG_DEBUG_IO("(tdi=%d)", !!tdi);
info.tdi = !!tdi;
info.tms = !info.tms;
info.bufidx + nb_bytes);
exit(-1);
}
- DEBUG_JTAG_IO("(nb_bytes=%d, bytes=[0x%02x, ...])", nb_bytes,
+ LOG_DEBUG_IO("(nb_bytes=%d, bytes=[0x%02x, ...])", nb_bytes,
bytes ? bytes[0] : 0);
if (bytes)
memcpy(&info.buf[info.bufidx], bytes, nb_bytes);
{
int i;
- DEBUG_JTAG_IO("(bits=%02x..., nb_bits=%d)", bits[0], nb_bits);
+ LOG_DEBUG_IO("(bits=%02x..., nb_bits=%d)", bits[0], nb_bits);
for (i = skip; i < nb_bits; i++)
ublast_clock_tms((bits[i / 8] >> (i % 8)) & 0x01);
ublast_idle_clock();
*/
static void ublast_tms(struct tms_command *cmd)
{
- DEBUG_JTAG_IO("(num_bits=%d)", cmd->num_bits);
+ LOG_DEBUG_IO("(num_bits=%d)", cmd->num_bits);
ublast_tms_seq(cmd->bits, cmd->num_bits, 0);
}
{
int i;
- DEBUG_JTAG_IO("(num_states=%d, last_state=%d)",
+ LOG_DEBUG_IO("(num_states=%d, last_state=%d)",
cmd->num_states, cmd->path[cmd->num_states - 1]);
for (i = 0; i < cmd->num_states; i++) {
if (tap_state_transition(tap_get_state(), false) == cmd->path[i])
uint8_t tms_scan;
int tms_len;
- DEBUG_JTAG_IO("(from %s to %s)", tap_state_name(tap_get_state()),
+ LOG_DEBUG_IO("(from %s to %s)", tap_state_name(tap_get_state()),
tap_state_name(state));
if (tap_get_state() == state)
return;
unsigned int retlen;
int ret = ERROR_OK;
- DEBUG_JTAG_IO("%s(buf=%p, num_bits=%d)", __func__, buf, nb_bytes * 8);
+ LOG_DEBUG_IO("%s(buf=%p, num_bits=%d)", __func__, buf, nb_bytes * 8);
ublast_flush_buffer();
while (ret == ERROR_OK && nb_bytes > 0) {
ret = ublast_buf_read(buf, nb_bytes, &retlen);
unsigned int retlen;
uint8_t tmp[8];
- DEBUG_JTAG_IO("%s(buf=%p, num_bits=%d)", __func__, buf, nb_bits);
+ LOG_DEBUG_IO("%s(buf=%p, num_bits=%d)", __func__, buf, nb_bits);
/*
* Ensure all previous bitbang writes were issued to the dongle, so that
static void ublast_runtest(int cycles, tap_state_t state)
{
- DEBUG_JTAG_IO("%s(cycles=%i, end_state=%d)", __func__, cycles, state);
+ LOG_DEBUG_IO("%s(cycles=%i, end_state=%d)", __func__, cycles, state);
ublast_state_move(TAP_IDLE, 0);
ublast_queue_tdi(NULL, cycles, SCAN_OUT);
static void ublast_stableclocks(int cycles)
{
- DEBUG_JTAG_IO("%s(cycles=%i)", __func__, cycles);
+ LOG_DEBUG_IO("%s(cycles=%i)", __func__, cycles);
ublast_queue_tdi(NULL, cycles, SCAN_OUT);
}
ublast_state_move(TAP_DRSHIFT, 0);
log_buf = hexdump(buf, DIV_ROUND_UP(scan_bits, 8));
- DEBUG_JTAG_IO("%s(scan=%s, type=%s, bits=%d, buf=[%s], end_state=%d)", __func__,
+ LOG_DEBUG_IO("%s(scan=%s, type=%s, bits=%d, buf=[%s], end_state=%d)", __func__,
cmd->ir_scan ? "IRSCAN" : "DRSCAN",
type2str[type],
scan_bits, log_buf, cmd->end_state);
static void ublast_usleep(int us)
{
- DEBUG_JTAG_IO("%s(us=%d)", __func__, us);
+ LOG_DEBUG_IO("%s(us=%d)", __func__, us);
jtag_sleep(us);
}