remove in_handler usage

git-svn-id: svn://svn.berlios.de/openocd/trunk@1646 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe 2009-05-07 13:57:43 +00:00
parent 391e1b0a57
commit cee9970c98
1 changed files with 37 additions and 48 deletions

View File

@ -186,38 +186,26 @@ static int etb_read_ram(etb_t *etb, u32 *data, int num_frames)
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++)
{
@ -230,8 +218,9 @@ static int etb_read_ram(etb_t *etb, u32 *data, int num_frames)
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();