1
0

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

This commit is contained in:
michael 2007-04-29 17:51:28 +00:00
parent 397d1c368e
commit a270f1e37a

View File

@ -209,7 +209,9 @@ int jtagkey_transfer(WD_TRANSFER *tr, int fd, unsigned int request, int ppbase,
DPRINTF("writing %d bytes\n", writepos-writebuf);
for (i=0; i<writepos-writebuf; i++) {
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