libftdi
2 years agoFix indentation
Thomas Jarosch [Tue, 4 May 2021 16:51:15 +0000]
Fix indentation

2 years agoAdd Tomasz Wasilczyk to AUTHORS
Thomas Jarosch [Sun, 2 May 2021 07:32:02 +0000]
Add Tomasz Wasilczyk to AUTHORS

2 years agoDon't set EEPROM serial when it's not used.
Tomasz Wasilczyk [Wed, 21 Apr 2021 19:43:34 +0000]
Don't set EEPROM serial when it's not used.

This makes a difference in USB enumeration -- if serial is missing,
its string is not present in string descriptor list.

2 years agoRemove legacy EEPROM fields from FT4232H.
Tomasz Wasilczyk [Wed, 21 Apr 2021 19:42:08 +0000]
Remove legacy EEPROM fields from FT4232H.

These are not present when flashed with FT_Prog tool.

2 years agoDon't fail reading missing strings.
Tomasz Wasilczyk [Wed, 21 Apr 2021 19:39:52 +0000]
Don't fail reading missing strings.

This happens i.e. when serial number is not set -- in such case the
string is missing from string descriptor list.

2 years agoftdi_eeprom_initdefaults const arguments
Tomasz Wasilczyk [Thu, 11 Mar 2021 23:47:06 +0000]
ftdi_eeprom_initdefaults const arguments

This function don't need to modify its arguments.

2 years agoDon't spam stderr when flashing FT232H eeprom
Tomasz Wasilczyk [Thu, 11 Mar 2021 23:43:12 +0000]
Don't spam stderr when flashing FT232H eeprom

3 years agoexamples/bitbang_cbus.c: Check return value of fgets()
Thomas Jarosch [Mon, 24 Aug 2020 17:45:41 +0000]
examples/bitbang_cbus.c: Check return value of fgets()

3 years agoFix building unit tests without FTDIPP
Thomas Jarosch [Mon, 24 Aug 2020 17:27:22 +0000]
Fix building unit tests without FTDIPP

Needed to run the baudrate unit tests.

Probably another fallout from:

****************************
commit 0209a3633dc877a577af07d883eb5059e22f6a91

cmake: do not check for g++ when FTDIPP is disabled
****************************

3 years agoFix GCC fall-through warnings.
Uwe Bonnes [Fri, 31 Jul 2020 09:00:50 +0000]
Fix GCC fall-through warnings.

When compiling ftdi.c in the context of blackmagic debug, more enabled
warnings and -Werror made me to add appended fixes.

Fixing the signedness of baudrate would probably be more logically by
making all baudrate and clk unsigned, but would need more code changes.
I decided to make clk signed as a fix with minimal
impact. The FTDI chips are far away from 2 GHz clock rate...

3 years agoIgnore purge_test example build for MinGW
Xiaofan Chen [Fri, 31 Jul 2020 02:25:45 +0000]
Ignore purge_test example build for MinGW

termios.h is not available on MinGW.

3 years agoCMakeLists.txt: fix paths when FTDIPP is set
Fabrice Fontaine [Fri, 17 Jul 2020 19:25:03 +0000]
CMakeLists.txt: fix paths when FTDIPP is set

Use the same project name (i.e. libftdi1 and not libftdipp1) when FTDIPP
is enabled as suggested by Aurelien Jarno in
http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00044.html

Without this change, the libftdi1.pc config file defines the include
path as /usr/local/include/libftdipp1 while the ftdi.h file is actually
installed in /usr/local/include/libftdi1

This is an issue for example for libsigrok which will fail on:

In file included from src/hardware/asix-sigma/protocol.c:27:
src/hardware/asix-sigma/protocol.h:28:10: fatal error: ftdi.h: No such file or directory
   28 | #include <ftdi.h>
      |          ^~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/1427f44e36752c337791597fab47a1889552a2fe

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

3 years agoRelease libftdi 1.5 final latest_release v1.5
Thomas Jarosch [Tue, 7 Jul 2020 19:32:55 +0000]
Release libftdi 1.5 final

3 years agoMerge branch 'prepare-release' v1.5rc1
Thomas Jarosch [Tue, 9 Jun 2020 21:19:34 +0000]
Merge branch 'prepare-release'

3 years agoSet version number to 1.5rc1
Thomas Jarosch [Tue, 9 Jun 2020 20:39:33 +0000]
Set version number to 1.5rc1

3 years agoPrepare changelog for 1.5rc1
Thomas Jarosch [Tue, 9 Jun 2020 20:28:50 +0000]
Prepare changelog for 1.5rc1

3 years agoIncrease copyright year to 2020
Thomas Jarosch [Tue, 9 Jun 2020 20:54:37 +0000]
Increase copyright year to 2020

3 years agoUpdate AUTHORS file
Thomas Jarosch [Tue, 9 Jun 2020 20:36:57 +0000]
Update AUTHORS file

3 years agoUpdate release checklist
Thomas Jarosch [Tue, 9 Jun 2020 20:43:59 +0000]
Update release checklist

3 years agoRemove outdated rpm .spec file template
Thomas Jarosch [Tue, 9 Jun 2020 21:11:04 +0000]
Remove outdated rpm .spec file template

The distro source packages are much more useful than this.

Grepped source tree for ".spec" and "rpm",
hopefully I caught all occurrences.

3 years agoUpdate Autotools Mythbuster link to avoid multiple redirects.
Diego Elio Pettenò [Tue, 2 Jun 2020 09:06:33 +0000]
Update Autotools Mythbuster link to avoid multiple redirects.

While I'm hoping to maintain the chain of redirects for the foreseeable
future, it makes sense to point at the final URL now that Autotools
Mythuster has had its domain for a long while.

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.com>

3 years agoftdi_eeprom_build(): Fix inverted handling of VCP driver field for TYPE_R chips
Thomas Jarosch [Thu, 14 May 2020 21:00:24 +0000]
ftdi_eeprom_build(): Fix inverted handling of VCP driver field for TYPE_R chips

From doc/EEPROM-structure:

    On TYPE_R 00.3 set means D2XX, on other devices VCP

-> invert the field for TYPE_R so "eeprom->channel_a_driver"
   set to 1 always means VCP driver for all chips.

3 years agoeeprom handling: Unify handling of boolean bit flags
Thomas Jarosch [Thu, 14 May 2020 20:38:37 +0000]
eeprom handling: Unify handling of boolean bit flags

Boolean bit flags should be zero or one in memory,
not the actual eeprom value FTDI assigned to them.

Example of the code change in ftdi_eeprom_build():

ftdi_eeprom_build():
-            if (eeprom->suspend_dbus7 == SUSPEND_DBUS7_BIT)
+            if (eeprom->suspend_dbus7)

The changes should not break any backward compatibility
in ftdi_build_eeprom().

The function ftdi_decode_eeprom() will return slightly different values
for boolean fields, but callers should test using "if (flag_enabled)"
instead of "if (flag_enabled == specific_value)" anyway.

Test done: Decoded eeprom of a FT232 serial cable stayed the same.
$ diff -u dump-old.txt dump-new.txt
-> no change

3 years agoftdi_eeprom: Add device release number support
Roman Lapin [Sat, 9 May 2020 20:13:58 +0000]
ftdi_eeprom: Add device release number support

In process of firmware repairing of some FTDI-chip based device I have
found that I can't get binary identical EEPROM dumps from properly
working device and ftdi_eeprom --build_eeprom command because of
ftdi_eeprom does not support changing of device release number (byte
with addr 0x06).

[TJ: Keep old behavior if release_number is not set in the config file]

4 years agoIgnore patch files
Yegor Yefremov [Mon, 13 Apr 2020 21:09:27 +0000]
Ignore patch files

4 years agoftdi_eeprom: Minor cosmetic fix on usage screen
Thomas Jarosch [Mon, 13 Apr 2020 21:07:14 +0000]
ftdi_eeprom: Minor cosmetic fix on usage screen

4 years agoftdi_eeprom: Add more detailed example.conf file
Holger Mößinger [Wed, 5 Feb 2020 12:11:04 +0000]
ftdi_eeprom: Add more detailed example.conf file

4 years agoeeprom: Fix handling of high_current_drive parameter
Holger Mößinger [Fri, 7 Feb 2020 13:38:46 +0000]
eeprom: Fix handling of high_current_drive parameter

Additionally fix it up for type R chips.

4 years agoeeprom: Add channel_a_driver support for type xxR chips
Holger Mößinger [Wed, 5 Feb 2020 13:57:41 +0000]
eeprom: Add channel_a_driver support for type xxR chips

4 years agoMake ftdi_eeprom more verbose by adding verbose option
Holger Mößinger [Wed, 5 Feb 2020 12:10:25 +0000]
Make ftdi_eeprom more verbose by adding verbose option

[TJ: Replaced tabs with spaces]

4 years agoIgnore tags file
Yegor Yefremov [Thu, 6 Feb 2020 13:37:09 +0000]
Ignore tags file

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

4 years agocmake: do not check for g++ when FTDIPP is disabled
Fabrice Fontaine [Tue, 21 Jan 2020 22:05:27 +0000]
cmake: do not check for g++ when FTDIPP is disabled

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[Retrieved (and slightly updated) from:
https://git.buildroot.net/buildroot/tree/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

4 years agoFix typos
Yegor Yefremov [Thu, 16 Jan 2020 07:42:21 +0000]
Fix typos

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

4 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*’
[-Werror=write-strings]

4 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:

Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

4 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 <hobbes1069@gmail.com> 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
/builddir/build/BUILD/libftdi-f49ee0d/build-py2/python/CMakeFiles/_ftdi1.dir
/usr/bin/doxygen
/builddir/build/BUILD/libftdi-f49ee0d/build-py2/Doxyfile.xml
cd /builddir/build/BUILD/libftdi-f49ee0d/build-py2/python && /usr/bin/cmake
-E touch
/builddir/build/BUILD/libftdi-f49ee0d/build-py2/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON.stamp
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/build-py2/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c
/builddir/build/BUILD/libftdi-f49ee0d/python/ftdi1.i
/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

4 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) <ferdnyc@gmail.com>

4 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
SWIG[3].

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
- Use "NOT CMAKE_VERSION VERSION_LESS" construct to
  support cmake versions below 3.7.0]

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1675275
[2] https://cmake.org/cmake/help/latest/policy/CMP0078.html?highlight=cmp0078
[3] https://cmake.org/cmake/help/latest/module/UseSWIG.html

4 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 <yegorslists@googlemail.com>

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

Fixes -Wmisleading-indentation warnings.

4 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

4 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 _fdti1.so file with an undefined
symbol str2charp_size due to C99 inline semantics change. So
remove this keyword.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

5 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:
https://cmake.org/cmake/help/v3.7/release/3.7.html

So replace this statement by NOT CMAKE_VERSION VERSION_LESS

Fixes:
 - http://autobuild.buildroot.org/results/1091872e2b77d789e361d1ddefd235c738933c55

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

5 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

5 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.

5 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.

5 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.

5 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 <rupprecht@google.com>

5 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 <cote2004-github@yahoo.com>

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

5 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

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

6 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 <yegorslists@googlemail.com>

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

6 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:
AUTO_DETACH_REATACH_SIO_MODULE

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

6 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.

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

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

6 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

6 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

6 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.

6 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

6 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.

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

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

6 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.

6 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

6 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).

6 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

6 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

6 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.

6 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()

6 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.

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

6 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 <yegorslists@googlemail.com>

6 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

6 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.

7 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

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

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

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

7 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

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

7 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()

7 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()

7 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.

7 years agocbus.py: remove unnecessary semicolons
Yegor Yefremov [Tue, 24 Jan 2017 14:14:57 +0000]
cbus.py: remove unnecessary semicolons

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

7 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.

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

7 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

7 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:

http://lxr.free-electrons.com/source/drivers/usb/serial/ftdi_sio.c#L1323

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).

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

7 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

7 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.

7 years agoFix cbus.py example
Yegor Yefremov [Thu, 9 Jun 2016 08:04:33 +0000]
Fix cbus.py example

FT230X related enums are called CBUSX and not CBUSH.

7 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.

7 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.

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

7 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