int jtag_ir(unsigned sz, unsigned bits) { int r; if ((r = jtag_move(SHIFTIR)) < 0) return r; if ((r = jtag_shift(sz, bits, 0)) < 0) return r; if ((r = jtag_move(DONE)) < 0) return r; return 0; }
int jtag_dr(unsigned sz, unsigned bits, unsigned *out) { int r; if ((r = jtag_move(SHIFTDR)) < 0) return r; if ((r = jtag_shift(sz, bits, out)) < 0) return r; if ((r = jtag_move(DONE)) < 0) return r; return 0; }
int jtag_reset(void) { return jtag_move(RESET); }
static void do_jtag_move(void *user) { user; /* suppress warning */ jtag_move(buf, jtag_bits); }