/* speed in kHz*/
static int speed_khz = 0;
/* flag if the kHz speed was defined */
-bool hasKHz = false;
+static bool hasKHz = false;
+static int jtag_speed = 0;
struct jtag_interface_s *jtag = NULL;
/* configuration */
jtag_interface_t *jtag_interface = NULL;
-static int jtag_speed = 0;
void jtag_set_error(int error)
{
jtag_speed = speed;
/* this command can be called during CONFIG,
* in which case jtag isn't initialized */
+ hasKHz = !jtag;
return jtag ? jtag->speed(speed) : ERROR_OK;
}
#include <strings.h>
#endif
-extern bool hasKHz;
-
extern const Jim_Nvp nvp_jtag_tap_event[];
/* jtag interfaces (parport, FTDI-USB, TI-USB, ...)
return retval;
}
cur_speed = speed_div1;
-
- retval = jtag_set_speed(cur_speed);
}
- else
- hasKHz = true;
+ retval = jtag_set_speed(cur_speed);
}
cur_speed = jtag_get_speed_khz();