set fixed frequency and print warning if a different frequency is requested

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1353 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 17 years ago
parent 92ee843b70
commit add9393e78

@ -1,5 +1,8 @@
2008-09-06 Arnim Laeuger <arniml@users.sourceforge.net>
* src/tap/cable/usbblaster.c: set fixed frequency and print warning
if a different frequency is requested
* src/tap/cable/generic.c: fixed calibration loop
* src/svf/svf.c: require frequency setting from cable for

@ -50,6 +50,8 @@
#define TDO 0
#define FIXED_FREQUENCY 12000000L
/* The default driver if not specified otherwise during connect */
#ifdef ENABLE_LOWLEVEL_FTD2XX
#define DEFAULT_DRIVER "ftd2xx"
@ -93,6 +95,16 @@ usbblaster_connect( char *params[], cable_t *cable )
return 0;
}
void
usbblaster_set_frequency( cable_t *cable, uint32_t new_frequency )
{
if (new_frequency != FIXED_FREQUENCY)
printf( _("Warning: USB-Blaster frequency is fixed to %ld Hz\n"),
FIXED_FREQUENCY );
cable->frequency = FIXED_FREQUENCY;
}
static int
usbblaster_init( cable_t *cable )
{
@ -108,6 +120,8 @@ usbblaster_init( cable_t *cable )
cx_xfer( cmd_root, NULL, cable, COMPLETELY );
usbblaster_set_frequency( cable, FIXED_FREQUENCY );
return 0;
}
@ -421,12 +435,6 @@ usbblaster_flush( cable_t *cable, cable_flush_amount_t how_much )
}
}
void
usbblaster_set_frequency( cable_t *cable, uint32_t new_frequency )
{
cable->frequency = new_frequency;
}
void
usbblaster_help( const char *cablename )
{

Loading…
Cancel
Save