see Changelog for full details:
Alain Abbas <aa@libertech.fr>
+ Alex Harford <harford@gmail.com>
Andrew John Rogers <andrew@rogerstech.co.uk>
Arnim Läuger <arnim.laeuger@gmx.net>
Daniel Kirkham <d.kirkham@telstra.com>
-New in 0.16 - 2009-05-04
+New in 0.16 - 2009-05-06
------------------------
* C++ wrapper: Reopen the device after calling get_strings() in Context::open() (Marek Vavruša and Intra2net)
* C++ wrapper: Fixed an inheritance problem (Marek Vavruša and Intra2net)
* C++ wrapper: Relicensed under GPLv2 + linking exception (Marek Vavruša and Intra2net)
-* Support for FT2232H and FT4232H (David Challis and Intra2net)
+* Support for FT2232H and FT4232H (David Challis, Alex Harford and Intra2net)
* Support for mingw cross compile (Uwe Bonnes)
* Python bindings and minor autoconf cleanup (Tarek Heiland)
* Code cleanup in various places (Intra2net)
Open selected channels on a chip, otherwise use first channel.
\param ftdi pointer to ftdi_context
- \param interface Interface to use for FT2232C chips.
+ \param interface Interface to use for FT2232C/2232H/4232H chips.
\retval 0: all fine
\retval -1: unknown interface
ftdi->in_ep = 0x04;
ftdi->out_ep = 0x83;
break;
+ case INTERFACE_C:
+ ftdi->interface = 2;
+ ftdi->index = INTERFACE_C;
+ ftdi->in_ep = 0x06;
+ ftdi->out_ep = 0x85;
+ break;
+ case INTERFACE_D:
+ ftdi->interface = 3;
+ ftdi->index = INTERFACE_D;
+ ftdi->in_ep = 0x08;
+ ftdi->out_ep = 0x87;
+ break;
default:
ftdi_error_return(-1, "Unknown interface");
}
else if (dev->descriptor.bcdDevice == 0x200)
ftdi->type = TYPE_AM;
else if (dev->descriptor.bcdDevice == 0x500)
- {
ftdi->type = TYPE_2232C;
- if (!ftdi->index)
- ftdi->index = INTERFACE_A;
- }
else if (dev->descriptor.bcdDevice == 0x600)
ftdi->type = TYPE_R;
else if (dev->descriptor.bcdDevice == 0x700)
else if (dev->descriptor.bcdDevice == 0x800)
ftdi->type = TYPE_4232H;
+ // Set default interface on dual/quad type chips
+ switch(ftdi->type)
+ {
+ case TYPE_2232C:
+ case TYPE_2232H:
+ case TYPE_4232H:
+ if (!ftdi->index)
+ ftdi->index = INTERFACE_A;
+ break;
+ default:
+ break;
+ }
+
ftdi_error_return(0, "all fine");
}