Added a call to ftdi_set_latency_timer to make iceprog performance independent of system settings

This commit is contained in:
Salvador E. Tropea 2017-05-03 10:08:26 -03:00
parent 587363b64a
commit 73fffc21fa
1 changed files with 5 additions and 0 deletions

View File

@ -454,6 +454,11 @@ int main(int argc, char **argv)
error();
}
if (ftdi_set_latency_timer(&ftdic, 2) < 0) {
fprintf(stderr, "Failed to set latency timer (%s).\n", ftdi_get_error_string(&ftdic));
error();
}
if (ftdi_set_bitmode(&ftdic, 0xff, BITMODE_MPSSE) < 0) {
fprintf(stderr, "Failed set BITMODE_MPSSE on iCE FTDI USB device.\n");
error();