field.num_bits = tap->ir_length;
field.out_value = calloc(CEIL(field.num_bits, 8), 1);
buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
-
+
field.in_value = NULL;
-
-
+
+
field.in_handler = NULL;
-
+
jtag_add_ir_scan(1, &field, TAP_INVALID);
field.num_bits = 5;
field.out_value = calloc(CEIL(field.num_bits, 8), 1);
buf_set_u32(field.out_value, 0, field.num_bits, new_scan_chain);
-
+
field.in_value = NULL;
-
-
+
+
field.in_handler = NULL;
-
+
/* select INTEST instruction */
etb_set_instr(etb, 0x2);
fields[0].tap = etb->tap;
fields[0].num_bits = 32;
fields[0].out_value = NULL;
-
- fields[0].in_value = NULL;
-
-
+ u8 tmp[4];
+ fields[0].in_value = tmp;
fields[0].in_handler = NULL;
-
fields[1].tap = etb->tap;
fields[1].num_bits = 7;
fields[1].out_value = malloc(1);
buf_set_u32(fields[1].out_value, 0, 7, 4);
-
fields[1].in_value = NULL;
-
-
fields[1].in_handler = NULL;
-
fields[2].tap = etb->tap;
fields[2].num_bits = 1;
fields[2].out_value = malloc(1);
buf_set_u32(fields[2].out_value, 0, 1, 0);
-
fields[2].in_value = NULL;
-
-
fields[2].in_handler = NULL;
-
jtag_add_dr_scan(3, fields, TAP_INVALID);
- fields[0].in_handler = buf_to_u32_handler; /* deprecated! invoke this from user code! */
for (i = 0; i < num_frames; i++)
{
else
buf_set_u32(fields[1].out_value, 0, 7, 0);
- fields[0].in_handler_priv = &data[i];
- jtag_add_dr_scan(3, fields, TAP_INVALID);
+ jtag_add_dr_scan_now(3, fields, TAP_INVALID);
+
+ data[i]=buf_get_u32(tmp, 0, 32);
}
jtag_execute_queue();
fields[0].tap = etb_reg->etb->tap;
fields[0].num_bits = 32;
fields[0].out_value = reg->value;
-
+
fields[0].in_value = NULL;
-
-
+
+
fields[0].in_handler = NULL;
-
+
fields[1].tap = etb_reg->etb->tap;
fields[1].num_bits = 7;
fields[1].out_value = malloc(1);
buf_set_u32(fields[1].out_value, 0, 7, reg_addr);
-
+
fields[1].in_value = NULL;
-
-
+
+
fields[1].in_handler = NULL;
-
+
fields[2].tap = etb_reg->etb->tap;
fields[2].num_bits = 1;
fields[2].out_value = malloc(1);
buf_set_u32(fields[2].out_value, 0, 1, 0);
-
+
fields[2].in_value = NULL;
-
-
+
+
fields[2].in_handler = NULL;
-
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].num_bits = 32;
fields[0].out_value = malloc(4);
buf_set_u32(fields[0].out_value, 0, 32, value);
-
+
fields[0].in_value = NULL;
-
-
+
+
fields[0].in_handler = NULL;
-
+
fields[1].tap = etb_reg->etb->tap;
fields[1].num_bits = 7;
fields[1].out_value = malloc(1);
buf_set_u32(fields[1].out_value, 0, 7, reg_addr);
-
+
fields[1].in_value = NULL;
-
-
+
+
fields[1].in_handler = NULL;
-
+
fields[2].tap = etb_reg->etb->tap;
fields[2].num_bits = 1;
fields[2].out_value = malloc(1);
buf_set_u32(fields[2].out_value, 0, 1, 1);
-
+
fields[2].in_value = NULL;
-
-
+
+
fields[2].in_handler = NULL;
-
+
jtag_add_dr_scan(3, fields, TAP_INVALID);