projects
/
my-code
/
pnx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6f15628
)
started code to set ir ...
author
hackbard
<hackbard@hackdaworld.org>
Sun, 27 Mar 2011 12:17:15 +0000
(14:17 +0200)
committer
hackbard
<hackbard@hackdaworld.org>
Sun, 27 Mar 2011 12:17:15 +0000
(14:17 +0200)
jtag.c
patch
|
blob
|
history
diff --git
a/jtag.c
b/jtag.c
index
ca2e683
..
2e8298c
100644
(file)
--- 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<<count)?1:0);
+ bitlen-=1;
+ count+=1;
+ }
+
+ return 0;
+
+}
+
int jtag_chain_init(t_jtag *jtag) {
int i;
int jtag_chain_init(t_jtag *jtag) {
int i;
@@
-212,6
+228,33
@@
int jtag_chain_init(t_jtag *jtag) {
}
}
+int jtag_set_ir(char *s,int bitlen) {
+
+ u8 ir[MAXDEV*MAX_IR_LEN/8];
+ int count;
+
+ if(biten>=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;
int main(int argc,char **argv) {
t_jtag jtag;