From 73b8a3e23ea9b9760ecf1dd29170558122d1a17b Mon Sep 17 00:00:00 2001 From: hackbard Date: Sun, 27 Mar 2011 14:17:15 +0200 Subject: [PATCH] started code to set ir ... --- jtag.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/jtag.c b/jtag.c index ca2e683..2e8298c 100644 --- a/jtag.c +++ b/jtag.c @@ -175,6 +175,22 @@ int jtag_read_data(u8 *p,int bitlen) { } +int jtag_write_data(u8 *p,int bitlen) { + + int count; + + count=0; + + while(bitlen) { + jtag_clock(0,p[count/8]&(1<=MAXDEV*MAX_IR_LEN) { + printf("instruction register too big!\n"); + return -1; + } + + memset(ir,0,MAXDEV*MAX_IR_LEN/8*sizeof(u8)); + + while(bitlen) { + ir[count/8]|=p[count] ... HIER WEITER ..; + count+=1; + bitlen-=1; + } + + jtag_enter_shift_ir(); + + while(len--) + + jtag_leave_shift_ir(); + return 0; + +} + int main(int argc,char **argv) { t_jtag jtag; -- 2.39.2