[PATCH] CMake: bump the minimal required version to 3.5

2023-12-12 Thread yegorslists
From: Yegor Yefremov Older CMake versions are treated as deprecated. --- CMakeLists.txt| 2 +- examples/cmake_example/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 985e658..2ce1ad4 100644 ---

[PATCH 2/2] CMake: use ${PC_LIBUSB_LIBRARIES} instead of a library name

2023-10-12 Thread yegorslists
From: Yegor Yefremov Patch taken from the Debian package: https://sources.debian.org/src/libftdi1/1.5-6/debian/patches/02-kfreebsd.diff/ --- cmake/FindLibUSB.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindLibUSB.cmake b/cmake/FindLibUSB.cmake index

[PATCH 1/2] CMake: fix multiarch support

2023-10-12 Thread yegorslists
From: Yegor Yefremov Let CMake determine the exact library destination path. Patch taken from the Debian package: https://sources.debian.org/src/libftdi1/1.5-6/debian/patches/01-cmake-multiarch.diff/ --- CMakeLists.txt| 6 +++--- ftdipp/CMakeLists.txt | 6 +++--- src/CMakeLists.txt

[PATCH v2 6/6] CMake: make the project compatible ´with building as a subproject

2023-09-11 Thread yegorslists
From: Yegor Yefremov Use CMAKE_CURRENT_*_DIR in the mein CMakeLists.txt and PROJECT_*_DIR in the subdirectories. --- CMakeLists.txt | 14 +++--- examples/CMakeLists.txt| 4 ++-- ftdi_eeprom/CMakeLists.txt | 2 +- ftdipp/CMakeLists.txt | 2 +-

[PATCH v2 4/6] CMake: rework subdirectory handling

2023-09-11 Thread yegorslists
From: Yegor Yefremov Move all mandatory subdirs to the top and also make if clauses more readable. --- CMakeLists.txt | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 947fb34..7f72e0c 100644 --- a/CMakeLists.txt +++

[PATCH v2 5/6] ftdipp/CMakeLists.txt: remove VIM modline settings

2023-09-11 Thread yegorslists
From: Yegor Yefremov Indentation settings will be handled via the EditorConfig project. --- ftdipp/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt index 38932ae..fa2711f 100644 --- a/ftdipp/CMakeLists.txt +++

[PATCH v2 3/6] CMake: rework findlibusb module

2023-09-11 Thread yegorslists
From: Yegor Yefremov Rename the module to FindLibUSB.cmake and use it as the only way of finding libusb. Bonus: perform CMake linting of the module. --- CMakeLists.txt | 14 +++--- cmake/{FindUSB1.cmake => FindLibUSB.cmake} | 13 +++-- 2 files

[PATCH v2 2/6] CMake: report CMake version

2023-09-11 Thread yegorslists
From: Yegor Yefremov --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24da84d..39857a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +message(STATUS "CMake

[PATCH v2 1/6] CMake: use dedicated recipe for documentation generation

2023-09-11 Thread yegorslists
From: Yegor Yefremov Use PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR to refer to the top source directory. --- CMakeLists.txt| 22 +- doc/CMakeLists.txt| 26 ++ doc/Doxyfile.in | 8 doc/Doxyfile.xml.in | 2 +-

[PATCH 2/2] CMake: report CMake version

2023-09-04 Thread yegorslists
From: Yegor Yefremov --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24da84d..39857a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +message(STATUS "CMake

[PATCH 1/2] CMake: use dedicated recipe for documentation generation

2023-09-04 Thread yegorslists
From: Yegor Yefremov Use PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR to refer to the top source directory. --- CMakeLists.txt| 22 +- doc/CMakeLists.txt| 26 ++ doc/Doxyfile.in | 8 doc/Doxyfile.xml.in | 2 +-

[PATCH] CMake: disable deprecated behavior

2023-09-01 Thread yegorslists
From: Yegor Yefremov Set policies CMP0011, CMP0057, CMP0099 to the new behavior. Since version 3.27.4 if the policy is not set to the new behavior, CMake will generate a warning. --- CMakeLists.txt | 17 + 1 file changed, 17 insertions(+) diff --git a/CMakeLists.txt

[PATCH] Doxygen: resolve warnings

2023-08-31 Thread yegorslists
From: Yegor Yefremov Remove obsolete values like MSCGEN_PATH, TCL_SUBST, etc. from the configuration file. All these options used the default values, hence it is safe to remove them. Paper type a4wide doesn't exist, so use a4. --- doc/Doxyfile.in | 30 +- 1 file

[PATCH 2/2] CMake: rework documentation creation section

2023-08-31 Thread yegorslists
From: Yegor Yefremov Add comments and also make the if ( DOCUMENTATION ) section more readable. --- CMakeLists.txt | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d7f9b6..1745dc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt

[PATCH 1/2] CMake: require 2.8.12 for cmake_example

2023-08-31 Thread yegorslists
From: Yegor Yefremov Make CMake minimal version requirement consistent for the entire project. --- examples/cmake_example/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cmake_example/CMakeLists.txt b/examples/cmake_example/CMakeLists.txt index

[PATCH] examples/eeprom.c: use AUTO_DETACH_REATACH_SIO_MODULE

2023-08-31 Thread yegorslists
From: Yegor Yefremov This way, the device's state remains unchanged after the eeprom invocation. Bonus: remove trailing white spaces. --- examples/eeprom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/eeprom.c b/examples/eeprom.c index 45f5dff..3d03ac3 100644

[PATCH] CMake: fix indentation and normalize braces

2023-08-30 Thread yegorslists
From: Yegor Yefremov --- CMakeLists.txt| 53 +-- examples/CMakeLists.txt | 21 ++- examples/cmake_example/CMakeLists.txt | 4 +- ftdipp/CMakeLists.txt | 35 +- packages/CMakeLists.txt

[WIP PATCH v3 2/2] Rework user area handling

2023-08-29 Thread yegorslists
From: Yegor Yefremov User area begins after the serial number string. Hence, use free_end to specify the end of the necessary data like producer, serial number strings as also PNP bits. For FT230X chips, use the fixed user area as described in the datasheet. Treat both generated data area and

[WIP PATCH v3 1/2] Change user_data from pointer to a buffer

2023-08-29 Thread yegorslists
From: Yegor Yefremov Handle user_data the same way as the main EEPROM buffer. Copy buffer instead of assigning a pointer in ftdi_set_eeprom_user_data(). This is required because if used from Python, the input buf is not available as soon as the ftdi_set_eeprom_user_data() exits. --- src/ftdi.c

[PATCH] Align is_not_pnp property

2023-08-29 Thread yegorslists
From: Yegor Yefremov As seen when written with FTD2XX. --- src/ftdi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ftdi.c b/src/ftdi.c index e16816e..6449f9d 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -3125,6 +3125,8 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)

[PATCH] FT4232: show mode for both C and D channels

2023-08-29 Thread yegorslists
From: Yegor Yefremov --- src/ftdi.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/ftdi.c b/src/ftdi.c index 0a7fb27..e16816e 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -3881,6 +3881,13 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, int verbose)

[PATCH] examples: eeprom: add the missing newlines

2023-08-09 Thread yegorslists
From: Yegor Yefremov --- examples/eeprom.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/eeprom.c b/examples/eeprom.c index 247589a..45f5dff 100644 --- a/examples/eeprom.c +++ b/examples/eeprom.c @@ -151,14 +151,14 @@ int main(int argc, char **argv)

[PATCH] EEPROM: mention FT230X in the dynamic content calculation

2023-08-09 Thread yegorslists
From: Yegor Yefremov --- src/ftdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ftdi.c b/src/ftdi.c index 0a7fb27..0404175 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -3049,7 +3049,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi) // Dynamic content //

[PATCH] EEPROM: fix checksum for FT230X series

2023-08-09 Thread yegorslists
From: Yegor Yefremov ftdi_eeprom_build() computes the checksum via reading the "Factory Configuration Data" region. ftdi_eeprom_decode() computes the checksum only on the EEPROM buffer. Hence, both checksums differ. Add the info from "Factory Configuration Data" to the EEPROM buffer. ---

[PATCH] Add .editorconfig for C and CMake files

2023-08-05 Thread yegorslists
From: Yegor Yefremov --- .editorconfig | 16 1 file changed, 16 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000..40392cd --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*]

[PATCH] Fix typos and harmonize spaces

2023-08-03 Thread yegorslists
From: Yegor Yefremov --- src/ftdi.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ftdi.c b/src/ftdi.c index 0a7fb27..3a51b26 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -83,7 +83,7 @@ static void ftdi_usb_close_internal (struct ftdi_context *ftdi)

[WIP PATCH v2 2/2] Rework user area handling

2023-08-03 Thread yegorslists
From: Yegor Yefremov User area begins after the serial number string. Hence, use free_end to specify the end of the necessary data like producer, serial number strings as also PNP bits. Treat both generated data area and strings area violations as errors. --- src/ftdi.c | 15 +-- 1

[WIP PATCH v2 1/2] Change user_data from pointer to a buffer

2023-08-03 Thread yegorslists
From: Yegor Yefremov Handle user_data the same way as the main EEPROM buffer. Copy buffer instead of assigning a pointer in ftdi_set_eeprom_user_data(). This is required because if used from Python, the input buf is not available as soon as the ftdi_set_eeprom_user_data() exits. --- src/ftdi.c

[PATCH 2/2] Rework user area handling

2023-08-03 Thread yegorslists
From: Yegor Yefremov User area begins after the serial number string. Hence, use free_end to specify the end of the necessary data like producer, serial number strings as also PNP bits. --- src/ftdi.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ftdi.c

[PATCH 1/2] Change user_data from pointer to a buffer

2023-08-03 Thread yegorslists
From: Yegor Yefremov Handle user_data the same way as the main EEPROM buffer. Copy buffer instead of assigning a pointer in ftdi_set_eeprom_user_data(). This is required because if used from Python, the input buf is not available as soon as the ftdi_set_eeprom_user_data() exits. --- src/ftdi.c

[PATCH] CMake: bump the minimal required version to 2.8.12

2023-08-01 Thread yegorslists
From: Yegor Yefremov The older CMake versions are deprecated. Remove support for CMake code compatible with CMake older than 2.8.8. Also move cmake_minimum_required() command before the project() command invocation. --- CMakeLists.txt | 46 +- 1

[PATCH] EEPROM: make user_data_addr value readable

2023-07-31 Thread yegorslists
From: Yegor Yefremov Before this change, the user_data_addr could be only written but not read. --- src/ftdi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ftdi.c b/src/ftdi.c index 0a7fb27..df822cb 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -4172,6 +4172,9 @@ int

[PATCH] Ignore patch files

2020-03-19 Thread yegorslists
From: Yegor Yefremov Signed-off-by: Yegor Yefremov --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 98a50e9..2f28a2f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.so *.lo *.la +*.patch *.pc .deps/ .libs/ -- 2.17.0 -- libftdi

[PATCH] Ignore tags file

2020-02-06 Thread yegorslists
From: Yegor Yefremov Signed-off-by: Yegor Yefremov --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index d05881d..98a50e9 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,6 @@ CMakeFiles # Misc. binaries *.dylib opt + +# ctags +tags --

[PATCH] Fix typos

2020-01-15 Thread yegorslists
From: Yegor Yefremov Signed-off-by: Yegor Yefremov --- cmake/FindConfuse.cmake | 2 +- examples/async.c| 4 ++-- examples/serial_test.c | 2 +- examples/stream_test.c | 4 ++-- ftdipp/CMakeLists.txt | 2 +- ftdipp/ftdi.cpp | 2 +- python/examples/cbus.py | 2 +-

[PATCH] CMake: reorder Python detection

2020-01-13 Thread yegorslists
From: Yegor Yefremov 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 --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] swig: improve indentation

2019-08-22 Thread yegorslists
From: Yegor Yefremov Fixes -Wmisleading-indentation warnings. --- python/ftdi1.i | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/python/ftdi1.i b/python/ftdi1.i index f397f84..8b179f9 100644 --- a/python/ftdi1.i +++ b/python/ftdi1.i @@ -92,7 +92,12 @@ char *

[PATCH] swig: python: fix unresolved symbol issue

2019-08-06 Thread yegorslists
From: Yegor Yefremov 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 --- python/ftdi1.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] Add SPDX identifiers to the core library and ftdi_eeprom tool

2019-06-07 Thread yegorslists
From: Yegor Yefremov Signed-off-by: Yegor Yefremov --- ftdi_eeprom/main.c | 1 + src/ftdi.c | 1 + src/ftdi.h | 1 + src/ftdi_i.h | 1 + src/ftdi_stream.c | 1 + 5 files changed, 5 insertions(+) diff --git a/ftdi_eeprom/main.c b/ftdi_eeprom/main.c index d1c4794..9778818

[PATCH] cmake: use the standard CMake flag to drive the shared object build

2017-12-15 Thread yegorslists
From: Samuel Martin Remove the STATICLIBS CMake option (and the code handling it) and let the standard CMake flags drive the shared object build. Build shared library: cmake -DBUILD_SHARED_LIBS=ON Build static library: cmake -DBUILD_SHARED_LIBS=OFF Signed-off-by: Samuel

[PATCH] Add missing sys/time.h include

2017-04-11 Thread yegorslists
From: Yegor Yefremov When compiling libftdi with mingw toolchain it complains about implicit declaration of gettimeofday(). Signed-off-by: Yegor Yefremov --- src/ftdi_stream.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] cbus.py: remove unnecessary semicolons

2017-01-24 Thread yegorslists
From: Yegor Yefremov --- python/examples/cbus.py | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/python/examples/cbus.py b/python/examples/cbus.py index 7f3b123..3ab9512 100644 --- a/python/examples/cbus.py +++

[PATCH] Make ftdi_read_eeprom_location endianess independent

2016-06-10 Thread yegorslists
From: Yegor Yefremov Read 16-bit integer as two byte array and combine these two bytes to unsigned short. --- src/ftdi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ftdi.c b/src/ftdi.c index f5d263c..fdf93fe 100644 --- a/src/ftdi.c

[PATCH] Fix cbus.py example

2016-06-09 Thread yegorslists
From: Yegor Yefremov FT230X related enums are called CBUSX and not CBUSH. --- python/examples/cbus.py | 54 - 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/python/examples/cbus.py