#include "jtagkey.h"
#define USBBUFSIZE 1048576
+#define JTAG_SPEED 100000
#define SLOW_AND_SAFE 1
static struct ftdi_context ftdic;
return ret;
}
- if ((ret = ftdi_set_baudrate(&ftdic, 500000)) != 0) {
- fprintf(stderr, "unable to set baudrate: %d (%s)\n", ret, ftdi_get_error_string(&ftdic));
- return ret;
- }
-
c = 0x00;
ftdi_write_data(&ftdic, &c, 1);
return ret;
}
+ if ((ret = ftdi_set_baudrate(&ftdic, JTAG_SPEED)) != 0) {
+ fprintf(stderr, "unable to set baudrate: %d (%s)\n", ret, ftdi_get_error_string(&ftdic));
+ return ret;
+ }
+
bitbang_mode = BITMODE_SYNCBB;
if ((ret = ftdi_usb_purge_buffers(&ftdic)) != 0) {