2 years agolibftdi: pass eeprom strings as const
Dan Dedrick [Tue, 7 Jan 2020 16:18:30 +0000]
libftdi: pass eeprom strings as const

These strings are not modified and it doesn't make sense that they ever
would be. Setting these as const ensures that they will not be modified
and allows const strings to be passed in without special manipulation.

Specifically a call like the following failed to compile:
ftdi_eeprom_set_strings(&ftdi, "foo", "bar", "abc123");

The error will look something like this:
error: ISO C++ forbids converting a string constant to ‘char*’

2 years agoCMake: reorder Python detection
Yegor Yefremov [Mon, 13 Jan 2020 14:08:44 +0000]
CMake: reorder Python detection

PythonInterp should be detected before PythonLibs otherwise
CMake exits with the following message:


Signed-off-by: Yegor Yefremov <>

2 years agoFix build dependency if swig wrapper and documentation is both switched on
Thomas Jarosch [Tue, 1 Oct 2019 14:17:09 +0000]
Fix build dependency if swig wrapper and documentation is both switched on

Seems to affect new cmake / swig versions only.

Reported by Richard Shaw <> during Fedora Rawhide build:

Ok, so far looks like I was right, you have to set the dependency on
ftdi1_doc.i before calling swig_add_library or it doesn't get it right:

[ 11%] Swig compile ftdi1.i for python
/usr/bin/doxygen /builddir/build/BUILD/libftdi-f49ee0d/build-py2/Doxyfile
cd /builddir/build/BUILD/libftdi-f49ee0d/build-py2/python && /usr/bin/cmake
-E make_directory /builddir/build/BUILD/libftdi-f49ee0d/build-py2/python
cd /builddir/build/BUILD/libftdi-f49ee0d/build-py2/python && /usr/bin/cmake
-E touch
cd /builddir/build/BUILD/libftdi-f49ee0d/build-py2/python && /usr/bin/cmake
-E env SWIG_LIB=/usr/share/swig/3.0.12 /usr/bin/swig -python -DDOXYGEN=YES
-outdir /builddir/build/BUILD/libftdi-f49ee0d/build-py2/python
-I/builddir/build/BUILD/libftdi-f49ee0d/src -I/usr/include/libusb-1.0
-I/usr/include/python2.7 -o
/builddir/build/BUILD/libftdi-f49ee0d/python/ftdi1.i:7: Error: Unable to
find 'ftdi1_doc.i'
make[2]: *** [python/CMakeFiles/ftdi1_swig_compilation.dir/build.make:67:
python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON.stamp] Error 1

2 years agoSimplify CMake policy guard
Frank Dana [Thu, 26 Sep 2019 18:57:25 +0000]
Simplify CMake policy guard

Signed-off-by: FeRD (Frank Dana) <>

2 years agoCMake/Swig updates for python wrapper
Richard Shaw [Mon, 18 Feb 2019 18:42:30 +0000]
CMake/Swig updates for python wrapper

libftdi was FTBFS[1] in Fedora Rawhide after a GCC 9.0.X mass rebuild but
the problem turned out to be behavior changes[2] in CMake with regards to

The UseSWIG module in cmake 3.13+ will now use standard target names and not
generate the SWIG_MODULE_<target>_REAL_NAME variable.

Replace the deprecated swig_add_module with swig_add_library.

[Refinements from Intra2net:
- Use swig_add_library for cmake 3.8+ only
- Add cmake version guard for the new CMP0078 policy
  support cmake versions below 3.7.0]


2 years agoAdd SPDX identifiers to the core library and ftdi_eeprom tool
Yegor Yefremov [Fri, 7 Jun 2019 13:43:55 +0000]
Add SPDX identifiers to the core library and ftdi_eeprom tool

Signed-off-by: Yegor Yefremov <>

2 years agoswig: improve indentation
Yegor Yefremov [Thu, 22 Aug 2019 13:47:06 +0000]
swig: improve indentation

Fixes -Wmisleading-indentation warnings.

2 years agoftdi_eeprom: Add support for group0 drive levels on x232H chips
Claudio Lanconelli [Tue, 1 Oct 2019 13:11:54 +0000]
ftdi_eeprom: Add support for group0 drive levels on x232H chips

2 years agoswig: python: fix unresolved symbol issue
Yegor Yefremov [Tue, 6 Aug 2019 11:42:06 +0000]
swig: python: fix unresolved symbol issue

GCC later than 5.x produce file with an undefined
symbol str2charp_size due to C99 inline semantics change. So
remove this keyword.

Signed-off-by: Yegor Yefremov <>

2 years agopython/CMakeLists.txt: fix build with cmake < 3.7
Fabrice Fontaine [Sat, 19 Jan 2019 20:42:01 +0000]
python/CMakeLists.txt: fix build with cmake < 3.7

VERSION_GREATER_EQUAL has been added only in cmake 3.7:

So replace this statement by NOT CMAKE_VERSION VERSION_LESS


Signed-off-by: Fabrice Fontaine <>

3 years agoRemove more example programs during rpm build
Thomas Jarosch [Fri, 18 Jan 2019 14:51:35 +0000]
Remove more example programs during rpm build

3 years agoAdd program to test flush (purge) functionality.
Eric Schott [Fri, 4 Jan 2019 00:55:59 +0000]
Add program to test flush (purge) functionality.

3 years agoImprove Doxygen output for #defines in header files.
Eric Schott [Fri, 4 Jan 2019 00:54:40 +0000]
Improve Doxygen output for #defines in header files.

3 years agoImplement tc[io]flush methods & deprecate broken purge_buffers methods.
Eric Schott [Fri, 4 Jan 2019 00:52:02 +0000]
Implement tc[io]flush methods & deprecate broken purge_buffers methods.

The definitions for the SIO_RESET_PURGE_RX or SIO_RESET_PURGE_TX values are
with respect to the FTDI chip, not the CPU.  That is, when the FTDI chip
receives a USB control transfer request with the command SIO_RESET_PURGE_RX,
the FTDI chip empties the FIFO containing data received from the CPU awaiting
transfer out the serial port to the connected serial device (e.g., a modem).
Likewise, upon reception of the SIO_RESET_PURGE_TX command, the FTDI chip
empties the FIFO of data received from the attached serial device destined to
be transmitted to the CPU.

Unfortunately the coding of the previous releases of libfti assumed these
commands had the opposite effect. This resulted in the function
ftdi_usb_purge_tx_buffer clearing data received from the attached serial
device.  Similarly, the function ftdi_usb_purge_rx_buffer cleared the FTDI
FIFO containing data to be transmitted to the attached serial device.  More
seriously, this latter function clear the libftid's internal buffer of data
received from the serial device, destined to the application program.

This patch adds the ftdi_tciflush, ftdi_tcoflush, and ftdi_tcioflush functions
which emulate the Linux serial port tcflush(3) function.

3 years agoUse a separate Py_ssize_t var instead of casting an int pointer as a Py_ssize_t pointer.
Jordan Rupprecht [Thu, 20 Sep 2018 18:05:56 +0000]
Use a separate Py_ssize_t var instead of casting an int pointer as a Py_ssize_t pointer.

Casting is fine if Py_ssize_t == int, but not when Py_ssize_t == long.

Signed-off-by: Jordan Rupprecht <>

3 years agoCMake: use find_package (SWIG) for cmake >= 3.0.0
Eneas U de Queiroz [Tue, 31 Jul 2018 20:44:57 +0000]
CMake: use find_package (SWIG) for cmake >= 3.0.0

There's a workaround for a bug (fixed in cmake 3.0.0) that does not
work in CMake 3.12.  Only use the workaround with cmake < 3.0.0.

Signed-off-by: Eneas U de Queiroz <>

3 years agoImprove new async read/write example
Uwe Bonnes [Fri, 1 Jun 2018 09:26:52 +0000]
Improve new async read/write example

3 years agoexamples/async.c : Short example using async read/write
Uwe Bonnes [Thu, 31 May 2018 13:22:05 +0000]
examples/async.c : Short example using async read/write

3 years agoBring back ftdi_eeprom by default
Thomas Jarosch [Wed, 28 Feb 2018 20:14:49 +0000]
Bring back ftdi_eeprom by default

3 years agoCMake: move options to a dedicated file
Yegor Yefremov [Wed, 3 Jan 2018 12:46:23 +0000]
CMake: move options to a dedicated file

Also disable all options having extra dependencies.

If an option is selected makes its dependencies as REQUIRED.

Signed-off-by: Yegor Yefremov <>

3 years agoAdd Robby McKilliam to AUTHORS
Thomas Jarosch [Tue, 6 Feb 2018 20:18:17 +0000]
Add Robby McKilliam to AUTHORS

3 years agoAdd kernel driver auto attach/detach
Robby McKilliam [Wed, 13 Dec 2017 22:54:35 +0000]
Add kernel driver auto attach/detach

Introduce new detach mode:

Tested on linux (Ubuntu 16.04 and Raspbian Stretch) with an FT230.

4 years agoAccess ftdi->max_packet_size after checking ftdi context != NULL
Thomas Jarosch [Fri, 27 Oct 2017 15:15:27 +0000]
Access ftdi->max_packet_size after checking ftdi context != NULL

Reported via email by Mr. Alex Tvema.

4 years agoStart ChangeLog for next version
Thomas Jarosch [Mon, 25 Sep 2017 07:17:25 +0000]
Start ChangeLog for next version

4 years agoAdd Pawel Jewstafjew to AUTHORS
Thomas Jarosch [Mon, 25 Sep 2017 07:16:13 +0000]
Add Pawel Jewstafjew to AUTHORS

4 years agofix support for XON/XOFF flow control
Pawel Jewstafjew [Wed, 20 Sep 2017 18:38:54 +0000]
fix support for XON/XOFF flow control

4 years agoFix ftdi_stream.c compilation on WIN32
Thomas Jarosch [Tue, 19 Sep 2017 14:19:37 +0000]
Fix ftdi_stream.c compilation on WIN32

4 years agoFix small memleak when ftdi_init() fails
Rolf Fiedler [Fri, 25 Aug 2017 09:33:35 +0000]
Fix small memleak when ftdi_init() fails

If libusb open fails (e.g. permission problem),
then ftdi_init() leaks the memory for the eeprom data.

4 years agoIncrease version to 1.4 final v1.4
Thomas Jarosch [Mon, 7 Aug 2017 14:52:39 +0000]
Increase version to 1.4 final

4 years agofollow-up on c++ open() fix. fixes logic in open() with long argument list.
Matthias Janke [Fri, 21 Jul 2017 14:10:15 +0000]
follow-up on c++ open() fix. fixes logic in open() with long argument list.

4 years agoSync README with ChangeLog
Thomas Jarosch [Wed, 26 Jul 2017 15:17:09 +0000]
Sync README with ChangeLog

4 years agoIncrease version to 1.4rc2 v1.4rc2
Thomas Jarosch [Wed, 26 Jul 2017 15:03:29 +0000]
Increase version to 1.4rc2

4 years agoC++ API: Increase .so library version
Thomas Jarosch [Fri, 21 Jul 2017 10:00:58 +0000]
C++ API: Increase .so library version

We have an ABI break in this release (get_strings_and_reopen() changes),
so programs using the C++ wrapper need to be recompiled.

4 years agoAdd Eric Schott to AUTHORS, update ChangeLog
Thomas Jarosch [Fri, 21 Jul 2017 09:58:31 +0000]
Add Eric Schott to AUTHORS, update ChangeLog

4 years agoC++ API: Correct the purge Direction and ModemCtl enumerations definitions
Eric Schott [Fri, 21 Jul 2017 09:56:07 +0000]
C++ API: Correct the purge Direction and ModemCtl enumerations definitions

Do not use value of zero for bitmasks. The new enumeration values
are defined so programs compiled with the old ftdi.hpp include
would work as previously (doing nothing when the enumeration
with the zero value was bit-or'ed into the argument).

4 years agoCorrect const-ness of write to agree with ftdi.h
Eric Schott [Fri, 21 Jul 2017 09:48:37 +0000]
Correct const-ness of write to agree with ftdi.h

4 years agoAdd Matthias Janke to AUTHORS, update ChangeLog
Thomas Jarosch [Thu, 20 Jul 2017 15:57:20 +0000]
Add Matthias Janke to AUTHORS, update ChangeLog

4 years agoC++ API: Add support to open devices with missing product / serial strings
Matthias Janke [Thu, 13 Jul 2017 16:10:44 +0000]
C++ API: Add support to open devices with missing product / serial strings

The C++ API and C API differ in how they open a device. The C API only
considers the user supplied strings iVendor, iProduct and iSerial to open a device.

The C++ API behaves differently. After opening the device with specific supplied strings,
it tries to read all strings via get_strings_and_reopen().
This fails if one string like iSerial is not defined
in the descriptor. As such the whole open() operation fails
and the C++ API would only open devices with complete descriptors.

This commit fixes this behaviour, by extending the get_strings_and_reopen()
and get_strings() argument lists, to configure the strings to read.

4 years agoChangelog: Rename ftdi_usb_open_bus_port() to ftdi_usb_open_bus_addr()
Thomas Jarosch [Tue, 23 May 2017 18:37:20 +0000]
Changelog: Rename ftdi_usb_open_bus_port() to ftdi_usb_open_bus_addr()

4 years agoChange ftdi_open_bus_port to ftdi_open_bus_addr, since libusb_get_port_number is...
Maxwell Dreytser [Thu, 11 May 2017 05:14:39 +0000]
Change ftdi_open_bus_port to ftdi_open_bus_addr, since libusb_get_port_number is not always unique.

4 years agoMinor comment fix.
Maxwell Dreytser [Fri, 21 Apr 2017 16:48:42 +0000]
Minor comment fix.

4 years agoAdd missing sys/time.h include
Yegor Yefremov [Wed, 12 Apr 2017 05:55:22 +0000]
Add missing sys/time.h include

When compiling libftdi with mingw toolchain it complains about
implicit declaration of gettimeofday().

Signed-off-by: Yegor Yefremov <>

4 years agoAdd ftdi_usb_open_bus_port to changelog, update AUTHORS
Thomas Jarosch [Fri, 21 Apr 2017 16:03:09 +0000]
Add ftdi_usb_open_bus_port to changelog, update AUTHORS

4 years agoAdd a ftdi_usb_open_bus_port() function
Maxwell Dreytser [Fri, 21 Apr 2017 16:01:24 +0000]
Add a ftdi_usb_open_bus_port() function

[Thomas Jarosch] from the libftdi mailinglist:

This patch adds a function that will open using the specified bus and
port. I don't know how useful it would be to others, but I decided to
submit it cause why not. I pretty much just copied
"ftdi_usb_open_desc_index" and modified the parameters and loop.

4 years agoUpdate Copyright to 2017, switch download URLs to HTTPS v1.4rc1
Thomas Jarosch [Wed, 5 Apr 2017 20:41:07 +0000]
Update Copyright to 2017, switch download URLs to HTTPS

4 years agoChangeLog for 1.4rc1
Thomas Jarosch [Wed, 5 Apr 2017 20:38:10 +0000]
ChangeLog for 1.4rc1

4 years agoUpdate AUTHORS and release checklist
Thomas Jarosch [Wed, 5 Apr 2017 20:26:10 +0000]
Update AUTHORS and release checklist

4 years agoSet version number to 1.4rc1
Thomas Jarosch [Wed, 5 Apr 2017 18:55:45 +0000]
Set version number to 1.4rc1

4 years agoftdi_eeprom_set_strings(): No need for an open device
Thomas Jarosch [Wed, 22 Feb 2017 10:56:02 +0000]
ftdi_eeprom_set_strings(): No need for an open device

4 years agoAdd Adam Malinowski to AUTHORS
Thomas Jarosch [Wed, 22 Feb 2017 09:20:59 +0000]
Add Adam Malinowski to AUTHORS

4 years agoAdd python (SWIG) support for ftdi_eeprom_get_strings()
Thomas Jarosch [Wed, 22 Feb 2017 09:17:56 +0000]
Add python (SWIG) support for ftdi_eeprom_get_strings()

4 years agoAdd doxygen documentation for ftdi_eeprom_get_strings()
Thomas Jarosch [Wed, 22 Feb 2017 09:07:53 +0000]
Add doxygen documentation for ftdi_eeprom_get_strings()

Mostly borrowed from ftdi_usb_get_strings()

4 years agoAdd new function ftdi_eeprom_get_strings()
Adam Malinowski [Thu, 16 Feb 2017 14:17:14 +0000]
Add new function ftdi_eeprom_get_strings()

This function adds possibility of reading EEPROM strings:
manufacturer, product and serial number.

4 years remove unnecessary semicolons
Yegor Yefremov [Tue, 24 Jan 2017 14:14:57 +0000] remove unnecessary semicolons

5 years agoUpdate build instructions with yum references
Robert Cox [Fri, 23 Dec 2016 13:36:28 +0000]
Update build instructions with yum references

5 years agoeeprom: Fix USE_SERIAL handling for 230X type chips
Robert Cox [Fri, 23 Dec 2016 13:30:55 +0000]
eeprom: Fix USE_SERIAL handling for 230X type chips

Found that the USE_SERIAL was not being set correctly in
the eeprom_build routine for the 230X. Tracked the problem down to a line
that hard coded the value when the 230X was first added. With this line
removed code currently in the code before the switch will set the bit
correctly for the 230X.

5 years agoAllow LINK_PYTHON_LIBRARY=OFF on Darwin
Tim D. Smith [Wed, 17 Aug 2016 03:44:57 +0000]

5 years agoAdd TYPE_230X to baudrate test code
Thomas Jarosch [Tue, 16 Aug 2016 12:55:33 +0000]
Add TYPE_230X to baudrate test code

5 years agoUse BM/R series baud rate computation for FT230X.
Joe Zbiciak [Sat, 13 Aug 2016 19:46:16 +0000]
Use BM/R series baud rate computation for FT230X.

The current code uses the AM series baud rate computation for FT230X,
and this results in incorrect divisor calculation for high baud rates.
Use the BM/R series logic instead.

This matches the corresponding code paths in the Linux kernel ftdi_sio
driver.  See ftdi_sio.c:1323 here:

Specifically attempts to set 2000000 on an FT230X fail currently due to
the if-statement at ftdi.c:1106.  The computed divisor (12) gets clamped
to 16, and thus the for-loop it's in doesn't converge on a usable divisor.

The if-statement at ftdi.c:1152 never fires, as the if-statement at
ftdi.c:1106 in the for-loop precludes a divisor of 12 (which is required
for *encoded_divisor to become 0x4001).

5 years agoAdd Jon Beniston to AUTHORS
Thomas Jarosch [Thu, 28 Jul 2016 14:47:42 +0000]
Add Jon Beniston to AUTHORS

5 years agoConst correctness for char* strings
Jon Beniston [Thu, 28 Jul 2016 14:42:55 +0000]
Const correctness for char* strings

This changes the API for the ftdi_get_error_string(),
but the fix is really simple.

From the mailinglist:

The attached patch fixes some warnings/errors when compiled with g++ and
another compiler:

- Strings should be const char *
- Malloc needs to be cast from void * to char *
- Avoid mixing declarations with code

5 years agoBuild on _WIN32: Don't include sys/time.h
Jon Beniston [Fri, 22 Jul 2016 10:29:21 +0000]
Build on _WIN32: Don't include sys/time.h

The attached patch fixes compilation with Visual Studio:

sys/time.h isn't available on Windows. timeval is defined within
windows includes.

Compiles OK for Cygwin/Mingw too.

5 years agoFix example
Yegor Yefremov [Thu, 9 Jun 2016 08:04:33 +0000]
Fix example

FT230X related enums are called CBUSX and not CBUSH.

5 years agoMake ftdi_read_eeprom_location() endianess independent
Yegor Yefremov [Fri, 10 Jun 2016 11:58:32 +0000]
Make ftdi_read_eeprom_location() endianess independent

Read 16-bit integer as two byte array and combine these two bytes
to unsigned short.

5 years agoftdi_eeprom: Fix flashing FT245R
Rolf Fiedler [Mon, 6 Jun 2016 15:31:40 +0000]
ftdi_eeprom: Fix flashing FT245R

When we were trying to program FT245R, they were always flashed as FT232R.
The attached patch fixes the missing call to type2bit for TYPE_R.

5 years agoPrepare final 1.3 release v1.3
Thomas Jarosch [Fri, 20 May 2016 06:53:12 +0000]
Prepare final 1.3 release

5 years agoftdi_eeprom: Improve usability of flash_raw mode
Thomas Jarosch [Fri, 20 May 2016 06:33:15 +0000]
ftdi_eeprom: Improve usability of flash_raw mode

5 years agorpm spec file: Include ftdi_eeprom/example.conf v1.3rc1
Thomas Jarosch [Mon, 25 Apr 2016 17:00:02 +0000]
rpm spec file: Include ftdi_eeprom/example.conf

Moved the config file to the right directory, too.

Also update the expected final release month in the ChangeLog.

5 years agoFix build error on rc1 string in MINOR_VERSION
Thomas Jarosch [Wed, 20 Apr 2016 18:31:31 +0000]
Fix build error on rc1 string in MINOR_VERSION

5 years agoUpdate Doxygen configuration
Thomas Jarosch [Wed, 20 Apr 2016 18:30:46 +0000]
Update Doxygen configuration

5 years agoSet version number to 1.3rc1
Thomas Jarosch [Tue, 19 Apr 2016 21:02:52 +0000]
Set version number to 1.3rc1

5 years agoUpdate changelog for 1.3, update AUTHORS
Thomas Jarosch [Tue, 19 Apr 2016 20:59:57 +0000]
Update changelog for 1.3, update AUTHORS

5 years agoAdd Fahrzin Hemmati to AUTHORS, update ChangeLog
Thomas Jarosch [Mon, 18 Apr 2016 20:58:44 +0000]
Add Fahrzin Hemmati to AUTHORS, update ChangeLog

5 years agoAdd ftdi_usb_get_strings2() to the python wrapper
Thomas Jarosch [Mon, 18 Apr 2016 20:57:00 +0000]
Add ftdi_usb_get_strings2() to the python wrapper

5 years agoAdd new function ftdi_usb_get_strings2()
Fahrzin Hemmati [Mon, 18 Apr 2016 20:48:42 +0000]
Add new function ftdi_usb_get_strings2()

This new version of ftdi_usb_get_strings() only closes
the device if it was opened by the function, too.

[minor code and changelog tweaks by Thomas Jarosch]

5 years agoftdi_stream: fix timeout setting: tv_usec field of timeval is in microseconds, not ms
Ларионов Даниил [Sat, 26 Mar 2016 12:36:53 +0000]
ftdi_stream: fix timeout setting: tv_usec field of timeval is in microseconds, not ms

5 years agoAdded ftdi_transfer_data_cancel for cancelation of a submitted transfer, avoided...
Eugene Hutorny [Sat, 23 Jan 2016 04:41:30 +0000]
Added ftdi_transfer_data_cancel for cancelation of a submitted transfer, avoided resubmittion of a cancelled transfer in the callbacks, replaced calls to libusb_handle_events with libusb_handle_events_timeout_completed (Eugene Hutorny,

6 years agoInstall example config for ftdi_eeprom in docdir
Thomas Jarosch [Fri, 20 Nov 2015 22:54:56 +0000]
Install example config for ftdi_eeprom in docdir

Feature request and initial patch from Fabio Rossi.

6 years agoAdd Salvador Eduardo Tropea to AUTHORS
Thomas Jarosch [Fri, 20 Nov 2015 22:29:33 +0000]
Add Salvador Eduardo Tropea to AUTHORS

6 years agoeeprom handling: Add support for arbitrary user data
Salvador Eduardo Tropea [Fri, 20 Nov 2015 22:26:03 +0000]
eeprom handling: Add support for arbitrary user data

Add two new configuration options:

- user_data_addr: An integer indicating the offset
                  where we want to put the user provided data.

- user_data_file: A string indicating the filename that
                  contains the binary data to be added.

I've extended the libftdi API to store the above mentioned data inside
the eeprom struct. Also extended ftdi_eeprom_build to include this data.

6 years agoftdi_eeprom: Add --build-eeprom support
Salvador Eduardo Tropea [Fri, 20 Nov 2015 22:11:53 +0000]
ftdi_eeprom: Add --build-eeprom support

Support a "--build-eeprom" command line option that just
generates the EEPROM image (only flashed if --flash-eeprom is provided)

6 years agoswig wrapper: Fix handling of binary strings in ftdi_write_data() for python 3
Thomas Jarosch [Thu, 5 Nov 2015 16:53:07 +0000]
swig wrapper: Fix handling of binary strings in ftdi_write_data() for python 3

Thanks to xantares09 for developing this patch!

Also thanks to Chris Bracket for testing it on python 2 and python 3.

6 years agoFix useless use_usb_version config file option is useless due to incorrect checking...
Thilo Schulz [Mon, 12 Oct 2015 17:07:23 +0000]
Fix useless use_usb_version config file option is useless due to incorrect checking of boolean flag


currently the use_usb_version configuration option for ftdi_eeprom is not
honoured. Config file adds boolean option as 0x00 or 0x01, but the check in
libftdi is for the actual bitnumber for USE_USB_VERSION_BIT which is not 0x01.

Signed-off-by: Thilo Schulz <>

6 years agoAdd Thilo Schulz to AUTHORS
Thomas Jarosch [Fri, 16 Oct 2015 11:30:12 +0000]
Add Thilo Schulz to AUTHORS

6 years agoAllow include() directive for libconfuse formatted config
Thilo Schulz [Sat, 10 Oct 2015 13:04:39 +0000]
Allow include() directive for libconfuse formatted config

 file in ftdi_eeprom

6 years agoFix segfault crash if output file cannot be opened
Thilo Schulz [Sat, 10 Oct 2015 11:06:04 +0000]
Fix segfault crash if output file cannot be opened

6 years agoUpdate address of FSF
Thomas Jarosch [Wed, 23 Sep 2015 08:59:37 +0000]
Update address of FSF

New file taken from:

6 years agoAdd Raphael Assenat to AUTHORS
Thomas Jarosch [Mon, 7 Sep 2015 14:08:04 +0000]
Add Raphael Assenat to AUTHORS

6 years agoFT232R EEPROM: Add External oscillator enable bit
Raphael Assenat [Fri, 14 Aug 2015 20:13:58 +0000]
FT232R EEPROM: Add External oscillator enable bit

To use an external oscillator on FT232R/FT245R an eeprom bit must be
set. This patch adds support for it in the library.

This is an updated version of the original patch which was missing
the ftdi_set_eeprom_value implementation.

Signed-off-by: Raphael Assenat <>

6 years agoAdd Stephan Linz to AUTHORS
Thomas Jarosch [Fri, 14 Aug 2015 13:28:14 +0000]
Add Stephan Linz to AUTHORS

6 years agoftdi_eeprom: support channel configuration
Stephan Linz [Thu, 13 Aug 2015 10:03:29 +0000]
ftdi_eeprom: support channel configuration

Previously, the channels could not be configured and were
hard set to type UART and driver VCP and further to no RS485
functionality on chips with support for this feature.

With the new 'chX_*' config file options the ftdi_eeprom tool
is now abel to change the channel type, set the driver autoload
decision (VCP od D2XX) and enable or disable RS485.

The new config file options are:

 * ch[a,b]_type      - string of: UART, FIFO, OPTO, CPU, FT1284
 * ch[a,b,c,d]_vcp   - bool: true for VCP, false for D2XX
 * ch[a,b,c,d]_rs485 - bool: true for RS485 enabled

Signed-off-by: Stephan Linz <>

6 years agoUpdate doxygen config template
Thomas Jarosch [Wed, 27 May 2015 15:43:03 +0000]
Update doxygen config template

Solves this warning:
Warning: Tag `SYMBOL_CACHE_SIZE' at line 341 of file `(...)/build/Doxyfile'
has become obsolete.

Diff looks ok, mostly documentation changes.

6 years agoftdi_eeprom: added --device option to specify FTDI device
Robin Haberkorn [Tue, 27 Jan 2015 21:53:41 +0000]
ftdi_eeprom: added --device option to specify FTDI device

 * previously, the device could only be selected using the "vendor_id",
   "product_id" and "default_pid" config file options.
   This did not guarantee that a device could be uniquely identified
   (e.g. there could be multiple devices with the same VID/PID).
   Also this severely limited the possibilities of changing a device's
   VID/PID using ftdi_eeprom - this only worked if the device happened
   to have FTDI's VID 0x0403 and a PID equal to "default_pid".
 * If the --device option is omitted, ftdi_eeprom defaults to the
   old behaviour of using the config file options.
 * The order of arguments is insignificant. If multiple
   'command' options (--read-eeprom, --erase-eeprom, --flash-eeprom)
   are given, only the last one will determine the action.

6 years agoFix wrong offset for CBUS_FUNCTION_9 via ftdi_get_eeprom_value()
Thomas Jarosch [Thu, 12 Feb 2015 21:42:14 +0000]
Fix wrong offset for CBUS_FUNCTION_9 via ftdi_get_eeprom_value()

Reported by Denis Davydov. Thanks!

6 years agofixed ftdi_cbus_func and ftdi_cbush_func enumerations and introduced ftdi_cbusx_func
Robin Haberkorn [Tue, 13 Jan 2015 23:03:38 +0000]
fixed ftdi_cbus_func and ftdi_cbush_func enumerations and introduced ftdi_cbusx_func

* removed CBUS_BB. D2XX doesn't have it, so I don't think it's actually valid.

* CBUSH_TXLED/CBUSH_RXLED had the wrong values probably because the author
  looked at an outdated D2XX ftdi.h
  These values were also wrong in various mux tables of ftdi.c resulting
  e.g. in confusing outputs of the eeprom.c example.

* ftdi_cbush_func was extended to contain FT230X CBUS functions.
  However, the clock functions are different on FT-X and it is also
  confusing to use CBUSH constants on FT-X chips, so I introduced another
  enum ftdi_cbusx_func with CBUSX constants.

* Added support for setting CBUS functions on FT232H and FT230X in ftdi_eeprom.
  To support these chips, special cbushN and cbusxN options have been
  Possible values of the "cbus" options now match the ftdi.h constant names.
  Libconfuse string lists are no longer used as option types since they do not
  represent enumerations but lists.

* When "cbus" options are missing in ftdi_eeprom config files, keep the
  chip defaults as set by ftdi_eeprom_initdefaults().

6 years agofixed EEPROM user-area space checks for FT232R and FT245R chips in ftdi_eeprom_build()
Robin Haberkorn [Fri, 23 Jan 2015 10:37:14 +0000]
fixed EEPROM user-area space checks for FT232R and FT245R chips in ftdi_eeprom_build()

According to FTDI Application Note 121 ("Accessing the EEPROM User Area Of FTDI
Devices"), the FT232R and FT245R chips have a total 48 words (96 bytes) of
user area space available for descriptive strings.

[Note from Thomas Jarosch: That has also been verified with "FT Prog" by Robin]

7 years agoAdd cbus python example code
Rodney Sinclair [Wed, 14 Jan 2015 16:19:42 +0000]
Add cbus python example code

7 years agoFix typo in CBUS defines (CBUSG_DRIVE1 -> CBUSH_DRIVE1)
Thomas Jarosch [Wed, 14 Jan 2015 10:38:35 +0000]
Fix typo in CBUS defines (CBUSG_DRIVE1 -> CBUSH_DRIVE1)

Thanks to Rodney Sinclair for the report.

7 years agoCosmetic change only (fix cmake style)
Thomas Jarosch [Tue, 23 Dec 2014 14:40:11 +0000]
Cosmetic change only (fix cmake style)

7 years agoAdd FT230X to the list of supported devices
Thomas Jarosch [Fri, 21 Nov 2014 17:02:07 +0000]
Add FT230X to the list of supported devices

For the next release ;)