int num_taps = jtag_NumEnabledTaps();
- jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
- scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
+ scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ scan_field_t * out_fields = cmd_queue_alloc(num_taps * sizeof(scan_field_t));
jtag_queue_command(cmd);
scan->ir_scan = true;
scan->num_fields = num_taps; /* one field per device */
- scan->fields = cmd_queue_alloc(num_taps * sizeof(scan_field_t));
+ scan->fields = out_fields;
scan->end_state = state;
nth_tap = -1;
int MINIDRIVER(interface_jtag_add_plain_ir_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
- jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
- scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
+ scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ scan_field_t * out_fields = cmd_queue_alloc(in_num_fields * sizeof(scan_field_t));
jtag_queue_command(cmd);
scan->ir_scan = true;
scan->num_fields = in_num_fields;
- scan->fields = cmd_queue_alloc(in_num_fields * sizeof(scan_field_t));
+ scan->fields = out_fields;
scan->end_state = state;
for (int i = 0; i < in_num_fields; i++)
}
}
- jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
- scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
+ scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ scan_field_t * out_fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(scan_field_t));
jtag_queue_command(cmd);
scan->ir_scan = false;
scan->num_fields = in_num_fields + bypass_devices;
- scan->fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(scan_field_t));
+ scan->fields = out_fields;
scan->end_state = state;
tap = NULL;
}
}
- jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
- scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
+ scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ scan_field_t * out_fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(scan_field_t));
jtag_queue_command(cmd);
scan->ir_scan = false;
scan->num_fields = in_num_fields + bypass_devices;
- scan->fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(scan_field_t));
+ scan->fields = out_fields;
scan->end_state = end_state;
tap = NULL;
*/
int MINIDRIVER(interface_jtag_add_plain_dr_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
- jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
- scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
+ scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
+ scan_field_t * out_fields = cmd_queue_alloc(in_num_fields * sizeof(scan_field_t));
jtag_queue_command(cmd);
scan->ir_scan = false;
scan->num_fields = in_num_fields;
- scan->fields = cmd_queue_alloc(in_num_fields * sizeof(scan_field_t));
+ scan->fields = out_fields;
scan->end_state = state;
for (int i = 0; i < in_num_fields; i++)