X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/blobdiff_plain/084feb4bf323e72dda5d651af3aa8de7351d8d9e..80a14787b97779d86558f414d23f7058b8654c94:/jtagkey.c diff --git a/jtagkey.c b/jtagkey.c index 6ed7375..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; @@ -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;