Added detection for FT2232H and FT4232H type chips
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 7 Apr 2009 09:35:09 +0000 (11:35 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 7 Apr 2009 09:35:09 +0000 (11:35 +0200)
README
src/ftdi.c
src/ftdi.h

diff --git a/README b/README
index dd195cb..4e1d0ea 100644 (file)
--- a/README
+++ b/README
@@ -1,9 +1,16 @@
--------------------------------------------------------------------
+--------------------------------------------------------------------
 libftdi version 0.15
--------------------------------------------------------------------
+--------------------------------------------------------------------
 
-libftdi - A library (using libusb) to talk to FTDI's FT2232C,
-FT232BM and FT245BM type chips including the popular bitbang mode.
+libftdi - A library (using libusb) to talk to FTDI's UART/FIFO chips
+including the popular bitbang mode.
+
+The following chips are supported:
+- FT4232H / FT2232H
+- FT232R  / FT245R
+- FT2232L / FT2232D / FT2232C
+- FT232BM / FT245BM (and the BL/BQ variants)
+- FT8U232AM / FT8U245AM
 
 The AUTHORS file contains a list of all the people
 that made libftdi possible what it is today.
@@ -19,6 +26,6 @@ Changes
 You'll find the newest version of libftdi at:
 http://www.intra2net.com/en/developer/libftdi
 
--------------------------------------------------------------------
-www.intra2net.com                            2003-2008 Intra2net AG
--------------------------------------------------------------------
+--------------------------------------------------------------------
+www.intra2net.com                             2003-2009 Intra2net AG
+--------------------------------------------------------------------
index c62ede7..a00e951 100644 (file)
@@ -438,6 +438,10 @@ int ftdi_usb_open_dev(struct ftdi_context *ftdi, struct usb_device *dev)
     }
     else if (dev->descriptor.bcdDevice == 0x600)
         ftdi->type = TYPE_R;
+    else if (dev->descriptor.bcdDevice == 0x700)
+        ftdi->type = TYPE_2232H;
+    else if (dev->descriptor.bcdDevice == 0x800)
+        ftdi->type = TYPE_4232H;
 
     ftdi_error_return(0, "all fine");
 }
index 937d15d..e02c32b 100644 (file)
@@ -22,7 +22,7 @@
 #define FTDI_DEFAULT_EEPROM_SIZE 128
 
 /** FTDI chip type */
-enum ftdi_chip_type { TYPE_AM=0, TYPE_BM=1, TYPE_2232C=2, TYPE_R=3 };
+enum ftdi_chip_type { TYPE_AM=0, TYPE_BM=1, TYPE_2232C=2, TYPE_R=3, TYPE_2232H=4, TYPE_4232H=5 };
 /** Parity mode for ftdi_set_line_property() */
 enum ftdi_parity_type { NONE=0, ODD=1, EVEN=2, MARK=3, SPACE=4 };
 /** Number of stop bits for ftdi_set_line_property() */