From: Michal Demin Date: Mon, 10 Jan 2011 13:54:10 +0000 (+0100) Subject: Add support for different interfaces on FTDI chips. X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/commitdiff_plain/6615630635379e2768f9cbc69b3efeb742195b32 Add support for different interfaces on FTDI chips. Signed-off-by: Michal Demin --- diff --git a/config.c b/config.c index a39902e..2963129 100644 --- a/config.c +++ b/config.c @@ -23,6 +23,7 @@ static void read_config() { #ifdef JTAGKEY char *pbuf; unsigned short vid, pid; + unsigned short iface; int line, len, num; #endif @@ -152,7 +153,7 @@ static void read_config() { pbuf = buf + i; for (; i < len; i++) { - if (buf[i] == ' ' || buf[i] == '\t') + if (buf[i] == ' ' || buf[i] == '\t' || buf[i] == ':') break; } @@ -163,9 +164,16 @@ static void read_config() { continue; } + iface = 0; + pbuf = buf + i; + if (pbuf[0] == ':') { + iface = atoi(pbuf + 1); + } + pp_config[num].real = 0; pp_config[num].usb_vid = vid; pp_config[num].usb_pid = pid; + pp_config[num].usb_iface = iface; pp_config[num].open = jtagkey_open; pp_config[num].close = jtagkey_close; pp_config[num].transfer = jtagkey_transfer; @@ -243,3 +251,20 @@ unsigned short config_usb_pid(int num) { return ret; } + +unsigned short config_usb_iface(int num) { + unsigned short ret = 0x00; + int i; + + read_config(); + + for (i=0; i= 0) ret = 0xff; diff --git a/libusb-driverrc b/libusb-driverrc index 98d0e31..9cf8230 100644 --- a/libusb-driverrc +++ b/libusb-driverrc @@ -4,3 +4,6 @@ # Amontec Jtagkey LPT2 = FTDI:0403:cff8 +# Dangerous Prototypes Bus Blaster v2 +LPT3 = FTDI:0403:6010:2 +