X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/blobdiff_plain/0a060ead2d6293cc1e4227918d52258b71f9e716..7b219d308d74d4ab41643207b0ee37fb2dbbe632:/jtagkey.c diff --git a/jtagkey.c b/jtagkey.c index 19011fa..d068cf5 100644 --- a/jtagkey.c +++ b/jtagkey.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "usb-driver.h" #include "config.h" #include "jtagkey.h" @@ -108,7 +109,8 @@ void jtagkey_close(int handle) { } } -void jtagkey_state(unsigned char data) { +#ifdef DEBUG +static void jtagkey_state(unsigned char data) { fprintf(stderr,"Pins high: "); if (data & JTAGKEY_TCK) @@ -128,6 +130,7 @@ void jtagkey_state(unsigned char data) { fprintf(stderr,"\n"); } +#endif struct jtagkey_reader_arg { int num; @@ -209,7 +212,7 @@ int jtagkey_transfer(WD_TRANSFER *tr, int fd, unsigned int request, int ppbase, DPRINTF("write byte: %d\n", val); if (tr[i].cmdTrans == 13) - tapmon(val & PP_TCK, val & PP_TMS); + jtagmon(val & PP_TCK, val & PP_TMS, val & PP_TDI); #endif /* Pad writebuf for read-commands in stream */ @@ -290,10 +293,8 @@ int jtagkey_transfer(WD_TRANSFER *tr, int fd, unsigned int request, int ppbase, pthread_join(reader_thread, NULL); #ifdef DEBUG - DPRINTF("write: "); - hexdump(writebuf, writepos-writebuf); - DPRINTF("read: "); - hexdump(readbuf, i); + hexdump(writebuf, writepos-writebuf, "->"); + hexdump(readbuf, i, "<-"); #endif writepos = writebuf;