Browse Source

only read pins when needed, now it's a bit faster than a parallel cable

master
michael 18 years ago
parent
commit
a270f1e37a
  1. 4
      jtagkey.c

4
jtagkey.c

@ -209,7 +209,9 @@ int jtagkey_transfer(WD_TRANSFER *tr, int fd, unsigned int request, int ppbase,
DPRINTF("writing %d bytes\n", writepos-writebuf); DPRINTF("writing %d bytes\n", writepos-writebuf);
for (i=0; i<writepos-writebuf; i++) { for (i=0; i<writepos-writebuf; i++) {
ftdi_write_data(&ftdic, writebuf+i, 1); ftdi_write_data(&ftdic, writebuf+i, 1);
ftdi_read_pins(&ftdic, readbuf+i);
if (i > 0 && tr[i].cmdTrans == PP_WRITE && tr[i-1].cmdTrans == PP_READ)
ftdi_read_pins(&ftdic, readbuf+i);
} }
#ifdef DEBUG #ifdef DEBUG

Loading…
Cancel
Save