usbblaster clock() rate improved, using byte shift mode

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1176 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent 09f3ff129e
commit 40fecfa129

@ -1,5 +1,7 @@
2008-04-19 Kolja Waschk <kawk>
* src/tap/cable/usbblaster.c: clock() at highest possible rate
using the byte shift mode for n>=8 (Thanks M. Banditt)
* include/cmd.h, src/cmd/cmd.c, src/jtag.c: [ 1946331 ] command
completion support (by Mike Frysinger)
* configure.ac, acinclude.m4: [ 1946114 ] make AC_PROG_SED

@ -5,6 +5,7 @@ or someone is missing who should be listed there!
Shaju Abraham
Beregnyei Balazs
Michael Banditt
Krzysztof Blaszkowski
Eugene Boldenkov
Uwe Bonnes
@ -14,6 +15,7 @@ Ian Campbell
Jeff Carr
Alex (d18c7db)
Jerome Debard
Kris Dickie
Alexander Didebulidze
Rainer Dörken
Andrew Dyer

@ -63,14 +63,38 @@ usbblaster_init( cable_t *cable )
static void
usbblaster_clock( cable_t *cable, int tms, int tdi, int n )
{
int i;
int i, m;
tms = tms ? (1<<TMS) : 0;
tdi = tdi ? (1<<TDI) : 0;
// printf("clock: %d %d %d\n", tms, tdi, n);
for (i = 0; i < n; i++) {
m = n;
if (tms == 0 && m >= 8)
{
unsigned char tdis = tdi ? 0xFF : 0;
parport_set_control( cable->link.port, 0 ); // noflush
while (m >= 8)
{
int i;
int chunkbytes = (m >> 3);
if(chunkbytes > 63) chunkbytes = 63;
parport_set_data( cable->link.port,(1<<SHMODE)|(0<<READ)|chunkbytes);
for (i=0; i<chunkbytes; i++)
{
parport_set_data( cable->link.port, tdis);
}
m -= (chunkbytes << 3);
}
}
for (i = 0; i < m; i++) {
parport_set_data( cable->link.port, OTHERS | (0 << TCK) | tms | tdi );
parport_set_data( cable->link.port, OTHERS | (1 << TCK) | tms | tdi );
parport_set_control( cable->link.port, 1 ); // flush
@ -189,7 +213,7 @@ usbblaster_transfer( cable_t *cable, int len, char *in, char *out )
static void
usbblaster_flush( cable_t *cable, cable_flush_amount_t how_much )
{
if( how_much == OPTIONALLY ) return;
if( how_much == OPTIONALLY ) return;
while (cable->todo.num_items > 0)
{

Loading…
Cancel
Save