+static int jtagkey_latency(int latency) {
+ static int current = 0;
+ int ret;
+
+ if (current != latency) {
+ DPRINTF("switching latency\n");
+ if ((ret = ftdi_set_latency_timer(&ftdic, latency)) != 0) {
+ fprintf(stderr, "unable to set latency timer: %d (%s)\n", ret, ftdi_get_error_string(&ftdic));
+ return ret;
+ }
+
+ current = latency;
+ }
+
+ return ret;
+}
+
+static int jtagkey_init(unsigned short vid, unsigned short pid, unsigned short iface) {