From: hackbard Date: Sun, 27 Mar 2011 12:31:03 +0000 (+0200) Subject: basically working set_ir stuff (untested!) X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b2243de35d3e030094e349ce4515442c27bccb9;p=my-code%2Fpnx.git basically working set_ir stuff (untested!) --- diff --git a/jtag.c b/jtag.c index 2e8298c..2497cf7 100644 --- a/jtag.c +++ b/jtag.c @@ -230,27 +230,29 @@ int jtag_chain_init(t_jtag *jtag) { int jtag_set_ir(char *s,int bitlen) { - u8 ir[MAXDEV*MAX_IR_LEN/8]; + u8 ir[MAXDEV*MAXIRLEN/8]; int count; - if(biten>=MAXDEV*MAX_IR_LEN) { + if(bitlen>=MAXDEV*MAXIRLEN) { printf("instruction register too big!\n"); return -1; } - memset(ir,0,MAXDEV*MAX_IR_LEN/8*sizeof(u8)); + memset(ir,0,MAXDEV*MAXIRLEN/8*sizeof(u8)); + printf("ir to set: "); while(bitlen) { - ir[count/8]|=p[count] ... HIER WEITER ..; + ir[count/8]|=(s[count]<<(count%8)); + printf("%d",ir[count/8]&(1<