struct scan_field field;
field.num_bits = tap->ir_length;
- field.out_value = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
- buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
+ void * t = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
+ field.out_value = t;
+ buf_set_u32(t, 0, field.num_bits, new_instr);
field.in_value = NULL;
jtag_add_ir_scan(tap, &field, end_state);
- free(field.out_value);
+ free(t);
}
return ERROR_OK;
struct scan_field field;
field.num_bits = tap->ir_length;
- field.out_value = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
- buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
+ void * t = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
+ field.out_value = t;
+ buf_set_u32(t, 0, field.num_bits, new_instr);
field.in_value = NULL;
jtag_add_ir_scan(tap, &field, TAP_IDLE);
- free(field.out_value);
+ free(t);
}
return ERROR_OK;
field.num_bits = tap->ir_length;
field.out_value = t;
- buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
+ buf_set_u32(t, 0, field.num_bits, new_instr);
field.in_value = NULL;
if (no_verify_capture == NULL)
field.num_bits = tap->ir_length;
field.out_value = t;
- buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
+ buf_set_u32(t, 0, field.num_bits, new_instr);
field.in_value = NULL;
jtag_add_ir_scan(tap, &field, TAP_IDLE);
field.num_bits = 32;
field.out_value = t;
- buf_set_u32(field.out_value, 0, field.num_bits, *data);
+ buf_set_u32(t, 0, field.num_bits, *data);
field.in_value = r;
jtag_add_dr_scan(tap, 1, &field, TAP_IDLE);
field.num_bits = 8;
field.out_value = t;
- buf_set_u32(field.out_value, 0, field.num_bits, *data);
+ buf_set_u32(t, 0, field.num_bits, *data);
field.in_value = r;
jtag_add_dr_scan(tap, 1, &field, TAP_IDLE);
memset(&field, 0, sizeof field);
field.num_bits = tap->ir_length;
field.out_value = scratch;
- buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
+ buf_set_u32(scratch, 0, field.num_bits, new_instr);
jtag_add_ir_scan(tap, &field, end_state);
}