switch to jtag_add_callback() - USB performance fix

git-svn-id: svn://svn.berlios.de/openocd/trunk@1733 b42882b7-edfa-0310-969c-e2dbd0fdcd60
__archive__
oharboe 2009-05-11 07:48:26 +00:00
parent 978a4bb4b4
commit 4fe5a010c2
1 changed files with 20 additions and 14 deletions

View File

@ -290,6 +290,12 @@ int xscale_read_dcsr(target_t *target)
return jtag_execute_queue();
}
static void xscale_getbuf(u8 *in)
{
*((u32 *)in)=buf_get_u32(in, 0, 32);
}
int xscale_receive(target_t *target, u32 *buffer, int num_words)
{
if (num_words==0)
@ -326,8 +332,6 @@ int xscale_receive(target_t *target, u32 *buffer, int num_words)
fields[1].tap = xscale->jtag_info.tap;
fields[1].num_bits = 32;
fields[1].out_value = NULL;
u8 tmp[4];
fields[1].in_value = tmp;
fields[2].tap = xscale->jtag_info.tap;
@ -351,13 +355,15 @@ int xscale_receive(target_t *target, u32 *buffer, int num_words)
fields[0].in_value = &field0[i];
jtag_add_pathmove(3, path);
jtag_add_dr_scan_now(3, fields, TAP_IDLE);
fields[1].in_value = (u8 *)(field1+i);
jtag_add_dr_scan(3, fields, TAP_IDLE);
jtag_add_callback(xscale_getbuf, (u8 *)(field1+i));
jtag_check_value_mask(fields+0, &field0_check_value, &field0_check_mask);
jtag_check_value_mask(fields+2, &field2_check_value, &field2_check_mask);
field1[i]=buf_get_u32(tmp, 0, 32);
words_scheduled++;
}