if (bitbang_mode != mode) {
DPRINTF("switching bitbang-mode!\n");
+
/* Wait for the latency-timer to kick in */
usleep(2);
if ((ret = ftdi_set_bitmode(&ftdic, JTAGKEY_TCK|JTAGKEY_TDI|JTAGKEY_TMS|JTAGKEY_OEn, mode)) != 0) {
if (nread)
{
DPRINTF("writing %d bytes\n", writepos-writebuf);
+
+ *writepos = last_data;
+ writepos++;
+
jtagkey_set_bbmode(BITMODE_SYNCBB);
ftdi_write_data(&ftdic, writebuf, writepos-writebuf);
switch(tr[i].cmdTrans) {
case PP_READ:
data = *readpos;
+
#ifdef DEBUG
DPRINTF("READ: 0x%x\n", data);
jtagkey_state(data);