From: hackbard Date: Mon, 28 Mar 2011 11:33:48 +0000 (+0200) Subject: implemented set ir stuff X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=my-code%2Fpnx.git implemented set ir stuff --- diff --git a/jtag.c b/jtag.c index 2497cf7..9d05d5f 100644 --- a/jtag.c +++ b/jtag.c @@ -1,6 +1,7 @@ /* * jtag.c - basic jtag stuff (good excercise!) * + * build: gcc -Wall jtag.c -o jtag * author: hackbard@hackdaworld.org * */ @@ -164,12 +165,15 @@ int jtag_read_data(u8 *p,int bitlen) { memset(p,0,bitlen+7/8); count=0; + printf(" <- "); while(bitlen) { in=jtag_clock(0,0); p[count/8]|=((in&1)<<(count%8)); + printf("%d",p[count/8]&(1<<(count%8))?1:0); count+=1; bitlen-=1; } + printf("\n"); return 0; @@ -181,11 +185,14 @@ int jtag_write_data(u8 *p,int bitlen) { count=0; + printf(" -> "); while(bitlen) { - jtag_clock(0,p[count/8]&(1<