From 01038fc9ff65e364ee46a40150d3a9569c1af58d Mon Sep 17 00:00:00 2001 From: Edwin Noorlander Date: Wed, 19 Feb 2025 16:33:10 +0100 Subject: [PATCH] updaet --- .gitmodules | 9 +- CMakeLists.txt | 11 +- lib/libftdi/.gitignore | 51 - lib/libftdi/AUTHORS | 47 - lib/libftdi/CMakeLists.txt | 180 - lib/libftdi/COPYING-CMAKE-SCRIPTS | 22 - lib/libftdi/COPYING.GPL | 339 -- lib/libftdi/COPYING.LIB | 481 -- lib/libftdi/ChangeLog | 144 - lib/libftdi/FindUSB1.cmake | 38 - lib/libftdi/LICENSE | 25 - lib/libftdi/README | 26 - lib/libftdi/README.mingw | 11 - lib/libftdi/TODO | 16 - lib/libftdi/Toolchain-Crossbuild32.cmake | 4 - lib/libftdi/Toolchain-mingw32.cmake | 16 - lib/libftdi/bindings/CMakeLists.txt | 28 - lib/libftdi/bindings/ftdi.i | 88 - lib/libftdi/doc/Doxyfile.in | 1722 ------ lib/libftdi/doc/EEPROM-structure | 109 - lib/libftdi/doc/release-checklist.txt | 28 - lib/libftdi/examples/CMakeLists.txt | 54 - lib/libftdi/examples/baud_test.c | 224 - lib/libftdi/examples/bitbang.c | 87 - lib/libftdi/examples/bitbang2.c | 92 - lib/libftdi/examples/bitbang_cbus.c | 94 - .../bitbang_cbus_eeprom_for_windows.ept | 62 - lib/libftdi/examples/bitbang_ft2232.c | 109 - lib/libftdi/examples/eeprom.c | 299 -- lib/libftdi/examples/find_all.c | 54 - lib/libftdi/examples/find_all_pp.cpp | 71 - lib/libftdi/examples/python/complete.py | 101 - lib/libftdi/examples/python/simple.py | 28 - lib/libftdi/examples/serial_test.c | 182 - lib/libftdi/examples/simple.c | 53 - lib/libftdi/examples/stream_test.c | 358 -- lib/libftdi/ftdi_eeprom/CMakeLists.txt | 41 - lib/libftdi/ftdi_eeprom/example.conf | 31 - .../ftdi_eeprom/ftdi_eeprom_version.h.in | 8 - lib/libftdi/ftdi_eeprom/main.c | 381 -- lib/libftdi/ftdipp/CMakeLists.txt | 80 - lib/libftdi/ftdipp/ftdi.cpp | 632 --- lib/libftdi/ftdipp/ftdi.hpp | 217 - lib/libftdi/libftdi-1.0.kdev4 | 3 - lib/libftdi/libftdi-config.in | 79 - lib/libftdi/libftdi.gyp | 25 - lib/libftdi/libftdi.lnt | 28 - lib/libftdi/libftdi.pc.in | 14 - lib/libftdi/libftdi.spec.in | 67 - lib/libftdi/libftdipp.pc.in | 11 - lib/libftdi/packages/99-libftdi.rules | 8 - lib/libftdi/packages/CMakeLists.txt | 21 - lib/libftdi/src/CMakeLists.txt | 77 - lib/libftdi/src/ftdi.c | 4122 -------------- lib/libftdi/src/ftdi.h | 530 -- lib/libftdi/src/ftdi_i.h | 130 - lib/libftdi/src/ftdi_stream.c | 295 - lib/libftdi/src/ftdi_version_i.h | 11 - lib/libftdi/src/ftdi_version_i.h.in | 11 - lib/libftdi/test/CMakeLists.txt | 30 - lib/libftdi/test/basic.cpp | 33 - lib/libftdi/test/baudrate.cpp | 267 - lib/libusb/.clang-tidy | 34 - lib/libusb/.codespellrc | 3 - lib/libusb/.gitattributes | 7 - lib/libusb/.github/cifuzz.yml | 26 - lib/libusb/.github/workflows/linux.yml | 50 - lib/libusb/.github/workflows/macos.yml | 36 - lib/libusb/.github/workflows/msys2.yml | 23 - .../.github/workflows/msys2_clang32.yml | 25 - .../.github/workflows/msys2_clang64.yml | 21 - lib/libusb/.gitignore | 84 - lib/libusb/.private/README.txt | 5 - lib/libusb/.private/appveyor_build.sh | 26 - lib/libusb/.private/bm.sh | 54 - lib/libusb/.private/ci-build.sh | 92 - lib/libusb/.private/ci-container-build.sh | 67 - lib/libusb/.private/post-rewrite.sh | 32 - lib/libusb/.private/pre-commit.sh | 52 - lib/libusb/.private/wbs.txt | 43 - lib/libusb/.travis.yml | 58 - lib/libusb/AUTHORS | 224 - lib/libusb/COPYING | 504 -- lib/libusb/ChangeLog | 351 -- lib/libusb/HACKING | 25 - lib/libusb/INSTALL_WIN.txt | 52 - lib/libusb/KEYS | 123 - lib/libusb/Makefile.am | 50 - lib/libusb/NEWS | 2 - lib/libusb/PORTING | 94 - lib/libusb/README | 33 - lib/libusb/README.git | 41 - lib/libusb/README.md | 1 - lib/libusb/TODO | 2 - lib/libusb/Xcode/common.xcconfig | 92 - lib/libusb/Xcode/config.h | 31 - lib/libusb/Xcode/debug.xcconfig | 32 - lib/libusb/Xcode/libusb.xcconfig | 21 - .../Xcode/libusb.xcodeproj/project.pbxproj | 1391 ----- lib/libusb/Xcode/libusb_debug.xcconfig | 21 - lib/libusb/Xcode/libusb_release.xcconfig | 21 - lib/libusb/Xcode/release.xcconfig | 30 - lib/libusb/android/README | 152 - lib/libusb/android/config.h | 55 - .../android/examples/unrooted_android.c | 301 -- .../android/examples/unrooted_android.h | 36 - lib/libusb/android/jni/Android.mk | 23 - lib/libusb/android/jni/Application.mk | 40 - lib/libusb/android/jni/examples.mk | 168 - lib/libusb/android/jni/libusb.mk | 60 - lib/libusb/android/jni/tests.mk | 45 - lib/libusb/appveyor.yml | 108 - lib/libusb/autogen.sh | 10 - lib/libusb/bootstrap.sh | 10 - lib/libusb/configure.ac | 450 -- lib/libusb/doc/Makefile.in | 22 - lib/libusb/doc/doxygen.cfg.in | 2571 --------- lib/libusb/doc/libusb.png | Bin 2923 -> 0 bytes lib/libusb/examples/Makefile.am | 12 - lib/libusb/examples/dpfp.c | 711 --- lib/libusb/examples/ezusb.c | 846 --- lib/libusb/examples/ezusb.h | 109 - lib/libusb/examples/fxload.c | 310 -- lib/libusb/examples/hotplugtest.c | 147 - lib/libusb/examples/listdevs.c | 73 - lib/libusb/examples/sam3u_benchmark.c | 228 - lib/libusb/examples/testlibusb.c | 312 -- lib/libusb/examples/xusb.c | 1256 ----- lib/libusb/libusb-1.0.pc.in | 11 - lib/libusb/libusb/Makefile.am | 98 - lib/libusb/libusb/Makefile.am.extra | 26 - lib/libusb/libusb/core.c | 2932 ---------- lib/libusb/libusb/descriptor.c | 1532 ------ lib/libusb/libusb/hotplug.c | 489 -- lib/libusb/libusb/io.c | 2865 ---------- lib/libusb/libusb/libusb-1.0.def | 199 - lib/libusb/libusb/libusb-1.0.rc | 53 - lib/libusb/libusb/libusb.h | 2419 --------- lib/libusb/libusb/libusbi.h | 1535 ------ lib/libusb/libusb/os/darwin_usb.c | 2978 ---------- lib/libusb/libusb/os/darwin_usb.h | 156 - lib/libusb/libusb/os/emscripten_webusb.cpp | 875 --- lib/libusb/libusb/os/events_posix.c | 340 -- lib/libusb/libusb/os/events_posix.h | 62 - lib/libusb/libusb/os/events_windows.c | 214 - lib/libusb/libusb/os/events_windows.h | 46 - lib/libusb/libusb/os/haiku_pollfs.cpp | 372 -- lib/libusb/libusb/os/haiku_usb.h | 113 - lib/libusb/libusb/os/haiku_usb_backend.cpp | 532 -- lib/libusb/libusb/os/haiku_usb_raw.cpp | 231 - lib/libusb/libusb/os/haiku_usb_raw.h | 188 - lib/libusb/libusb/os/linux_netlink.c | 401 -- lib/libusb/libusb/os/linux_udev.c | 321 -- lib/libusb/libusb/os/linux_usbfs.c | 2829 ---------- lib/libusb/libusb/os/linux_usbfs.h | 221 - lib/libusb/libusb/os/netbsd_usb.c | 617 --- lib/libusb/libusb/os/null_usb.c | 111 - lib/libusb/libusb/os/openbsd_usb.c | 700 --- lib/libusb/libusb/os/sunos_usb.c | 1619 ------ lib/libusb/libusb/os/sunos_usb.h | 79 - lib/libusb/libusb/os/threads_posix.c | 126 - lib/libusb/libusb/os/threads_posix.h | 98 - lib/libusb/libusb/os/threads_windows.c | 40 - lib/libusb/libusb/os/threads_windows.h | 113 - lib/libusb/libusb/os/windows_common.c | 923 ---- lib/libusb/libusb/os/windows_common.h | 424 -- lib/libusb/libusb/os/windows_usbdk.c | 724 --- lib/libusb/libusb/os/windows_usbdk.h | 106 - lib/libusb/libusb/os/windows_winusb.c | 4766 ----------------- lib/libusb/libusb/os/windows_winusb.h | 787 --- lib/libusb/libusb/strerror.c | 223 - lib/libusb/libusb/sync.c | 342 -- lib/libusb/libusb/version.h | 18 - lib/libusb/libusb/version_nano.h | 1 - lib/libusb/msvc/.gitattributes | 4 - lib/libusb/msvc/Base.props | 60 - .../msvc/Configuration.Application.props | 7 - lib/libusb/msvc/Configuration.Base.props | 47 - .../msvc/Configuration.DynamicLibrary.props | 21 - .../msvc/Configuration.StaticLibrary.props | 7 - .../msvc/ProjectConfigurations.Base.props | 69 - lib/libusb/msvc/build_all.ps1 | 17 - lib/libusb/msvc/config.h | 58 - lib/libusb/msvc/dpfp.vcxproj | 33 - lib/libusb/msvc/dpfp_threaded.vcxproj | 38 - lib/libusb/msvc/fxload.vcxproj | 46 - lib/libusb/msvc/getopt.vcxproj | 33 - lib/libusb/msvc/getopt/getopt.c | 1060 ---- lib/libusb/msvc/getopt/getopt.h | 180 - lib/libusb/msvc/getopt/getopt1.c | 188 - lib/libusb/msvc/hotplugtest.vcxproj | 32 - lib/libusb/msvc/init_context.vcxproj | 35 - lib/libusb/msvc/libusb.sln | 542 -- lib/libusb/msvc/libusb_dll.vcxproj | 61 - lib/libusb/msvc/libusb_static.vcxproj | 49 - lib/libusb/msvc/listdevs.vcxproj | 32 - lib/libusb/msvc/sam3u_benchmark.vcxproj | 33 - lib/libusb/msvc/set_option.vcxproj | 35 - lib/libusb/msvc/stress.vcxproj | 35 - lib/libusb/msvc/stress_mt.vcxproj | 33 - lib/libusb/msvc/testlibusb.vcxproj | 32 - lib/libusb/msvc/xusb.vcxproj | 38 - lib/libusb/tests/Makefile.am | 40 - lib/libusb/tests/init_context.c | 153 - lib/libusb/tests/libusb_testlib.h | 76 - lib/libusb/tests/macos.c | 130 - lib/libusb/tests/set_option.c | 253 - lib/libusb/tests/stress.c | 172 - lib/libusb/tests/stress_mt.c | 267 - lib/libusb/tests/testlib.c | 184 - lib/libusb/tests/umockdev.c | 1175 ---- lib/libusb/tests/webusb-test-shim/.gitignore | 1 - lib/libusb/tests/webusb-test-shim/index.js | 12 - .../tests/webusb-test-shim/package-lock.json | 50 - .../tests/webusb-test-shim/package.json | 10 - 215 files changed, 9 insertions(+), 63543 deletions(-) delete mode 100644 lib/libftdi/.gitignore delete mode 100644 lib/libftdi/AUTHORS delete mode 100644 lib/libftdi/CMakeLists.txt delete mode 100644 lib/libftdi/COPYING-CMAKE-SCRIPTS delete mode 100644 lib/libftdi/COPYING.GPL delete mode 100644 lib/libftdi/COPYING.LIB delete mode 100644 lib/libftdi/ChangeLog delete mode 100644 lib/libftdi/FindUSB1.cmake delete mode 100644 lib/libftdi/LICENSE delete mode 100644 lib/libftdi/README delete mode 100644 lib/libftdi/README.mingw delete mode 100644 lib/libftdi/TODO delete mode 100644 lib/libftdi/Toolchain-Crossbuild32.cmake delete mode 100644 lib/libftdi/Toolchain-mingw32.cmake delete mode 100644 lib/libftdi/bindings/CMakeLists.txt delete mode 100644 lib/libftdi/bindings/ftdi.i delete mode 100644 lib/libftdi/doc/Doxyfile.in delete mode 100644 lib/libftdi/doc/EEPROM-structure delete mode 100644 lib/libftdi/doc/release-checklist.txt delete mode 100644 lib/libftdi/examples/CMakeLists.txt delete mode 100644 lib/libftdi/examples/baud_test.c delete mode 100644 lib/libftdi/examples/bitbang.c delete mode 100644 lib/libftdi/examples/bitbang2.c delete mode 100644 lib/libftdi/examples/bitbang_cbus.c delete mode 100644 lib/libftdi/examples/bitbang_cbus_eeprom_for_windows.ept delete mode 100644 lib/libftdi/examples/bitbang_ft2232.c delete mode 100644 lib/libftdi/examples/eeprom.c delete mode 100644 lib/libftdi/examples/find_all.c delete mode 100644 lib/libftdi/examples/find_all_pp.cpp delete mode 100644 lib/libftdi/examples/python/complete.py delete mode 100644 lib/libftdi/examples/python/simple.py delete mode 100644 lib/libftdi/examples/serial_test.c delete mode 100644 lib/libftdi/examples/simple.c delete mode 100644 lib/libftdi/examples/stream_test.c delete mode 100644 lib/libftdi/ftdi_eeprom/CMakeLists.txt delete mode 100644 lib/libftdi/ftdi_eeprom/example.conf delete mode 100644 lib/libftdi/ftdi_eeprom/ftdi_eeprom_version.h.in delete mode 100644 lib/libftdi/ftdi_eeprom/main.c delete mode 100644 lib/libftdi/ftdipp/CMakeLists.txt delete mode 100644 lib/libftdi/ftdipp/ftdi.cpp delete mode 100644 lib/libftdi/ftdipp/ftdi.hpp delete mode 100644 lib/libftdi/libftdi-1.0.kdev4 delete mode 100644 lib/libftdi/libftdi-config.in delete mode 100644 lib/libftdi/libftdi.gyp delete mode 100644 lib/libftdi/libftdi.lnt delete mode 100644 lib/libftdi/libftdi.pc.in delete mode 100644 lib/libftdi/libftdi.spec.in delete mode 100644 lib/libftdi/libftdipp.pc.in delete mode 100644 lib/libftdi/packages/99-libftdi.rules delete mode 100644 lib/libftdi/packages/CMakeLists.txt delete mode 100644 lib/libftdi/src/CMakeLists.txt delete mode 100644 lib/libftdi/src/ftdi.c delete mode 100644 lib/libftdi/src/ftdi.h delete mode 100644 lib/libftdi/src/ftdi_i.h delete mode 100644 lib/libftdi/src/ftdi_stream.c delete mode 100644 lib/libftdi/src/ftdi_version_i.h delete mode 100644 lib/libftdi/src/ftdi_version_i.h.in delete mode 100644 lib/libftdi/test/CMakeLists.txt delete mode 100644 lib/libftdi/test/basic.cpp delete mode 100644 lib/libftdi/test/baudrate.cpp delete mode 100644 lib/libusb/.clang-tidy delete mode 100644 lib/libusb/.codespellrc delete mode 100644 lib/libusb/.gitattributes delete mode 100644 lib/libusb/.github/cifuzz.yml delete mode 100644 lib/libusb/.github/workflows/linux.yml delete mode 100644 lib/libusb/.github/workflows/macos.yml delete mode 100644 lib/libusb/.github/workflows/msys2.yml delete mode 100644 lib/libusb/.github/workflows/msys2_clang32.yml delete mode 100644 lib/libusb/.github/workflows/msys2_clang64.yml delete mode 100644 lib/libusb/.gitignore delete mode 100644 lib/libusb/.private/README.txt delete mode 100755 lib/libusb/.private/appveyor_build.sh delete mode 100755 lib/libusb/.private/bm.sh delete mode 100755 lib/libusb/.private/ci-build.sh delete mode 100755 lib/libusb/.private/ci-container-build.sh delete mode 100755 lib/libusb/.private/post-rewrite.sh delete mode 100755 lib/libusb/.private/pre-commit.sh delete mode 100644 lib/libusb/.private/wbs.txt delete mode 100644 lib/libusb/.travis.yml delete mode 100644 lib/libusb/AUTHORS delete mode 100644 lib/libusb/COPYING delete mode 100644 lib/libusb/ChangeLog delete mode 100644 lib/libusb/HACKING delete mode 100644 lib/libusb/INSTALL_WIN.txt delete mode 100644 lib/libusb/KEYS delete mode 100644 lib/libusb/Makefile.am delete mode 100644 lib/libusb/NEWS delete mode 100644 lib/libusb/PORTING delete mode 100644 lib/libusb/README delete mode 100644 lib/libusb/README.git delete mode 120000 lib/libusb/README.md delete mode 100644 lib/libusb/TODO delete mode 100644 lib/libusb/Xcode/common.xcconfig delete mode 100644 lib/libusb/Xcode/config.h delete mode 100644 lib/libusb/Xcode/debug.xcconfig delete mode 100644 lib/libusb/Xcode/libusb.xcconfig delete mode 100644 lib/libusb/Xcode/libusb.xcodeproj/project.pbxproj delete mode 100644 lib/libusb/Xcode/libusb_debug.xcconfig delete mode 100644 lib/libusb/Xcode/libusb_release.xcconfig delete mode 100644 lib/libusb/Xcode/release.xcconfig delete mode 100644 lib/libusb/android/README delete mode 100644 lib/libusb/android/config.h delete mode 100644 lib/libusb/android/examples/unrooted_android.c delete mode 100644 lib/libusb/android/examples/unrooted_android.h delete mode 100644 lib/libusb/android/jni/Android.mk delete mode 100644 lib/libusb/android/jni/Application.mk delete mode 100644 lib/libusb/android/jni/examples.mk delete mode 100644 lib/libusb/android/jni/libusb.mk delete mode 100644 lib/libusb/android/jni/tests.mk delete mode 100644 lib/libusb/appveyor.yml delete mode 100755 lib/libusb/autogen.sh delete mode 100755 lib/libusb/bootstrap.sh delete mode 100644 lib/libusb/configure.ac delete mode 100644 lib/libusb/doc/Makefile.in delete mode 100644 lib/libusb/doc/doxygen.cfg.in delete mode 100644 lib/libusb/doc/libusb.png delete mode 100644 lib/libusb/examples/Makefile.am delete mode 100644 lib/libusb/examples/dpfp.c delete mode 100644 lib/libusb/examples/ezusb.c delete mode 100644 lib/libusb/examples/ezusb.h delete mode 100644 lib/libusb/examples/fxload.c delete mode 100644 lib/libusb/examples/hotplugtest.c delete mode 100644 lib/libusb/examples/listdevs.c delete mode 100644 lib/libusb/examples/sam3u_benchmark.c delete mode 100644 lib/libusb/examples/testlibusb.c delete mode 100644 lib/libusb/examples/xusb.c delete mode 100644 lib/libusb/libusb-1.0.pc.in delete mode 100644 lib/libusb/libusb/Makefile.am delete mode 100644 lib/libusb/libusb/Makefile.am.extra delete mode 100644 lib/libusb/libusb/core.c delete mode 100644 lib/libusb/libusb/descriptor.c delete mode 100644 lib/libusb/libusb/hotplug.c delete mode 100644 lib/libusb/libusb/io.c delete mode 100644 lib/libusb/libusb/libusb-1.0.def delete mode 100644 lib/libusb/libusb/libusb-1.0.rc delete mode 100644 lib/libusb/libusb/libusb.h delete mode 100644 lib/libusb/libusb/libusbi.h delete mode 100644 lib/libusb/libusb/os/darwin_usb.c delete mode 100644 lib/libusb/libusb/os/darwin_usb.h delete mode 100644 lib/libusb/libusb/os/emscripten_webusb.cpp delete mode 100644 lib/libusb/libusb/os/events_posix.c delete mode 100644 lib/libusb/libusb/os/events_posix.h delete mode 100644 lib/libusb/libusb/os/events_windows.c delete mode 100644 lib/libusb/libusb/os/events_windows.h delete mode 100644 lib/libusb/libusb/os/haiku_pollfs.cpp delete mode 100644 lib/libusb/libusb/os/haiku_usb.h delete mode 100644 lib/libusb/libusb/os/haiku_usb_backend.cpp delete mode 100644 lib/libusb/libusb/os/haiku_usb_raw.cpp delete mode 100644 lib/libusb/libusb/os/haiku_usb_raw.h delete mode 100644 lib/libusb/libusb/os/linux_netlink.c delete mode 100644 lib/libusb/libusb/os/linux_udev.c delete mode 100644 lib/libusb/libusb/os/linux_usbfs.c delete mode 100644 lib/libusb/libusb/os/linux_usbfs.h delete mode 100644 lib/libusb/libusb/os/netbsd_usb.c delete mode 100644 lib/libusb/libusb/os/null_usb.c delete mode 100644 lib/libusb/libusb/os/openbsd_usb.c delete mode 100644 lib/libusb/libusb/os/sunos_usb.c delete mode 100644 lib/libusb/libusb/os/sunos_usb.h delete mode 100644 lib/libusb/libusb/os/threads_posix.c delete mode 100644 lib/libusb/libusb/os/threads_posix.h delete mode 100644 lib/libusb/libusb/os/threads_windows.c delete mode 100644 lib/libusb/libusb/os/threads_windows.h delete mode 100644 lib/libusb/libusb/os/windows_common.c delete mode 100644 lib/libusb/libusb/os/windows_common.h delete mode 100644 lib/libusb/libusb/os/windows_usbdk.c delete mode 100644 lib/libusb/libusb/os/windows_usbdk.h delete mode 100644 lib/libusb/libusb/os/windows_winusb.c delete mode 100644 lib/libusb/libusb/os/windows_winusb.h delete mode 100644 lib/libusb/libusb/strerror.c delete mode 100644 lib/libusb/libusb/sync.c delete mode 100644 lib/libusb/libusb/version.h delete mode 100644 lib/libusb/libusb/version_nano.h delete mode 100644 lib/libusb/msvc/.gitattributes delete mode 100644 lib/libusb/msvc/Base.props delete mode 100644 lib/libusb/msvc/Configuration.Application.props delete mode 100644 lib/libusb/msvc/Configuration.Base.props delete mode 100644 lib/libusb/msvc/Configuration.DynamicLibrary.props delete mode 100644 lib/libusb/msvc/Configuration.StaticLibrary.props delete mode 100644 lib/libusb/msvc/ProjectConfigurations.Base.props delete mode 100644 lib/libusb/msvc/build_all.ps1 delete mode 100644 lib/libusb/msvc/config.h delete mode 100644 lib/libusb/msvc/dpfp.vcxproj delete mode 100644 lib/libusb/msvc/dpfp_threaded.vcxproj delete mode 100644 lib/libusb/msvc/fxload.vcxproj delete mode 100644 lib/libusb/msvc/getopt.vcxproj delete mode 100644 lib/libusb/msvc/getopt/getopt.c delete mode 100644 lib/libusb/msvc/getopt/getopt.h delete mode 100644 lib/libusb/msvc/getopt/getopt1.c delete mode 100644 lib/libusb/msvc/hotplugtest.vcxproj delete mode 100644 lib/libusb/msvc/init_context.vcxproj delete mode 100644 lib/libusb/msvc/libusb.sln delete mode 100644 lib/libusb/msvc/libusb_dll.vcxproj delete mode 100644 lib/libusb/msvc/libusb_static.vcxproj delete mode 100644 lib/libusb/msvc/listdevs.vcxproj delete mode 100644 lib/libusb/msvc/sam3u_benchmark.vcxproj delete mode 100644 lib/libusb/msvc/set_option.vcxproj delete mode 100644 lib/libusb/msvc/stress.vcxproj delete mode 100644 lib/libusb/msvc/stress_mt.vcxproj delete mode 100644 lib/libusb/msvc/testlibusb.vcxproj delete mode 100644 lib/libusb/msvc/xusb.vcxproj delete mode 100644 lib/libusb/tests/Makefile.am delete mode 100644 lib/libusb/tests/init_context.c delete mode 100644 lib/libusb/tests/libusb_testlib.h delete mode 100644 lib/libusb/tests/macos.c delete mode 100644 lib/libusb/tests/set_option.c delete mode 100644 lib/libusb/tests/stress.c delete mode 100644 lib/libusb/tests/stress_mt.c delete mode 100644 lib/libusb/tests/testlib.c delete mode 100644 lib/libusb/tests/umockdev.c delete mode 100644 lib/libusb/tests/webusb-test-shim/.gitignore delete mode 100644 lib/libusb/tests/webusb-test-shim/index.js delete mode 100644 lib/libusb/tests/webusb-test-shim/package-lock.json delete mode 100644 lib/libusb/tests/webusb-test-shim/package.json diff --git a/.gitmodules b/.gitmodules index 75252f1..0351308 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "lib/libftdi"] - path = lib/libftdi - url = https://github.com/legege/libftdi.git -[submodule "lib/libusb"] - path = lib/libusb - url = https://github.com/libusb/libusb.git +# [submodule "lib/libftdi"] +# path = lib/libftdi +# url = https://github.com/legege/libftdi.git \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 23935c6..dad891d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,11 @@ set(SubProjects # Create the main executable, specifying the source file add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c) + +# Set some application definitions +target_compile_definitions(${PROJECT_NAME} PRIVATE MESSAGE="Hello for TESTLIB from cmake.") +target_compile_definitions(${PROJECT_NAME} PRIVATE MAIN_MESSAGE="Hello for main.c from cmake.") + set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${BIN_NAME} @@ -49,8 +54,4 @@ foreach(Project IN LISTS SubProjects) # Link the subproject to the main project executable target_link_libraries(${PROJECT_NAME} PRIVATE ${Project}) -endforeach() - -# Set some application definitions -target_compile_definitions(${PROJECT_NAME} PRIVATE MESSAGE="Hello from testlib! from cmake.") -target_compile_definitions(${PROJECT_NAME} PRIVATE MAIN_MESSAGE="Hello from main! from cmake.") +endforeach() \ No newline at end of file diff --git a/lib/libftdi/.gitignore b/lib/libftdi/.gitignore deleted file mode 100644 index dcf277d..0000000 --- a/lib/libftdi/.gitignore +++ /dev/null @@ -1,51 +0,0 @@ -# Normal stuff -*.o -*.a -*.so -*.lo -*.la -*.pc -.deps/ -.libs/ -.kdev4/ -build/ - -# kdevelop -*.kdevelop.pcs -*.kdevses - -# Doxygen documentation -Doxyfile -doc/Doxyfile -doc/html -doc/man - -# examples -examples/baud_test -examples/bitbang -examples/bitbang2 -examples/bitbang_cbus -examples/bitbang_ft2232 -examples/find_all -examples/find_all_pp -examples/serial_test -examples/simple - -# Backup files and stuff from patches -*.orig -*.rej -*~ -.*.swp - -# libftdi specific -libftdi-config -libftdi.spec - -# CMake -CMakeCache.txt -cmake_install.cmake -CMakeFiles - -# Misc. binaries -*.dylib -opt diff --git a/lib/libftdi/AUTHORS b/lib/libftdi/AUTHORS deleted file mode 100644 index aad2fe7..0000000 --- a/lib/libftdi/AUTHORS +++ /dev/null @@ -1,47 +0,0 @@ -Main developers: - - Intra2net AG - -Contributors in alphabetical order, -see Changelog for full details: - - Alain Abbas - Alex Harford - Anders Larsen - Andrew John Rogers - Arnim Läuger - Aurelien Jarno - Chris Zeh - Clifford Wolf - Daniel Kirkham - David Challis - Emil - Evan Nemerson - Evgeny Sinelnikov - Ian Abbott - Jean-Daniel Merkli - Juergen Beisert - Lorenz Moesenlechner - Mark Hämmerling - Marek Vavruša - Marius Kintel - Matthias Kranz - Matthias Richter - Matthijs ten Berge - Max - Michel Zou - Mike Frysinger - Nathan Fraser - Oleg Seiljus - Peter Holik - Rogier Wolff - Steven Turner - Tarek Heiland - Thimo Eichstaedt - Thomas Fischl - Tim Ansell - Tom Saunders - Uwe Bonnes - Vladimir Yakovlev - Wilfried Holzke - Yi-Shin Li diff --git a/lib/libftdi/CMakeLists.txt b/lib/libftdi/CMakeLists.txt deleted file mode 100644 index 4c43a48..0000000 --- a/lib/libftdi/CMakeLists.txt +++ /dev/null @@ -1,180 +0,0 @@ -# Project -project(libftdi) -set(MAJOR_VERSION 1) -set(MINOR_VERSION 0) -set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}) -SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") - -# CMake -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE Debug) -endif("${CMAKE_BUILD_TYPE}" STREQUAL "") -set(CMAKE_COLOR_MAKEFILE ON) -cmake_minimum_required(VERSION 2.6 FATAL_ERROR) - -add_definitions(-Wall) - -# Debug build -message("-- Build type: ${CMAKE_BUILD_TYPE}") -if(${CMAKE_BUILD_TYPE} STREQUAL Debug) - add_definitions(-DDEBUG) -endif(${CMAKE_BUILD_TYPE} STREQUAL Debug) - -FIND_PACKAGE(USB1 REQUIRED) -INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR}) - -# Find Boost (optional package) -find_package(Boost) - -# Set components -set(CPACK_COMPONENTS_ALL sharedlibs staticlibs headers) -set(CPACK_COMPONENT_SHAREDLIBS_DISPLAY_NAME "Shared libraries") -set(CPACK_COMPONENT_STATICLIBS_DISPLAY_NAME "Static libraries") -set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers") - -set(CPACK_COMPONENT_SHAREDLIBS_DESCRIPTION -"Shared library for general use.") -set(CPACK_COMPONENT_STATICLIBS_DESCRIPTION -"Static library, good if you want to embed libftdi in your application.") -set(CPACK_COMPONENT_HEADERS_DESCRIPTION -"C/C++ header files.") - -set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development") -set(CPACK_COMPONENT_STATICLIBS_GROUP "Development") -set(CPACK_COMPONENT_HEADERS_GROUP "Development") - -# automatically set lib suffix -if ( UNIX AND NOT APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT EXISTS "/etc/debian_version" ) - if ( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT LIB_SUFFIX ) - set ( LIB_SUFFIX 64 ) - endif () -endif () - -if(NOT APPLE) - if(CMAKE_SIZEOF_VOID_P EQUAL 4) - SET(PACK_ARCH "") - else(CMAKE_SIZEOF_VOID_P EQUAL 8) - SET(PACK_ARCH .x86_64) - endif(CMAKE_SIZEOF_VOID_P EQUAL 4) -else(NOT APPLE) - SET(PACK_ARCH "") -endif(NOT APPLE) - -# Package information -set(CPACK_PACKAGE_VERSION ${VERSION_STRING}) -set(CPACK_PACKAGE_CONTACT "Intra2net AG ") -set(CPACK_PACKAGE_DESCRIPTION "libftdi library.") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CPACK_PACKAGE_DESCRIPTION} - ) -# Package settings -if(${UNIX}) - set(CPACK_GENERATOR "DEB;RPM") - set(CPACK_CMAKE_GENERATOR "Unix Makefiles") - set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) - set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}${PACK_ARCH}) -endif(${UNIX}) - -if(${WIN32}) - set(CPACK_GENERATOR "NSIS") - set(CPACK_CMAKE_GENERATOR "MinGW Makefiles") - set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") - set(CPACK_PACKAGE_VENDOR "") - set(CPACK_PACKAGE_INSTALL_DIRECTORY "libftdi") - set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win32") - set(CPACK_NSIS_DISPLAY_NAME "libftdi") - set(CPACK_NSIS_MODIFY_PATH "ON") -endif(${WIN32}) - -set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE) - -set(CPACK_SOURCE_GENERATOR TGZ) -set(CPACK_SOURCE_IGNORE_FILES "\\\\.git") -set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}) - -# Subdirectories -if(${UNIX}) - set(CPACK_SET_DESTDIR "ON") -endif(${UNIX}) - -add_subdirectory(src) -add_subdirectory(ftdipp) -add_subdirectory(bindings) -add_subdirectory(ftdi_eeprom) -add_subdirectory(examples) -add_subdirectory(packages) -add_subdirectory(test) - -# "make dist" target -set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${VERSION_STRING}) -add_custom_target(dist - COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD - | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2 - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) - - -# Documentation - -option(DOCUMENTATION "Generate API documentation with Doxygen" ON) - -find_package(Doxygen) -if(DOCUMENTATION AND DOXYGEN_FOUND) - - # Set variables - set(PACKAGE libftdi) - set(VERSION ${VERSION_STRING}) - set(top_srcdir ${CMAKE_SOURCE_DIR}) - - # Find doxy config - message(STATUS "Doxygen found.") - set(DOXY_DIR "${CMAKE_SOURCE_DIR}/doc") - set(DOXY_CONFIG "${DOXY_DIR}/Doxyfile.in") - - # Copy doxy.config.in - configure_file("${DOXY_CONFIG}" "${CMAKE_BINARY_DIR}/doxy.config") - - # Create doc directory - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/doc - COMMAND rm -rf ${CMAKE_BINARY_DIR}/doc/{html,man} - COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc - DEPENDS ftdi ftdipp - ) - - # Run doxygen - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/doc/html/index.html - COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_BINARY_DIR}/doxy.config" - DEPENDS "${CMAKE_BINARY_DIR}/doxy.config" "${CMAKE_BINARY_DIR}/doc" - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc - ) - - add_custom_target(docs ALL DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html) - - message(STATUS "Generating API documentation with Doxygen") -else(DOCUMENTATION AND DOXYGEN_FOUND) - message(STATUS "Not generating API documentation") -endif(DOCUMENTATION AND DOXYGEN_FOUND) - -# PkgConfig -set(prefix ${CMAKE_INSTALL_PREFIX}) -set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin) -set(includedir ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}) - -if(${UNIX}) - set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) -endif(${UNIX}) -if(${WIN32}) - set(libdir ${CMAKE_INSTALL_PREFIX}/bin) -endif(${WIN32}) - -configure_file(${CMAKE_SOURCE_DIR}/libftdi.pc.in ${CMAKE_BINARY_DIR}/libftdi.pc @ONLY) -configure_file(${CMAKE_SOURCE_DIR}/libftdipp.pc.in ${CMAKE_BINARY_DIR}/libftdipp.pc @ONLY) -install(FILES ${CMAKE_BINARY_DIR}/libftdi.pc ${CMAKE_BINARY_DIR}/libftdipp.pc - DESTINATION lib${LIB_SUFFIX}/pkgconfig) - -if(${UNIX}) - configure_file(${CMAKE_SOURCE_DIR}/libftdi-config.in ${CMAKE_BINARY_DIR}/libftdi-config @ONLY) - install(PROGRAMS ${CMAKE_BINARY_DIR}/libftdi-config DESTINATION bin) -endif(${UNIX}) - -include(CPack) diff --git a/lib/libftdi/COPYING-CMAKE-SCRIPTS b/lib/libftdi/COPYING-CMAKE-SCRIPTS deleted file mode 100644 index 4b41776..0000000 --- a/lib/libftdi/COPYING-CMAKE-SCRIPTS +++ /dev/null @@ -1,22 +0,0 @@ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/libftdi/COPYING.GPL b/lib/libftdi/COPYING.GPL deleted file mode 100644 index d511905..0000000 --- a/lib/libftdi/COPYING.GPL +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/lib/libftdi/COPYING.LIB b/lib/libftdi/COPYING.LIB deleted file mode 100644 index e38ffa8..0000000 --- a/lib/libftdi/COPYING.LIB +++ /dev/null @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place - Suite 330 - Boston, MA 02111-1307, USA. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/lib/libftdi/ChangeLog b/lib/libftdi/ChangeLog deleted file mode 100644 index b402e07..0000000 --- a/lib/libftdi/ChangeLog +++ /dev/null @@ -1,144 +0,0 @@ -New in 0.17 - 2009-12-19 ------------------------- -* C++ wrapper: Reduced code duplication and small other changes (Intra2net) -* Deprecated old ftdi_enable_bitbang() function (Intra2net) -* New ftdi_usb_open_desc_index() function (Intra2net) -* Added baud rate test example code (Intra2net) -* New serial input example code (Jim Paris) -* Fix modem status byte filtering for USB high speed chips (Intra2net and Jim Paris) -* Add bitmode for synchronous fifo in FT2232H (Uwe Bonnes) -* Fix usb_set_configuration() call on Windows 64 (NIL) -* Fix usb index in ftdi_convert_baudrate() for FT2232H/FT4232H chips (Thimo Eichstaedt) -* Set initial baudrate on correct interface instead of always the first one (Thimo Eichstaedt) -* Call usb_set_configuration() on Windows only (Uwe Bonnes) -* 64 bit and other buildsystem fixes (Uwe Bonnes) -* Don't build --with-async-mode w/ libusb-compat-0.1 (Clifford Wolf) -* Functions for read/write of a single eeprom location (Oleg Seiljus) -* Protect against double close of usb device (Nathan Fraser) -* Fix out-of-tree-build in python wrapper (Aurelien Jarno) -* Autoconf and doxygen cleanup (Jim Paris) - -New in 0.16 - 2009-05-08 ------------------------- -* 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, 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) -* Fixed ftdi_read_chipid in some cases (Matthias Richter) -* eeprom decode function and small cleanups (Marius Kintel) -* cmake system improvements (Marius Kintel and Intra2net) -* Fix compilation in -ansi -pedantic mode (Matthias Janke) - -New in 0.15 - 2008-12-19 ------------------------- -* Full C++ wrapper. Needs boost (Marek Vavruša and Intra2net) -* cmake rules (Marek Vavruša) - -New in 0.14 - 2008-09-09 ------------------------- -* Fixed flow control code for second FT2232 interface (Marek Vavruša) -* Ability to set flow control via one USB call (Marek Vavruša) -* 64 bit build support in the RPM spec file (Uwe Bonnes) -* Small fix to the RPM spec file (Uwe Bonnes) -* Ability to set RS232 break type (Intra2net) -* Grouped flow control and modem status code together (Intra2net) - -New in 0.13 - 2008-06-13 ------------------------- -* Build .spec file via configure.in (Intra2net) -* Fixed "libusb-config --cflags" call (Mike Frysinger and Intra2net) -* Always set usb configuration (Mike Frysinger and Intra2net) -* Improved libusb-win32 support (Mike Frysinger) - -New in 0.12 - 2008-04-16 ------------------------- -* Fix build of documentation for "out of tree" builds -* Fix USB config descriptor in the eeprom (Juergen Beisert) -* Ability to purge RX/TX buffers separately (Arnim Läuger) -* Setting of event and error character (Arnim Läuger) -* Poll modem status function (Arnim Läuger and Intra2net) -* Updated documentation and created AUTHORS file - -New in 0.11 - 2008-03-01 ------------------------- -* Vala bindings helper functions (ftdi_new, ftdi_free, ftdi_list_free2) (Even Nermerson) -* Support for different EEPROM sizes (Andrew John Rogers, andrew@rogerstech.co.uk) -* Async write support. Linux only and no error handling. - You have to enable it via --with-async-mode. -* Detection of R-type chips -* FTDIChip-ID read support (Peter Holik) - -New in 0.10 - 2007-05-08 ------------------------- -* Examples for libftdi_usb_find_all and CBUS mode -* Fixed ftdi_list_free -* Small cosmetic changes - -New in 0.9 - 2007-02-09 ------------------------ -* Fixed build without doxygen -* Correct .so file library version - -New in 0.8 - 2007-02-08 ------------------------ -* Complete doxygen documentation and examples -* Extended FT2232C bitbang mode example code (Max) -* ftdi_usb_get_strings function to get device ID strings (Matthijs ten Berge) -* Fix ftdi_read_pins on PowerPC systems (Thomas Fischl) -* Automatically detach ftdi_sio kernel driver (Uwe Bonnes and Intra2net) -* Configurable flow control (Lorenz Moesenlechner and Matthias Kranz) - -New in 0.7 - 2005-10-11 ------------------------ -* Baudrate calculation fix for FT2232C (Steven Turner/FTDI) -* Find all devices by vendor/product id (Tim Ansell and Intra2net) -* Documentation updates (Tim Ansell) - -New in 0.6 - 2005-04-24 ------------------------ -* Set library version on .so file again -* Configurable serial line parameters (Alain Abbas) -* Improved filtering of status bytes (Evgeny Sinelnikov) -* Extended FT2232C support (Uwe Bonnes) -* Small improvement to the baudrate calculation code (Emil) -* Error handling cleanup (Rogier Wolff and Intra2net) - -New in 0.5 - 2004-09-24 ------------------------ -* New autoconf suite -* pkgconfig support -* Status byte filtering now works for "big" readbuffer sizes (Thanks Evgeny!) -* Open device by description and/or serial (Evgeny Sinelnikov) -* Improved error handling (Evgeny Sinelnikov) - -New in 0.4 - 2004-06-15 ------------------------ -* Fixed filtering of status bytes (Readbuffer size is now 64 bytes) -* FT2232C support (Steven Turner/FTDI) -* New baudrate calculation code (Ian Abbott) -* Automatic detection of chip type -* Important: ftdi_write_data now returns the bytes written -* Fixed defaults values in ftdi_eeprom_initdefaults (Jean-Daniel Merkli) -* Reset internal readbuffer offsets for reset()/purge_buffers() -* Small typo fixes (Mark Haemmerling) - -New in 0.3 - 2004-03-25 ------------------------ -* Improved read function which takes arbitrary input buffer sizes - Attention: Call ftdi_deinit() on exit to free used memory -* Vastly increased read/write performance (configurable chunksize, default is 4096) -* Set/get latency timer function working (Thanks Steven Turner/FTDI) -* Increased library version because the changes require recompilation - -New in 0.2 - 2004-01-03 ------------------------ -* EEPROM build fix by Daniel Kirkham (Melbourne, Australia) -* Implemented basic ftdi_read_data() function -* EEPROM write fixes - -New in 0.1 - 2003-06-10 ------------------------ -* First public release diff --git a/lib/libftdi/FindUSB1.cmake b/lib/libftdi/FindUSB1.cmake deleted file mode 100644 index ebcac99..0000000 --- a/lib/libftdi/FindUSB1.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# - Try to find the freetype library -# Once done this defines -# -# LIBUSB_FOUND - system has libusb -# LIBUSB_INCLUDE_DIR - the libusb include directory -# LIBUSB_LIBRARIES - Link these to use libusb - -# Copyright (c) 2006, 2008 Laurent Montel, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) - - # in cache already - set(LIBUSB_FOUND TRUE) - -else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) - IF (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_LIBUSB libusb-1.0) - ENDIF(NOT WIN32) - - FIND_PATH(LIBUSB_INCLUDE_DIR libusb.h - PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) - - FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 - PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) - - include(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) - - MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) - -endif (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) diff --git a/lib/libftdi/LICENSE b/lib/libftdi/LICENSE deleted file mode 100644 index dd66312..0000000 --- a/lib/libftdi/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -The C library "libftdi" is distributed under the -GNU Library General Public License version 2. - -A copy of the GNU Library General Public License (LGPL) is included -in this distribution, in the file COPYING.LIB. - ----------------------------------------------------------------------- - -The C++ wrapper "ftdipp" is distributed under the GNU General -Public License version 2 (with a special exception described below). - -A copy of the GNU General Public License (GPL) is included -in this distribution, in the file COPYING.GPL. - -As a special exception, if other files instantiate templates or use macros -or inline functions from this file, or you compile this file and link it -with other works to produce a work based on this file, this file -does not by itself cause the resulting work to be covered -by the GNU General Public License. - -However the source code for this file must still be made available -in accordance with section (3) of the GNU General Public License. - -This exception does not invalidate any other reasons why a work based -on this file might be covered by the GNU General Public License. diff --git a/lib/libftdi/README b/lib/libftdi/README deleted file mode 100644 index 30821cb..0000000 --- a/lib/libftdi/README +++ /dev/null @@ -1,26 +0,0 @@ --------------------------------------------------------------------- -libftdi version 0.99 --------------------------------------------------------------------- - -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. - -Changes -------- - -You'll find the newest version of libftdi at: -http://www.intra2net.com/en/developer/libftdi - --------------------------------------------------------------------- -www.intra2net.com 2003-201x Intra2net AG --------------------------------------------------------------------- diff --git a/lib/libftdi/README.mingw b/lib/libftdi/README.mingw deleted file mode 100644 index afc02ad..0000000 --- a/lib/libftdi/README.mingw +++ /dev/null @@ -1,11 +0,0 @@ -To crosscompile for Win32 with mingw -- Get and build libusb-win32-src-x.tar.gz from Sourceforge - Version was "libusb-win32-src-0.1.12.1.tar.gz" for April 4, 2009 -- Compile like "make host_prefix=i386-mingw32msvc all". Your prefixes may vary. -- Copy src/usb.h to /opt/cross/i386-mingw32msvc/include/ -- Copy *.a to /opt/cross/i386-mingw32msvc/lib/ -- Create a build directory like "mkdir build-win32", e.g in ../libftdi/ -- cd in that directory and run - "cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-mingw32.cmake .." -- Copy src/ftdi.h to /opt/cross/i386-mingw32msvc/include/ -- Copy build-win32/src/*.a to /opt/cross/i386-mingw32msvc/lib/ \ No newline at end of file diff --git a/lib/libftdi/TODO b/lib/libftdi/TODO deleted file mode 100644 index 0b419b5..0000000 --- a/lib/libftdi/TODO +++ /dev/null @@ -1,16 +0,0 @@ -*** TODO for 1.0 release *** -Build related: -- Rename the library and header file, - so libftdi 0.x and 1.x can co-exist - -API extentions: -- TO DECIDE: Make ftdi structure opaque? - -Misc: -- Resolve TODO entries in ftdi_eeprom -- Look into merging ftdi_eeprom and examples/eeprom - -Documentation: -- Mention libusb-1.0 dependency -- Comparison between 1.0 and 0.19 -- Document the new EEPROM function diff --git a/lib/libftdi/Toolchain-Crossbuild32.cmake b/lib/libftdi/Toolchain-Crossbuild32.cmake deleted file mode 100644 index 3c80dd8..0000000 --- a/lib/libftdi/Toolchain-Crossbuild32.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_C_COMPILER gcc -m32) -set(CMAKE_CXX_COMPILER g++ -m32) -set(CMAKE_FIND_ROOT_PATH /usr/lib) diff --git a/lib/libftdi/Toolchain-mingw32.cmake b/lib/libftdi/Toolchain-mingw32.cmake deleted file mode 100644 index bff3cba..0000000 --- a/lib/libftdi/Toolchain-mingw32.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# the name of the target operating system -SET(CMAKE_SYSTEM_NAME Windows) - -# which compilers to use for C and C++ -SET(CMAKE_C_COMPILER i386-mingw32msvc-gcc) -SET(CMAKE_CXX_COMPILER i386-mingw32msvc-g++) - -# here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /opt/cross/i386-mingw32msvc ) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/lib/libftdi/bindings/CMakeLists.txt b/lib/libftdi/bindings/CMakeLists.txt deleted file mode 100644 index b17d8a8..0000000 --- a/lib/libftdi/bindings/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -include(FindSWIG) -include(FindPythonLibs) -include(FindPythonInterp) -include(UseSWIG) - -option(PYTHON_BINDINGS "Build python bindings via swig" ON) - -if(PYTHON_BINDINGS AND SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND) - INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/src) - INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) - LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../src) - - SWIG_ADD_MODULE(ftdi python ftdi.i) - SWIG_LINK_LIBRARIES(ftdi ftdi ${PYTHON_LIBRARIES}) - - execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print '%d.%d' % ( sys.version_info[0], sys.version_info[1] )" - OUTPUT_VARIABLE PYTHON_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE ) - - set ( SITEPACKAGE lib${LIB_SUFFIX}/python${PYTHON_VERSION}/site-packages ) - - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/_ftdi.so DESTINATION ${SITEPACKAGE}) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ftdi.py DESTINATION ${SITEPACKAGE}) - - message(STATUS "Building python bindings via swig. Will be installed under ${CMAKE_INSTALL_PREFIX}/${SITEPACKAGE}") -else(PYTHON_BINDINGS AND SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND) - message(STATUS "Not building python bindings") -endif(PYTHON_BINDINGS AND SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND) diff --git a/lib/libftdi/bindings/ftdi.i b/lib/libftdi/bindings/ftdi.i deleted file mode 100644 index 42c2646..0000000 --- a/lib/libftdi/bindings/ftdi.i +++ /dev/null @@ -1,88 +0,0 @@ -/* File: ftdi.i */ - -%module(docstring="Python interface to libftdi") ftdi - -%include -%include - -%typemap(in) unsigned char* = char*; - -%ignore ftdi_write_data_async; -%ignore ftdi_async_complete; - -%immutable ftdi_version_info::version_str; -%immutable ftdi_version_info::snapshot_str; - -%rename("%(strip:[ftdi_])s") ""; - -%newobject ftdi_new; -%typemap(newfree) struct ftdi_context *ftdi "ftdi_free($1);"; -%delobject ftdi_free; - -%typemap(in,numinputs=0) SWIGTYPE** OUTPUT ($*ltype temp) %{ $1 = &temp; %} -%typemap(argout) SWIGTYPE** OUTPUT %{ $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj((void*)*$1,$*descriptor,0)); %} -%apply SWIGTYPE** OUTPUT { struct ftdi_device_list **devlist }; - int ftdi_usb_find_all(struct ftdi_context *ftdi, struct ftdi_device_list **devlist, - int vendor, int product); -%clear struct ftdi_device_list **devlist; - -%apply char *OUTPUT { char * manufacturer, char * description, char * serial }; -%cstring_bounded_output( char * manufacturer, 256 ); -%cstring_bounded_output( char * description, 256 ); -%cstring_bounded_output( char * serial, 256 ); -%typemap(default,noblock=1) int mnf_len, int desc_len, int serial_len { $1 = 256; } - int ftdi_usb_get_strings(struct ftdi_context *ftdi, struct libusb_device *dev, - char * manufacturer, int mnf_len, - char * description, int desc_len, - char * serial, int serial_len); -%clear char * manufacturer, char * description, char * serial; -%clear int mnf_len, int desc_len, int serial_len; - -%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %} -%typemap(argout) (unsigned char *buf, int size) %{ if(result<0) $2=0; $result = SWIG_Python_AppendOutput($result, PyString_FromStringAndSize((char*)$1, $2)); free($1); %} - int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int size); -%clear (unsigned char *buf, int size); - -%apply int *OUTPUT { unsigned int *chunksize }; - int ftdi_read_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize); - int ftdi_write_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize); -%clear unsigned int *chunksize; - -%apply char *OUTPUT { unsigned char *pins }; - int ftdi_read_pins(struct ftdi_context *ftdi, unsigned char *pins); -%clear unsigned char *pins; - -%apply char *OUTPUT { unsigned char *latency }; - int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char *latency); -%clear unsigned char *latency; - -%apply short *OUTPUT { unsigned short *status }; - int ftdi_poll_modem_status(struct ftdi_context *ftdi, unsigned short *status); -%clear unsigned short *status; - -%apply int *OUTPUT { int* value }; - int ftdi_get_eeprom_value(struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int* value); -%clear int* value; - -%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %} -%typemap(argout) (unsigned char *buf, int size) %{ if(result<0) $2=0; $result = SWIG_Python_AppendOutput($result, PyString_FromStringAndSize((char*)$1, $2)); free($1); %} - int ftdi_get_eeprom_buf(struct ftdi_context *ftdi, unsigned char * buf, int size); -%clear (unsigned char *buf, int size); - -%apply short *OUTPUT { unsigned short *eeprom_val }; - int ftdi_read_eeprom_location (struct ftdi_context *ftdi, int eeprom_addr, unsigned short *eeprom_val); -%clear unsigned short *eeprom_val; - -%apply int *OUTPUT { unsigned int *chipid }; - int ftdi_read_chipid(struct ftdi_context *ftdi, unsigned int *chipid); -%clear unsigned int *chipid; - -%include ftdi.h -%{ -#include -%} - -%include ftdi_i.h -%{ -#include -%} diff --git a/lib/libftdi/doc/Doxyfile.in b/lib/libftdi/doc/Doxyfile.in deleted file mode 100644 index b5c45cc..0000000 --- a/lib/libftdi/doc/Doxyfile.in +++ /dev/null @@ -1,1722 +0,0 @@ -# Doxyfile 1.7.4 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" "). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = @PACKAGE@ - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = @VERSION@ - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer -# a quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is -# included in the documentation. The maximum height of the logo should not -# exceed 55 pixels and the maximum width should not exceed 200 pixels. -# Doxygen will copy the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and -# unions are shown inside the group in which they are included (e.g. using -# @ingroup) instead of on a separate page (for HTML and Man pages) or -# section (for LaTeX and RTF). - -INLINE_GROUPED_CLASSES = NO - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penalty. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will roughly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespaces are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to -# do proper type resolution of all parameters of a function it will reject a -# match between the prototype and the implementation of a member function even -# if there is only one candidate or it is obvious which candidate to choose -# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen -# will still accept a match between prototype and implementation in such cases. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. The create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_NO_PARAMDOC option can be enabled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = @top_srcdir@/src \ - @top_srcdir@/ftdipp - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = @top_srcdir@/examples - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) -# and it is also possible to disable source filtering for a specific pattern -# using *.ext= (so without naming a filter). This option only has effect when -# FILTER_SOURCE_FILES is enabled. - -FILTER_SOURCE_PATTERNS = - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. Note that when using a custom header you are responsible -# for the proper inclusion of any scripts and style sheets that doxygen -# needs, which is dependent on the configuration options used. -# It is adviced to generate a default header using "doxygen -w html -# header.html footer.html stylesheet.css YourConfigFile" and then modify -# that header. Note that the header is subject to change so you typically -# have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW! - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# If the HTML_TIMESTAMP tag is set to YES then the generated HTML -# documentation will contain the timesstamp. - -HTML_TIMESTAMP = NO - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that -# the files will be copied as-is; there are no commands or markers available. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the stylesheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. - -HTML_TIMESTAMP = YES - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values -# (range [0,1..20]) that doxygen will group on one line in the generated HTML -# documentation. Note that a value of 0 will completely suppress the enum -# values from appearing in the overview section. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered bitmaps. Use this if you do not -# have LaTeX installed or if you want to formulas look prettier in the HTML -# output. When enabled you also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. - -USE_MATHJAX = NO - -# When MathJax is enabled you need to specify the location relative to the -# HTML output directory using the MATHJAX_RELPATH option. The destination -# directory should contain the MathJax.js script. For instance, if the mathjax -# directory is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the -# mathjax.org site, so you can quickly see the result without installing -# MathJax, but it is strongly recommended to install a local copy of MathJax -# before deployment. - -MATHJAX_RELPATH = http://www.mathjax.org/mathjax - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. - -SEARCHENGINE = NO - -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a PHP enabled web server instead of at the web client -# using Javascript. Doxygen will generate the search PHP script and index -# file to put on the web server. The advantage of the server -# based approach is that it scales better to large projects and allows -# full text search. The disadvantages are that it is more difficult to setup -# and does not have live searching capabilities. - -SERVER_BASED_SEARCH = NO - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the -# Makefile that is written to the output directory. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for -# the generated latex document. The footer should contain everything after -# the last chapter. If it is left blank doxygen will generate a -# standard footer. Notice: only use this tag if you know what you are doing! - -LATEX_FOOTER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = YES - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. -# This is useful -# if you want to understand what is going on. -# On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# pointed to by INCLUDE_PATH will be searched when a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = LIBFTDI_LINUX_ASYNC_MODE - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition that -# overrules the definition found in the source code. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all references to function-like macros -# that are alone on a line, have an all uppercase name, and do not end with a -# semicolon, because these will confuse the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option also works with HAVE_DOT disabled, but it is recommended to -# install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is -# allowed to run in parallel. When set to 0 (the default) doxygen will -# base this on the number of processors available in the system. You can set it -# explicitly to a value larger than 0 to get control over the balance -# between CPU load and processing speed. - -DOT_NUM_THREADS = 0 - -# By default doxygen will write a font called Helvetica to the output -# directory and reference it in all dot files that doxygen generates. -# When you want a differently looking font you can specify the font name -# using DOT_FONTNAME. You need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = Helvetica - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will generate a graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are svg, png, jpg, or gif. -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MSCFILE_DIRS tag can be used to specify one or more directories that -# contain msc files that are included in the documentation (see the -# \mscfile command). - -MSCFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/lib/libftdi/doc/EEPROM-structure b/lib/libftdi/doc/EEPROM-structure deleted file mode 100644 index a1e9b02..0000000 --- a/lib/libftdi/doc/EEPROM-structure +++ /dev/null @@ -1,109 +0,0 @@ -Here we try to document what we know about the EEPROM Structure. - -Even with a 93xx66 EEPROM, at maximum 256 Bytes are used - -All important things happen in the first -0x14(FT232/245), 0x16(FT2232CD), 0x18(FT232/245R) or 0x1a (FT2232H/4432H) bytes - -Type | Use extra EEPROM space -FT2XXB | No - -Byte.BIT| TYPE_AM TYPE_BM TYPE_2232C TYPE_R TYPE_2232H TYPE_4232H -00.0 | 0 0 channel_a_type channel_a_type 0 -00.1 | 0 0 channel_a_type channel_a_type 0 -00.2 | 0 0 channel_a_type high_current channel_a_type 0 -00.3 | 0 0 channel_a_driver channel_a_driver channel_a_driver channel_a_driver -00.4 | 0 0 high_current_a 0 0 0 -00.5 | 0 0 0 0 0 0 -00.6 | 0 0 0 0 0 0 -00.7 | 0 0 0 0 SUSPEND_DBUS7 channel_c_driver - -On TYPE_R 00.3 set mean D2XX, on other devices VCP - -01.0 | 0 0 channel_b_type channel_b_type 0 -01.1 | 0 0 channel_b_type channel_b_type 0 -01.2 | 0 0 channel_b_type 0 channel_b_type 0 -01.3 | 0 0 channel_b_driver 0 channel_b_driver channel_b_driver -01.4 | 0 0 high_current_b 0 0 0 -01.5 | 0 0 0 0 0 0 -01.6 | 0 0 0 0 0 -01.7 | 0 0 0 0 0 channel_d_driver - -Fixme: Missing 4232H validation - -02 | Vendor ID (VID) LSB (all) -03 | Vendor ID (VID) MSB (all) -04 | Product ID (PID) LSB (all) -05 | Product ID (PID) MSB (all) -06 | Device release number LSB (not tested on TYPE_4232H) -07 | Device release number MSB (not tested on TYPE_4232H) - | -08.4 | Battery powered -08.5 | Remote wakeup -08.6 | Self powered: 1, bus powered: 0 -08.7 | Always 1 - | -09 | Max power (mA/2) - | -Byte.BIT| TYPE_AM TYPE_BM TYPE_2232C TYPE_R TYPE_2232H TYPE_4232H -0a.0 | 0 IsoIn IsoIn part A 0 0 0 -0a.1 | 0 IsoOut IsoOut part A 0 0 0 -0a.2 | 0 suspend_pull_down suspend_pull_down suspend_pull_down suspend_pull_down -0a.3 | 0 use_serial use_serial use_serial -0a.4 | 0 change_usb_version change_usb_version -0a.5 | 0 0 IsoIn part B 0 0 0 -0a.6 | 0 0 IsoOut part B 0 0 0 -0a.7 | 0 - reserved - -0b | TYPE_R Bitmask Invert, 0 else -Byte.BIT| TYPE_4232H -0b.4 | channel_a_rs485enable -0b.5 | channel_b_rs485enable -0b.6 | channel_c_rs485enable -0b.7 | channel_d_rs485enable - -Byte | TYPE_AM TYPE_BM TYPE_2232C TYPE_R TYPE_2232H TYPE_4232H -0c | 0 USB-VER-LSB USB-VER-LSB 0 ? ? -0d | 0 USB-VER-MSB USB-VER-MSB 0 ? ? -(On several FT2232H different values were observed -> The value is unused - if change USB version is not set, so it might contain garbage) - -0e | OFFSET Vendor -0f | Len VENDOR - -10 | Offset Product -11 | Length Product - -12 | Offset Serial -13 | Length Serial - -Byte.BIT| TYPE_AM TYPE_BM TYPE_2232C TYPE_R TYPE_2232H TYPE_4232H -14.3:0 | UA UA CHIP CBUS[0] AL A -14.7:0 | UA UA CHIP CBUS[1] AH B -15.3:0 | UA UA 0 CBUS[2] BL C -15.7:0 | UA UA 0 CBUS[3] BH D -16.3:0 | UA UA UA CBUS[4] 0 0 -16.7:0 | UA UA UA 0 0 0 - -CHIP values: -0x46: EEPROM is a 93xx46 -0x56: EEPROM is a 93xx56 -0x66: EEPROM is a 93xx66 - -17 UA UA UA 0 0 0 -18 UA UA UA VENDOR CHIP CHIP -19 UA UA UA VENDOR 0 0 - -1a UA (all) - - -Additional fields after the serial string: -0x00, 0x00 - reserved for "legacy port name prefix" -0x00, 0x00 - reserved for plug and play options -(Observed values with PnP == 0: -0x02 0x03 0x01 0x00) - -Note: The additional fields after the serial number string -collide with the official FTDI formula from AN_121 regarding -the start of the user area: -"Start Address = the address following the last byte of SerialNumber string." diff --git a/lib/libftdi/doc/release-checklist.txt b/lib/libftdi/doc/release-checklist.txt deleted file mode 100644 index fe5654a..0000000 --- a/lib/libftdi/doc/release-checklist.txt +++ /dev/null @@ -1,28 +0,0 @@ -*** Checklist for a new libftdi release *** -- Update ChangeLog and AUTHORS via git history - -- Update version number in the following files: - - CMakeLists.txt - - README - -- Run "make dist" - -- Diff tarball to previous version, check if all - important changes are in the ChangeLog - -- Ensure all modifications are checked in - -- Sign tarball, build .src.rpm and sign it, too - -- Create git tag: - - git tag -s -u 24F006F5 v0.XX - - git tag -d latest-release ; git tag latest-release - - git push --tags - -- Website - - Upload tarball and .src.rpm - - Add ChangeLog to main page - - Update URLs in download section - - Generate API documentation and upload it - -- Announce on mailinglist & freshmeat diff --git a/lib/libftdi/examples/CMakeLists.txt b/lib/libftdi/examples/CMakeLists.txt deleted file mode 100644 index 29646f5..0000000 --- a/lib/libftdi/examples/CMakeLists.txt +++ /dev/null @@ -1,54 +0,0 @@ -option(EXAMPLES "Build example programs" ON) - -if (EXAMPLES) - # Includes - include( ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ) - - message(STATUS "Building example programs.") - - # Source includes - include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src) - - # Targets - add_executable(simple simple.c) - add_executable(bitbang bitbang.c) - add_executable(bitbang2 bitbang2.c) - add_executable(bitbang_cbus bitbang_cbus.c) - add_executable(bitbang_ft2232 bitbang_ft2232.c) - add_executable(find_all find_all.c) - add_executable(serial_test serial_test.c) - add_executable(baud_test baud_test.c) - add_executable(stream_test stream_test.c) - add_executable(eeprom eeprom.c) - - # Linkage - target_link_libraries(simple ftdi) - target_link_libraries(bitbang ftdi) - target_link_libraries(bitbang2 ftdi) - target_link_libraries(bitbang_cbus ftdi) - target_link_libraries(bitbang_ft2232 ftdi) - target_link_libraries(find_all ftdi) - target_link_libraries(serial_test ftdi) - target_link_libraries(baud_test ftdi) - target_link_libraries(stream_test ftdi) - target_link_libraries(eeprom ftdi) - - # libftdi++ examples - if(FTDI_BUILD_CPP) - if(Boost_FOUND) - message(STATUS "Building libftdi++ examples.") - include_directories(BEFORE ${CMAKE_SOURCE_DIR}/ftdipp - ${Boost_INCLUDE_DIRS}) - - # Target - add_executable(find_all_pp find_all_pp.cpp) - - # Linkage - target_link_libraries(find_all_pp ftdipp) - endif(Boost_FOUND) - endif(FTDI_BUILD_CPP) -else(EXAMPLES) - message(STATUS "Not building example programs.") -endif(EXAMPLES) diff --git a/lib/libftdi/examples/baud_test.c b/lib/libftdi/examples/baud_test.c deleted file mode 100644 index eb50e2f..0000000 --- a/lib/libftdi/examples/baud_test.c +++ /dev/null @@ -1,224 +0,0 @@ -/* baud_test.c - * - * test setting the baudrate and compare it with the expected runtime - * - * options: - * -p defaults to "i:0x0403:0x6001" (this is the first FT232R with default id) - * d: path of bus and device-node (e.g. "003/001") within usb device tree (usually at /proc/bus/usb/) - * i:: first device with given vendor and product id, - * ids can be decimal, octal (preceded by "0") or hex (preceded by "0x") - * i::: as above with index being the number of the device (starting with 0) - * if there are more than one - * s::: first device with given vendor id, product id and serial string - * -d - * -b (divides by 16 if bitbang as taken from the ftdi datasheets) - * -m r: serial a: async bitbang s:sync bitbang - * -c - * - * (C) 2009 by Gerd v. Egidy - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include -#include -#include -#include -#include - -double get_prec_time() -{ - struct timeval tv; - double res; - - gettimeofday(&tv,NULL); - - res=tv.tv_sec; - res+=((double)tv.tv_usec/1000000); - - return res; -} - -int main(int argc, char **argv) -{ - struct ftdi_context *ftdi; - int i, t; - unsigned char *txbuf; - unsigned char *rxbuf; - double start, duration, plan; - int retval= 0; - - // default values - int baud=9600; - int set_baud; - int datasize=100000; - - char default_devicedesc[] = "i:0x0403:0x6001"; - char *devicedesc=default_devicedesc; - int txchunksize=256; - enum ftdi_mpsse_mode test_mode=BITMODE_BITBANG; - - while ((t = getopt (argc, argv, "b:d:p:m:c:")) != -1) - { - switch (t) - { - case 'd': - datasize = atoi (optarg); - break; - case 'm': - switch (*optarg) - { - case 'r': - // serial - test_mode=BITMODE_RESET; - break; - case 'a': - // async - test_mode=BITMODE_BITBANG; - break; - case 's': - // sync - test_mode=BITMODE_SYNCBB; - break; - } - break; - case 'b': - baud = atoi (optarg); - break; - case 'p': - devicedesc=optarg; - break; - case 'c': - txchunksize = atoi (optarg); - break; - } - } - - txbuf=malloc(txchunksize); - rxbuf=malloc(txchunksize); - if (txbuf == NULL || rxbuf == NULL) - { - fprintf(stderr, "can't malloc\n"); - return EXIT_FAILURE; - } - - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_new failed\n"); - retval = EXIT_FAILURE; - goto done; - } - - if (ftdi_usb_open_string(ftdi, devicedesc) < 0) - { - fprintf(stderr,"Can't open ftdi device: %s\n",ftdi_get_error_string(ftdi)); - retval = EXIT_FAILURE; - goto do_deinit; - } - - set_baud=baud; - if (test_mode!=BITMODE_RESET) - { - // we do bitbang, so real baudrate / 16 - set_baud=baud/16; - } - - ftdi_set_baudrate(ftdi,set_baud); - printf("real baudrate used: %d\n",(test_mode==BITMODE_RESET) ? ftdi->baudrate : ftdi->baudrate*16); - - if (ftdi_set_bitmode(ftdi, 0xFF,test_mode) < 0) - { - fprintf(stderr,"Can't set mode: %s\n",ftdi_get_error_string(ftdi)); - retval = EXIT_FAILURE; - goto do_close; - } - - if (test_mode==BITMODE_RESET) - { - // serial 8N1: 8 data bits, 1 startbit, 1 stopbit - plan=((double)(datasize*10))/baud; - } - else - { - // bitbang means 8 bits at once - plan=((double)datasize)/baud; - } - - printf("this test should take %.2f seconds\n",plan); - - // prepare data to send: 0 and 1 bits alternating (except for serial start/stopbit): - // maybe someone wants to look at this with a scope or logic analyzer - for (i=0; i0); - } - - start=get_prec_time(); - - // don't wait for more data to arrive, take what we get and keep on sending - // yes, we really would like to have libusb 1.0+ with async read/write... - ftdi->usb_read_timeout=1; - - i=0; - while (i < datasize) - { - int sendsize=txchunksize; - if (i+sendsize > datasize) - sendsize=datasize-i; - - if ((sendsize=ftdi_write_data(ftdi, txbuf, sendsize)) < 0) - { - fprintf(stderr,"write failed at %d: %s\n", - i, ftdi_get_error_string(ftdi)); - retval = EXIT_FAILURE; - goto do_close; - } - - i+=sendsize; - - if (test_mode==BITMODE_SYNCBB) - { - // read the same amount of data as sent - ftdi_read_data(ftdi, rxbuf, sendsize); - } - } - - duration=get_prec_time()-start; - printf("and took %.4f seconds, this is %.0f baud or factor %.3f\n",duration,(plan*baud)/duration,plan/duration); -do_close: - ftdi_usb_close(ftdi); -do_deinit: - ftdi_free(ftdi); -done: - if(rxbuf) - free(rxbuf); - if(txbuf) - free(txbuf); - exit (retval); -} diff --git a/lib/libftdi/examples/bitbang.c b/lib/libftdi/examples/bitbang.c deleted file mode 100644 index 1d69e2e..0000000 --- a/lib/libftdi/examples/bitbang.c +++ /dev/null @@ -1,87 +0,0 @@ -/* This program is distributed under the GPL, version 2 */ - -#include -#include -#include -#ifdef __WIN32__ -#define sleep(x) Sleep(x) -#endif -#include - -int main(int argc, char **argv) -{ - struct ftdi_context *ftdi; - int f,i; - unsigned char buf[1]; - int retval = 0; - - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_new failed\n"); - return EXIT_FAILURE; - } - - f = ftdi_usb_open(ftdi, 0x0403, 0x6001); - - if (f < 0 && f != -5) - { - fprintf(stderr, "unable to open ftdi device: %d (%s)\n", f, ftdi_get_error_string(ftdi)); - retval = 1; - goto done; - } - - printf("ftdi open succeeded: %d\n",f); - - printf("enabling bitbang mode\n"); - ftdi_set_bitmode(ftdi, 0xFF, BITMODE_BITBANG); - - sleep(3); - - buf[0] = 0x0; - printf("turning everything on\n"); - f = ftdi_write_data(ftdi, buf, 1); - if (f < 0) - { - fprintf(stderr,"write failed for 0x%x, error %d (%s)\n",buf[0],f, ftdi_get_error_string(ftdi)); - } - - sleep(3); - - buf[0] = 0xFF; - printf("turning everything off\n"); - f = ftdi_write_data(ftdi, buf, 1); - if (f < 0) - { - fprintf(stderr,"write failed for 0x%x, error %d (%s)\n",buf[0],f, ftdi_get_error_string(ftdi)); - } - - sleep(3); - - for (i = 0; i < 32; i++) - { - buf[0] = 0 | (0xFF ^ 1 << (i % 8)); - if ( i > 0 && (i % 8) == 0) - { - printf("\n"); - } - printf("%02hhx ",buf[0]); - fflush(stdout); - f = ftdi_write_data(ftdi, buf, 1); - if (f < 0) - { - fprintf(stderr,"write failed for 0x%x, error %d (%s)\n",buf[0],f, ftdi_get_error_string(ftdi)); - } - sleep(1); - } - - printf("\n"); - - printf("disabling bitbang mode\n"); - ftdi_disable_bitbang(ftdi); - - ftdi_usb_close(ftdi); -done: - ftdi_free(ftdi); - - return retval; -} diff --git a/lib/libftdi/examples/bitbang2.c b/lib/libftdi/examples/bitbang2.c deleted file mode 100644 index 1582da0..0000000 --- a/lib/libftdi/examples/bitbang2.c +++ /dev/null @@ -1,92 +0,0 @@ -/* ftdi_out.c - * - * Output a (stream of) byte(s) in bitbang mode to the - * ftdi245 chip that is (hopefully) attached. - * - * We have a little board that has a FT245BM chip and - * the 8 outputs are connected to several different - * things that we can turn on and off with this program. - * - * If you have an idea about hardware that can easily - * interface onto an FTDI chip, I'd like to collect - * ideas. If I find it worthwhile to make, I'll consider - * making it, I'll even send you a prototype (against - * cost-of-material) if you want. - * - * At "harddisk-recovery.nl" they have a little board that - * controls the power to two harddrives and two fans. - * - * -- REW R.E.Wolff@BitWizard.nl - * - * - * - * This program was based on libftdi_example_bitbang2232.c - * which doesn't carry an author or attribution header. - * - * - * This program is distributed under the GPL, version 2. - * Millions copies of the GPL float around the internet. - */ - - -#include -#include -#include -#ifdef __WIN32__ -#define usleep(x) Sleep((x+999)/1000) -#endif -#include - -void ftdi_fatal (struct ftdi_context *ftdi, char *str) -{ - fprintf (stderr, "%s: %s\n", - str, ftdi_get_error_string (ftdi)); - ftdi_deinit(ftdi); - exit (1); -} - -int main(int argc, char **argv) -{ - struct ftdi_context *ftdi; - int i, t; - unsigned char data; - int delay = 100000; /* 100 thousand microseconds: 1 tenth of a second */ - - while ((t = getopt (argc, argv, "d:")) != -1) - { - switch (t) - { - case 'd': - delay = atoi (optarg); - break; - } - } - - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_bew failed\n"); - return EXIT_FAILURE; - } - - if (ftdi_usb_open(ftdi, 0x0403, 0x6001) < 0) - ftdi_fatal (ftdi, "Can't open ftdi device"); - - if (ftdi_set_bitmode(ftdi, 0xFF, BITMODE_BITBANG) < 0) - ftdi_fatal (ftdi, "Can't enable bitbang"); - - for (i=optind; i < argc ; i++) - { - sscanf (argv[i], "%x", &t); - data = t; - if (ftdi_write_data(ftdi, &data, 1) < 0) - { - fprintf(stderr,"write failed for 0x%x: %s\n", - data, ftdi_get_error_string(ftdi)); - } - usleep(delay); - } - - ftdi_usb_close(ftdi); - ftdi_free(ftdi); - exit (0); -} diff --git a/lib/libftdi/examples/bitbang_cbus.c b/lib/libftdi/examples/bitbang_cbus.c deleted file mode 100644 index 9914786..0000000 --- a/lib/libftdi/examples/bitbang_cbus.c +++ /dev/null @@ -1,94 +0,0 @@ -/* bitbang_cbus.c - - Example to use CBUS bitbang mode of newer chipsets. - You must enable CBUS bitbang mode in the EEPROM first. - - Thanks to Steve Brown for the - the information how to do it. - - The top nibble controls input/output and the bottom nibble - controls the state of the lines set to output. The datasheet isn't clear - what happens if you set a bit in the output register when that line is - conditioned for input. This is described in more detail - in the FT232R bitbang app note. - - BITMASK - CBUS Bits - 3210 3210 - xxxx xxxx - |    |------ Output Control 0->LO, 1->HI - |----------- Input/Output   0->Input, 1->Output - - Example: - All pins to output with 0 bit high: 0xF1 (11110001) - Bits 0 and 1 to input, 2 and 3 to output and masked high: 0xCC (11001100) - - The input is standard "0x" hex notation. - A carriage return terminates the program. - - This program is distributed under the GPL, version 2 -*/ - -#include -#include -#include -#include - -int main(void) -{ - struct ftdi_context *ftdi; - int f; - unsigned char buf[1]; - unsigned char bitmask; - char input[10]; - - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_new failed\n"); - return EXIT_FAILURE; - } - - f = ftdi_usb_open(ftdi, 0x0403, 0x6001); - if (f < 0 && f != -5) - { - fprintf(stderr, "unable to open ftdi device: %d (%s)\n", f, ftdi_get_error_string(ftdi)); - ftdi_deinit(ftdi); - exit(-1); - } - printf("ftdi open succeeded: %d\n",f); - - while (1) - { - // Set bitmask from input - fgets(input, sizeof(input) - 1, stdin); - if (input[0] == '\n') break; - bitmask = strtol(input, NULL, 0); - printf("Using bitmask 0x%02x\n", bitmask); - f = ftdi_set_bitmode(ftdi, bitmask, BITMODE_CBUS); - if (f < 0) - { - fprintf(stderr, "set_bitmode failed for 0x%x, error %d (%s)\n", bitmask, f, ftdi_get_error_string(ftdi)); - ftdi_usb_close(ftdi); - ftdi_deinit(ftdi); - exit(-1); - } - - // read CBUS - f = ftdi_read_pins(ftdi, &buf[0]); - if (f < 0) - { - fprintf(stderr, "read_pins failed, error %d (%s)\n", f, ftdi_get_error_string(ftdi)); - ftdi_usb_close(ftdi); - ftdi_deinit(ftdi); - exit(-1); - } - printf("Read returned 0x%01x\n", buf[0] & 0x0f); - } - printf("disabling bitbang mode\n"); - ftdi_disable_bitbang(ftdi); - - ftdi_usb_close(ftdi); - ftdi_free(ftdi); - - return 0; -} diff --git a/lib/libftdi/examples/bitbang_cbus_eeprom_for_windows.ept b/lib/libftdi/examples/bitbang_cbus_eeprom_for_windows.ept deleted file mode 100644 index 59716c6..0000000 --- a/lib/libftdi/examples/bitbang_cbus_eeprom_for_windows.ept +++ /dev/null @@ -1,62 +0,0 @@ -[Basic Details] -Device Type=6 -VID PID Type=0 -USB VID=0403 -USB PID=6001 -[USB Power Options] -Bus Powered=1 -Self Powered=0 -Max Bus Power=44 -[USB Serial Number Control] -Prefix=FT -Use Fixed Serial Number=0 -Fixed Serial Number=FTDECZJT -[USB Remote WakeUp] -Enable Remote WakeUp=1 -[Windows Plug and Play] -Enable Plug and Play=0 -[USB String Descriptors] -Manufacturer=FTDI -Product=USB Serial Converter -[Programming Options] -Only Program Blank Devices=0 -[BM Device Specific Options] -USB Version Number=1 -Disable Serial Number=0 -IO Pin Pull Down in Suspend=0 -[Dual Device Specific Options A] -RS 232 mode=1 -245 FIFO mode=0 -245 CPU FIFO mode=0 -OPTO Isolate mode=1 -High Current Drive=0 -[Dual Device Specific Options B] -RS 232 mode=1 -245 FIFO mode=0 -245 CPU FIFO mode=0 -OPTO Isolate mode=0 -High Current Drive=0 -[Dual Device Driver Options A] -Virtual Com Port Driver=1 -D2XX Driver=0 -[Dual Device Driver Options B] -Virtual Com Port Driver=1 -D2XX Driver=0 -[R Device Specific Options] -Invert TXD=0 -Invert RXD=0 -Invert RTS#=0 -Invert CTS#=0 -Invert DTR#=0 -Invert DSR#=0 -Invert DCD#=0 -Invert RI#=0 -C0 Signal=10 -C1 Signal=10 -C2 Signal=10 -C3 Signal=10 -C4 Signal=5 -Enable Ext Osc=0 -High Current I/O=0 -Load D2XX Driver=0 -In EndPoint Size=0 diff --git a/lib/libftdi/examples/bitbang_ft2232.c b/lib/libftdi/examples/bitbang_ft2232.c deleted file mode 100644 index 29f5029..0000000 --- a/lib/libftdi/examples/bitbang_ft2232.c +++ /dev/null @@ -1,109 +0,0 @@ -/* bitbang_ft2232.c - - Output some flickering in bitbang mode to the FT2232 - - Thanks to max@koeln.ccc.de for fixing and extending - the example for the second channel. - - This program is distributed under the GPL, version 2 -*/ - -#include -#include -#include -#ifdef __WIN32__ -#define sleep(x) Sleep(x) -#endif -#include - -int main(int argc, char **argv) -{ - struct ftdi_context *ftdi, *ftdi2; - unsigned char buf[1]; - int f,i; - - // Init 1. channel - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_new failed\n"); - return EXIT_FAILURE; - } - - ftdi_set_interface(ftdi, INTERFACE_A); - f = ftdi_usb_open(ftdi, 0x0403, 0x6001); - if (f < 0 && f != -5) - { - fprintf(stderr, "unable to open ftdi device: %d (%s)\n", f, ftdi_get_error_string(ftdi)); - ftdi_deinit(ftdi); - exit(-1); - } - printf("ftdi open succeeded(channel 1): %d\n",f); - - printf("enabling bitbang mode(channel 1)\n"); - ftdi_set_bitmode(ftdi, 0xFF, BITMODE_BITBANG); - - // Init 2. channel - if ((ftdi2 = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_new failed\n"); - return EXIT_FAILURE; - } - ftdi_set_interface(ftdi2, INTERFACE_B); - f = ftdi_usb_open(ftdi2, 0x0403, 0x6001); - if (f < 0 && f != -5) - { - fprintf(stderr, "unable to open ftdi device: %d (%s)\n", f, ftdi_get_error_string(ftdi2)); - ftdi_deinit(ftdi2); - exit(-1); - } - printf("ftdi open succeeded(channel 2): %d\n",f); - - printf("enabling bitbang mode (channel 2)\n"); - ftdi_set_bitmode(ftdi2, 0xFF, BITMODE_BITBANG); - - // Write data - printf("startloop\n"); - for (i = 0; i < 23; i++) - { - buf[0] = 0x1; - printf("porta: %02i: 0x%02x \n",i,buf[0]); - f = ftdi_write_data(ftdi, buf, 1); - if (f < 0) - fprintf(stderr,"write failed on channel 1 for 0x%x, error %d (%s)\n", buf[0], f, ftdi_get_error_string(ftdi)); - sleep(1); - - buf[0] = 0x2; - printf("porta: %02i: 0x%02x \n",i,buf[0]); - f = ftdi_write_data(ftdi, buf, 1); - if (f < 0) - fprintf(stderr,"write failed on channel 1 for 0x%x, error %d (%s)\n", buf[0], f, ftdi_get_error_string(ftdi)); - sleep(1); - - buf[0] = 0x1; - printf("portb: %02i: 0x%02x \n",i,buf[0]); - f = ftdi_write_data(ftdi2, buf, 1); - if (f < 0) - fprintf(stderr,"write failed on channel 2 for 0x%x, error %d (%s)\n", buf[0], f, ftdi_get_error_string(ftdi2)); - sleep(1); - - buf[0] = 0x2; - printf("portb: %02i: 0x%02x \n",i,buf[0]); - f = ftdi_write_data(ftdi2, buf, 1); - if (f < 0) - fprintf(stderr,"write failed on channel 2 for 0x%x, error %d (%s)\n", buf[0], f, ftdi_get_error_string(ftdi2)); - sleep(1); - } - printf("\n"); - - printf("disabling bitbang mode(channel 1)\n"); - ftdi_disable_bitbang(ftdi); - ftdi_usb_close(ftdi); - ftdi_deinit(ftdi); - - printf("disabling bitbang mode(channel 2)\n"); - ftdi_disable_bitbang(ftdi2); - ftdi_usb_close(ftdi2); - ftdi_free(ftdi2); - - return 0; -} diff --git a/lib/libftdi/examples/eeprom.c b/lib/libftdi/examples/eeprom.c deleted file mode 100644 index 247589a..0000000 --- a/lib/libftdi/examples/eeprom.c +++ /dev/null @@ -1,299 +0,0 @@ -/* LIBFTDI EEPROM access example - - This program is distributed under the GPL, version 2 -*/ - -#include -#include -#include -#include -#include -#include -#include - -int read_decode_eeprom(struct ftdi_context *ftdi) -{ - int i, j, f; - int value; - int size; - unsigned char buf[256]; - - f = ftdi_read_eeprom(ftdi); - if (f < 0) - { - fprintf(stderr, "ftdi_read_eeprom: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - return -1; - } - - - ftdi_get_eeprom_value(ftdi, CHIP_SIZE, & value); - if (value <0) - { - fprintf(stderr, "No EEPROM found or EEPROM empty\n"); - fprintf(stderr, "On empty EEPROM, use -w option to write default values\n"); - return -1; - } - fprintf(stderr, "Chip type %d ftdi_eeprom_size: %d\n", ftdi->type, value); - if (ftdi->type == TYPE_R) - size = 0xa0; - else - size = value; - ftdi_get_eeprom_buf(ftdi, buf, size); - for (i=0; i < size; i += 16) - { - fprintf(stdout,"0x%03x:", i); - - for (j = 0; j< 8; j++) - fprintf(stdout," %02x", buf[i+j]); - fprintf(stdout," "); - for (; j< 16; j++) - fprintf(stdout," %02x", buf[i+j]); - fprintf(stdout," "); - for (j = 0; j< 8; j++) - fprintf(stdout,"%c", isprint(buf[i+j])?buf[i+j]:'.'); - fprintf(stdout," "); - for (; j< 16; j++) - fprintf(stdout,"%c", isprint(buf[i+j])?buf[i+j]:'.'); - fprintf(stdout,"\n"); - } - - f = ftdi_eeprom_decode(ftdi, 1); - if (f < 0) - { - fprintf(stderr, "ftdi_eeprom_decode: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - return -1; - } - return 0; -} - -int main(int argc, char **argv) -{ - struct ftdi_context *ftdi; - int f, i; - int vid = 0; - int pid = 0; - char const *desc = 0; - char const *serial = 0; - int erase = 0; - int use_defaults = 0; - int large_chip = 0; - int do_write = 0; - int retval = 0; - int value; - - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "Failed to allocate ftdi structure :%s \n", - ftdi_get_error_string(ftdi)); - return EXIT_FAILURE; - } - - while ((i = getopt(argc, argv, "d::ev:p:l:P:S:w")) != -1) - { - switch (i) - { - case 'd': - use_defaults = 1; - if (optarg) - large_chip = 0x66; - break; - case 'e': - erase = 1; - break; - case 'v': - vid = strtoul(optarg, NULL, 0); - break; - case 'p': - pid = strtoul(optarg, NULL, 0); - break; - case 'P': - desc = optarg; - break; - case 'S': - serial = optarg; - break; - case 'w': - do_write = 1; - break; - default: - fprintf(stderr, "usage: %s [options]\n", *argv); - fprintf(stderr, "\t-d[num] Work with default valuesfor 128 Byte " - "EEPROM or for 256 Byte EEPROM if some [num] is given\n"); - fprintf(stderr, "\t-w write\n"); - fprintf(stderr, "\t-e erase\n"); - fprintf(stderr, "\t-v verbose decoding\n"); - fprintf(stderr, "\t-p Search for device with PID == number\n"); - fprintf(stderr, "\t-v Search for device with VID == number\n"); - fprintf(stderr, "\t-P 1) - { - int i = 1; - fprintf(stderr, "%d FTDI devices found: Only Readout on EEPROM done. ",res); - fprintf(stderr, "Use VID/PID/desc/serial to select device\n"); - for (curdev = devlist; curdev != NULL; curdev= curdev->next, i++) - { - f = ftdi_usb_open_dev(ftdi, curdev->dev); - if (f<0) - { - fprintf(stderr, "Unable to open device %d: (%s)", - i, ftdi_get_error_string(ftdi)); - continue; - } - fprintf(stderr, "Decoded values of device %d:\n", i); - read_decode_eeprom(ftdi); - ftdi_usb_close(ftdi); - } - ftdi_list_free(&devlist); - retval = EXIT_SUCCESS; - goto do_deinit; - } - else if (res == 1) - { - f = ftdi_usb_open_dev(ftdi, devlist[0].dev); - if (f<0) - { - fprintf(stderr, "Unable to open device %d: (%s)", - i, ftdi_get_error_string(ftdi)); - } - } - else - { - fprintf(stderr, "No devices found\n"); - f = 0; - } - ftdi_list_free(&devlist); - } - else - { - // Open device - f = ftdi_usb_open_desc(ftdi, vid, pid, desc, serial); - if (f < 0) - { - fprintf(stderr, "Device VID 0x%04x PID 0x%04x", vid, pid); - if (desc) - fprintf(stderr, " Desc %s", desc); - if (serial) - fprintf(stderr, " Serial %s", serial); - fprintf(stderr, "\n"); - fprintf(stderr, "unable to open ftdi device: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - - retval = -1; - goto done; - } - } - if (erase) - { - f = ftdi_erase_eeprom(ftdi); /* needed to determine EEPROM chip type */ - if (f < 0) - { - fprintf(stderr, "Erase failed: %s", - ftdi_get_error_string(ftdi)); - retval = -2; - goto done; - } - if (ftdi_get_eeprom_value(ftdi, CHIP_TYPE, & value) <0) - { - fprintf(stderr, "ftdi_get_eeprom_value: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - } - if (value == -1) - fprintf(stderr, "No EEPROM\n"); - else if (value == 0) - fprintf(stderr, "Internal EEPROM\n"); - else - fprintf(stderr, "Found 93x%02x\n", value); - retval = 0; - goto done; - } - - if (use_defaults) - { - ftdi_eeprom_initdefaults(ftdi, NULL, NULL, NULL); - if (ftdi_set_eeprom_value(ftdi, MAX_POWER, 500) <0) - { - fprintf(stderr, "ftdi_set_eeprom_value: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - } - if (large_chip) - if (ftdi_set_eeprom_value(ftdi, CHIP_TYPE, 0x66) <0) - { - fprintf(stderr, "ftdi_set_eeprom_value: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - } - f=(ftdi_eeprom_build(ftdi)); - if (f < 0) - { - fprintf(stderr, "ftdi_eeprom_build: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - retval = -1; - goto done; - } - } - else if (do_write) - { - ftdi_eeprom_initdefaults(ftdi, NULL, NULL, NULL); - f = ftdi_erase_eeprom(ftdi); - if (ftdi_set_eeprom_value(ftdi, MAX_POWER, 500) <0) - { - fprintf(stderr, "ftdi_set_eeprom_value: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - } - f = ftdi_erase_eeprom(ftdi);/* needed to determine EEPROM chip type */ - if (ftdi_get_eeprom_value(ftdi, CHIP_TYPE, & value) <0) - { - fprintf(stderr, "ftdi_get_eeprom_value: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - } - if (value == -1) - fprintf(stderr, "No EEPROM\n"); - else if (value == 0) - fprintf(stderr, "Internal EEPROM\n"); - else - fprintf(stderr, "Found 93x%02x\n", value); - f=(ftdi_eeprom_build(ftdi)); - if (f < 0) - { - fprintf(stderr, "Erase failed: %s", - ftdi_get_error_string(ftdi)); - retval = -2; - goto done; - } - f = ftdi_write_eeprom(ftdi); - { - fprintf(stderr, "ftdi_eeprom_decode: %d (%s)\n", - f, ftdi_get_error_string(ftdi)); - retval = 1; - goto done; - } - } - retval = read_decode_eeprom(ftdi); -done: - ftdi_usb_close(ftdi); -do_deinit: - ftdi_free(ftdi); - return retval; -} diff --git a/lib/libftdi/examples/find_all.c b/lib/libftdi/examples/find_all.c deleted file mode 100644 index 4a70650..0000000 --- a/lib/libftdi/examples/find_all.c +++ /dev/null @@ -1,54 +0,0 @@ -/* find_all.c - - Example for ftdi_usb_find_all() - - This program is distributed under the GPL, version 2 -*/ - -#include -#include -#include - -int main(void) -{ - int ret, i; - struct ftdi_context *ftdi; - struct ftdi_device_list *devlist, *curdev; - char manufacturer[128], description[128]; - int retval = EXIT_SUCCESS; - - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_new failed\n"); - return EXIT_FAILURE; - } - - if ((ret = ftdi_usb_find_all(ftdi, &devlist, 0, 0)) < 0) - { - fprintf(stderr, "ftdi_usb_find_all failed: %d (%s)\n", ret, ftdi_get_error_string(ftdi)); - retval = EXIT_FAILURE; - goto do_deinit; - } - - printf("Number of FTDI devices found: %d\n", ret); - - i = 0; - for (curdev = devlist; curdev != NULL; i++) - { - printf("Checking device: %d\n", i); - if ((ret = ftdi_usb_get_strings(ftdi, curdev->dev, manufacturer, 128, description, 128, NULL, 0)) < 0) - { - fprintf(stderr, "ftdi_usb_get_strings failed: %d (%s)\n", ret, ftdi_get_error_string(ftdi)); - retval = EXIT_FAILURE; - goto done; - } - printf("Manufacturer: %s, Description: %s\n\n", manufacturer, description); - curdev = curdev->next; - } -done: - ftdi_list_free(&devlist); -do_deinit: - ftdi_free(ftdi); - - return retval; -} diff --git a/lib/libftdi/examples/find_all_pp.cpp b/lib/libftdi/examples/find_all_pp.cpp deleted file mode 100644 index cf1675b..0000000 --- a/lib/libftdi/examples/find_all_pp.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* final_all_pp.cpp - - Simple libftdi-cpp usage - - This program is distributed under the GPL, version 2 -*/ - -#include "ftdi.hpp" -#include -#include -#include -#include -using namespace Ftdi; - -int main(int argc, char **argv) -{ - // Show help - if (argc > 1) - { - if (strcmp(argv[1],"-h") == 0 || strcmp(argv[1],"--help") == 0) - { - std::cout << "Usage: " << argv[0] << " [-v VENDOR_ID] [-p PRODUCT_ID]" << std::endl; - return EXIT_SUCCESS; - } - } - - // Parse args - int vid = 0x0403, pid = 0x6010, tmp = 0; - for (int i = 0; i < (argc - 1); i++) - { - if (strcmp(argv[i], "-v") == 0) - if ((tmp = strtol(argv[++i], 0, 16)) >= 0) - vid = tmp; - - if (strcmp(argv[i], "-p") == 0) - if ((tmp = strtol(argv[++i], 0, 16)) >= 0) - pid = tmp; - } - - // Print header - std::cout << std::hex << std::showbase - << "Found devices ( VID: " << vid << ", PID: " << pid << " )" - << std::endl - << "------------------------------------------------" - << std::endl << std::dec; - - // Print whole list - List* list = List::find_all(vid, pid); - for (List::iterator it = list->begin(); it != list->end(); it++) - { - std::cout << "FTDI (" << &*it << "): " - << it->vendor() << ", " - << it->description() << ", " - << it->serial(); - - // Open test - if(it->open() == 0) - std::cout << " (Open OK)"; - else - std::cout << " (Open FAILED)"; - - it->close(); - - std::cout << std::endl; - - } - - delete list; - - return EXIT_SUCCESS; -} diff --git a/lib/libftdi/examples/python/complete.py b/lib/libftdi/examples/python/complete.py deleted file mode 100644 index cee917d..0000000 --- a/lib/libftdi/examples/python/complete.py +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -"""Python example program. - -Complete program to demonstrate the usage -of the swig generated python wrapper - -You need to build and install the wrapper first""" - -import os -import ftdi -import time - -# initialize -ftdic = ftdi.new() -if ftdic == 0: - print 'new failed: %d', ret - os._exit( 1 ) - - -# list all devices -ret, devlist = ftdi.usb_find_all( ftdic, 0x0403, 0x6001 ) -if ret < 0: - print 'ftdi_usb_find_all failed: %d (%s)' % ( ret, ftdi.get_error_string( ftdic ) ) - os._exit( 1 ) -print 'Number of FTDI devices found: %d\n' % ret -curnode = devlist -i = 0 -while( curnode != None ): - ret, manufacturer, description, serial = ftdi.usb_get_strings( ftdic, curnode.dev ) - if ret < 0: - print 'ftdi_usb_get_strings failed: %d (%s)' % ( ret, ftdi.get_error_string( ftdic ) ) - os._exit( 1 ) - print 'Device #%d: manufacturer="%s" description="%s" serial="%s"\n' % ( i, manufacturer, description, serial ) - curnode = curnode.next - i += 1 - -# open usb -ret = ftdi.usb_open( ftdic, 0x0403, 0x6001 ) -if ret < 0: - print 'unable to open ftdi device: %d (%s)' % ( ret, ftdi.get_error_string( ftdic ) ) - os._exit( 1 ) - - -# bitbang -ret = ftdi.set_bitmode( ftdic, 0xff, ftdi.BITMODE_BITBANG ) -if ret < 0: - print 'Cannot enable bitbang' - os._exit( 1 ) -print 'turning everything on' -ftdi.write_data( ftdic, chr(0xff), 1 ) -time.sleep( 1 ) -print 'turning everything off\n' -ftdi.write_data( ftdic, chr(0x00), 1 ) -time.sleep( 1 ) -for i in range( 8 ): - val = 2**i - print 'enabling bit #%d (0x%02x)' % (i, val) - ftdi.write_data( ftdic, chr(val), 1 ) - time.sleep ( 1 ) -ftdi.disable_bitbang( ftdic ) -print '' - - -# read pins -ret, pins = ftdi.read_pins( ftdic ) -print 'pins:', -if ( ret == 0 ): - print '%02x' % ord( pins[0] ) -print '' - - -# read chip id -ret, chipid = ftdi.read_chipid( ftdic ) -print 'FDTI chip id: %X\n' % chipid - - -# read eeprom -eeprom_addr = 1 -ret, eeprom_val = ftdi.read_eeprom_location( ftdic, eeprom_addr ) -if (ret==0): - print 'eeprom @ %d: 0x%04x\n' % ( eeprom_addr, eeprom_val ) - -print 'complete eeprom:' -ret = ftdi.read_eeprom( ftdic ) -size = 128 -ret, eeprom = ftdi.get_eeprom_buf ( ftdic, size ) -if ( ret == 0 ): - for i in range( size ): - print '%02x' % ord( eeprom[i] ), - if ( i % 8 == 7 ): - print '' - - -# close usb -ret = ftdi.usb_close( ftdic ) -if ret < 0: - print 'unable to close ftdi device: %d (%s)' % ( ret, ftdi.get_error_string( ftdic ) ) - os._exit( 1 ) -ftdi.free( ftdic ) diff --git a/lib/libftdi/examples/python/simple.py b/lib/libftdi/examples/python/simple.py deleted file mode 100644 index ecd5c2f..0000000 --- a/lib/libftdi/examples/python/simple.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -"""Python example program. - -Small program to demonstrate the usage -of the swig generated python wrapper - -You need to build and install the wrapper first""" - -import ftdi - -def main(): - """Main program""" - context = ftdi.new() - - version_info = ftdi.get_library_version() - print("[FTDI version] major: %d, minor: %d, micro: %d" \ - ", version_str: %s, snapshot_str: %s" % - (version_info.major, version_info.minor, version_info.micro, - version_info.version_str, version_info.snapshot_str)) - - print("ftdi.usb_open(): %d" % ftdi.usb_open(context, 0x0403, 0x6010)) - print("ftdi.set_baudrate(): %d" % ftdi.set_baudrate(context, 9600)) - - ftdi.free(context) - -main() diff --git a/lib/libftdi/examples/serial_test.c b/lib/libftdi/examples/serial_test.c deleted file mode 100644 index 6a9d8ff..0000000 --- a/lib/libftdi/examples/serial_test.c +++ /dev/null @@ -1,182 +0,0 @@ -/* serial_test.c - - Read/write data via serial I/O - - This program is distributed under the GPL, version 2 -*/ - -#include -#include -#include -#ifdef __WIN32__ -#define sleep(x) Sleep(x) -#endif -#include -#include -#include - -static int exitRequested = 0; -/* - * sigintHandler -- - * - * SIGINT handler, so we can gracefully exit when the user hits ctrl-C. - */ -static void -sigintHandler(int signum) -{ - exitRequested = 1; -} - -int main(int argc, char **argv) -{ - struct ftdi_context *ftdi; - unsigned char buf[1024]; - int f = 0, i; - int vid = 0x403; - int pid = 0; - int baudrate = 115200; - int interface = INTERFACE_ANY; - int do_write = 0; - unsigned int pattern = 0xffff; - int retval = EXIT_FAILURE; - - while ((i = getopt(argc, argv, "i:v:p:b:w::")) != -1) - { - switch (i) - { - case 'i': // 0=ANY, 1=A, 2=B, 3=C, 4=D - interface = strtoul(optarg, NULL, 0); - break; - case 'v': - vid = strtoul(optarg, NULL, 0); - break; - case 'p': - pid = strtoul(optarg, NULL, 0); - break; - case 'b': - baudrate = strtoul(optarg, NULL, 0); - break; - case 'w': - do_write = 1; - if (optarg) - pattern = strtoul(optarg, NULL, 0); - if (pattern > 0xff) - { - fprintf(stderr, "Please provide a 8 bit pattern\n"); - exit(-1); - } - break; - default: - fprintf(stderr, "usage: %s [-i interface] [-v vid] [-p pid] [-b baudrate] [-w [pattern]]\n", *argv); - exit(-1); - } - } - - // Init - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_new failed\n"); - return EXIT_FAILURE; - } - - if (!vid && !pid && (interface == INTERFACE_ANY)) - { - ftdi_set_interface(ftdi, INTERFACE_ANY); - struct ftdi_device_list *devlist; - int res; - if ((res = ftdi_usb_find_all(ftdi, &devlist, 0, 0)) < 0) - { - fprintf(stderr, "No FTDI with default VID/PID found\n"); - goto do_deinit; - } - if (res == 1) - { - f = ftdi_usb_open_dev(ftdi, devlist[0].dev); - if (f<0) - { - fprintf(stderr, "Unable to open device %d: (%s)", - i, ftdi_get_error_string(ftdi)); - } - } - ftdi_list_free(&devlist); - if (res > 1) - { - fprintf(stderr, "%d Devices found, please select Device with VID/PID\n", res); - /* TODO: List Devices*/ - goto do_deinit; - } - if (res == 0) - { - fprintf(stderr, "No Devices found with default VID/PID\n"); - goto do_deinit; - } - } - else - { - // Select interface - ftdi_set_interface(ftdi, interface); - - // Open device - f = ftdi_usb_open(ftdi, vid, pid); - } - if (f < 0) - { - fprintf(stderr, "unable to open ftdi device: %d (%s)\n", f, ftdi_get_error_string(ftdi)); - exit(-1); - } - - // Set baudrate - f = ftdi_set_baudrate(ftdi, baudrate); - if (f < 0) - { - fprintf(stderr, "unable to set baudrate: %d (%s)\n", f, ftdi_get_error_string(ftdi)); - exit(-1); - } - - /* Set line parameters - * - * TODO: Make these parameters settable from the command line - * - * Parameters are choosen that sending a continous stream of 0x55 - * should give a square wave - * - */ - f = ftdi_set_line_property(ftdi, 8, STOP_BIT_1, NONE); - if (f < 0) - { - fprintf(stderr, "unable to set line parameters: %d (%s)\n", f, ftdi_get_error_string(ftdi)); - exit(-1); - } - - if (do_write) - for(i=0; i<1024; i++) - buf[i] = pattern; - - signal(SIGINT, sigintHandler); - while (!exitRequested) - { - if (do_write) - f = ftdi_write_data(ftdi, buf, - (baudrate/512 >sizeof(buf))?sizeof(buf): - (baudrate/512)?baudrate/512:1); - else - f = ftdi_read_data(ftdi, buf, sizeof(buf)); - if (f<0) - sleep(1); - else if(f> 0 && !do_write) - { - fprintf(stderr, "read %d bytes\n", f); - fwrite(buf, f, 1, stdout); - fflush(stderr); - fflush(stdout); - } - } - signal(SIGINT, SIG_DFL); - retval = EXIT_SUCCESS; - - ftdi_usb_close(ftdi); - do_deinit: - ftdi_free(ftdi); - - return retval; -} diff --git a/lib/libftdi/examples/simple.c b/lib/libftdi/examples/simple.c deleted file mode 100644 index cfd674b..0000000 --- a/lib/libftdi/examples/simple.c +++ /dev/null @@ -1,53 +0,0 @@ -/* simple.c - - Simple libftdi usage example - - This program is distributed under the GPL, version 2 -*/ - -#include -#include -#include - -int main(void) -{ - int ret; - struct ftdi_context *ftdi; - struct ftdi_version_info version; - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_new failed\n"); - return EXIT_FAILURE; - } - - version = ftdi_get_library_version(); - printf("Initialized libftdi %s (major: %d, minor: %d, micro: %d, snapshot ver: %s)\n", - version.version_str, version.major, version.minor, version.micro, - version.snapshot_str); - - if ((ret = ftdi_usb_open(ftdi, 0x0403, 0x6001)) < 0) - { - fprintf(stderr, "unable to open ftdi device: %d (%s)\n", ret, ftdi_get_error_string(ftdi)); - ftdi_free(ftdi); - return EXIT_FAILURE; - } - - // Read out FTDIChip-ID of R type chips - if (ftdi->type == TYPE_R) - { - unsigned int chipid; - printf("ftdi_read_chipid: %d\n", ftdi_read_chipid(ftdi, &chipid)); - printf("FTDI chipid: %X\n", chipid); - } - - if ((ret = ftdi_usb_close(ftdi)) < 0) - { - fprintf(stderr, "unable to close ftdi device: %d (%s)\n", ret, ftdi_get_error_string(ftdi)); - ftdi_free(ftdi); - return EXIT_FAILURE; - } - - ftdi_free(ftdi); - - return EXIT_SUCCESS; -} diff --git a/lib/libftdi/examples/stream_test.c b/lib/libftdi/examples/stream_test.c deleted file mode 100644 index 43abea9..0000000 --- a/lib/libftdi/examples/stream_test.c +++ /dev/null @@ -1,358 +0,0 @@ -/* stream_test.c - * - * Test reading from FT2232H in synchronous FIFO mode. - * - * The FT2232H must supply data due to an appropriate circuit - * - * To check for skipped block with appended code, - * a structure as follows is assumed - * 1* uint32_t num (incremented in 0x4000 steps) - * 3* uint32_t dont_care - * - * After start, data will be read in streaming until the program is aborted - * Progess information wil be printed out - * If a filename is given on the command line, the data read will be - * written to that file - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -void check_outfile(char *); - -static FILE *outputFile; - -static int check = 1; -static int exitRequested = 0; -/* - * sigintHandler -- - * - * SIGINT handler, so we can gracefully exit when the user hits ctrl-C. - */ - -static void -sigintHandler(int signum) -{ - exitRequested = 1; -} - -static void -usage(const char *argv0) -{ - fprintf(stderr, - "Usage: %s [options...] \n" - "Test streaming read from FT2232H\n" - "[-P string] only look for product with given string\n" - "[-n] don't check for special block structure\n" - "\n" - "If some filename is given, write data read to that file\n" - "Progess information is printed each second\n" - "Abort with ^C\n" - "\n" - "Options:\n" - "\n" - "Copyright (C) 2009 Micah Dowty \n" - "Adapted for use with libftdi (C) 2010 Uwe Bonnes \n", - argv0); - exit(1); -} - -static uint32_t start = 0; -static uint32_t offset = 0; -static uint64_t blocks = 0; -static uint32_t skips = 0; -static uint32_t n_err = 0; -static int -readCallback(uint8_t *buffer, int length, FTDIProgressInfo *progress, void *userdata) -{ - if (length) - { - if (check) - { - int i,rem; - uint32_t num; - for (i= offset; i3) - { - num = *(uint32_t*) (buffer+i); - if (start && (num != start +0x4000)) - { - uint32_t delta = ((num-start)/0x4000)-1; - fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x at blocks %10llu\n", - delta, start -0x4000, num, (unsigned long long) blocks); - n_err++; - skips += delta; - } - start = num; - } - else if (rem) - start += 0x4000; - if (rem != 0) - { - blocks ++; - offset = 16-rem; - } - } - if (outputFile) - { - if (fwrite(buffer, length, 1, outputFile) != 1) - { - perror("Write error"); - return 1; - } - } - } - if (progress) - { - fprintf(stderr, "%10.02fs total time %9.3f MiB captured %7.1f kB/s curr rate %7.1f kB/s totalrate %d dropouts\n", - progress->totalTime, - progress->current.totalBytes / (1024.0 * 1024.0), - progress->currentRate / 1024.0, - progress->totalRate / 1024.0, - n_err); - } - return exitRequested ? 1 : 0; -} - -int main(int argc, char **argv) -{ - struct ftdi_context *ftdi; - int err, c; - FILE *of = NULL; - char const *outfile = 0; - outputFile =0; - exitRequested = 0; - char *descstring = NULL; - int option_index; - static struct option long_options[] = {{NULL},}; - - while ((c = getopt_long(argc, argv, "P:n", long_options, &option_index)) !=- 1) - switch (c) - { - case -1: - break; - case 'P': - descstring = optarg; - break; - case 'n': - check = 0; - break; - default: - usage(argv[0]); - } - - if (optind == argc - 1) - { - // Exactly one extra argument- a dump file - outfile = argv[optind]; - } - else if (optind < argc) - { - // Too many extra args - usage(argv[0]); - } - - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "ftdi_new failed\n"); - return EXIT_FAILURE; - } - - if (ftdi_set_interface(ftdi, INTERFACE_A) < 0) - { - fprintf(stderr, "ftdi_set_interface failed\n"); - ftdi_free(ftdi); - return EXIT_FAILURE; - } - - if (ftdi_usb_open_desc(ftdi, 0x0403, 0x6010, descstring, NULL) < 0) - { - fprintf(stderr,"Can't open ftdi device: %s\n",ftdi_get_error_string(ftdi)); - ftdi_free(ftdi); - return EXIT_FAILURE; - } - - /* A timeout value of 1 results in may skipped blocks */ - if(ftdi_set_latency_timer(ftdi, 2)) - { - fprintf(stderr,"Can't set latency, Error %s\n",ftdi_get_error_string(ftdi)); - ftdi_usb_close(ftdi); - ftdi_free(ftdi); - return EXIT_FAILURE; - } - -/* if(ftdi_usb_purge_rx_buffer(ftdi) < 0) - { - fprintf(stderr,"Can't rx purge\n",ftdi_get_error_string(ftdi)); - return EXIT_FAILURE; - }*/ - if (outfile) - if ((of = fopen(outfile,"w+")) == 0) - fprintf(stderr,"Can't open logfile %s, Error %s\n", outfile, strerror(errno)); - if (of) - if (setvbuf(of, NULL, _IOFBF , 1<<16) == 0) - outputFile = of; - signal(SIGINT, sigintHandler); - - err = ftdi_readstream(ftdi, readCallback, NULL, 8, 256); - if (err < 0 && !exitRequested) - exit(1); - - if (outputFile) { - fclose(outputFile); - outputFile = NULL; - } - fprintf(stderr, "Capture ended.\n"); - - if (ftdi_set_bitmode(ftdi, 0xff, BITMODE_RESET) < 0) - { - fprintf(stderr,"Can't set synchronous fifo mode, Error %s\n",ftdi_get_error_string(ftdi)); - ftdi_usb_close(ftdi); - ftdi_free(ftdi); - return EXIT_FAILURE; - } - ftdi_usb_close(ftdi); - ftdi_free(ftdi); - signal(SIGINT, SIG_DFL); - if (check && outfile) - { - if ((outputFile = fopen(outfile,"r")) == 0) - { - fprintf(stderr,"Can't open logfile %s, Error %s\n", outfile, strerror(errno)); - ftdi_usb_close(ftdi); - ftdi_free(ftdi); - return EXIT_FAILURE; - } - check_outfile(descstring); - fclose(outputFile); - } - else if (check) - fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le) blocks skipped\n", - n_err, (unsigned long long) blocks, (long double)n_err/(long double) blocks, - skips, (long double)skips/(long double) blocks); - exit (0); -} - -void check_outfile(char *descstring) -{ - if(strcmp(descstring,"FT2232HTEST") == 0) - { - char buf0[1024]; - char buf1[1024]; - char bufr[1024]; - char *pa, *pb, *pc; - unsigned int num_lines = 0, line_num = 1; - int err_count = 0; - unsigned int num_start, num_end; - - pa = buf0; - pb = buf1; - pc = buf0; - if(fgets(pa, 1023, outputFile) == NULL) - { - fprintf(stderr,"Empty output file\n"); - return; - } - while(fgets(pb, 1023, outputFile) != NULL) - { - num_lines++; - unsigned int num_save = num_start; - if( sscanf(pa,"%6u%94s%6u",&num_start, bufr,&num_end) !=3) - { - fprintf(stdout,"Format doesn't match at line %8d \"%s", - num_lines, pa); - err_count++; - line_num = num_save +2; - } - else - { - if ((num_start+1)%100000 != num_end) - { - if (err_count < 20) - fprintf(stdout,"Malformed line %d \"%s\"\n", - num_lines, pa); - err_count++; - } - else if(num_start != line_num) - { - if (err_count < 20) - fprintf(stdout,"Skipping from %d to %d\n", - line_num, num_start); - err_count++; - - } - line_num = num_end; - } - pa = pb; - pb = pc; - pc = pa; - } - if(err_count) - fprintf(stdout,"\n%d errors of %d data sets %f\n", err_count, num_lines, (double) err_count/(double)num_lines); - else - fprintf(stdout,"No errors for %d lines\n",num_lines); - } - else if(strcmp(descstring,"LLBBC10") == 0) - { - uint32_t block0[4]; - uint32_t block1[4]; - uint32_t *pa = block0; - uint32_t *pb = block1; - uint32_t *pc = block0; - uint32_t start= 0; - uint32_t nread = 0; - int n_shown = 0; - int n_errors = 0; - if (fread(pa, sizeof(uint32_t), 4,outputFile) < 4) - { - fprintf(stderr,"Empty result file\n"); - return; - } - while(fread(pb, sizeof(uint32_t), 4,outputFile) != 0) - { - blocks++; - nread = pa[0]; - if(start>0 && (nread != start)) - { - if(n_shown < 30) - { - fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x at blocks %10llu \n", - (nread-start)/0x4000, start -0x4000, nread, (unsigned long long) blocks); - n_shown ++; - } - n_errors++; - } - else if (n_shown >0) - n_shown--; - start = nread + 0x4000; - pa = pb; - pb = pc; - pc = pa; - } - if(n_errors) - fprintf(stderr, "%d blocks wrong from %llu blocks read\n", - n_errors, (unsigned long long) blocks); - else - fprintf(stderr, "%llu blocks all fine\n", (unsigned long long) blocks); - } -} diff --git a/lib/libftdi/ftdi_eeprom/CMakeLists.txt b/lib/libftdi/ftdi_eeprom/CMakeLists.txt deleted file mode 100644 index 38d7a96..0000000 --- a/lib/libftdi/ftdi_eeprom/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -set(FTDI_BUILD_EEPROM False PARENT_SCOPE) - -option(FTDI_EEPROM "Build ftdi_eeprom" ON) - -if (FTDI_EEPROM) - include(FindPkgConfig) - pkg_check_modules(Confuse libconfuse) - INCLUDE_DIRECTORIES(${Confuse_INCLUDE_DIRS}) - LINK_DIRECTORIES(${Confuse_LIBRARY_DIRS}) - SET(libs ${libs} ${Confuse_LIBRARIES}) - - if(Confuse_FOUND) - set(FTDI_BUILD_EEPROM True PARENT_SCOPE) - message(STATUS "Building ftdi_eeprom") - - # Version defines - set(EEPROM_MAJOR_VERSION 0) - set(EEPROM_MINOR_VERSION 17) - set(EEPROM_VERSION_STRING ${EEPROM_MAJOR_VERSION}.${EEPROM_MINOR_VERSION}) - - include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src) - include_directories(BEFORE ${CMAKE_BINARY_DIR}/ftdi_eeprom) - - configure_file( - "ftdi_eeprom_version.h.in" - "${CMAKE_BINARY_DIR}/ftdi_eeprom/ftdi_eeprom_version.h" - ) - - add_executable(ftdi_eeprom main.c) - target_link_libraries(ftdi_eeprom ftdi) - target_link_libraries(ftdi_eeprom ${Confuse_LIBRARIES}) - - else(Confuse_FOUND) - message(STATUS "libConfuse not found, won't build ftdi_eeprom") - endif(Confuse_FOUND) - -else(FTDI_EEPROM) - - message(STATUS "ftdi_eeprom build is disabled") - -endif(FTDI_EEPROM) diff --git a/lib/libftdi/ftdi_eeprom/example.conf b/lib/libftdi/ftdi_eeprom/example.conf deleted file mode 100644 index 2c50fda..0000000 --- a/lib/libftdi/ftdi_eeprom/example.conf +++ /dev/null @@ -1,31 +0,0 @@ -vendor_id=0x0403 # Vendor ID -product_id=0x6001 # Product ID - -max_power=0 # Max. power consumption: value * 2 mA. Use 0 if self_powered = true. - -########### -# Strings # -########### -manufacturer="ACME Inc" # Manufacturer -product="USB Serial Converter" # Product -serial="08-15" # Serial - -########### -# Options # -########### -self_powered=true # Turn this off for bus powered -remote_wakeup=false # Turn this on for remote wakeup feature -use_serial=true # Use the serial number string - -# Normally out don't have to change one of these flags -in_is_isochronous=false # In Endpoint is Isochronous -out_is_isochronous=false # Out Endpoint is Isochronous -suspend_pull_downs=false # Enable suspend pull downs for lower power -change_usb_version=false # Change USB Version -usb_version=0x0200 # Only used when change_usb_version is enabled - -######## -# Misc # -######## - -filename="eeprom.new" # Filename, leave empty to skip file writing diff --git a/lib/libftdi/ftdi_eeprom/ftdi_eeprom_version.h.in b/lib/libftdi/ftdi_eeprom/ftdi_eeprom_version.h.in deleted file mode 100644 index db7717d..0000000 --- a/lib/libftdi/ftdi_eeprom/ftdi_eeprom_version.h.in +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _FTDI_EEPROM_VERSION_H -#define _FTDI_EEPROM_VERSION_H - -#define EEPROM_MAJOR_VERSION @EEPROM_MAJOR_VERSION@ -#define EEPROM_MINOR_VERSION @EEPROM_MINOR_VERSION@ -#define EEPROM_VERSION_STRING "@EEPROM_VERSION_STRING@" - -#endif diff --git a/lib/libftdi/ftdi_eeprom/main.c b/lib/libftdi/ftdi_eeprom/main.c deleted file mode 100644 index ad7de93..0000000 --- a/lib/libftdi/ftdi_eeprom/main.c +++ /dev/null @@ -1,381 +0,0 @@ -/*************************************************************************** - main.c - description - ------------------- - begin : Mon Apr 7 12:05:22 CEST 2003 - copyright : (C) 2003-2011 by Intra2net AG and the libftdi developers - email : opensource@intra2net.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License version 2 as * - * published by the Free Software Foundation. * - * * - ***************************************************************************/ - -/* - TODO: - - Remove 128 bytes limit - - Merge Uwe's eeprom tool. Current features: - - Init eeprom defaults based upon eeprom type - - Read -> Already there - - Write -> Already there - - Erase -> Already there - - Decode on stdout - - Ability to find device by PID/VID, product name or serial - - TODO nice-to-have: - - Out-of-the-box compatibility with FTDI's eeprom tool configuration files - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#include -#include -#include - -static int str_to_cbus(char *str, int max_allowed) -{ - #define MAX_OPTION 14 - const char* options[MAX_OPTION] = { - "TXDEN", "PWREN", "RXLED", "TXLED", "TXRXLED", "SLEEP", - "CLK48", "CLK24", "CLK12", "CLK6", - "IO_MODE", "BITBANG_WR", "BITBANG_RD", "SPECIAL"}; - int i; - max_allowed += 1; - if (max_allowed > MAX_OPTION) max_allowed = MAX_OPTION; - for (i=0; i\n"); - - if (argc != 2 && argc != 3) - { - printf("Syntax: %s [commands] config-file\n", argv[0]); - printf("Valid commands:\n"); - printf("--read-eeprom Read eeprom and write to -filename- from config-file\n"); - printf("--erase-eeprom Erase eeprom\n"); - printf("--flash-eeprom Flash eeprom\n"); - exit (-1); - } - - if (argc == 3) - { - if (strcmp(argv[1], "--read-eeprom") == 0) - _read = 1; - else if (strcmp(argv[1], "--erase-eeprom") == 0) - _erase = 1; - else if (strcmp(argv[1], "--flash-eeprom") == 0) - _flash = 1; - else - { - printf ("Can't open configuration file\n"); - exit (-1); - } - argc_filename = 2; - } - else - { - argc_filename = 1; - } - - if ((fp = fopen(argv[argc_filename], "r")) == NULL) - { - printf ("Can't open configuration file\n"); - exit (-1); - } - fclose (fp); - - cfg = cfg_init(opts, 0); - cfg_parse(cfg, argv[argc_filename]); - filename = cfg_getstr(cfg, "filename"); - - if (cfg_getbool(cfg, "self_powered") && cfg_getint(cfg, "max_power") > 0) - printf("Hint: Self powered devices should have a max_power setting of 0.\n"); - - if ((ftdi = ftdi_new()) == 0) - { - fprintf(stderr, "Failed to allocate ftdi structure :%s \n", - ftdi_get_error_string(ftdi)); - return EXIT_FAILURE; - } - - if (_read > 0 || _erase > 0 || _flash > 0) - { - int vendor_id = cfg_getint(cfg, "vendor_id"); - int product_id = cfg_getint(cfg, "product_id"); - - i = ftdi_usb_open(ftdi, vendor_id, product_id); - - if (i != 0) - { - int default_pid = cfg_getint(cfg, "default_pid"); - printf("Unable to find FTDI devices under given vendor/product id: 0x%X/0x%X\n", vendor_id, product_id); - printf("Error code: %d (%s)\n", i, ftdi_get_error_string(ftdi)); - printf("Retrying with default FTDI pid=%#04x.\n", default_pid); - - i = ftdi_usb_open(ftdi, 0x0403, default_pid); - if (i != 0) - { - printf("Error: %s\n", ftdi->error_str); - exit (-1); - } - } - } - ftdi_eeprom_initdefaults (ftdi, cfg_getstr(cfg, "manufacturer"), - cfg_getstr(cfg, "product"), - cfg_getstr(cfg, "serial")); - - printf("FTDI read eeprom: %d\n", ftdi_read_eeprom(ftdi)); - eeprom_get_value(ftdi, CHIP_SIZE, &my_eeprom_size); - // TODO: Do we know the eeprom size already? - printf("EEPROM size: %d\n", my_eeprom_size); - - if (_read > 0) - { - ftdi_eeprom_decode(ftdi, 0 /* debug: 1 */); - - eeprom_buf = malloc(my_eeprom_size); - ftdi_get_eeprom_buf(ftdi, eeprom_buf, my_eeprom_size); - - if (eeprom_buf == NULL) - { - fprintf(stderr, "Malloc failed, aborting\n"); - goto cleanup; - } - if (filename != NULL && strlen(filename) > 0) - { - - FILE *fp = fopen (filename, "wb"); - fwrite (eeprom_buf, 1, my_eeprom_size, fp); - fclose (fp); - } - else - { - printf("Warning: Not writing eeprom, you must supply a valid filename\n"); - } - - goto cleanup; - } - - eeprom_set_value(ftdi, VENDOR_ID, cfg_getint(cfg, "vendor_id")); - eeprom_set_value(ftdi, PRODUCT_ID, cfg_getint(cfg, "product_id")); - - eeprom_set_value(ftdi, SELF_POWERED, cfg_getbool(cfg, "self_powered")); - eeprom_set_value(ftdi, REMOTE_WAKEUP, cfg_getbool(cfg, "remote_wakeup")); - eeprom_set_value(ftdi, MAX_POWER, cfg_getint(cfg, "max_power")); - - eeprom_set_value(ftdi, IN_IS_ISOCHRONOUS, cfg_getbool(cfg, "in_is_isochronous")); - eeprom_set_value(ftdi, OUT_IS_ISOCHRONOUS, cfg_getbool(cfg, "out_is_isochronous")); - eeprom_set_value(ftdi, SUSPEND_PULL_DOWNS, cfg_getbool(cfg, "suspend_pull_downs")); - - eeprom_set_value(ftdi, USE_SERIAL, cfg_getbool(cfg, "use_serial")); - eeprom_set_value(ftdi, USE_USB_VERSION, cfg_getbool(cfg, "change_usb_version")); - eeprom_set_value(ftdi, USB_VERSION, cfg_getint(cfg, "usb_version")); - - - eeprom_set_value(ftdi, HIGH_CURRENT, cfg_getbool(cfg, "high_current")); - eeprom_set_value(ftdi, CBUS_FUNCTION_0, str_to_cbus(cfg_getstr(cfg, "cbus0"), 13)); - eeprom_set_value(ftdi, CBUS_FUNCTION_1, str_to_cbus(cfg_getstr(cfg, "cbus1"), 13)); - eeprom_set_value(ftdi, CBUS_FUNCTION_2, str_to_cbus(cfg_getstr(cfg, "cbus2"), 13)); - eeprom_set_value(ftdi, CBUS_FUNCTION_3, str_to_cbus(cfg_getstr(cfg, "cbus3"), 13)); - eeprom_set_value(ftdi, CBUS_FUNCTION_4, str_to_cbus(cfg_getstr(cfg, "cbus4"), 9)); - int invert = 0; - if (cfg_getbool(cfg, "invert_rxd")) invert |= INVERT_RXD; - if (cfg_getbool(cfg, "invert_txd")) invert |= INVERT_TXD; - if (cfg_getbool(cfg, "invert_rts")) invert |= INVERT_RTS; - if (cfg_getbool(cfg, "invert_cts")) invert |= INVERT_CTS; - if (cfg_getbool(cfg, "invert_dtr")) invert |= INVERT_DTR; - if (cfg_getbool(cfg, "invert_dsr")) invert |= INVERT_DSR; - if (cfg_getbool(cfg, "invert_dcd")) invert |= INVERT_DCD; - if (cfg_getbool(cfg, "invert_ri")) invert |= INVERT_RI; - eeprom_set_value(ftdi, INVERT, invert); - - eeprom_set_value(ftdi, CHANNEL_A_DRIVER, DRIVER_VCP); - eeprom_set_value(ftdi, CHANNEL_B_DRIVER, DRIVER_VCP); - eeprom_set_value(ftdi, CHANNEL_C_DRIVER, DRIVER_VCP); - eeprom_set_value(ftdi, CHANNEL_D_DRIVER, DRIVER_VCP); - eeprom_set_value(ftdi, CHANNEL_A_RS485, 0); - eeprom_set_value(ftdi, CHANNEL_B_RS485, 0); - eeprom_set_value(ftdi, CHANNEL_C_RS485, 0); - eeprom_set_value(ftdi, CHANNEL_D_RS485, 0); - - if (_erase > 0) - { - printf("FTDI erase eeprom: %d\n", ftdi_erase_eeprom(ftdi)); - } - - size_check = ftdi_eeprom_build(ftdi); - - if (size_check == -1) - { - printf ("Sorry, the eeprom can only contain 128 bytes (100 bytes for your strings).\n"); - printf ("You need to short your string by: %d bytes\n", size_check); - goto cleanup; - } else if (size_check < 0) { - printf ("ftdi_eeprom_build(): error: %d\n", size_check); - } - else - { - printf ("Used eeprom space: %d bytes\n", my_eeprom_size-size_check); - } - - if (_flash > 0) - { - if (cfg_getbool(cfg, "flash_raw")) - { - if (filename != NULL && strlen(filename) > 0) - { - eeprom_buf = malloc(my_eeprom_size); - FILE *fp = fopen(filename, "rb"); - fread(eeprom_buf, 1, my_eeprom_size, fp); - fclose(fp); - - ftdi_set_eeprom_buf(ftdi, eeprom_buf, my_eeprom_size); - } - } - printf ("FTDI write eeprom: %d\n", ftdi_write_eeprom(ftdi)); - } - - // Write to file? - if (filename != NULL && strlen(filename) > 0 && !cfg_getbool(cfg, "flash_raw")) - { - fp = fopen(filename, "w"); - if (fp == NULL) - { - printf ("Can't write eeprom file.\n"); - exit (-1); - } - else - printf ("Writing to file: %s\n", filename); - - if (eeprom_buf == NULL) - eeprom_buf = malloc(my_eeprom_size); - ftdi_get_eeprom_buf(ftdi, eeprom_buf, my_eeprom_size); - - fwrite(eeprom_buf, my_eeprom_size, 1, fp); - fclose(fp); - } - -cleanup: - if (eeprom_buf) - free(eeprom_buf); - if (_read > 0 || _erase > 0 || _flash > 0) - { - printf("FTDI close: %d\n", ftdi_usb_close(ftdi)); - } - - ftdi_deinit (ftdi); - ftdi_free (ftdi); - - cfg_free(cfg); - - printf("\n"); - return 0; -} diff --git a/lib/libftdi/ftdipp/CMakeLists.txt b/lib/libftdi/ftdipp/CMakeLists.txt deleted file mode 100644 index 23000c9..0000000 --- a/lib/libftdi/ftdipp/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ -# Check -set(FTDI_BUILD_CPP False PARENT_SCOPE) - -option(FTDIPP "Build C++ binding library libftdi++" ON) - -if (FTDIPP) - - if(Boost_FOUND) - - # Includes - include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/src) - - include_directories(${Boost_INCLUDE_DIRS}) - - # Targets - set(cpp_sources ftdi.cpp) - set(cpp_headers ftdi.hpp) - - set(FTDI_BUILD_CPP True PARENT_SCOPE) - message(STATUS "Building libftdi++") - - # Shared library - add_library(ftdipp SHARED ${cpp_sources}) - - math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases - set_target_properties(ftdipp PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2) - - # Static library - add_library(ftdipp-static STATIC ${cpp_sources}) - set_target_properties(ftdipp-static PROPERTIES OUTPUT_NAME "ftdipp") - - # Prevent clobbering each other during the build - set_target_properties(ftdipp PROPERTIES CLEAN_DIRECT_OUTPUT 1) - set_target_properties(ftdipp-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) - - # Dependencies - target_link_libraries(ftdipp ftdi ${LIBUSB_LIBRARIES} ${BOOST_LIBRARIES}) - - # Install - if(${UNIX}) - install( TARGETS ftdipp - LIBRARY DESTINATION lib${LIB_SUFFIX} - COMPONENT sharedlibs - ) - install( TARGETS ftdipp-static - ARCHIVE DESTINATION lib${LIB_SUFFIX} - COMPONENT staticlibs - ) - install( FILES ${cpp_headers} - DESTINATION include/${PROJECT_NAME} - COMPONENT headers - ) - endif(${UNIX}) - - if(${WIN32}) - install( TARGETS ftdipp - DESTINATION bin - COMPONENT sharedlibs - ) - install( TARGETS ftdipp-static - DESTINATION bin - COMPONENT staticlibs - ) - install( FILES ${cpp_headers} - DESTINATION include/${PROJECT_NAME} - COMPONENT headers - ) - endif(${WIN32}) - - else(Boost_FOUND) - message(STATUS "Boost not found, won't build libftdi++") - endif(Boost_FOUND) - -else(FTDIPP) - - message(STATUS "Not building libftdi++") - -endif(FTDIPP) diff --git a/lib/libftdi/ftdipp/ftdi.cpp b/lib/libftdi/ftdipp/ftdi.cpp deleted file mode 100644 index e2755d8..0000000 --- a/lib/libftdi/ftdipp/ftdi.cpp +++ /dev/null @@ -1,632 +0,0 @@ -/*************************************************************************** - ftdi.cpp - C++ wraper for libftdi - ------------------- - begin : Mon Oct 13 2008 - copyright : (C) 2008 by Marek Vavruša - email : opensource@intra2net.com and marek@vavrusa.com - ***************************************************************************/ -/* -Copyright (C) 2008 by Marek Vavruša - -The software in this package is distributed under the GNU General -Public License version 2 (with a special exception described below). - -A copy of GNU General Public License (GPL) is included in this distribution, -in the file COPYING.GPL. - -As a special exception, if other files instantiate templates or use macros -or inline functions from this file, or you compile this file and link it -with other works to produce a work based on this file, this file -does not by itself cause the resulting work to be covered -by the GNU General Public License. - -However the source code for this file must still be made available -in accordance with section (3) of the GNU General Public License. - -This exception does not invalidate any other reasons why a work based -on this file might be covered by the GNU General Public License. -*/ -#include "ftdi.hpp" -#include "ftdi_i.h" -#include "ftdi.h" - -namespace Ftdi -{ - -class Context::Private -{ -public: - Private() - : open(false), ftdi(0), dev(0) - { - ftdi = ftdi_new(); - } - - ~Private() - { - if (open) - ftdi_usb_close(ftdi); - - ftdi_free(ftdi); - } - - bool open; - - struct ftdi_context* ftdi; - struct libusb_device* dev; - - std::string vendor; - std::string description; - std::string serial; -}; - -/*! \brief Constructor. - */ -Context::Context() - : d( new Private() ) -{ -} - -/*! \brief Destructor. - */ -Context::~Context() -{ -} - -bool Context::is_open() -{ - return d->open; -} - -int Context::open(int vendor, int product) -{ - // Open device - int ret = ftdi_usb_open(d->ftdi, vendor, product); - - if (ret < 0) - return ret; - - return get_strings_and_reopen(); -} - -int Context::open(int vendor, int product, const std::string& description, const std::string& serial, unsigned int index) -{ - // translate empty strings to NULL - // -> do not use them to find the device (vs. require an empty string to be set in the EEPROM) - const char* c_description=NULL; - const char* c_serial=NULL; - if (!description.empty()) - c_description=description.c_str(); - if (!serial.empty()) - c_serial=serial.c_str(); - - int ret = ftdi_usb_open_desc_index(d->ftdi, vendor, product, c_description, c_serial, index); - - if (ret < 0) - return ret; - - return get_strings_and_reopen(); -} - -int Context::open(const std::string& description) -{ - int ret = ftdi_usb_open_string(d->ftdi, description.c_str()); - - if (ret < 0) - return ret; - - return get_strings_and_reopen(); -} - -int Context::open(struct libusb_device *dev) -{ - if (dev != 0) - d->dev = dev; - - if (d->dev == 0) - return -1; - - return get_strings_and_reopen(); -} - -int Context::close() -{ - d->open = false; - d->dev = 0; - return ftdi_usb_close(d->ftdi); -} - -int Context::reset() -{ - return ftdi_usb_reset(d->ftdi); -} - -int Context::flush(int mask) -{ - int ret = 1; - - if (mask & Input) - ret &= ftdi_usb_purge_rx_buffer(d->ftdi); - if (mask & Output) - ret &= ftdi_usb_purge_tx_buffer(d->ftdi); - - return ret; -} - -int Context::set_interface(enum ftdi_interface interface) -{ - return ftdi_set_interface(d->ftdi, interface); -} - -void Context::set_usb_device(struct libusb_device_handle *dev) -{ - ftdi_set_usbdev(d->ftdi, dev); - d->dev = libusb_get_device(dev); -} - -int Context::set_baud_rate(int baudrate) -{ - return ftdi_set_baudrate(d->ftdi, baudrate); -} - -int Context::set_line_property(enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity) -{ - return ftdi_set_line_property(d->ftdi, bits, sbit, parity); -} - -int Context::set_line_property(enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity, enum ftdi_break_type break_type) -{ - return ftdi_set_line_property2(d->ftdi, bits, sbit, parity, break_type); -} - -int Context::read(unsigned char *buf, int size) -{ - return ftdi_read_data(d->ftdi, buf, size); -} - -int Context::set_read_chunk_size(unsigned int chunksize) -{ - return ftdi_read_data_set_chunksize(d->ftdi, chunksize); -} - -int Context::read_chunk_size() -{ - unsigned chunk = -1; - if (ftdi_read_data_get_chunksize(d->ftdi, &chunk) < 0) - return -1; - - return chunk; -} - -int Context::write(unsigned char *buf, int size) -{ - return ftdi_write_data(d->ftdi, buf, size); -} - -int Context::set_write_chunk_size(unsigned int chunksize) -{ - return ftdi_write_data_set_chunksize(d->ftdi, chunksize); -} - -int Context::write_chunk_size() -{ - unsigned chunk = -1; - if (ftdi_write_data_get_chunksize(d->ftdi, &chunk) < 0) - return -1; - - return chunk; -} - -int Context::set_flow_control(int flowctrl) -{ - return ftdi_setflowctrl(d->ftdi, flowctrl); -} - -int Context::set_modem_control(int mask) -{ - int dtr = 0, rts = 0; - - if (mask & Dtr) - dtr = 1; - if (mask & Rts) - rts = 1; - - return ftdi_setdtr_rts(d->ftdi, dtr, rts); -} - -int Context::set_dtr(bool state) -{ - return ftdi_setdtr(d->ftdi, state); -} - -int Context::set_rts(bool state) -{ - return ftdi_setrts(d->ftdi, state); -} - -int Context::set_latency(unsigned char latency) -{ - return ftdi_set_latency_timer(d->ftdi, latency); -} - -unsigned Context::latency() -{ - unsigned char latency = 0; - ftdi_get_latency_timer(d->ftdi, &latency); - return latency; -} - -unsigned short Context::poll_modem_status() -{ - unsigned short status = 0; - ftdi_poll_modem_status(d->ftdi, &status); - return status; -} - -int Context::set_event_char(unsigned char eventch, unsigned char enable) -{ - return ftdi_set_event_char(d->ftdi, eventch, enable); -} - -int Context::set_error_char(unsigned char errorch, unsigned char enable) -{ - return ftdi_set_error_char(d->ftdi, errorch, enable); -} - -int Context::set_bitmode(unsigned char bitmask, unsigned char mode) -{ - return ftdi_set_bitmode(d->ftdi, bitmask, mode); -} - -int Context::set_bitmode(unsigned char bitmask, enum ftdi_mpsse_mode mode) -{ - return ftdi_set_bitmode(d->ftdi, bitmask, mode); -} - -int Context::bitbang_disable() -{ - return ftdi_disable_bitbang(d->ftdi); -} - -int Context::read_pins(unsigned char *pins) -{ - return ftdi_read_pins(d->ftdi, pins); -} - -char* Context::error_string() -{ - return ftdi_get_error_string(d->ftdi); -} - -int Context::get_strings() -{ - // Prepare buffers - char vendor[512], desc[512], serial[512]; - - int ret = ftdi_usb_get_strings(d->ftdi, d->dev, vendor, 512, desc, 512, serial, 512); - - if (ret < 0) - return -1; - - d->vendor = vendor; - d->description = desc; - d->serial = serial; - - return 1; -} - -int Context::get_strings_and_reopen() -{ - if ( d->dev == 0 ) - { - d->dev = libusb_get_device(d->ftdi->usb_dev); - } - - // Get device strings (closes device) - int ret=get_strings(); - if (ret < 0) - { - d->open = 0; - return ret; - } - - // Reattach device - ret = ftdi_usb_open_dev(d->ftdi, d->dev); - d->open = (ret >= 0); - - return ret; -} - -/*! \brief Device strings properties. - */ -const std::string& Context::vendor() -{ - return d->vendor; -} - -/*! \brief Device strings properties. - */ -const std::string& Context::description() -{ - return d->description; -} - -/*! \brief Device strings properties. - */ -const std::string& Context::serial() -{ - return d->serial; -} - -void Context::set_context(struct ftdi_context* context) -{ - ftdi_free(d->ftdi); - d->ftdi = context; -} - -void Context::set_usb_device(struct libusb_device *dev) -{ - d->dev = dev; -} - -struct ftdi_context* Context::context() -{ - return d->ftdi; -} - -class Eeprom::Private -{ -public: - Private() - : context(0) - {} - - struct ftdi_eeprom eeprom; - struct ftdi_context* context; -}; - -Eeprom::Eeprom(Context* parent) - : d ( new Private() ) -{ - d->context = parent->context(); -} - -Eeprom::~Eeprom() -{ -} - -int Eeprom::init_defaults(char* manufacturer, char *product, char * serial) -{ - return ftdi_eeprom_initdefaults(d->context, manufacturer, product, serial); -} - -int Eeprom::chip_id(unsigned int *chipid) -{ - return ftdi_read_chipid(d->context, chipid); -} - -int Eeprom::build(unsigned char *output) -{ - return ftdi_eeprom_build(d->context); -} - -int Eeprom::read(unsigned char *eeprom) -{ - return ftdi_read_eeprom(d->context); -} - -int Eeprom::write(unsigned char *eeprom) -{ - return ftdi_write_eeprom(d->context); -} - -int Eeprom::read_location(int eeprom_addr, unsigned short *eeprom_val) -{ - return ftdi_read_eeprom_location(d->context, eeprom_addr, eeprom_val); -} - -int Eeprom::write_location(int eeprom_addr, unsigned short eeprom_val) -{ - return ftdi_write_eeprom_location(d->context, eeprom_addr, eeprom_val); -} - -int Eeprom::erase() -{ - return ftdi_erase_eeprom(d->context); -} - -class List::Private -{ -public: - Private(struct ftdi_device_list* _devlist) - : devlist(_devlist) - {} - - ~Private() - { - if(devlist) - ftdi_list_free(&devlist); - } - - std::list list; - struct ftdi_device_list* devlist; -}; - -List::List(struct ftdi_device_list* devlist) - : d( new Private(devlist) ) -{ - if (devlist != 0) - { - // Iterate list - for (; devlist != 0; devlist = devlist->next) - { - Context c; - c.set_usb_device(devlist->dev); - c.get_strings(); - d->list.push_back(c); - } - } -} - -List::~List() -{ -} - -/** -* Return begin iterator for accessing the contained list elements -* @return Iterator -*/ -List::iterator List::begin() -{ - return d->list.begin(); -} - -/** -* Return end iterator for accessing the contained list elements -* @return Iterator -*/ -List::iterator List::end() -{ - return d->list.end(); -} - -/** -* Return begin iterator for accessing the contained list elements -* @return Const iterator -*/ -List::const_iterator List::begin() const -{ - return d->list.begin(); -} - -/** -* Return end iterator for accessing the contained list elements -* @return Const iterator -*/ -List::const_iterator List::end() const -{ - return d->list.end(); -} - -/** -* Return begin reverse iterator for accessing the contained list elements -* @return Reverse iterator -*/ -List::reverse_iterator List::rbegin() -{ - return d->list.rbegin(); -} - -/** -* Return end reverse iterator for accessing the contained list elements -* @return Reverse iterator -*/ -List::reverse_iterator List::rend() -{ - return d->list.rend(); -} - -/** -* Return begin reverse iterator for accessing the contained list elements -* @return Const reverse iterator -*/ -List::const_reverse_iterator List::rbegin() const -{ - return d->list.rbegin(); -} - -/** -* Return end reverse iterator for accessing the contained list elements -* @return Const reverse iterator -*/ -List::const_reverse_iterator List::rend() const -{ - return d->list.rend(); - -} - -/** -* Get number of elements stored in the list -* @return Number of elements -*/ -List::ListType::size_type List::size() const -{ - return d->list.size(); -} - -/** -* Check if list is empty -* @return True if empty, false otherwise -*/ -bool List::empty() const -{ - return d->list.empty(); -} - -/** - * Removes all elements. Invalidates all iterators. - * Do it in a non-throwing way and also make - * sure we really free the allocated memory. - */ -void List::clear() -{ - ListType().swap(d->list); - - // Free device list - if (d->devlist) - { - ftdi_list_free(&d->devlist); - d->devlist = 0; - } -} - -/** - * Appends a copy of the element as the new last element. - * @param element Value to copy and append -*/ -void List::push_back(const Context& element) -{ - d->list.push_back(element); -} - -/** - * Adds a copy of the element as the new first element. - * @param element Value to copy and add -*/ -void List::push_front(const Context& element) -{ - d->list.push_front(element); -} - -/** - * Erase one element pointed by iterator - * @param pos Element to erase - * @return Position of the following element (or end()) -*/ -List::iterator List::erase(iterator pos) -{ - return d->list.erase(pos); -} - -/** - * Erase a range of elements - * @param beg Begin of range - * @param end End of range - * @return Position of the element after the erased range (or end()) -*/ -List::iterator List::erase(iterator beg, iterator end) -{ - return d->list.erase(beg, end); -} - -List* List::find_all(int vendor, int product) -{ - struct ftdi_device_list* dlist = 0; - struct ftdi_context ftdi; - ftdi_init(&ftdi); - ftdi_usb_find_all(&ftdi, &dlist, vendor, product); - ftdi_deinit(&ftdi); - return new List(dlist); -} - -} diff --git a/lib/libftdi/ftdipp/ftdi.hpp b/lib/libftdi/ftdipp/ftdi.hpp deleted file mode 100644 index ec0e13d..0000000 --- a/lib/libftdi/ftdipp/ftdi.hpp +++ /dev/null @@ -1,217 +0,0 @@ -/*************************************************************************** - ftdi.hpp - C++ wrapper for libftdi - ------------------- - begin : Mon Oct 13 2008 - copyright : (C) 2008 by Marek Vavruša - email : opensource@intra2net.com and marek@vavrusa.com - ***************************************************************************/ -/* -Copyright (C) 2008 by Marek Vavruša - -The software in this package is distributed under the GNU General -Public License version 2 (with a special exception described below). - -A copy of GNU General Public License (GPL) is included in this distribution, -in the file COPYING.GPL. - -As a special exception, if other files instantiate templates or use macros -or inline functions from this file, or you compile this file and link it -with other works to produce a work based on this file, this file -does not by itself cause the resulting work to be covered -by the GNU General Public License. - -However the source code for this file must still be made available -in accordance with section (3) of the GNU General Public License. - -This exception does not invalidate any other reasons why a work based -on this file might be covered by the GNU General Public License. -*/ -#ifndef __libftdi_hpp__ -#define __libftdi_hpp__ - -#include -#include -#include -#include - -namespace Ftdi -{ - -/* Forward declarations*/ -class List; -class Eeprom; - -/*! \brief FTDI device context. - * Represents single FTDI device context. - */ -class Context -{ - /* Friends */ - friend class Eeprom; - friend class List; - -public: - /*! \brief Direction flags for flush(). - */ - enum Direction - { - Input, - Output - }; - - /*! \brief Modem control flags. - */ - enum ModemCtl - { - Dtr, - Rts - }; - - /* Constructor, Destructor */ - Context(); - ~Context(); - - /* Properties */ - Eeprom* eeprom(); - const std::string& vendor(); - const std::string& description(); - const std::string& serial(); - - /* Device manipulators */ - bool is_open(); - int open(struct libusb_device *dev = 0); - int open(int vendor, int product); - int open(int vendor, int product, const std::string& description, const std::string& serial = std::string(), unsigned int index=0); - int open(const std::string& description); - int close(); - int reset(); - int flush(int mask = Input|Output); - int set_interface(enum ftdi_interface interface); - void set_usb_device(struct libusb_device_handle *dev); - - /* Line manipulators */ - int set_baud_rate(int baudrate); - int set_line_property(enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity); - int set_line_property(enum ftdi_bits_type bits, enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity, enum ftdi_break_type break_type); - - /* I/O */ - int read(unsigned char *buf, int size); - int write(unsigned char *buf, int size); - int set_read_chunk_size(unsigned int chunksize); - int set_write_chunk_size(unsigned int chunksize); - int read_chunk_size(); - int write_chunk_size(); - - /* Async IO - TODO: should wrap? - int writeAsync(unsigned char *buf, int size); - void asyncComplete(int wait_for_more); - */ - - /* Flow control */ - int set_event_char(unsigned char eventch, unsigned char enable); - int set_error_char(unsigned char errorch, unsigned char enable); - int set_flow_control(int flowctrl); - int set_modem_control(int mask = Dtr|Rts); - int set_latency(unsigned char latency); - int set_dtr(bool state); - int set_rts(bool state); - - unsigned short poll_modem_status(); - unsigned latency(); - - /* BitBang mode */ - int set_bitmode(unsigned char bitmask, unsigned char mode); - int set_bitmode(unsigned char bitmask, enum ftdi_mpsse_mode mode); - int bitbang_disable(); - int read_pins(unsigned char *pins); - - /* Misc */ - char* error_string(); - -protected: - int get_strings(); - int get_strings_and_reopen(); - - /* Properties */ - struct ftdi_context* context(); - void set_context(struct ftdi_context* context); - void set_usb_device(struct libusb_device *dev); - -private: - class Private; - boost::shared_ptr d; -}; - -/*! \brief Device EEPROM. - */ -class Eeprom -{ -public: - Eeprom(Context* parent); - ~Eeprom(); - - int init_defaults(char *manufacturer, char* product, char * serial); - int chip_id(unsigned int *chipid); - int build(unsigned char *output); - - int read(unsigned char *eeprom); - int write(unsigned char *eeprom); - int read_location(int eeprom_addr, unsigned short *eeprom_val); - int write_location(int eeprom_addr, unsigned short eeprom_val); - int erase(); - -private: - class Private; - boost::shared_ptr d; -}; - -/*! \brief Device list. - */ -class List -{ -public: - List(struct ftdi_device_list* devlist = 0); - ~List(); - - static List* find_all(int vendor, int product); - - /// List type storing "Context" objects - typedef std::list ListType; - /// Iterator type for the container - typedef ListType::iterator iterator; - /// Const iterator type for the container - typedef ListType::const_iterator const_iterator; - /// Reverse iterator type for the container - typedef ListType::reverse_iterator reverse_iterator; - /// Const reverse iterator type for the container - typedef ListType::const_reverse_iterator const_reverse_iterator; - - iterator begin(); - iterator end(); - const_iterator begin() const; - const_iterator end() const; - - reverse_iterator rbegin(); - reverse_iterator rend(); - const_reverse_iterator rbegin() const; - const_reverse_iterator rend() const; - - ListType::size_type size() const; - bool empty() const; - void clear(); - - void push_back(const Context& element); - void push_front(const Context& element); - - iterator erase(iterator pos); - iterator erase(iterator beg, iterator end); - -private: - class Private; - boost::shared_ptr d; -}; - -} - -#endif diff --git a/lib/libftdi/libftdi-1.0.kdev4 b/lib/libftdi/libftdi-1.0.kdev4 deleted file mode 100644 index 6da24c2..0000000 --- a/lib/libftdi/libftdi-1.0.kdev4 +++ /dev/null @@ -1,3 +0,0 @@ -[Project] -Manager=KDevCMakeManager -Name=libftdi-1.0 diff --git a/lib/libftdi/libftdi-config.in b/lib/libftdi/libftdi-config.in deleted file mode 100644 index a71de4e..0000000 --- a/lib/libftdi/libftdi-config.in +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -exec_prefix_set=no - -usage() -{ - cat <&2 -fi - -while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case $1 in - --prefix=*) - prefix=$optarg - if test $exec_prefix_set = no ; then - exec_prefix=$optarg - fi - ;; - --prefix) - echo_prefix=yes - ;; - --exec-prefix=*) - exec_prefix=$optarg - exec_prefix_set=yes - ;; - --exec-prefix) - echo_exec_prefix=yes - ;; - --version) - echo @VERSION@ - exit 0 - ;; - --cflags) - if test "@includedir@" != /usr/include ; then - includes="-I@includedir@" - fi - echo_cflags=yes - ;; - --libs) - echo_libs=yes - ;; - *) - usage 1 1>&2 - ;; - esac - shift -done - -if test "$echo_prefix" = "yes"; then - echo $prefix -fi -if test "$echo_exec_prefix" = "yes"; then - echo $exec_prefix -fi -if test "$echo_cflags" = "yes"; then - echo $includes -fi -if test "$echo_libs" = "yes"; then - echo -L@libdir@ -lftdi @LIBS@ -fi diff --git a/lib/libftdi/libftdi.gyp b/lib/libftdi/libftdi.gyp deleted file mode 100644 index 4aefcb3..0000000 --- a/lib/libftdi/libftdi.gyp +++ /dev/null @@ -1,25 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'libftdi', - 'type': 'static_library', - - 'dependencies': [ - '../libusb/libusb.gyp:libusb' - ], - 'sources': [ - 'src/ftdi.c', - 'src/ftdi_stream.c' - ], - 'include_dirs': [ - '.', - 'src' - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'src', - ], - }, - } - ] -} diff --git a/lib/libftdi/libftdi.lnt b/lib/libftdi/libftdi.lnt deleted file mode 100644 index 4ff6280..0000000 --- a/lib/libftdi/libftdi.lnt +++ /dev/null @@ -1,28 +0,0 @@ -// PC-Lint 9.00 settings ---iz:\usr\include\libusb-1.0 ---i../src ---i../ftdipp - --emacro(527, ftdi_error_return) // ignore "unreachable code" --emacro(717, ftdi_error_return) - --epu // Pointer to unsigned/signed of the same type is ok - -+fie // Allow enum to int conversion - --ecall(534, usb_close) // silence ignored return value from usb_close - -// Disable bogus BOOST warnings --emacro(58,BOOST_ASSERT) --emacro(506, BOOST_FOREACH) --emacro(666, BOOST_FOREACH) --esym(666, BOOST_FOREACH) --emacro(1023, BOOST_FOREACH) --emacro(1793, BOOST_FOREACH) --esym(665, BOOST_FOREACH) --e123 - -// Don't complain we are running with -wlib(0) -// as the boost headers can't be parsed properly --estring(686, -wlib(0)) --wlib(0) diff --git a/lib/libftdi/libftdi.pc.in b/lib/libftdi/libftdi.pc.in deleted file mode 100644 index fe87214..0000000 --- a/lib/libftdi/libftdi.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ -libusb_libs=@LIBUSB_1_0_LIBS@ -libusb_cflags=@LIBUSB_1_0_CFLAGS@ - -Name: libftdi -Description: Library to program and control the FTDI USB controller -Requires: -Version: @VERSION@ -Libs: -L${libdir} -lftdi ${libusb_libs} -Cflags: -I${includedir} ${libusb_cflags} - diff --git a/lib/libftdi/libftdi.spec.in b/lib/libftdi/libftdi.spec.in deleted file mode 100644 index ec4d063..0000000 --- a/lib/libftdi/libftdi.spec.in +++ /dev/null @@ -1,67 +0,0 @@ -Summary: Library to program and control the FTDI USB controller -Name: libftdi -Version: @VERSION@ -Release: 1 -License: LGPL for libftdi and GPLv2+linking exception for the C++ wrapper -Group: System Environment/Libraries -Vendor: Intra2net AG -Source: http://www.intra2net.com/en/developer/libftdi/download/%{name}-%{version}.tar.gz -Buildroot: /tmp/%{name}-%{version}-root -Requires: libusb -BuildRequires: libusb, libusb-devel, pkgconfig, doxygen -Prefix: /usr -URL: http://www.intra2net.com/en/developer/libftdi - -%package devel -Summary: Header files and static libraries for libftdi -Group: Development/Libraries -Requires: libftdi = %{version}, libusb-devel - -%description -Library to program and control the FTDI USB controller - -%description devel -Header files and static libraries for libftdi - -%prep -%setup -q - -%build - -PARAMS="" -./configure --prefix=%{prefix} \ - --libdir=%{_libdir} -%endif - -make - -%install -make DESTDIR=$RPM_BUILD_ROOT install - -# Remove example programs -rm -f $RPM_BUILD_ROOT/usr/bin/simple -rm -f $RPM_BUILD_ROOT/usr/bin/bitbang -rm -f $RPM_BUILD_ROOT/usr/bin/bitbang2 -rm -f $RPM_BUILD_ROOT/usr/bin/bitbang_ft2232 -rm -f $RPM_BUILD_ROOT/usr/bin/bitbang_cbus -rm -f $RPM_BUILD_ROOT/usr/bin/find_all -rm -f $RPM_BUILD_ROOT/usr/bin/find_all_pp -rm -f $RPM_BUILD_ROOT/usr/bin/serial_test -rm -f $RPM_BUILD_ROOT/usr/bin/baud_test - -%clean -rm -fr $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -%doc COPYING.LIB COPYING.GPL LICENSE -%{_libdir}/libftdi*.so* - -%files devel -%defattr(-,root,root) -%doc doc/html doc/man -%{_bindir}/libftdi-config -%{prefix}/include/*.h -%{prefix}/include/*.hpp -%{_libdir}/libftdi*.*a -%{_libdir}/pkgconfig/*.pc diff --git a/lib/libftdi/libftdipp.pc.in b/lib/libftdi/libftdipp.pc.in deleted file mode 100644 index ee81fef..0000000 --- a/lib/libftdi/libftdipp.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libftdipp -Description: C++ wrapper for libftdi -Requires: libftdi -Version: @VERSION@ -Libs: -L${libdir} -lftdipp -Cflags: -I${includedir} diff --git a/lib/libftdi/packages/99-libftdi.rules b/lib/libftdi/packages/99-libftdi.rules deleted file mode 100644 index 8487413..0000000 --- a/lib/libftdi/packages/99-libftdi.rules +++ /dev/null @@ -1,8 +0,0 @@ -# FTDI Devices: FT232BM/L/Q, FT245BM/L/Q, FT232RL/Q, FT245RL/Q, VNC1L with VDPS Firmware -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0664", GROUP="plugdev" - -# FTDI Devices: FT2232C/D/L, FT2232HL/Q -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0664", GROUP="plugdev" - -# FTDI Devices: FT4232HL/Q -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="0664", GROUP="plugdev" diff --git a/lib/libftdi/packages/CMakeLists.txt b/lib/libftdi/packages/CMakeLists.txt deleted file mode 100644 index 00b2696..0000000 --- a/lib/libftdi/packages/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Debian -if("${PACKAGE}" STREQUAL "Debian") - - # Settings - set(REVISION 0) - set(CPACK_GENERATOR "DEB" PARENT_SCOPE) - set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}-${REVISION} PARENT_SCOPE) - - # Dependencies - set(CPACK_DEBIAN_PACKAGE_DEPENDS "libusb-0.1-4" PARENT_SCOPE) - set(DEBIAN_PACKAGE_BUILDS_DEPENDS "cmake, libusb-dev" PARENT_SCOPE) - - # Bundles - message("-- Installing udev rules to /etc/udev/rules.d") - install(FILES 99-libftdi.rules - DESTINATION /etc/udev/rules.d) - -endif("${PACKAGE}" STREQUAL "Debian") - -# General RPM rules -set(CPACK_RPM_PACKAGE_DEPENDS "libusb" PARENT_SCOPE) diff --git a/lib/libftdi/src/CMakeLists.txt b/lib/libftdi/src/CMakeLists.txt deleted file mode 100644 index 7ce9eda..0000000 --- a/lib/libftdi/src/CMakeLists.txt +++ /dev/null @@ -1,77 +0,0 @@ -# Includes -include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ) - -# Version information -set(SNAPSHOT_VERSION "unknown") -execute_process(COMMAND git describe - OUTPUT_VARIABLE GIT_DESCRIBE_OUTPUT - RESULT_VARIABLE GIT_DESCRIBE_RESULT - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -if(${GIT_DESCRIBE_RESULT} STREQUAL 0) - set(SNAPSHOT_VERSION ${GIT_DESCRIBE_OUTPUT}) -endif(${GIT_DESCRIBE_RESULT} STREQUAL 0) -message(STATUS "Detected git snapshot version: ${SNAPSHOT_VERSION}") - -configure_file(ftdi_version_i.h.in "${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h" @ONLY) - -# Targets -set(c_sources ftdi.c ftdi_stream.c) -set(c_headers ftdi.h) - -add_library(ftdi SHARED ${c_sources}) - -math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases -set_target_properties(ftdi PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2) - -# Static library -add_library(ftdi-static STATIC ${c_sources}) -set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi") - -# Prevent clobbering each other during the build -set_target_properties(ftdi PROPERTIES CLEAN_DIRECT_OUTPUT 1) -set_target_properties(ftdi-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) - -# Dependencies -target_link_libraries(ftdi ${LIBUSB_LIBRARIES}) - -# Install -if(${UNIX}) - - install( TARGETS ftdi - LIBRARY DESTINATION lib${LIB_SUFFIX} - COMPONENT sharedlibs - ) - - install( TARGETS ftdi-static - ARCHIVE DESTINATION lib${LIB_SUFFIX} - COMPONENT staticlibs - ) - - install( FILES ${c_headers} - DESTINATION include/${PROJECT_NAME} - COMPONENT headers - ) - -endif(${UNIX}) - -if(${WIN32}) - - install( TARGETS ftdi - DESTINATION bin - COMPONENT sharedlibs - ) - - install( TARGETS ftdi-static - DESTINATION bin - COMPONENT staticlibs - ) - - install( FILES ${c_headers} - DESTINATION include/${PROJECT_NAME} - COMPONENT headers - ) - -endif(${WIN32}) diff --git a/lib/libftdi/src/ftdi.c b/lib/libftdi/src/ftdi.c deleted file mode 100644 index 8650be2..0000000 --- a/lib/libftdi/src/ftdi.c +++ /dev/null @@ -1,4122 +0,0 @@ -/*************************************************************************** - ftdi.c - description - ------------------- - begin : Fri Apr 4 2003 - copyright : (C) 2003-2011 by Intra2net AG and the libftdi developers - email : opensource@intra2net.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License * - * version 2.1 as published by the Free Software Foundation; * - * * - ***************************************************************************/ - -/** - \mainpage libftdi API documentation - - Library to talk to FTDI chips. You find the latest versions of libftdi at - http://www.intra2net.com/en/developer/libftdi/ - - The library is easy to use. Have a look at this short example: - \include simple.c - - More examples can be found in the "examples" directory. -*/ -/** \addtogroup libftdi */ -/* @{ */ - -#include -#include -#include -#include -#include - -#include "ftdi_i.h" -#include "ftdi.h" -#include "ftdi_version_i.h" - -#define ftdi_error_return(code, str) do { \ - ftdi->error_str = str; \ - return code; \ - } while(0); - -#define ftdi_error_return_free_device_list(code, str, devs) do { \ - libusb_free_device_list(devs,1); \ - ftdi->error_str = str; \ - return code; \ - } while(0); - - -/** - Internal function to close usb device pointer. - Sets ftdi->usb_dev to NULL. - \internal - - \param ftdi pointer to ftdi_context - - \retval none -*/ -static void ftdi_usb_close_internal (struct ftdi_context *ftdi) -{ - if (ftdi && ftdi->usb_dev) - { - libusb_close (ftdi->usb_dev); - ftdi->usb_dev = NULL; - if(ftdi->eeprom) - ftdi->eeprom->initialized_for_connected_device = 0; - } -} - -/** - Initializes a ftdi_context. - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: couldn't allocate read buffer - \retval -2: couldn't allocate struct buffer - \retval -3: libusb_init() failed - - \remark This should be called before all functions -*/ -int ftdi_init(struct ftdi_context *ftdi) -{ - struct ftdi_eeprom* eeprom = (struct ftdi_eeprom *)malloc(sizeof(struct ftdi_eeprom)); - ftdi->usb_ctx = NULL; - ftdi->usb_dev = NULL; - ftdi->usb_read_timeout = 5000; - ftdi->usb_write_timeout = 5000; - - ftdi->type = TYPE_BM; /* chip type */ - ftdi->baudrate = -1; - ftdi->bitbang_enabled = 0; /* 0: normal mode 1: any of the bitbang modes enabled */ - - ftdi->readbuffer = NULL; - ftdi->readbuffer_offset = 0; - ftdi->readbuffer_remaining = 0; - ftdi->writebuffer_chunksize = 4096; - ftdi->max_packet_size = 0; - ftdi->error_str = NULL; - ftdi->module_detach_mode = AUTO_DETACH_SIO_MODULE; - - if (libusb_init(&ftdi->usb_ctx) < 0) - ftdi_error_return(-3, "libusb_init() failed"); - - ftdi_set_interface(ftdi, INTERFACE_ANY); - ftdi->bitbang_mode = 1; /* when bitbang is enabled this holds the number of the mode */ - - if (eeprom == 0) - ftdi_error_return(-2, "Can't malloc struct ftdi_eeprom"); - memset(eeprom, 0, sizeof(struct ftdi_eeprom)); - ftdi->eeprom = eeprom; - - /* All fine. Now allocate the readbuffer */ - return ftdi_read_data_set_chunksize(ftdi, 4096); -} - -/** - Allocate and initialize a new ftdi_context - - \return a pointer to a new ftdi_context, or NULL on failure -*/ -struct ftdi_context *ftdi_new(void) -{ - struct ftdi_context * ftdi = (struct ftdi_context *)malloc(sizeof(struct ftdi_context)); - - if (ftdi == NULL) - { - return NULL; - } - - if (ftdi_init(ftdi) != 0) - { - free(ftdi); - return NULL; - } - - return ftdi; -} - -/** - Open selected channels on a chip, otherwise use first channel. - - \param ftdi pointer to ftdi_context - \param interface Interface to use for FT2232C/2232H/4232H chips. - - \retval 0: all fine - \retval -1: unknown interface - \retval -2: USB device unavailable - \retval -3: Device already open, interface can't be set in that state -*/ -int ftdi_set_interface(struct ftdi_context *ftdi, enum ftdi_interface interface) -{ - if (ftdi == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (ftdi->usb_dev != NULL) - { - int check_interface = interface; - if (check_interface == INTERFACE_ANY) - check_interface = INTERFACE_A; - - if (ftdi->index != check_interface) - ftdi_error_return(-3, "Interface can not be changed on an already open device"); - } - - switch (interface) - { - case INTERFACE_ANY: - case INTERFACE_A: - ftdi->interface = 0; - ftdi->index = INTERFACE_A; - ftdi->in_ep = 0x02; - ftdi->out_ep = 0x81; - break; - case INTERFACE_B: - ftdi->interface = 1; - ftdi->index = INTERFACE_B; - 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"); - } - return 0; -} - -/** - Deinitializes a ftdi_context. - - \param ftdi pointer to ftdi_context -*/ -void ftdi_deinit(struct ftdi_context *ftdi) -{ - if (ftdi == NULL) - return; - - ftdi_usb_close_internal (ftdi); - - if (ftdi->readbuffer != NULL) - { - free(ftdi->readbuffer); - ftdi->readbuffer = NULL; - } - - if (ftdi->eeprom != NULL) - { - if (ftdi->eeprom->manufacturer != 0) - { - free(ftdi->eeprom->manufacturer); - ftdi->eeprom->manufacturer = 0; - } - if (ftdi->eeprom->product != 0) - { - free(ftdi->eeprom->product); - ftdi->eeprom->product = 0; - } - if (ftdi->eeprom->serial != 0) - { - free(ftdi->eeprom->serial); - ftdi->eeprom->serial = 0; - } - free(ftdi->eeprom); - ftdi->eeprom = NULL; - } - - if (ftdi->usb_ctx) - { - libusb_exit(ftdi->usb_ctx); - ftdi->usb_ctx = NULL; - } -} - -/** - Deinitialize and free an ftdi_context. - - \param ftdi pointer to ftdi_context -*/ -void ftdi_free(struct ftdi_context *ftdi) -{ - ftdi_deinit(ftdi); - free(ftdi); -} - -/** - Use an already open libusb device. - - \param ftdi pointer to ftdi_context - \param usb libusb libusb_device_handle to use -*/ -void ftdi_set_usbdev (struct ftdi_context *ftdi, libusb_device_handle *usb) -{ - if (ftdi == NULL) - return; - - ftdi->usb_dev = usb; -} - -/** - * @brief Get libftdi library version - * - * @return ftdi_version_info Library version information - **/ -struct ftdi_version_info ftdi_get_library_version() -{ - struct ftdi_version_info ver; - - ver.major = FTDI_MAJOR_VERSION; - ver.minor = FTDI_MINOR_VERSION; - ver.micro = FTDI_MICRO_VERSION; - ver.version_str = FTDI_VERSION_STRING; - ver.snapshot_str = FTDI_SNAPSHOT_VERSION; - - return ver; -} - -/** - Finds all ftdi devices with given VID:PID on the usb bus. Creates a new - ftdi_device_list which needs to be deallocated by ftdi_list_free() after - use. With VID:PID 0:0, search for the default devices - (0x403:0x6001, 0x403:0x6010, 0x403:0x6011, 0x403:0x6014) - - \param ftdi pointer to ftdi_context - \param devlist Pointer where to store list of found devices - \param vendor Vendor ID to search for - \param product Product ID to search for - - \retval >0: number of devices found - \retval -3: out of memory - \retval -5: libusb_get_device_list() failed - \retval -6: libusb_get_device_descriptor() failed -*/ -int ftdi_usb_find_all(struct ftdi_context *ftdi, struct ftdi_device_list **devlist, int vendor, int product) -{ - struct ftdi_device_list **curdev; - libusb_device *dev; - libusb_device **devs; - int count = 0; - int i = 0; - - if (libusb_get_device_list(ftdi->usb_ctx, &devs) < 0) - ftdi_error_return(-5, "libusb_get_device_list() failed"); - - curdev = devlist; - *curdev = NULL; - - while ((dev = devs[i++]) != NULL) - { - struct libusb_device_descriptor desc; - - if (libusb_get_device_descriptor(dev, &desc) < 0) - ftdi_error_return_free_device_list(-6, "libusb_get_device_descriptor() failed", devs); - - if (((vendor != 0 && product != 0) && - desc.idVendor == vendor && desc.idProduct == product) || - ((vendor == 0 && product == 0) && - (desc.idVendor == 0x403) && (desc.idProduct == 0x6001 || desc.idProduct == 0x6010 - || desc.idProduct == 0x6011 || desc.idProduct == 0x6014))) - { - *curdev = (struct ftdi_device_list*)malloc(sizeof(struct ftdi_device_list)); - if (!*curdev) - ftdi_error_return_free_device_list(-3, "out of memory", devs); - - (*curdev)->next = NULL; - (*curdev)->dev = dev; - libusb_ref_device(dev); - curdev = &(*curdev)->next; - count++; - } - } - libusb_free_device_list(devs,1); - return count; -} - -/** - Frees a usb device list. - - \param devlist USB device list created by ftdi_usb_find_all() -*/ -void ftdi_list_free(struct ftdi_device_list **devlist) -{ - struct ftdi_device_list *curdev, *next; - - for (curdev = *devlist; curdev != NULL;) - { - next = curdev->next; - libusb_unref_device(curdev->dev); - free(curdev); - curdev = next; - } - - *devlist = NULL; -} - -/** - Frees a usb device list. - - \param devlist USB device list created by ftdi_usb_find_all() -*/ -void ftdi_list_free2(struct ftdi_device_list *devlist) -{ - ftdi_list_free(&devlist); -} - -/** - Return device ID strings from the usb device. - - The parameters manufacturer, description and serial may be NULL - or pointer to buffers to store the fetched strings. - - \note Use this function only in combination with ftdi_usb_find_all() - as it closes the internal "usb_dev" after use. - - \param ftdi pointer to ftdi_context - \param dev libusb usb_dev to use - \param manufacturer Store manufacturer string here if not NULL - \param mnf_len Buffer size of manufacturer string - \param description Store product description string here if not NULL - \param desc_len Buffer size of product description string - \param serial Store serial string here if not NULL - \param serial_len Buffer size of serial string - - \retval 0: all fine - \retval -1: wrong arguments - \retval -4: unable to open device - \retval -7: get product manufacturer failed - \retval -8: get product description failed - \retval -9: get serial number failed - \retval -11: libusb_get_device_descriptor() failed -*/ -int ftdi_usb_get_strings(struct ftdi_context * ftdi, struct libusb_device * dev, - char * manufacturer, int mnf_len, char * description, int desc_len, char * serial, int serial_len) -{ - struct libusb_device_descriptor desc; - - if ((ftdi==NULL) || (dev==NULL)) - return -1; - - if (libusb_open(dev, &ftdi->usb_dev) < 0) - ftdi_error_return(-4, "libusb_open() failed"); - - if (libusb_get_device_descriptor(dev, &desc) < 0) - ftdi_error_return(-11, "libusb_get_device_descriptor() failed"); - - if (manufacturer != NULL) - { - if (libusb_get_string_descriptor_ascii(ftdi->usb_dev, desc.iManufacturer, (unsigned char *)manufacturer, mnf_len) < 0) - { - ftdi_usb_close_internal (ftdi); - ftdi_error_return(-7, "libusb_get_string_descriptor_ascii() failed"); - } - } - - if (description != NULL) - { - if (libusb_get_string_descriptor_ascii(ftdi->usb_dev, desc.iProduct, (unsigned char *)description, desc_len) < 0) - { - ftdi_usb_close_internal (ftdi); - ftdi_error_return(-8, "libusb_get_string_descriptor_ascii() failed"); - } - } - - if (serial != NULL) - { - if (libusb_get_string_descriptor_ascii(ftdi->usb_dev, desc.iSerialNumber, (unsigned char *)serial, serial_len) < 0) - { - ftdi_usb_close_internal (ftdi); - ftdi_error_return(-9, "libusb_get_string_descriptor_ascii() failed"); - } - } - - ftdi_usb_close_internal (ftdi); - - return 0; -} - -/** - * Internal function to determine the maximum packet size. - * \param ftdi pointer to ftdi_context - * \param dev libusb usb_dev to use - * \retval Maximum packet size for this device - */ -static unsigned int _ftdi_determine_max_packet_size(struct ftdi_context *ftdi, libusb_device *dev) -{ - struct libusb_device_descriptor desc; - struct libusb_config_descriptor *config0; - unsigned int packet_size; - - // Sanity check - if (ftdi == NULL || dev == NULL) - return 64; - - // Determine maximum packet size. Init with default value. - // New hi-speed devices from FTDI use a packet size of 512 bytes - // but could be connected to a normal speed USB hub -> 64 bytes packet size. - if (ftdi->type == TYPE_2232H || ftdi->type == TYPE_4232H || ftdi->type == TYPE_232H ) - packet_size = 512; - else - packet_size = 64; - - if (libusb_get_device_descriptor(dev, &desc) < 0) - return packet_size; - - if (libusb_get_config_descriptor(dev, 0, &config0) < 0) - return packet_size; - - if (desc.bNumConfigurations > 0) - { - if (ftdi->interface < config0->bNumInterfaces) - { - struct libusb_interface interface = config0->interface[ftdi->interface]; - if (interface.num_altsetting > 0) - { - struct libusb_interface_descriptor descriptor = interface.altsetting[0]; - if (descriptor.bNumEndpoints > 0) - { - packet_size = descriptor.endpoint[0].wMaxPacketSize; - } - } - } - } - - libusb_free_config_descriptor (config0); - return packet_size; -} - -/** - Opens a ftdi device given by an usb_device. - - \param ftdi pointer to ftdi_context - \param dev libusb usb_dev to use - - \retval 0: all fine - \retval -3: unable to config device - \retval -4: unable to open device - \retval -5: unable to claim device - \retval -6: reset failed - \retval -7: set baudrate failed - \retval -8: ftdi context invalid - \retval -9: libusb_get_device_descriptor() failed - \retval -10: libusb_get_config_descriptor() failed - \retval -11: libusb_detach_kernel_driver() failed - \retval -12: libusb_get_configuration() failed -*/ -int ftdi_usb_open_dev(struct ftdi_context *ftdi, libusb_device *dev) -{ - struct libusb_device_descriptor desc; - struct libusb_config_descriptor *config0; - int cfg, cfg0, detach_errno = 0; - - if (ftdi == NULL) - ftdi_error_return(-8, "ftdi context invalid"); - - if (libusb_open(dev, &ftdi->usb_dev) < 0) - ftdi_error_return(-4, "libusb_open() failed"); - - if (libusb_get_device_descriptor(dev, &desc) < 0) - ftdi_error_return(-9, "libusb_get_device_descriptor() failed"); - - if (libusb_get_config_descriptor(dev, 0, &config0) < 0) - ftdi_error_return(-10, "libusb_get_config_descriptor() failed"); - cfg0 = config0->bConfigurationValue; - libusb_free_config_descriptor (config0); - - // Try to detach ftdi_sio kernel module. - // - // The return code is kept in a separate variable and only parsed - // if usb_set_configuration() or usb_claim_interface() fails as the - // detach operation might be denied and everything still works fine. - // Likely scenario is a static ftdi_sio kernel module. - if (ftdi->module_detach_mode == AUTO_DETACH_SIO_MODULE) - { - if (libusb_detach_kernel_driver(ftdi->usb_dev, ftdi->interface) !=0) - detach_errno = errno; - } - - if (libusb_get_configuration (ftdi->usb_dev, &cfg) < 0) - ftdi_error_return(-12, "libusb_get_configuration () failed"); - // set configuration (needed especially for windows) - // tolerate EBUSY: one device with one configuration, but two interfaces - // and libftdi sessions to both interfaces (e.g. FT2232) - if (desc.bNumConfigurations > 0 && cfg != cfg0) - { - if (libusb_set_configuration(ftdi->usb_dev, cfg0) < 0) - { - ftdi_usb_close_internal (ftdi); - if (detach_errno == EPERM) - { - ftdi_error_return(-8, "inappropriate permissions on device!"); - } - else - { - ftdi_error_return(-3, "unable to set usb configuration. Make sure the default FTDI driver is not in use"); - } - } - } - - if (libusb_claim_interface(ftdi->usb_dev, ftdi->interface) < 0) - { - ftdi_usb_close_internal (ftdi); - if (detach_errno == EPERM) - { - ftdi_error_return(-8, "inappropriate permissions on device!"); - } - else - { - ftdi_error_return(-5, "unable to claim usb device. Make sure the default FTDI driver is not in use"); - } - } - - if (ftdi_usb_reset (ftdi) != 0) - { - ftdi_usb_close_internal (ftdi); - ftdi_error_return(-6, "ftdi_usb_reset failed"); - } - - // Try to guess chip type - // Bug in the BM type chips: bcdDevice is 0x200 for serial == 0 - if (desc.bcdDevice == 0x400 || (desc.bcdDevice == 0x200 - && desc.iSerialNumber == 0)) - ftdi->type = TYPE_BM; - else if (desc.bcdDevice == 0x200) - ftdi->type = TYPE_AM; - else if (desc.bcdDevice == 0x500) - ftdi->type = TYPE_2232C; - else if (desc.bcdDevice == 0x600) - ftdi->type = TYPE_R; - else if (desc.bcdDevice == 0x700) - ftdi->type = TYPE_2232H; - else if (desc.bcdDevice == 0x800) - ftdi->type = TYPE_4232H; - else if (desc.bcdDevice == 0x900) - ftdi->type = TYPE_232H; - - // Determine maximum packet size - ftdi->max_packet_size = _ftdi_determine_max_packet_size(ftdi, dev); - - if (ftdi_set_baudrate (ftdi, 9600) != 0) - { - ftdi_usb_close_internal (ftdi); - ftdi_error_return(-7, "set baudrate failed"); - } - - ftdi_error_return(0, "all fine"); -} - -/** - Opens the first device with a given vendor and product ids. - - \param ftdi pointer to ftdi_context - \param vendor Vendor ID - \param product Product ID - - \retval same as ftdi_usb_open_desc() -*/ -int ftdi_usb_open(struct ftdi_context *ftdi, int vendor, int product) -{ - return ftdi_usb_open_desc(ftdi, vendor, product, NULL, NULL); -} - -/** - Opens the first device with a given, vendor id, product id, - description and serial. - - \param ftdi pointer to ftdi_context - \param vendor Vendor ID - \param product Product ID - \param description Description to search for. Use NULL if not needed. - \param serial Serial to search for. Use NULL if not needed. - - \retval 0: all fine - \retval -3: usb device not found - \retval -4: unable to open device - \retval -5: unable to claim device - \retval -6: reset failed - \retval -7: set baudrate failed - \retval -8: get product description failed - \retval -9: get serial number failed - \retval -12: libusb_get_device_list() failed - \retval -13: libusb_get_device_descriptor() failed -*/ -int ftdi_usb_open_desc(struct ftdi_context *ftdi, int vendor, int product, - const char* description, const char* serial) -{ - return ftdi_usb_open_desc_index(ftdi,vendor,product,description,serial,0); -} - -/** - Opens the index-th device with a given, vendor id, product id, - description and serial. - - \param ftdi pointer to ftdi_context - \param vendor Vendor ID - \param product Product ID - \param description Description to search for. Use NULL if not needed. - \param serial Serial to search for. Use NULL if not needed. - \param index Number of matching device to open if there are more than one, starts with 0. - - \retval 0: all fine - \retval -1: usb_find_busses() failed - \retval -2: usb_find_devices() failed - \retval -3: usb device not found - \retval -4: unable to open device - \retval -5: unable to claim device - \retval -6: reset failed - \retval -7: set baudrate failed - \retval -8: get product description failed - \retval -9: get serial number failed - \retval -10: unable to close device - \retval -11: ftdi context invalid -*/ -int ftdi_usb_open_desc_index(struct ftdi_context *ftdi, int vendor, int product, - const char* description, const char* serial, unsigned int index) -{ - libusb_device *dev; - libusb_device **devs; - char string[256]; - int i = 0; - - if (ftdi == NULL) - ftdi_error_return(-11, "ftdi context invalid"); - - if (libusb_get_device_list(ftdi->usb_ctx, &devs) < 0) - ftdi_error_return(-12, "libusb_get_device_list() failed"); - - while ((dev = devs[i++]) != NULL) - { - struct libusb_device_descriptor desc; - int res; - - if (libusb_get_device_descriptor(dev, &desc) < 0) - ftdi_error_return_free_device_list(-13, "libusb_get_device_descriptor() failed", devs); - - if (desc.idVendor == vendor && desc.idProduct == product) - { - if (libusb_open(dev, &ftdi->usb_dev) < 0) - ftdi_error_return_free_device_list(-4, "usb_open() failed", devs); - - if (description != NULL) - { - if (libusb_get_string_descriptor_ascii(ftdi->usb_dev, desc.iProduct, (unsigned char *)string, sizeof(string)) < 0) - { - ftdi_usb_close_internal (ftdi); - ftdi_error_return_free_device_list(-8, "unable to fetch product description", devs); - } - if (strncmp(string, description, sizeof(string)) != 0) - { - ftdi_usb_close_internal (ftdi); - continue; - } - } - if (serial != NULL) - { - if (libusb_get_string_descriptor_ascii(ftdi->usb_dev, desc.iSerialNumber, (unsigned char *)string, sizeof(string)) < 0) - { - ftdi_usb_close_internal (ftdi); - ftdi_error_return_free_device_list(-9, "unable to fetch serial number", devs); - } - if (strncmp(string, serial, sizeof(string)) != 0) - { - ftdi_usb_close_internal (ftdi); - continue; - } - } - - ftdi_usb_close_internal (ftdi); - - if (index > 0) - { - index--; - continue; - } - - res = ftdi_usb_open_dev(ftdi, dev); - libusb_free_device_list(devs,1); - return res; - } - } - - // device not found - ftdi_error_return_free_device_list(-3, "device not found", devs); -} - -/** - Opens the ftdi-device described by a description-string. - Intended to be used for parsing a device-description given as commandline argument. - - \param ftdi pointer to ftdi_context - \param description NULL-terminated description-string, using this format: - \li d:\ path of bus and device-node (e.g. "003/001") within usb device tree (usually at /proc/bus/usb/) - \li i:\:\ first device with given vendor and product id, ids can be decimal, octal (preceded by "0") or hex (preceded by "0x") - \li i:\:\:\ as above with index being the number of the device (starting with 0) if there are more than one - \li s:\:\:\ first device with given vendor id, product id and serial string - - \note The description format may be extended in later versions. - - \retval 0: all fine - \retval -2: libusb_get_device_list() failed - \retval -3: usb device not found - \retval -4: unable to open device - \retval -5: unable to claim device - \retval -6: reset failed - \retval -7: set baudrate failed - \retval -8: get product description failed - \retval -9: get serial number failed - \retval -10: unable to close device - \retval -11: illegal description format - \retval -12: ftdi context invalid -*/ -int ftdi_usb_open_string(struct ftdi_context *ftdi, const char* description) -{ - if (ftdi == NULL) - ftdi_error_return(-12, "ftdi context invalid"); - - if (description[0] == 0 || description[1] != ':') - ftdi_error_return(-11, "illegal description format"); - - if (description[0] == 'd') - { - libusb_device *dev; - libusb_device **devs; - unsigned int bus_number, device_address; - int i = 0; - - if (libusb_get_device_list(ftdi->usb_ctx, &devs) < 0) - ftdi_error_return(-2, "libusb_get_device_list() failed"); - - /* XXX: This doesn't handle symlinks/odd paths/etc... */ - if (sscanf (description + 2, "%u/%u", &bus_number, &device_address) != 2) - ftdi_error_return_free_device_list(-11, "illegal description format", devs); - - while ((dev = devs[i++]) != NULL) - { - int ret; - if (bus_number == libusb_get_bus_number (dev) - && device_address == libusb_get_device_address (dev)) - { - ret = ftdi_usb_open_dev(ftdi, dev); - libusb_free_device_list(devs,1); - return ret; - } - } - - // device not found - ftdi_error_return_free_device_list(-3, "device not found", devs); - } - else if (description[0] == 'i' || description[0] == 's') - { - unsigned int vendor; - unsigned int product; - unsigned int index=0; - const char *serial=NULL; - const char *startp, *endp; - - errno=0; - startp=description+2; - vendor=strtoul((char*)startp,(char**)&endp,0); - if (*endp != ':' || endp == startp || errno != 0) - ftdi_error_return(-11, "illegal description format"); - - startp=endp+1; - product=strtoul((char*)startp,(char**)&endp,0); - if (endp == startp || errno != 0) - ftdi_error_return(-11, "illegal description format"); - - if (description[0] == 'i' && *endp != 0) - { - /* optional index field in i-mode */ - if (*endp != ':') - ftdi_error_return(-11, "illegal description format"); - - startp=endp+1; - index=strtoul((char*)startp,(char**)&endp,0); - if (*endp != 0 || endp == startp || errno != 0) - ftdi_error_return(-11, "illegal description format"); - } - if (description[0] == 's') - { - if (*endp != ':') - ftdi_error_return(-11, "illegal description format"); - - /* rest of the description is the serial */ - serial=endp+1; - } - - return ftdi_usb_open_desc_index(ftdi, vendor, product, NULL, serial, index); - } - else - { - ftdi_error_return(-11, "illegal description format"); - } -} - -/** - Resets the ftdi device. - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: FTDI reset failed - \retval -2: USB device unavailable -*/ -int ftdi_usb_reset(struct ftdi_context *ftdi) -{ - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_RESET_REQUEST, SIO_RESET_SIO, - ftdi->index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1,"FTDI reset failed"); - - // Invalidate data in the readbuffer - ftdi->readbuffer_offset = 0; - ftdi->readbuffer_remaining = 0; - - return 0; -} - -/** - Clears the read buffer on the chip and the internal read buffer. - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: read buffer purge failed - \retval -2: USB device unavailable -*/ -int ftdi_usb_purge_rx_buffer(struct ftdi_context *ftdi) -{ - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_RESET_REQUEST, SIO_RESET_PURGE_RX, - ftdi->index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "FTDI purge of RX buffer failed"); - - // Invalidate data in the readbuffer - ftdi->readbuffer_offset = 0; - ftdi->readbuffer_remaining = 0; - - return 0; -} - -/** - Clears the write buffer on the chip. - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: write buffer purge failed - \retval -2: USB device unavailable -*/ -int ftdi_usb_purge_tx_buffer(struct ftdi_context *ftdi) -{ - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_RESET_REQUEST, SIO_RESET_PURGE_TX, - ftdi->index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "FTDI purge of TX buffer failed"); - - return 0; -} - -/** - Clears the buffers on the chip and the internal read buffer. - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: read buffer purge failed - \retval -2: write buffer purge failed - \retval -3: USB device unavailable -*/ -int ftdi_usb_purge_buffers(struct ftdi_context *ftdi) -{ - int result; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-3, "USB device unavailable"); - - result = ftdi_usb_purge_rx_buffer(ftdi); - if (result < 0) - return -1; - - result = ftdi_usb_purge_tx_buffer(ftdi); - if (result < 0) - return -2; - - return 0; -} - - - -/** - Closes the ftdi device. Call ftdi_deinit() if you're cleaning up. - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: usb_release failed - \retval -3: ftdi context invalid -*/ -int ftdi_usb_close(struct ftdi_context *ftdi) -{ - int rtn = 0; - - if (ftdi == NULL) - ftdi_error_return(-3, "ftdi context invalid"); - - if (ftdi->usb_dev != NULL) - if (libusb_release_interface(ftdi->usb_dev, ftdi->interface) < 0) - rtn = -1; - - ftdi_usb_close_internal (ftdi); - - return rtn; -} - -/* ftdi_to_clkbits_AM For the AM device, convert a requested baudrate - to encoded divisor and the achievable baudrate - Function is only used internally - \internal - - See AN120 - clk/1 -> 0 - clk/1.5 -> 1 - clk/2 -> 2 - From /2, 0.125/ 0.25 and 0.5 steps may be taken - The fractional part has frac_code encoding -*/ -static int ftdi_to_clkbits_AM(int baudrate, unsigned long *encoded_divisor) - -{ - static const char frac_code[8] = {0, 3, 2, 4, 1, 5, 6, 7}; - static const char am_adjust_up[8] = {0, 0, 0, 1, 0, 3, 2, 1}; - static const char am_adjust_dn[8] = {0, 0, 0, 1, 0, 1, 2, 3}; - int divisor, best_divisor, best_baud, best_baud_diff; - divisor = 24000000 / baudrate; - int i; - - // Round down to supported fraction (AM only) - divisor -= am_adjust_dn[divisor & 7]; - - // Try this divisor and the one above it (because division rounds down) - best_divisor = 0; - best_baud = 0; - best_baud_diff = 0; - for (i = 0; i < 2; i++) - { - int try_divisor = divisor + i; - int baud_estimate; - int baud_diff; - - // Round up to supported divisor value - if (try_divisor <= 8) - { - // Round up to minimum supported divisor - try_divisor = 8; - } - else if (divisor < 16) - { - // AM doesn't support divisors 9 through 15 inclusive - try_divisor = 16; - } - else - { - // Round up to supported fraction (AM only) - try_divisor += am_adjust_up[try_divisor & 7]; - if (try_divisor > 0x1FFF8) - { - // Round down to maximum supported divisor value (for AM) - try_divisor = 0x1FFF8; - } - } - // Get estimated baud rate (to nearest integer) - baud_estimate = (24000000 + (try_divisor / 2)) / try_divisor; - // Get absolute difference from requested baud rate - if (baud_estimate < baudrate) - { - baud_diff = baudrate - baud_estimate; - } - else - { - baud_diff = baud_estimate - baudrate; - } - if (i == 0 || baud_diff < best_baud_diff) - { - // Closest to requested baud rate so far - best_divisor = try_divisor; - best_baud = baud_estimate; - best_baud_diff = baud_diff; - if (baud_diff == 0) - { - // Spot on! No point trying - break; - } - } - } - // Encode the best divisor value - *encoded_divisor = (best_divisor >> 3) | (frac_code[best_divisor & 7] << 14); - // Deal with special cases for encoded value - if (*encoded_divisor == 1) - { - *encoded_divisor = 0; // 3000000 baud - } - else if (*encoded_divisor == 0x4001) - { - *encoded_divisor = 1; // 2000000 baud (BM only) - } - return best_baud; -} - -/* ftdi_to_clkbits Convert a requested baudrate for a given system clock and predivisor - to encoded divisor and the achievable baudrate - Function is only used internally - \internal - - See AN120 - clk/1 -> 0 - clk/1.5 -> 1 - clk/2 -> 2 - From /2, 0.125 steps may be taken. - The fractional part has frac_code encoding - - value[13:0] of value is the divisor - index[9] mean 12 MHz Base(120 MHz/10) rate versus 3 MHz (48 MHz/16) else - - H Type have all features above with - {index[8],value[15:14]} is the encoded subdivisor - - FT232R, FT2232 and FT232BM have no option for 12 MHz and with - {index[0],value[15:14]} is the encoded subdivisor - - AM Type chips have only four fractional subdivisors at value[15:14] - for subdivisors 0, 0.5, 0.25, 0.125 -*/ -static int ftdi_to_clkbits(int baudrate, unsigned int clk, int clk_div, unsigned long *encoded_divisor) -{ - static const char frac_code[8] = {0, 3, 2, 4, 1, 5, 6, 7}; - int best_baud = 0; - int divisor, best_divisor; - if (baudrate >= clk/clk_div) - { - *encoded_divisor = 0; - best_baud = clk/clk_div; - } - else if (baudrate >= clk/(clk_div + clk_div/2)) - { - *encoded_divisor = 1; - best_baud = clk/(clk_div + clk_div/2); - } - else if (baudrate >= clk/(2*clk_div)) - { - *encoded_divisor = 2; - best_baud = clk/(2*clk_div); - } - else - { - /* We divide by 16 to have 3 fractional bits and one bit for rounding */ - divisor = clk*16/clk_div / baudrate; - if (divisor & 1) /* Decide if to round up or down*/ - best_divisor = divisor /2 +1; - else - best_divisor = divisor/2; - if(best_divisor > 0x20000) - best_divisor = 0x1ffff; - best_baud = clk*16/clk_div/best_divisor; - if (best_baud & 1) /* Decide if to round up or down*/ - best_baud = best_baud /2 +1; - else - best_baud = best_baud /2; - *encoded_divisor = (best_divisor >> 3) | (frac_code[best_divisor & 0x7] << 14); - } - return best_baud; -} -/** - ftdi_convert_baudrate returns nearest supported baud rate to that requested. - Function is only used internally - \internal -*/ -static int ftdi_convert_baudrate(int baudrate, struct ftdi_context *ftdi, - unsigned short *value, unsigned short *index) -{ - int best_baud; - unsigned long encoded_divisor; - - if (baudrate <= 0) - { - // Return error - return -1; - } - -#define H_CLK 120000000 -#define C_CLK 48000000 - if ((ftdi->type == TYPE_2232H) || (ftdi->type == TYPE_4232H) || (ftdi->type == TYPE_232H )) - { - if(baudrate*10 > H_CLK /0x3fff) - { - /* On H Devices, use 12 000 000 Baudrate when possible - We have a 14 bit divisor, a 1 bit divisor switch (10 or 16) - three fractional bits and a 120 MHz clock - Assume AN_120 "Sub-integer divisors between 0 and 2 are not allowed" holds for - DIV/10 CLK too, so /1, /1.5 and /2 can be handled the same*/ - best_baud = ftdi_to_clkbits(baudrate, H_CLK, 10, &encoded_divisor); - encoded_divisor |= 0x20000; /* switch on CLK/10*/ - } - else - best_baud = ftdi_to_clkbits(baudrate, C_CLK, 16, &encoded_divisor); - } - else if ((ftdi->type == TYPE_BM) || (ftdi->type == TYPE_2232C) || (ftdi->type == TYPE_R )) - { - best_baud = ftdi_to_clkbits(baudrate, C_CLK, 16, &encoded_divisor); - } - else - { - best_baud = ftdi_to_clkbits_AM(baudrate, &encoded_divisor); - } - // Split into "value" and "index" values - *value = (unsigned short)(encoded_divisor & 0xFFFF); - if (ftdi->type == TYPE_2232H || - ftdi->type == TYPE_4232H || ftdi->type == TYPE_232H ) - { - *index = (unsigned short)(encoded_divisor >> 8); - *index &= 0xFF00; - *index |= ftdi->index; - } - else - *index = (unsigned short)(encoded_divisor >> 16); - - // Return the nearest baud rate - return best_baud; -} - -/** - * @brief Wrapper function to export ftdi_convert_baudrate() to the unit test - * Do not use, it's only for the unit test framework - **/ -int convert_baudrate_UT_export(int baudrate, struct ftdi_context *ftdi, - unsigned short *value, unsigned short *index) -{ - return ftdi_convert_baudrate(baudrate, ftdi, value, index); -} - -/** - Sets the chip baud rate - - \param ftdi pointer to ftdi_context - \param baudrate baud rate to set - - \retval 0: all fine - \retval -1: invalid baudrate - \retval -2: setting baudrate failed - \retval -3: USB device unavailable -*/ -int ftdi_set_baudrate(struct ftdi_context *ftdi, int baudrate) -{ - unsigned short value, index; - int actual_baudrate; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-3, "USB device unavailable"); - - if (ftdi->bitbang_enabled) - { - baudrate = baudrate*4; - } - - actual_baudrate = ftdi_convert_baudrate(baudrate, ftdi, &value, &index); - if (actual_baudrate <= 0) - ftdi_error_return (-1, "Silly baudrate <= 0."); - - // Check within tolerance (about 5%) - if ((actual_baudrate * 2 < baudrate /* Catch overflows */ ) - || ((actual_baudrate < baudrate) - ? (actual_baudrate * 21 < baudrate * 20) - : (baudrate * 21 < actual_baudrate * 20))) - ftdi_error_return (-1, "Unsupported baudrate. Note: bitbang baudrates are automatically multiplied by 4"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_SET_BAUDRATE_REQUEST, value, - index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return (-2, "Setting new baudrate failed"); - - ftdi->baudrate = baudrate; - return 0; -} - -/** - Set (RS232) line characteristics. - The break type can only be set via ftdi_set_line_property2() - and defaults to "off". - - \param ftdi pointer to ftdi_context - \param bits Number of bits - \param sbit Number of stop bits - \param parity Parity mode - - \retval 0: all fine - \retval -1: Setting line property failed -*/ -int ftdi_set_line_property(struct ftdi_context *ftdi, enum ftdi_bits_type bits, - enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity) -{ - return ftdi_set_line_property2(ftdi, bits, sbit, parity, BREAK_OFF); -} - -/** - Set (RS232) line characteristics - - \param ftdi pointer to ftdi_context - \param bits Number of bits - \param sbit Number of stop bits - \param parity Parity mode - \param break_type Break type - - \retval 0: all fine - \retval -1: Setting line property failed - \retval -2: USB device unavailable -*/ -int ftdi_set_line_property2(struct ftdi_context *ftdi, enum ftdi_bits_type bits, - enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity, - enum ftdi_break_type break_type) -{ - unsigned short value = bits; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - switch (parity) - { - case NONE: - value |= (0x00 << 8); - break; - case ODD: - value |= (0x01 << 8); - break; - case EVEN: - value |= (0x02 << 8); - break; - case MARK: - value |= (0x03 << 8); - break; - case SPACE: - value |= (0x04 << 8); - break; - } - - switch (sbit) - { - case STOP_BIT_1: - value |= (0x00 << 11); - break; - case STOP_BIT_15: - value |= (0x01 << 11); - break; - case STOP_BIT_2: - value |= (0x02 << 11); - break; - } - - switch (break_type) - { - case BREAK_OFF: - value |= (0x00 << 14); - break; - case BREAK_ON: - value |= (0x01 << 14); - break; - } - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_SET_DATA_REQUEST, value, - ftdi->index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return (-1, "Setting new line property failed"); - - return 0; -} - -/** - Writes data in chunks (see ftdi_write_data_set_chunksize()) to the chip - - \param ftdi pointer to ftdi_context - \param buf Buffer with the data - \param size Size of the buffer - - \retval -666: USB device unavailable - \retval <0: error code from usb_bulk_write() - \retval >0: number of bytes written -*/ -int ftdi_write_data(struct ftdi_context *ftdi, unsigned char *buf, int size) -{ - int offset = 0; - int actual_length; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-666, "USB device unavailable"); - - while (offset < size) - { - int write_size = ftdi->writebuffer_chunksize; - - if (offset+write_size > size) - write_size = size-offset; - - if (libusb_bulk_transfer(ftdi->usb_dev, ftdi->in_ep, buf+offset, write_size, &actual_length, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "usb bulk write failed"); - - offset += actual_length; - } - - return offset; -} - -static void ftdi_read_data_cb(struct libusb_transfer *transfer) -{ - struct ftdi_transfer_control *tc = (struct ftdi_transfer_control *) transfer->user_data; - struct ftdi_context *ftdi = tc->ftdi; - int packet_size, actual_length, num_of_chunks, chunk_remains, i, ret; - - packet_size = ftdi->max_packet_size; - - actual_length = transfer->actual_length; - - if (actual_length > 2) - { - // skip FTDI status bytes. - // Maybe stored in the future to enable modem use - num_of_chunks = actual_length / packet_size; - chunk_remains = actual_length % packet_size; - //printf("actual_length = %X, num_of_chunks = %X, chunk_remains = %X, readbuffer_offset = %X\n", actual_length, num_of_chunks, chunk_remains, ftdi->readbuffer_offset); - - ftdi->readbuffer_offset += 2; - actual_length -= 2; - - if (actual_length > packet_size - 2) - { - for (i = 1; i < num_of_chunks; i++) - memmove (ftdi->readbuffer+ftdi->readbuffer_offset+(packet_size - 2)*i, - ftdi->readbuffer+ftdi->readbuffer_offset+packet_size*i, - packet_size - 2); - if (chunk_remains > 2) - { - memmove (ftdi->readbuffer+ftdi->readbuffer_offset+(packet_size - 2)*i, - ftdi->readbuffer+ftdi->readbuffer_offset+packet_size*i, - chunk_remains-2); - actual_length -= 2*num_of_chunks; - } - else - actual_length -= 2*(num_of_chunks-1)+chunk_remains; - } - - if (actual_length > 0) - { - // data still fits in buf? - if (tc->offset + actual_length <= tc->size) - { - memcpy (tc->buf + tc->offset, ftdi->readbuffer + ftdi->readbuffer_offset, actual_length); - //printf("buf[0] = %X, buf[1] = %X\n", buf[0], buf[1]); - tc->offset += actual_length; - - ftdi->readbuffer_offset = 0; - ftdi->readbuffer_remaining = 0; - - /* Did we read exactly the right amount of bytes? */ - if (tc->offset == tc->size) - { - //printf("read_data exact rem %d offset %d\n", - //ftdi->readbuffer_remaining, offset); - tc->completed = 1; - return; - } - } - else - { - // only copy part of the data or size <= readbuffer_chunksize - int part_size = tc->size - tc->offset; - memcpy (tc->buf + tc->offset, ftdi->readbuffer + ftdi->readbuffer_offset, part_size); - tc->offset += part_size; - - ftdi->readbuffer_offset += part_size; - ftdi->readbuffer_remaining = actual_length - part_size; - - /* printf("Returning part: %d - size: %d - offset: %d - actual_length: %d - remaining: %d\n", - part_size, size, offset, actual_length, ftdi->readbuffer_remaining); */ - tc->completed = 1; - return; - } - } - } - ret = libusb_submit_transfer (transfer); - if (ret < 0) - tc->completed = 1; -} - - -static void ftdi_write_data_cb(struct libusb_transfer *transfer) -{ - struct ftdi_transfer_control *tc = (struct ftdi_transfer_control *) transfer->user_data; - struct ftdi_context *ftdi = tc->ftdi; - - tc->offset += transfer->actual_length; - - if (tc->offset == tc->size) - { - tc->completed = 1; - } - else - { - int write_size = ftdi->writebuffer_chunksize; - int ret; - - if (tc->offset + write_size > tc->size) - write_size = tc->size - tc->offset; - - transfer->length = write_size; - transfer->buffer = tc->buf + tc->offset; - ret = libusb_submit_transfer (transfer); - if (ret < 0) - tc->completed = 1; - } -} - - -/** - Writes data to the chip. Does not wait for completion of the transfer - nor does it make sure that the transfer was successful. - - Use libusb 1.0 asynchronous API. - - \param ftdi pointer to ftdi_context - \param buf Buffer with the data - \param size Size of the buffer - - \retval NULL: Some error happens when submit transfer - \retval !NULL: Pointer to a ftdi_transfer_control -*/ - -struct ftdi_transfer_control *ftdi_write_data_submit(struct ftdi_context *ftdi, unsigned char *buf, int size) -{ - struct ftdi_transfer_control *tc; - struct libusb_transfer *transfer; - int write_size, ret; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - return NULL; - - tc = (struct ftdi_transfer_control *) malloc (sizeof (*tc)); - if (!tc) - return NULL; - - transfer = libusb_alloc_transfer(0); - if (!transfer) - { - free(tc); - return NULL; - } - - tc->ftdi = ftdi; - tc->completed = 0; - tc->buf = buf; - tc->size = size; - tc->offset = 0; - - if (size < ftdi->writebuffer_chunksize) - write_size = size; - else - write_size = ftdi->writebuffer_chunksize; - - libusb_fill_bulk_transfer(transfer, ftdi->usb_dev, ftdi->in_ep, buf, - write_size, ftdi_write_data_cb, tc, - ftdi->usb_write_timeout); - transfer->type = LIBUSB_TRANSFER_TYPE_BULK; - - ret = libusb_submit_transfer(transfer); - if (ret < 0) - { - libusb_free_transfer(transfer); - free(tc); - return NULL; - } - tc->transfer = transfer; - - return tc; -} - -/** - Reads data from the chip. Does not wait for completion of the transfer - nor does it make sure that the transfer was successful. - - Use libusb 1.0 asynchronous API. - - \param ftdi pointer to ftdi_context - \param buf Buffer with the data - \param size Size of the buffer - - \retval NULL: Some error happens when submit transfer - \retval !NULL: Pointer to a ftdi_transfer_control -*/ - -struct ftdi_transfer_control *ftdi_read_data_submit(struct ftdi_context *ftdi, unsigned char *buf, int size) -{ - struct ftdi_transfer_control *tc; - struct libusb_transfer *transfer; - int ret; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - return NULL; - - tc = (struct ftdi_transfer_control *) malloc (sizeof (*tc)); - if (!tc) - return NULL; - - tc->ftdi = ftdi; - tc->buf = buf; - tc->size = size; - - if (size <= ftdi->readbuffer_remaining) - { - memcpy (buf, ftdi->readbuffer+ftdi->readbuffer_offset, size); - - // Fix offsets - ftdi->readbuffer_remaining -= size; - ftdi->readbuffer_offset += size; - - /* printf("Returning bytes from buffer: %d - remaining: %d\n", size, ftdi->readbuffer_remaining); */ - - tc->completed = 1; - tc->offset = size; - tc->transfer = NULL; - return tc; - } - - tc->completed = 0; - if (ftdi->readbuffer_remaining != 0) - { - memcpy (buf, ftdi->readbuffer+ftdi->readbuffer_offset, ftdi->readbuffer_remaining); - - tc->offset = ftdi->readbuffer_remaining; - } - else - tc->offset = 0; - - transfer = libusb_alloc_transfer(0); - if (!transfer) - { - free (tc); - return NULL; - } - - ftdi->readbuffer_remaining = 0; - ftdi->readbuffer_offset = 0; - - libusb_fill_bulk_transfer(transfer, ftdi->usb_dev, ftdi->out_ep, ftdi->readbuffer, ftdi->readbuffer_chunksize, ftdi_read_data_cb, tc, ftdi->usb_read_timeout); - transfer->type = LIBUSB_TRANSFER_TYPE_BULK; - - ret = libusb_submit_transfer(transfer); - if (ret < 0) - { - libusb_free_transfer(transfer); - free (tc); - return NULL; - } - tc->transfer = transfer; - - return tc; -} - -/** - Wait for completion of the transfer. - - Use libusb 1.0 asynchronous API. - - \param tc pointer to ftdi_transfer_control - - \retval < 0: Some error happens - \retval >= 0: Data size transferred -*/ - -int ftdi_transfer_data_done(struct ftdi_transfer_control *tc) -{ - int ret; - - while (!tc->completed) - { - ret = libusb_handle_events(tc->ftdi->usb_ctx); - if (ret < 0) - { - if (ret == LIBUSB_ERROR_INTERRUPTED) - continue; - libusb_cancel_transfer(tc->transfer); - while (!tc->completed) - if (libusb_handle_events(tc->ftdi->usb_ctx) < 0) - break; - libusb_free_transfer(tc->transfer); - free (tc); - return ret; - } - } - - ret = tc->offset; - /** - * tc->transfer could be NULL if "(size <= ftdi->readbuffer_remaining)" - * at ftdi_read_data_submit(). Therefore, we need to check it here. - **/ - if (tc->transfer) - { - if (tc->transfer->status != LIBUSB_TRANSFER_COMPLETED) - ret = -1; - libusb_free_transfer(tc->transfer); - } - free(tc); - return ret; -} - -/** - Configure write buffer chunk size. - Default is 4096. - - \param ftdi pointer to ftdi_context - \param chunksize Chunk size - - \retval 0: all fine - \retval -1: ftdi context invalid -*/ -int ftdi_write_data_set_chunksize(struct ftdi_context *ftdi, unsigned int chunksize) -{ - if (ftdi == NULL) - ftdi_error_return(-1, "ftdi context invalid"); - - ftdi->writebuffer_chunksize = chunksize; - return 0; -} - -/** - Get write buffer chunk size. - - \param ftdi pointer to ftdi_context - \param chunksize Pointer to store chunk size in - - \retval 0: all fine - \retval -1: ftdi context invalid -*/ -int ftdi_write_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize) -{ - if (ftdi == NULL) - ftdi_error_return(-1, "ftdi context invalid"); - - *chunksize = ftdi->writebuffer_chunksize; - return 0; -} - -/** - Reads data in chunks (see ftdi_read_data_set_chunksize()) from the chip. - - Automatically strips the two modem status bytes transfered during every read. - - \param ftdi pointer to ftdi_context - \param buf Buffer to store data in - \param size Size of the buffer - - \retval -666: USB device unavailable - \retval <0: error code from libusb_bulk_transfer() - \retval 0: no data was available - \retval >0: number of bytes read - -*/ -int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int size) -{ - int offset = 0, ret, i, num_of_chunks, chunk_remains; - int packet_size = ftdi->max_packet_size; - int actual_length = 1; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-666, "USB device unavailable"); - - // Packet size sanity check (avoid division by zero) - if (packet_size == 0) - ftdi_error_return(-1, "max_packet_size is bogus (zero)"); - - // everything we want is still in the readbuffer? - if (size <= ftdi->readbuffer_remaining) - { - memcpy (buf, ftdi->readbuffer+ftdi->readbuffer_offset, size); - - // Fix offsets - ftdi->readbuffer_remaining -= size; - ftdi->readbuffer_offset += size; - - /* printf("Returning bytes from buffer: %d - remaining: %d\n", size, ftdi->readbuffer_remaining); */ - - return size; - } - // something still in the readbuffer, but not enough to satisfy 'size'? - if (ftdi->readbuffer_remaining != 0) - { - memcpy (buf, ftdi->readbuffer+ftdi->readbuffer_offset, ftdi->readbuffer_remaining); - - // Fix offset - offset += ftdi->readbuffer_remaining; - } - // do the actual USB read - while (offset < size && actual_length > 0) - { - ftdi->readbuffer_remaining = 0; - ftdi->readbuffer_offset = 0; - /* returns how much received */ - ret = libusb_bulk_transfer (ftdi->usb_dev, ftdi->out_ep, ftdi->readbuffer, ftdi->readbuffer_chunksize, &actual_length, ftdi->usb_read_timeout); - if (ret < 0) - ftdi_error_return(ret, "usb bulk read failed"); - - if (actual_length > 2) - { - // skip FTDI status bytes. - // Maybe stored in the future to enable modem use - num_of_chunks = actual_length / packet_size; - chunk_remains = actual_length % packet_size; - //printf("actual_length = %X, num_of_chunks = %X, chunk_remains = %X, readbuffer_offset = %X\n", actual_length, num_of_chunks, chunk_remains, ftdi->readbuffer_offset); - - ftdi->readbuffer_offset += 2; - actual_length -= 2; - - if (actual_length > packet_size - 2) - { - for (i = 1; i < num_of_chunks; i++) - memmove (ftdi->readbuffer+ftdi->readbuffer_offset+(packet_size - 2)*i, - ftdi->readbuffer+ftdi->readbuffer_offset+packet_size*i, - packet_size - 2); - if (chunk_remains > 2) - { - memmove (ftdi->readbuffer+ftdi->readbuffer_offset+(packet_size - 2)*i, - ftdi->readbuffer+ftdi->readbuffer_offset+packet_size*i, - chunk_remains-2); - actual_length -= 2*num_of_chunks; - } - else - actual_length -= 2*(num_of_chunks-1)+chunk_remains; - } - } - else if (actual_length <= 2) - { - // no more data to read? - return offset; - } - if (actual_length > 0) - { - // data still fits in buf? - if (offset+actual_length <= size) - { - memcpy (buf+offset, ftdi->readbuffer+ftdi->readbuffer_offset, actual_length); - //printf("buf[0] = %X, buf[1] = %X\n", buf[0], buf[1]); - offset += actual_length; - - /* Did we read exactly the right amount of bytes? */ - if (offset == size) - //printf("read_data exact rem %d offset %d\n", - //ftdi->readbuffer_remaining, offset); - return offset; - } - else - { - // only copy part of the data or size <= readbuffer_chunksize - int part_size = size-offset; - memcpy (buf+offset, ftdi->readbuffer+ftdi->readbuffer_offset, part_size); - - ftdi->readbuffer_offset += part_size; - ftdi->readbuffer_remaining = actual_length-part_size; - offset += part_size; - - /* printf("Returning part: %d - size: %d - offset: %d - actual_length: %d - remaining: %d\n", - part_size, size, offset, actual_length, ftdi->readbuffer_remaining); */ - - return offset; - } - } - } - // never reached - return -127; -} - -/** - Configure read buffer chunk size. - Default is 4096. - - Automatically reallocates the buffer. - - \param ftdi pointer to ftdi_context - \param chunksize Chunk size - - \retval 0: all fine - \retval -1: ftdi context invalid -*/ -int ftdi_read_data_set_chunksize(struct ftdi_context *ftdi, unsigned int chunksize) -{ - unsigned char *new_buf; - - if (ftdi == NULL) - ftdi_error_return(-1, "ftdi context invalid"); - - // Invalidate all remaining data - ftdi->readbuffer_offset = 0; - ftdi->readbuffer_remaining = 0; -#ifdef __linux__ - /* We can't set readbuffer_chunksize larger than MAX_BULK_BUFFER_LENGTH, - which is defined in libusb-1.0. Otherwise, each USB read request will - be divided into multiple URBs. This will cause issues on Linux kernel - older than 2.6.32. */ - if (chunksize > 16384) - chunksize = 16384; -#endif - - if ((new_buf = (unsigned char *)realloc(ftdi->readbuffer, chunksize)) == NULL) - ftdi_error_return(-1, "out of memory for readbuffer"); - - ftdi->readbuffer = new_buf; - ftdi->readbuffer_chunksize = chunksize; - - return 0; -} - -/** - Get read buffer chunk size. - - \param ftdi pointer to ftdi_context - \param chunksize Pointer to store chunk size in - - \retval 0: all fine - \retval -1: FTDI context invalid -*/ -int ftdi_read_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize) -{ - if (ftdi == NULL) - ftdi_error_return(-1, "FTDI context invalid"); - - *chunksize = ftdi->readbuffer_chunksize; - return 0; -} - -/** - Enable/disable bitbang modes. - - \param ftdi pointer to ftdi_context - \param bitmask Bitmask to configure lines. - HIGH/ON value configures a line as output. - \param mode Bitbang mode: use the values defined in \ref ftdi_mpsse_mode - - \retval 0: all fine - \retval -1: can't enable bitbang mode - \retval -2: USB device unavailable -*/ -int ftdi_set_bitmode(struct ftdi_context *ftdi, unsigned char bitmask, unsigned char mode) -{ - unsigned short usb_val; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - usb_val = bitmask; // low byte: bitmask - usb_val |= (mode << 8); - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, SIO_SET_BITMODE_REQUEST, usb_val, ftdi->index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "unable to configure bitbang mode. Perhaps not a BM/2232C type chip?"); - - ftdi->bitbang_mode = mode; - ftdi->bitbang_enabled = (mode == BITMODE_RESET) ? 0 : 1; - return 0; -} - -/** - Disable bitbang mode. - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: can't disable bitbang mode - \retval -2: USB device unavailable -*/ -int ftdi_disable_bitbang(struct ftdi_context *ftdi) -{ - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, SIO_SET_BITMODE_REQUEST, 0, ftdi->index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "unable to leave bitbang mode. Perhaps not a BM type chip?"); - - ftdi->bitbang_enabled = 0; - return 0; -} - - -/** - Directly read pin state, circumventing the read buffer. Useful for bitbang mode. - - \param ftdi pointer to ftdi_context - \param pins Pointer to store pins into - - \retval 0: all fine - \retval -1: read pins failed - \retval -2: USB device unavailable -*/ -int ftdi_read_pins(struct ftdi_context *ftdi, unsigned char *pins) -{ - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_IN_REQTYPE, SIO_READ_PINS_REQUEST, 0, ftdi->index, (unsigned char *)pins, 1, ftdi->usb_read_timeout) != 1) - ftdi_error_return(-1, "read pins failed"); - - return 0; -} - -/** - Set latency timer - - The FTDI chip keeps data in the internal buffer for a specific - amount of time if the buffer is not full yet to decrease - load on the usb bus. - - \param ftdi pointer to ftdi_context - \param latency Value between 1 and 255 - - \retval 0: all fine - \retval -1: latency out of range - \retval -2: unable to set latency timer - \retval -3: USB device unavailable -*/ -int ftdi_set_latency_timer(struct ftdi_context *ftdi, unsigned char latency) -{ - unsigned short usb_val; - - if (latency < 1) - ftdi_error_return(-1, "latency out of range. Only valid for 1-255"); - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-3, "USB device unavailable"); - - usb_val = latency; - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, SIO_SET_LATENCY_TIMER_REQUEST, usb_val, ftdi->index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-2, "unable to set latency timer"); - - return 0; -} - -/** - Get latency timer - - \param ftdi pointer to ftdi_context - \param latency Pointer to store latency value in - - \retval 0: all fine - \retval -1: unable to get latency timer - \retval -2: USB device unavailable -*/ -int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char *latency) -{ - unsigned short usb_val; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_IN_REQTYPE, SIO_GET_LATENCY_TIMER_REQUEST, 0, ftdi->index, (unsigned char *)&usb_val, 1, ftdi->usb_read_timeout) != 1) - ftdi_error_return(-1, "reading latency timer failed"); - - *latency = (unsigned char)usb_val; - return 0; -} - -/** - Poll modem status information - - This function allows the retrieve the two status bytes of the device. - The device sends these bytes also as a header for each read access - where they are discarded by ftdi_read_data(). The chip generates - the two stripped status bytes in the absence of data every 40 ms. - - Layout of the first byte: - - B0..B3 - must be 0 - - B4 Clear to send (CTS) - 0 = inactive - 1 = active - - B5 Data set ready (DTS) - 0 = inactive - 1 = active - - B6 Ring indicator (RI) - 0 = inactive - 1 = active - - B7 Receive line signal detect (RLSD) - 0 = inactive - 1 = active - - Layout of the second byte: - - B0 Data ready (DR) - - B1 Overrun error (OE) - - B2 Parity error (PE) - - B3 Framing error (FE) - - B4 Break interrupt (BI) - - B5 Transmitter holding register (THRE) - - B6 Transmitter empty (TEMT) - - B7 Error in RCVR FIFO - - \param ftdi pointer to ftdi_context - \param status Pointer to store status information in. Must be two bytes. - - \retval 0: all fine - \retval -1: unable to retrieve status information - \retval -2: USB device unavailable -*/ -int ftdi_poll_modem_status(struct ftdi_context *ftdi, unsigned short *status) -{ - char usb_val[2]; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_IN_REQTYPE, SIO_POLL_MODEM_STATUS_REQUEST, 0, ftdi->index, (unsigned char *)usb_val, 2, ftdi->usb_read_timeout) != 2) - ftdi_error_return(-1, "getting modem status failed"); - - *status = (usb_val[1] << 8) | (usb_val[0] & 0xFF); - - return 0; -} - -/** - Set flowcontrol for ftdi chip - - \param ftdi pointer to ftdi_context - \param flowctrl flow control to use. should be - SIO_DISABLE_FLOW_CTRL, SIO_RTS_CTS_HS, SIO_DTR_DSR_HS or SIO_XON_XOFF_HS - - \retval 0: all fine - \retval -1: set flow control failed - \retval -2: USB device unavailable -*/ -int ftdi_setflowctrl(struct ftdi_context *ftdi, int flowctrl) -{ - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_SET_FLOW_CTRL_REQUEST, 0, (flowctrl | ftdi->index), - NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "set flow control failed"); - - return 0; -} - -/** - Set dtr line - - \param ftdi pointer to ftdi_context - \param state state to set line to (1 or 0) - - \retval 0: all fine - \retval -1: set dtr failed - \retval -2: USB device unavailable -*/ -int ftdi_setdtr(struct ftdi_context *ftdi, int state) -{ - unsigned short usb_val; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (state) - usb_val = SIO_SET_DTR_HIGH; - else - usb_val = SIO_SET_DTR_LOW; - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_SET_MODEM_CTRL_REQUEST, usb_val, ftdi->index, - NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "set dtr failed"); - - return 0; -} - -/** - Set rts line - - \param ftdi pointer to ftdi_context - \param state state to set line to (1 or 0) - - \retval 0: all fine - \retval -1: set rts failed - \retval -2: USB device unavailable -*/ -int ftdi_setrts(struct ftdi_context *ftdi, int state) -{ - unsigned short usb_val; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (state) - usb_val = SIO_SET_RTS_HIGH; - else - usb_val = SIO_SET_RTS_LOW; - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_SET_MODEM_CTRL_REQUEST, usb_val, ftdi->index, - NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "set of rts failed"); - - return 0; -} - -/** - Set dtr and rts line in one pass - - \param ftdi pointer to ftdi_context - \param dtr DTR state to set line to (1 or 0) - \param rts RTS state to set line to (1 or 0) - - \retval 0: all fine - \retval -1: set dtr/rts failed - \retval -2: USB device unavailable - */ -int ftdi_setdtr_rts(struct ftdi_context *ftdi, int dtr, int rts) -{ - unsigned short usb_val; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (dtr) - usb_val = SIO_SET_DTR_HIGH; - else - usb_val = SIO_SET_DTR_LOW; - - if (rts) - usb_val |= SIO_SET_RTS_HIGH; - else - usb_val |= SIO_SET_RTS_LOW; - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_SET_MODEM_CTRL_REQUEST, usb_val, ftdi->index, - NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "set of rts/dtr failed"); - - return 0; -} - -/** - Set the special event character - - \param ftdi pointer to ftdi_context - \param eventch Event character - \param enable 0 to disable the event character, non-zero otherwise - - \retval 0: all fine - \retval -1: unable to set event character - \retval -2: USB device unavailable -*/ -int ftdi_set_event_char(struct ftdi_context *ftdi, - unsigned char eventch, unsigned char enable) -{ - unsigned short usb_val; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - usb_val = eventch; - if (enable) - usb_val |= 1 << 8; - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, SIO_SET_EVENT_CHAR_REQUEST, usb_val, ftdi->index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "setting event character failed"); - - return 0; -} - -/** - Set error character - - \param ftdi pointer to ftdi_context - \param errorch Error character - \param enable 0 to disable the error character, non-zero otherwise - - \retval 0: all fine - \retval -1: unable to set error character - \retval -2: USB device unavailable -*/ -int ftdi_set_error_char(struct ftdi_context *ftdi, - unsigned char errorch, unsigned char enable) -{ - unsigned short usb_val; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - usb_val = errorch; - if (enable) - usb_val |= 1 << 8; - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, SIO_SET_ERROR_CHAR_REQUEST, usb_val, ftdi->index, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "setting error character failed"); - - return 0; -} - -/** - Init eeprom with default values for the connected device - \param ftdi pointer to ftdi_context - \param manufacturer String to use as Manufacturer - \param product String to use as Product description - \param serial String to use as Serial number description - - \retval 0: all fine - \retval -1: No struct ftdi_context - \retval -2: No struct ftdi_eeprom - \retval -3: No connected device or device not yet opened -*/ -int ftdi_eeprom_initdefaults(struct ftdi_context *ftdi, char * manufacturer, - char * product, char * serial) -{ - struct ftdi_eeprom *eeprom; - - if (ftdi == NULL) - ftdi_error_return(-1, "No struct ftdi_context"); - - if (ftdi->eeprom == NULL) - ftdi_error_return(-2,"No struct ftdi_eeprom"); - - eeprom = ftdi->eeprom; - memset(eeprom, 0, sizeof(struct ftdi_eeprom)); - - if (ftdi->usb_dev == NULL) - ftdi_error_return(-3, "No connected device or device not yet opened"); - - eeprom->vendor_id = 0x0403; - eeprom->use_serial = 1; - if ((ftdi->type == TYPE_AM) || (ftdi->type == TYPE_BM) || - (ftdi->type == TYPE_R)) - eeprom->product_id = 0x6001; - else if (ftdi->type == TYPE_4232H) - eeprom->product_id = 0x6011; - else if (ftdi->type == TYPE_232H) - eeprom->product_id = 0x6014; - else - eeprom->product_id = 0x6010; - if (ftdi->type == TYPE_AM) - eeprom->usb_version = 0x0101; - else - eeprom->usb_version = 0x0200; - eeprom->max_power = 100; - - if (eeprom->manufacturer) - free (eeprom->manufacturer); - eeprom->manufacturer = NULL; - if (manufacturer) - { - eeprom->manufacturer = malloc(strlen(manufacturer)+1); - if (eeprom->manufacturer) - strcpy(eeprom->manufacturer, manufacturer); - } - - if (eeprom->product) - free (eeprom->product); - eeprom->product = NULL; - if(product) - { - eeprom->product = malloc(strlen(product)+1); - if (eeprom->product) - strcpy(eeprom->product, product); - } - else - { - const char* default_product; - switch(ftdi->type) - { - case TYPE_AM: default_product = "AM"; break; - case TYPE_BM: default_product = "BM"; break; - case TYPE_2232C: default_product = "Dual RS232"; break; - case TYPE_R: default_product = "FT232R USB UART"; break; - case TYPE_2232H: default_product = "Dual RS232-HS"; break; - case TYPE_4232H: default_product = "FT4232H"; break; - case TYPE_232H: default_product = "Single-RS232-HS"; break; - default: - ftdi_error_return(-3, "Unknown chip type"); - } - eeprom->product = malloc(strlen(default_product) +1); - if (eeprom->product) - strcpy(eeprom->product, default_product); - } - - if (eeprom->serial) - free (eeprom->serial); - eeprom->serial = NULL; - if (serial) - { - eeprom->serial = malloc(strlen(serial)+1); - if (eeprom->serial) - strcpy(eeprom->serial, serial); - } - - if (ftdi->type == TYPE_R) - { - eeprom->max_power = 90; - eeprom->size = 0x80; - eeprom->cbus_function[0] = CBUS_TXLED; - eeprom->cbus_function[1] = CBUS_RXLED; - eeprom->cbus_function[2] = CBUS_TXDEN; - eeprom->cbus_function[3] = CBUS_PWREN; - eeprom->cbus_function[4] = CBUS_SLEEP; - } - else - { - if(ftdi->type == TYPE_232H) - { - int i; - for (i=0; i<10; i++) - eeprom->cbus_function[i] = CBUSH_TRISTATE; - } - eeprom->size = -1; - } - eeprom->initialized_for_connected_device = 1; - return 0; -} -/*FTD2XX doesn't check for values not fitting in the ACBUS Signal oprtions*/ -void set_ft232h_cbus(struct ftdi_eeprom *eeprom, unsigned char * output) -{ - int i; - for(i=0; i<5;i++) - { - int mode_low, mode_high; - if (eeprom->cbus_function[2*i]> CBUSH_CLK7_5) - mode_low = CBUSH_TRISTATE; - else - mode_low = eeprom->cbus_function[2*i]; - if (eeprom->cbus_function[2*i+1]> CBUSH_CLK7_5) - mode_high = CBUSH_TRISTATE; - else - mode_high = eeprom->cbus_function[2*i]; - - output[0x18+i] = mode_high <<4 | mode_low; - } -} -/* Return the bits for the encoded EEPROM Structure of a requested Mode - * - */ -static unsigned char type2bit(unsigned char type, enum ftdi_chip_type chip) -{ - switch (chip) - { - case TYPE_2232H: - case TYPE_2232C: - { - switch (type) - { - case CHANNEL_IS_UART: return 0; - case CHANNEL_IS_FIFO: return 0x01; - case CHANNEL_IS_OPTO: return 0x02; - case CHANNEL_IS_CPU : return 0x04; - default: return 0; - } - } - case TYPE_232H: - { - switch (type) - { - case CHANNEL_IS_UART : return 0; - case CHANNEL_IS_FIFO : return 0x01; - case CHANNEL_IS_OPTO : return 0x02; - case CHANNEL_IS_CPU : return 0x04; - case CHANNEL_IS_FT1284 : return 0x08; - default: return 0; - } - } - default: return 0; - } - return 0; -} - -/** - Build binary buffer from ftdi_eeprom structure. - Output is suitable for ftdi_write_eeprom(). - - \param ftdi pointer to ftdi_context - - \retval >=0: size of eeprom user area in bytes - \retval -1: eeprom size (128 bytes) exceeded by custom strings - \retval -2: Invalid eeprom or ftdi pointer - \retval -3: Invalid cbus function setting (FIXME: Not in the code?) - \retval -4: Chip doesn't support invert (FIXME: Not in the code?) - \retval -5: Chip doesn't support high current drive (FIXME: Not in the code?) - \retval -6: No connected EEPROM or EEPROM Type unknown -*/ -int ftdi_eeprom_build(struct ftdi_context *ftdi) -{ - unsigned char i, j, eeprom_size_mask; - unsigned short checksum, value; - unsigned char manufacturer_size = 0, product_size = 0, serial_size = 0; - int user_area_size; - struct ftdi_eeprom *eeprom; - unsigned char * output; - - if (ftdi == NULL) - ftdi_error_return(-2,"No context"); - if (ftdi->eeprom == NULL) - ftdi_error_return(-2,"No eeprom structure"); - - eeprom= ftdi->eeprom; - output = eeprom->buf; - - if (eeprom->chip == -1) - ftdi_error_return(-6,"No connected EEPROM or EEPROM type unknown"); - - if ((eeprom->chip == 0x56) || (eeprom->chip == 0x66)) - eeprom->size = 0x100; - else - eeprom->size = 0x80; - - if (eeprom->manufacturer != NULL) - manufacturer_size = strlen(eeprom->manufacturer); - if (eeprom->product != NULL) - product_size = strlen(eeprom->product); - if (eeprom->serial != NULL) - serial_size = strlen(eeprom->serial); - - // eeprom size check - switch (ftdi->type) - { - case TYPE_AM: - case TYPE_BM: - user_area_size = 96; // base size for strings (total of 48 characters) - break; - case TYPE_2232C: - user_area_size = 90; // two extra config bytes and 4 bytes PnP stuff - break; - case TYPE_R: - user_area_size = 88; // four extra config bytes + 4 bytes PnP stuff - break; - case TYPE_2232H: // six extra config bytes + 4 bytes PnP stuff - case TYPE_4232H: - user_area_size = 86; - break; - case TYPE_232H: - user_area_size = 80; - break; - default: - user_area_size = 0; - break; - } - user_area_size -= (manufacturer_size + product_size + serial_size) * 2; - - if (user_area_size < 0) - ftdi_error_return(-1,"eeprom size exceeded"); - - // empty eeprom - memset (ftdi->eeprom->buf, 0, FTDI_MAX_EEPROM_SIZE); - - // Bytes and Bits set for all Types - - // Addr 02: Vendor ID - output[0x02] = eeprom->vendor_id; - output[0x03] = eeprom->vendor_id >> 8; - - // Addr 04: Product ID - output[0x04] = eeprom->product_id; - output[0x05] = eeprom->product_id >> 8; - - // Addr 06: Device release number (0400h for BM features) - output[0x06] = 0x00; - switch (ftdi->type) - { - case TYPE_AM: - output[0x07] = 0x02; - break; - case TYPE_BM: - output[0x07] = 0x04; - break; - case TYPE_2232C: - output[0x07] = 0x05; - break; - case TYPE_R: - output[0x07] = 0x06; - break; - case TYPE_2232H: - output[0x07] = 0x07; - break; - case TYPE_4232H: - output[0x07] = 0x08; - break; - case TYPE_232H: - output[0x07] = 0x09; - break; - default: - output[0x07] = 0x00; - } - - // Addr 08: Config descriptor - // Bit 7: always 1 - // Bit 6: 1 if this device is self powered, 0 if bus powered - // Bit 5: 1 if this device uses remote wakeup - // Bit 4-0: reserved - 0 - j = 0x80; - if (eeprom->self_powered == 1) - j |= 0x40; - if (eeprom->remote_wakeup == 1) - j |= 0x20; - output[0x08] = j; - - // Addr 09: Max power consumption: max power = value * 2 mA - output[0x09] = eeprom->max_power>>1; - - if (ftdi->type != TYPE_AM) - { - // Addr 0A: Chip configuration - // Bit 7: 0 - reserved - // Bit 6: 0 - reserved - // Bit 5: 0 - reserved - // Bit 4: 1 - Change USB version - // Bit 3: 1 - Use the serial number string - // Bit 2: 1 - Enable suspend pull downs for lower power - // Bit 1: 1 - Out EndPoint is Isochronous - // Bit 0: 1 - In EndPoint is Isochronous - // - j = 0; - if (eeprom->in_is_isochronous == 1) - j = j | 1; - if (eeprom->out_is_isochronous == 1) - j = j | 2; - output[0x0A] = j; - } - - // Dynamic content - // Strings start at 0x94 (TYPE_AM, TYPE_BM) - // 0x96 (TYPE_2232C), 0x98 (TYPE_R) and 0x9a (TYPE_x232H) - // 0xa0 (TYPE_232H) - i = 0; - switch (ftdi->type) - { - case TYPE_232H: - i += 2; - case TYPE_2232H: - case TYPE_4232H: - i += 2; - case TYPE_R: - i += 2; - case TYPE_2232C: - i += 2; - case TYPE_AM: - case TYPE_BM: - i += 0x94; - } - /* Wrap around 0x80 for 128 byte EEPROMS (Internale and 93x46) */ - eeprom_size_mask = eeprom->size -1; - - // Addr 0E: Offset of the manufacturer string + 0x80, calculated later - // Addr 0F: Length of manufacturer string - // Output manufacturer - output[0x0E] = i; // calculate offset - output[i & eeprom_size_mask] = manufacturer_size*2 + 2, i++; - output[i & eeprom_size_mask] = 0x03, i++; // type: string - for (j = 0; j < manufacturer_size; j++) - { - output[i & eeprom_size_mask] = eeprom->manufacturer[j], i++; - output[i & eeprom_size_mask] = 0x00, i++; - } - output[0x0F] = manufacturer_size*2 + 2; - - // Addr 10: Offset of the product string + 0x80, calculated later - // Addr 11: Length of product string - output[0x10] = i | 0x80; // calculate offset - output[i & eeprom_size_mask] = product_size*2 + 2, i++; - output[i & eeprom_size_mask] = 0x03, i++; - for (j = 0; j < product_size; j++) - { - output[i & eeprom_size_mask] = eeprom->product[j], i++; - output[i & eeprom_size_mask] = 0x00, i++; - } - output[0x11] = product_size*2 + 2; - - // Addr 12: Offset of the serial string + 0x80, calculated later - // Addr 13: Length of serial string - output[0x12] = i | 0x80; // calculate offset - output[i & eeprom_size_mask] = serial_size*2 + 2, i++; - output[i & eeprom_size_mask] = 0x03, i++; - for (j = 0; j < serial_size; j++) - { - output[i & eeprom_size_mask] = eeprom->serial[j], i++; - output[i & eeprom_size_mask] = 0x00, i++; - } - - // Legacy port name and PnP fields for FT2232 and newer chips - if (ftdi->type > TYPE_BM) - { - output[i & eeprom_size_mask] = 0x02; /* as seen when written with FTD2XX */ - i++; - output[i & eeprom_size_mask] = 0x03; /* as seen when written with FTD2XX */ - i++; - output[i & eeprom_size_mask] = eeprom->is_not_pnp; /* as seen when written with FTD2XX */ - i++; - } - - output[0x13] = serial_size*2 + 2; - - if (ftdi->type > TYPE_AM) /* use_serial not used in AM devices */ - { - if (eeprom->use_serial) - output[0x0A] |= USE_SERIAL_NUM; - else - output[0x0A] &= ~USE_SERIAL_NUM; - } - - /* Bytes and Bits specific to (some) types - Write linear, as this allows easier fixing*/ - switch (ftdi->type) - { - case TYPE_AM: - break; - case TYPE_BM: - output[0x0C] = eeprom->usb_version & 0xff; - output[0x0D] = (eeprom->usb_version>>8) & 0xff; - if (eeprom->use_usb_version == USE_USB_VERSION_BIT) - output[0x0A] |= USE_USB_VERSION_BIT; - else - output[0x0A] &= ~USE_USB_VERSION_BIT; - - break; - case TYPE_2232C: - - output[0x00] = type2bit(eeprom->channel_a_type, TYPE_2232C); - if ( eeprom->channel_a_driver == DRIVER_VCP) - output[0x00] |= DRIVER_VCP; - else - output[0x00] &= ~DRIVER_VCP; - - if ( eeprom->high_current_a == HIGH_CURRENT_DRIVE) - output[0x00] |= HIGH_CURRENT_DRIVE; - else - output[0x00] &= ~HIGH_CURRENT_DRIVE; - - output[0x01] = type2bit(eeprom->channel_b_type, TYPE_2232C); - if ( eeprom->channel_b_driver == DRIVER_VCP) - output[0x01] |= DRIVER_VCP; - else - output[0x01] &= ~DRIVER_VCP; - - if ( eeprom->high_current_b == HIGH_CURRENT_DRIVE) - output[0x01] |= HIGH_CURRENT_DRIVE; - else - output[0x01] &= ~HIGH_CURRENT_DRIVE; - - if (eeprom->in_is_isochronous == 1) - output[0x0A] |= 0x1; - else - output[0x0A] &= ~0x1; - if (eeprom->out_is_isochronous == 1) - output[0x0A] |= 0x2; - else - output[0x0A] &= ~0x2; - if (eeprom->suspend_pull_downs == 1) - output[0x0A] |= 0x4; - else - output[0x0A] &= ~0x4; - if (eeprom->use_usb_version == USE_USB_VERSION_BIT) - output[0x0A] |= USE_USB_VERSION_BIT; - else - output[0x0A] &= ~USE_USB_VERSION_BIT; - - output[0x0C] = eeprom->usb_version & 0xff; - output[0x0D] = (eeprom->usb_version>>8) & 0xff; - output[0x14] = eeprom->chip; - break; - case TYPE_R: - if (eeprom->high_current == HIGH_CURRENT_DRIVE_R) - output[0x00] |= HIGH_CURRENT_DRIVE_R; - output[0x01] = 0x40; /* Hard coded Endpoint Size*/ - - if (eeprom->suspend_pull_downs == 1) - output[0x0A] |= 0x4; - else - output[0x0A] &= ~0x4; - output[0x0B] = eeprom->invert; - output[0x0C] = eeprom->usb_version & 0xff; - output[0x0D] = (eeprom->usb_version>>8) & 0xff; - - if (eeprom->cbus_function[0] > CBUS_BB) - output[0x14] = CBUS_TXLED; - else - output[0x14] = eeprom->cbus_function[0]; - - if (eeprom->cbus_function[1] > CBUS_BB) - output[0x14] |= CBUS_RXLED<<4; - else - output[0x14] |= eeprom->cbus_function[1]<<4; - - if (eeprom->cbus_function[2] > CBUS_BB) - output[0x15] = CBUS_TXDEN; - else - output[0x15] = eeprom->cbus_function[2]; - - if (eeprom->cbus_function[3] > CBUS_BB) - output[0x15] |= CBUS_PWREN<<4; - else - output[0x15] |= eeprom->cbus_function[3]<<4; - - if (eeprom->cbus_function[4] > CBUS_CLK6) - output[0x16] = CBUS_SLEEP; - else - output[0x16] = eeprom->cbus_function[4]; - break; - case TYPE_2232H: - output[0x00] = type2bit(eeprom->channel_a_type, TYPE_2232H); - if ( eeprom->channel_a_driver == DRIVER_VCP) - output[0x00] |= DRIVER_VCP; - else - output[0x00] &= ~DRIVER_VCP; - - output[0x01] = type2bit(eeprom->channel_b_type, TYPE_2232H); - if ( eeprom->channel_b_driver == DRIVER_VCP) - output[0x01] |= DRIVER_VCP; - else - output[0x01] &= ~DRIVER_VCP; - if (eeprom->suspend_dbus7 == SUSPEND_DBUS7_BIT) - output[0x01] |= SUSPEND_DBUS7_BIT; - else - output[0x01] &= ~SUSPEND_DBUS7_BIT; - - if (eeprom->suspend_pull_downs == 1) - output[0x0A] |= 0x4; - else - output[0x0A] &= ~0x4; - - if (eeprom->group0_drive > DRIVE_16MA) - output[0x0c] |= DRIVE_16MA; - else - output[0x0c] |= eeprom->group0_drive; - if (eeprom->group0_schmitt == IS_SCHMITT) - output[0x0c] |= IS_SCHMITT; - if (eeprom->group0_slew == SLOW_SLEW) - output[0x0c] |= SLOW_SLEW; - - if (eeprom->group1_drive > DRIVE_16MA) - output[0x0c] |= DRIVE_16MA<<4; - else - output[0x0c] |= eeprom->group1_drive<<4; - if (eeprom->group1_schmitt == IS_SCHMITT) - output[0x0c] |= IS_SCHMITT<<4; - if (eeprom->group1_slew == SLOW_SLEW) - output[0x0c] |= SLOW_SLEW<<4; - - if (eeprom->group2_drive > DRIVE_16MA) - output[0x0d] |= DRIVE_16MA; - else - output[0x0d] |= eeprom->group2_drive; - if (eeprom->group2_schmitt == IS_SCHMITT) - output[0x0d] |= IS_SCHMITT; - if (eeprom->group2_slew == SLOW_SLEW) - output[0x0d] |= SLOW_SLEW; - - if (eeprom->group3_drive > DRIVE_16MA) - output[0x0d] |= DRIVE_16MA<<4; - else - output[0x0d] |= eeprom->group3_drive<<4; - if (eeprom->group3_schmitt == IS_SCHMITT) - output[0x0d] |= IS_SCHMITT<<4; - if (eeprom->group3_slew == SLOW_SLEW) - output[0x0d] |= SLOW_SLEW<<4; - - output[0x18] = eeprom->chip; - - break; - case TYPE_4232H: - if (eeprom->channel_a_driver == DRIVER_VCP) - output[0x00] |= DRIVER_VCP; - else - output[0x00] &= ~DRIVER_VCP; - if (eeprom->channel_b_driver == DRIVER_VCP) - output[0x01] |= DRIVER_VCP; - else - output[0x01] &= ~DRIVER_VCP; - if (eeprom->channel_c_driver == DRIVER_VCP) - output[0x00] |= (DRIVER_VCP << 4); - else - output[0x00] &= ~(DRIVER_VCP << 4); - if (eeprom->channel_d_driver == DRIVER_VCP) - output[0x01] |= (DRIVER_VCP << 4); - else - output[0x01] &= ~(DRIVER_VCP << 4); - - if (eeprom->suspend_pull_downs == 1) - output[0x0a] |= 0x4; - else - output[0x0a] &= ~0x4; - - if (eeprom->channel_a_rs485enable) - output[0x0b] |= CHANNEL_IS_RS485 << 0; - else - output[0x0b] &= ~(CHANNEL_IS_RS485 << 0); - if (eeprom->channel_b_rs485enable) - output[0x0b] |= CHANNEL_IS_RS485 << 1; - else - output[0x0b] &= ~(CHANNEL_IS_RS485 << 1); - if (eeprom->channel_c_rs485enable) - output[0x0b] |= CHANNEL_IS_RS485 << 2; - else - output[0x0b] &= ~(CHANNEL_IS_RS485 << 2); - if (eeprom->channel_d_rs485enable) - output[0x0b] |= CHANNEL_IS_RS485 << 3; - else - output[0x0b] &= ~(CHANNEL_IS_RS485 << 3); - - if (eeprom->group0_drive > DRIVE_16MA) - output[0x0c] |= DRIVE_16MA; - else - output[0x0c] |= eeprom->group0_drive; - if (eeprom->group0_schmitt == IS_SCHMITT) - output[0x0c] |= IS_SCHMITT; - if (eeprom->group0_slew == SLOW_SLEW) - output[0x0c] |= SLOW_SLEW; - - if (eeprom->group1_drive > DRIVE_16MA) - output[0x0c] |= DRIVE_16MA<<4; - else - output[0x0c] |= eeprom->group1_drive<<4; - if (eeprom->group1_schmitt == IS_SCHMITT) - output[0x0c] |= IS_SCHMITT<<4; - if (eeprom->group1_slew == SLOW_SLEW) - output[0x0c] |= SLOW_SLEW<<4; - - if (eeprom->group2_drive > DRIVE_16MA) - output[0x0d] |= DRIVE_16MA; - else - output[0x0d] |= eeprom->group2_drive; - if (eeprom->group2_schmitt == IS_SCHMITT) - output[0x0d] |= IS_SCHMITT; - if (eeprom->group2_slew == SLOW_SLEW) - output[0x0d] |= SLOW_SLEW; - - if (eeprom->group3_drive > DRIVE_16MA) - output[0x0d] |= DRIVE_16MA<<4; - else - output[0x0d] |= eeprom->group3_drive<<4; - if (eeprom->group3_schmitt == IS_SCHMITT) - output[0x0d] |= IS_SCHMITT<<4; - if (eeprom->group3_slew == SLOW_SLEW) - output[0x0d] |= SLOW_SLEW<<4; - - output[0x18] = eeprom->chip; - - break; - case TYPE_232H: - output[0x00] = type2bit(eeprom->channel_a_type, TYPE_232H); - if ( eeprom->channel_a_driver == DRIVER_VCP) - output[0x00] |= DRIVER_VCPH; - else - output[0x00] &= ~DRIVER_VCPH; - if (eeprom->powersave) - output[0x01] |= POWER_SAVE_DISABLE_H; - else - output[0x01] &= ~POWER_SAVE_DISABLE_H; - if (eeprom->clock_polarity) - output[0x01] |= FT1284_CLK_IDLE_STATE; - else - output[0x01] &= ~FT1284_CLK_IDLE_STATE; - if (eeprom->data_order) - output[0x01] |= FT1284_DATA_LSB; - else - output[0x01] &= ~FT1284_DATA_LSB; - if (eeprom->flow_control) - output[0x01] |= FT1284_FLOW_CONTROL; - else - output[0x01] &= ~FT1284_FLOW_CONTROL; - if (eeprom->group0_drive > DRIVE_16MA) - output[0x0c] |= DRIVE_16MA; - else - output[0x0c] |= eeprom->group0_drive; - if (eeprom->group0_schmitt == IS_SCHMITT) - output[0x0c] |= IS_SCHMITT; - if (eeprom->group0_slew == SLOW_SLEW) - output[0x0c] |= SLOW_SLEW; - - if (eeprom->group1_drive > DRIVE_16MA) - output[0x0d] |= DRIVE_16MA; - else - output[0x0d] |= eeprom->group1_drive; - if (eeprom->group1_schmitt == IS_SCHMITT) - output[0x0d] |= IS_SCHMITT; - if (eeprom->group1_slew == SLOW_SLEW) - output[0x0d] |= SLOW_SLEW; - - set_ft232h_cbus(eeprom, output); - - output[0x1e] = eeprom->chip; - fprintf(stderr,"FIXME: Build FT232H specific EEPROM settings\n"); - break; - - } - - // calculate checksum - checksum = 0xAAAA; - - for (i = 0; i < eeprom->size/2-1; i++) - { - value = output[i*2]; - value += output[(i*2)+1] << 8; - - checksum = value^checksum; - checksum = (checksum << 1) | (checksum >> 15); - } - - output[eeprom->size-2] = checksum; - output[eeprom->size-1] = checksum >> 8; - - return user_area_size; -} -/* Decode the encoded EEPROM field for the FTDI Mode into a value for the abstracted - * EEPROM structure - * - * FTD2XX doesn't allow to set multiple bits in the interface mode bitfield, and so do we - */ -static unsigned char bit2type(unsigned char bits) -{ - switch (bits) - { - case 0: return CHANNEL_IS_UART; - case 1: return CHANNEL_IS_FIFO; - case 2: return CHANNEL_IS_OPTO; - case 4: return CHANNEL_IS_CPU; - case 8: return CHANNEL_IS_FT1284; - default: - fprintf(stderr," Unexpected value %d for Hardware Interface type\n", - bits); - } - return 0; -} -/** - Decode binary EEPROM image into an ftdi_eeprom structure. - - \param ftdi pointer to ftdi_context - \param verbose Decode EEPROM on stdout - - \retval 0: all fine - \retval -1: something went wrong - - FIXME: How to pass size? How to handle size field in ftdi_eeprom? - FIXME: Strings are malloc'ed here and should be freed somewhere -*/ -int ftdi_eeprom_decode(struct ftdi_context *ftdi, int verbose) -{ - unsigned char i, j; - unsigned short checksum, eeprom_checksum, value; - unsigned char manufacturer_size = 0, product_size = 0, serial_size = 0; - int eeprom_size; - struct ftdi_eeprom *eeprom; - unsigned char *buf = ftdi->eeprom->buf; - int release; - - if (ftdi == NULL) - ftdi_error_return(-1,"No context"); - if (ftdi->eeprom == NULL) - ftdi_error_return(-1,"No eeprom structure"); - - eeprom = ftdi->eeprom; - eeprom_size = eeprom->size; - - // Addr 02: Vendor ID - eeprom->vendor_id = buf[0x02] + (buf[0x03] << 8); - - // Addr 04: Product ID - eeprom->product_id = buf[0x04] + (buf[0x05] << 8); - - release = buf[0x06] + (buf[0x07]<<8); - - // Addr 08: Config descriptor - // Bit 7: always 1 - // Bit 6: 1 if this device is self powered, 0 if bus powered - // Bit 5: 1 if this device uses remote wakeup - eeprom->self_powered = buf[0x08] & 0x40; - eeprom->remote_wakeup = buf[0x08] & 0x20; - - // Addr 09: Max power consumption: max power = value * 2 mA - eeprom->max_power = buf[0x09]; - - // Addr 0A: Chip configuration - // Bit 7: 0 - reserved - // Bit 6: 0 - reserved - // Bit 5: 0 - reserved - // Bit 4: 1 - Change USB version on BM and 2232C - // Bit 3: 1 - Use the serial number string - // Bit 2: 1 - Enable suspend pull downs for lower power - // Bit 1: 1 - Out EndPoint is Isochronous - // Bit 0: 1 - In EndPoint is Isochronous - // - eeprom->in_is_isochronous = buf[0x0A]&0x01; - eeprom->out_is_isochronous = buf[0x0A]&0x02; - eeprom->suspend_pull_downs = buf[0x0A]&0x04; - eeprom->use_serial = (buf[0x0A] & USE_SERIAL_NUM)?1:0; - eeprom->use_usb_version = buf[0x0A] & USE_USB_VERSION_BIT; - - // Addr 0C: USB version low byte when 0x0A - // Addr 0D: USB version high byte when 0x0A - eeprom->usb_version = buf[0x0C] + (buf[0x0D] << 8); - - // Addr 0E: Offset of the manufacturer string + 0x80, calculated later - // Addr 0F: Length of manufacturer string - manufacturer_size = buf[0x0F]/2; - if (eeprom->manufacturer) - free(eeprom->manufacturer); - if (manufacturer_size > 0) - { - eeprom->manufacturer = malloc(manufacturer_size); - if (eeprom->manufacturer) - { - // Decode manufacturer - i = buf[0x0E] & (eeprom_size -1); // offset - for (j=0;jmanufacturer[j] = buf[2*j+i+2]; - } - eeprom->manufacturer[j] = '\0'; - } - } - else eeprom->manufacturer = NULL; - - // Addr 10: Offset of the product string + 0x80, calculated later - // Addr 11: Length of product string - if (eeprom->product) - free(eeprom->product); - product_size = buf[0x11]/2; - if (product_size > 0) - { - eeprom->product = malloc(product_size); - if (eeprom->product) - { - // Decode product name - i = buf[0x10] & (eeprom_size -1); // offset - for (j=0;jproduct[j] = buf[2*j+i+2]; - } - eeprom->product[j] = '\0'; - } - } - else eeprom->product = NULL; - - // Addr 12: Offset of the serial string + 0x80, calculated later - // Addr 13: Length of serial string - if (eeprom->serial) - free(eeprom->serial); - serial_size = buf[0x13]/2; - if (serial_size > 0) - { - eeprom->serial = malloc(serial_size); - if (eeprom->serial) - { - // Decode serial - i = buf[0x12] & (eeprom_size -1); // offset - for (j=0;jserial[j] = buf[2*j+i+2]; - } - eeprom->serial[j] = '\0'; - } - } - else eeprom->serial = NULL; - - // verify checksum - checksum = 0xAAAA; - - for (i = 0; i < eeprom_size/2-1; i++) - { - value = buf[i*2]; - value += buf[(i*2)+1] << 8; - - checksum = value^checksum; - checksum = (checksum << 1) | (checksum >> 15); - } - - eeprom_checksum = buf[eeprom_size-2] + (buf[eeprom_size-1] << 8); - - if (eeprom_checksum != checksum) - { - fprintf(stderr, "Checksum Error: %04x %04x\n", checksum, eeprom_checksum); - ftdi_error_return(-1,"EEPROM checksum error"); - } - - eeprom->channel_a_type = 0; - if ((ftdi->type == TYPE_AM) || (ftdi->type == TYPE_BM)) - { - eeprom->chip = -1; - } - else if (ftdi->type == TYPE_2232C) - { - eeprom->channel_a_type = bit2type(buf[0x00] & 0x7); - eeprom->channel_a_driver = buf[0x00] & DRIVER_VCP; - eeprom->high_current_a = buf[0x00] & HIGH_CURRENT_DRIVE; - eeprom->channel_b_type = buf[0x01] & 0x7; - eeprom->channel_b_driver = buf[0x01] & DRIVER_VCP; - eeprom->high_current_b = buf[0x01] & HIGH_CURRENT_DRIVE; - eeprom->chip = buf[0x14]; - } - else if (ftdi->type == TYPE_R) - { - /* TYPE_R flags D2XX, not VCP as all others*/ - eeprom->channel_a_driver = ~buf[0x00] & DRIVER_VCP; - eeprom->high_current = buf[0x00] & HIGH_CURRENT_DRIVE_R; - if ( (buf[0x01]&0x40) != 0x40) - fprintf(stderr, - "TYPE_R EEPROM byte[0x01] Bit 6 unexpected Endpoint size." - " If this happened with the\n" - " EEPROM programmed by FTDI tools, please report " - "to libftdi@developer.intra2net.com\n"); - - eeprom->chip = buf[0x16]; - // Addr 0B: Invert data lines - // Works only on FT232R, not FT245R, but no way to distinguish - eeprom->invert = buf[0x0B]; - // Addr 14: CBUS function: CBUS0, CBUS1 - // Addr 15: CBUS function: CBUS2, CBUS3 - // Addr 16: CBUS function: CBUS5 - eeprom->cbus_function[0] = buf[0x14] & 0x0f; - eeprom->cbus_function[1] = (buf[0x14] >> 4) & 0x0f; - eeprom->cbus_function[2] = buf[0x15] & 0x0f; - eeprom->cbus_function[3] = (buf[0x15] >> 4) & 0x0f; - eeprom->cbus_function[4] = buf[0x16] & 0x0f; - } - else if ((ftdi->type == TYPE_2232H) || (ftdi->type == TYPE_4232H)) - { - eeprom->channel_a_driver = buf[0x00] & DRIVER_VCP; - eeprom->channel_b_driver = buf[0x01] & DRIVER_VCP; - - if (ftdi->type == TYPE_2232H) - { - eeprom->channel_a_type = bit2type(buf[0x00] & 0x7); - eeprom->channel_b_type = bit2type(buf[0x01] & 0x7); - eeprom->suspend_dbus7 = buf[0x01] & SUSPEND_DBUS7_BIT; - } - else - { - eeprom->channel_c_driver = (buf[0x00] >> 4) & DRIVER_VCP; - eeprom->channel_d_driver = (buf[0x01] >> 4) & DRIVER_VCP; - eeprom->channel_a_rs485enable = buf[0x0b] & (CHANNEL_IS_RS485 << 0); - eeprom->channel_b_rs485enable = buf[0x0b] & (CHANNEL_IS_RS485 << 1); - eeprom->channel_c_rs485enable = buf[0x0b] & (CHANNEL_IS_RS485 << 2); - eeprom->channel_d_rs485enable = buf[0x0b] & (CHANNEL_IS_RS485 << 3); - } - - eeprom->chip = buf[0x18]; - eeprom->group0_drive = buf[0x0c] & DRIVE_16MA; - eeprom->group0_schmitt = buf[0x0c] & IS_SCHMITT; - eeprom->group0_slew = buf[0x0c] & SLOW_SLEW; - eeprom->group1_drive = (buf[0x0c] >> 4) & 0x3; - eeprom->group1_schmitt = (buf[0x0c] >> 4) & IS_SCHMITT; - eeprom->group1_slew = (buf[0x0c] >> 4) & SLOW_SLEW; - eeprom->group2_drive = buf[0x0d] & DRIVE_16MA; - eeprom->group2_schmitt = buf[0x0d] & IS_SCHMITT; - eeprom->group2_slew = buf[0x0d] & SLOW_SLEW; - eeprom->group3_drive = (buf[0x0d] >> 4) & DRIVE_16MA; - eeprom->group3_schmitt = (buf[0x0d] >> 4) & IS_SCHMITT; - eeprom->group3_slew = (buf[0x0d] >> 4) & SLOW_SLEW; - } - else if (ftdi->type == TYPE_232H) - { - int i; - - eeprom->channel_a_type = buf[0x00] & 0xf; - eeprom->channel_a_driver = (buf[0x00] & DRIVER_VCPH)?DRIVER_VCP:0; - eeprom->clock_polarity = buf[0x01] & FT1284_CLK_IDLE_STATE; - eeprom->data_order = buf[0x01] & FT1284_DATA_LSB; - eeprom->flow_control = buf[0x01] & FT1284_FLOW_CONTROL; - eeprom->powersave = buf[0x01] & POWER_SAVE_DISABLE_H; - eeprom->group0_drive = buf[0x0c] & DRIVE_16MA; - eeprom->group0_schmitt = buf[0x0c] & IS_SCHMITT; - eeprom->group0_slew = buf[0x0c] & SLOW_SLEW; - eeprom->group1_drive = buf[0x0d] & DRIVE_16MA; - eeprom->group1_schmitt = buf[0x0d] & IS_SCHMITT; - eeprom->group1_slew = buf[0x0d] & SLOW_SLEW; - - for(i=0; i<5; i++) - { - eeprom->cbus_function[2*i ] = buf[0x18+i] & 0x0f; - eeprom->cbus_function[2*i+1] = (buf[0x18+i] >> 4) & 0x0f; - } - eeprom->chip = buf[0x1e]; - /*FIXME: Decipher more values*/ - } - - if (verbose) - { - char *channel_mode[] = {"UART", "FIFO", "CPU", "OPTO", "FT1284"}; - fprintf(stdout, "VID: 0x%04x\n",eeprom->vendor_id); - fprintf(stdout, "PID: 0x%04x\n",eeprom->product_id); - fprintf(stdout, "Release: 0x%04x\n",release); - - if (eeprom->self_powered) - fprintf(stdout, "Self-Powered%s", (eeprom->remote_wakeup)?", USB Remote Wake Up\n":"\n"); - else - fprintf(stdout, "Bus Powered: %3d mA%s", eeprom->max_power * 2, - (eeprom->remote_wakeup)?" USB Remote Wake Up\n":"\n"); - if (eeprom->manufacturer) - fprintf(stdout, "Manufacturer: %s\n",eeprom->manufacturer); - if (eeprom->product) - fprintf(stdout, "Product: %s\n",eeprom->product); - if (eeprom->serial) - fprintf(stdout, "Serial: %s\n",eeprom->serial); - fprintf(stdout, "Checksum : %04x\n", checksum); - if (ftdi->type == TYPE_R) - fprintf(stdout, "Internal EEPROM\n"); - else if (eeprom->chip >= 0x46) - fprintf(stdout, "Attached EEPROM: 93x%02x\n", eeprom->chip); - if (eeprom->suspend_dbus7) - fprintf(stdout, "Suspend on DBUS7\n"); - if (eeprom->suspend_pull_downs) - fprintf(stdout, "Pull IO pins low during suspend\n"); - if(eeprom->powersave) - { - if(ftdi->type >= TYPE_232H) - fprintf(stdout,"Enter low power state on ACBUS7\n"); - } - if (eeprom->remote_wakeup) - fprintf(stdout, "Enable Remote Wake Up\n"); - fprintf(stdout, "PNP: %d\n",(eeprom->is_not_pnp)?0:1); - if (ftdi->type >= TYPE_2232C) - fprintf(stdout,"Channel A has Mode %s%s%s\n", - channel_mode[eeprom->channel_a_type], - (eeprom->channel_a_driver)?" VCP":"", - (eeprom->high_current_a)?" High Current IO":""); - if (ftdi->type >= TYPE_232H) - { - fprintf(stdout,"FT1284 Mode Clock is idle %s, %s first, %sFlow Control\n", - (eeprom->clock_polarity)?"HIGH":"LOW", - (eeprom->data_order)?"LSB":"MSB", - (eeprom->flow_control)?"":"No "); - } - if ((ftdi->type >= TYPE_2232C) && (ftdi->type != TYPE_R) && (ftdi->type != TYPE_232H)) - fprintf(stdout,"Channel B has Mode %s%s%s\n", - channel_mode[eeprom->channel_b_type], - (eeprom->channel_b_driver)?" VCP":"", - (eeprom->high_current_b)?" High Current IO":""); - if (((ftdi->type == TYPE_BM) || (ftdi->type == TYPE_2232C)) && - eeprom->use_usb_version == USE_USB_VERSION_BIT) - fprintf(stdout,"Use explicit USB Version %04x\n",eeprom->usb_version); - - if ((ftdi->type == TYPE_2232H) || (ftdi->type == TYPE_4232H)) - { - fprintf(stdout,"%s has %d mA drive%s%s\n", - (ftdi->type == TYPE_2232H)?"AL":"A", - (eeprom->group0_drive+1) *4, - (eeprom->group0_schmitt)?" Schmitt Input":"", - (eeprom->group0_slew)?" Slow Slew":""); - fprintf(stdout,"%s has %d mA drive%s%s\n", - (ftdi->type == TYPE_2232H)?"AH":"B", - (eeprom->group1_drive+1) *4, - (eeprom->group1_schmitt)?" Schmitt Input":"", - (eeprom->group1_slew)?" Slow Slew":""); - fprintf(stdout,"%s has %d mA drive%s%s\n", - (ftdi->type == TYPE_2232H)?"BL":"C", - (eeprom->group2_drive+1) *4, - (eeprom->group2_schmitt)?" Schmitt Input":"", - (eeprom->group2_slew)?" Slow Slew":""); - fprintf(stdout,"%s has %d mA drive%s%s\n", - (ftdi->type == TYPE_2232H)?"BH":"D", - (eeprom->group3_drive+1) *4, - (eeprom->group3_schmitt)?" Schmitt Input":"", - (eeprom->group3_slew)?" Slow Slew":""); - } - else if (ftdi->type == TYPE_232H) - { - int i; - char *cbush_mux[] = {"TRISTATE","RXLED","TXLED", "TXRXLED","PWREN", - "SLEEP","DRIVE_0","DRIVE_1","IOMODE","TXDEN", - "CLK30","CLK15","CLK7_5" - }; - fprintf(stdout,"ACBUS has %d mA drive%s%s\n", - (eeprom->group0_drive+1) *4, - (eeprom->group0_schmitt)?" Schmitt Input":"", - (eeprom->group0_slew)?" Slow Slew":""); - fprintf(stdout,"ADBUS has %d mA drive%s%s\n", - (eeprom->group1_drive+1) *4, - (eeprom->group1_schmitt)?" Schmitt Input":"", - (eeprom->group1_slew)?" Slow Slew":""); - for (i=0; i<10; i++) - { - if (eeprom->cbus_function[i]<= CBUSH_CLK7_5 ) - fprintf(stdout,"C%d Function: %s\n", i, - cbush_mux[eeprom->cbus_function[i]]); - } - } - - if (ftdi->type == TYPE_R) - { - char *cbus_mux[] = {"TXDEN","PWREN","RXLED", "TXLED","TX+RXLED", - "SLEEP","CLK48","CLK24","CLK12","CLK6", - "IOMODE","BB_WR","BB_RD" - }; - char *cbus_BB[] = {"RXF","TXE","RD", "WR"}; - - if (eeprom->invert) - { - char *r_bits[] = {"TXD","RXD","RTS", "CTS","DTR","DSR","DCD","RI"}; - fprintf(stdout,"Inverted bits:"); - for (i=0; i<8; i++) - if ((eeprom->invert & (1<cbus_function[i]cbus_function[i]]); - else - { - if (i < 4) - /* Running MPROG show that C0..3 have fixed function Synchronous - Bit Bang mode */ - fprintf(stdout,"C%d BB Function: %s\n", i, - cbus_BB[i]); - else - fprintf(stdout, "Unknown CBUS mode. Might be special mode?\n"); - } - } - } - } - return 0; -} - -/** - Get a value from the decoded EEPROM structure - - \param ftdi pointer to ftdi_context - \param value_name Enum of the value to query - \param value Pointer to store read value - - \retval 0: all fine - \retval -1: Value doesn't exist -*/ -int ftdi_get_eeprom_value(struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int* value) -{ - switch (value_name) - { - case VENDOR_ID: - *value = ftdi->eeprom->vendor_id; - break; - case PRODUCT_ID: - *value = ftdi->eeprom->product_id; - break; - case SELF_POWERED: - *value = ftdi->eeprom->self_powered; - break; - case REMOTE_WAKEUP: - *value = ftdi->eeprom->remote_wakeup; - break; - case IS_NOT_PNP: - *value = ftdi->eeprom->is_not_pnp; - break; - case SUSPEND_DBUS7: - *value = ftdi->eeprom->suspend_dbus7; - break; - case IN_IS_ISOCHRONOUS: - *value = ftdi->eeprom->in_is_isochronous; - break; - case OUT_IS_ISOCHRONOUS: - *value = ftdi->eeprom->out_is_isochronous; - break; - case SUSPEND_PULL_DOWNS: - *value = ftdi->eeprom->suspend_pull_downs; - break; - case USE_SERIAL: - *value = ftdi->eeprom->use_serial; - break; - case USB_VERSION: - *value = ftdi->eeprom->usb_version; - break; - case USE_USB_VERSION: - *value = ftdi->eeprom->use_usb_version; - break; - case MAX_POWER: - *value = ftdi->eeprom->max_power; - break; - case CHANNEL_A_TYPE: - *value = ftdi->eeprom->channel_a_type; - break; - case CHANNEL_B_TYPE: - *value = ftdi->eeprom->channel_b_type; - break; - case CHANNEL_A_DRIVER: - *value = ftdi->eeprom->channel_a_driver; - break; - case CHANNEL_B_DRIVER: - *value = ftdi->eeprom->channel_b_driver; - break; - case CHANNEL_C_DRIVER: - *value = ftdi->eeprom->channel_c_driver; - break; - case CHANNEL_D_DRIVER: - *value = ftdi->eeprom->channel_d_driver; - break; - case CHANNEL_A_RS485: - *value = ftdi->eeprom->channel_a_rs485enable; - break; - case CHANNEL_B_RS485: - *value = ftdi->eeprom->channel_b_rs485enable; - break; - case CHANNEL_C_RS485: - *value = ftdi->eeprom->channel_c_rs485enable; - break; - case CHANNEL_D_RS485: - *value = ftdi->eeprom->channel_d_rs485enable; - break; - case CBUS_FUNCTION_0: - *value = ftdi->eeprom->cbus_function[0]; - break; - case CBUS_FUNCTION_1: - *value = ftdi->eeprom->cbus_function[1]; - break; - case CBUS_FUNCTION_2: - *value = ftdi->eeprom->cbus_function[2]; - break; - case CBUS_FUNCTION_3: - *value = ftdi->eeprom->cbus_function[3]; - break; - case CBUS_FUNCTION_4: - *value = ftdi->eeprom->cbus_function[4]; - break; - case CBUS_FUNCTION_5: - *value = ftdi->eeprom->cbus_function[5]; - break; - case CBUS_FUNCTION_6: - *value = ftdi->eeprom->cbus_function[6]; - break; - case CBUS_FUNCTION_7: - *value = ftdi->eeprom->cbus_function[7]; - break; - case CBUS_FUNCTION_8: - *value = ftdi->eeprom->cbus_function[8]; - break; - case CBUS_FUNCTION_9: - *value = ftdi->eeprom->cbus_function[8]; - break; - case HIGH_CURRENT: - *value = ftdi->eeprom->high_current; - break; - case HIGH_CURRENT_A: - *value = ftdi->eeprom->high_current_a; - break; - case HIGH_CURRENT_B: - *value = ftdi->eeprom->high_current_b; - break; - case INVERT: - *value = ftdi->eeprom->invert; - break; - case GROUP0_DRIVE: - *value = ftdi->eeprom->group0_drive; - break; - case GROUP0_SCHMITT: - *value = ftdi->eeprom->group0_schmitt; - break; - case GROUP0_SLEW: - *value = ftdi->eeprom->group0_slew; - break; - case GROUP1_DRIVE: - *value = ftdi->eeprom->group1_drive; - break; - case GROUP1_SCHMITT: - *value = ftdi->eeprom->group1_schmitt; - break; - case GROUP1_SLEW: - *value = ftdi->eeprom->group1_slew; - break; - case GROUP2_DRIVE: - *value = ftdi->eeprom->group2_drive; - break; - case GROUP2_SCHMITT: - *value = ftdi->eeprom->group2_schmitt; - break; - case GROUP2_SLEW: - *value = ftdi->eeprom->group2_slew; - break; - case GROUP3_DRIVE: - *value = ftdi->eeprom->group3_drive; - break; - case GROUP3_SCHMITT: - *value = ftdi->eeprom->group3_schmitt; - break; - case GROUP3_SLEW: - *value = ftdi->eeprom->group3_slew; - break; - case POWER_SAVE: - *value = ftdi->eeprom->powersave; - break; - case CLOCK_POLARITY: - *value = ftdi->eeprom->clock_polarity; - break; - case DATA_ORDER: - *value = ftdi->eeprom->data_order; - break; - case FLOW_CONTROL: - *value = ftdi->eeprom->flow_control; - break; - case CHIP_TYPE: - *value = ftdi->eeprom->chip; - break; - case CHIP_SIZE: - *value = ftdi->eeprom->size; - break; - default: - ftdi_error_return(-1, "Request for unknown EEPROM value"); - } - return 0; -} - -/** - Set a value in the decoded EEPROM Structure - No parameter checking is performed - - \param ftdi pointer to ftdi_context - \param value_name Enum of the value to set - \param value to set - - \retval 0: all fine - \retval -1: Value doesn't exist - \retval -2: Value not user settable -*/ -int ftdi_set_eeprom_value(struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int value) -{ - switch (value_name) - { - case VENDOR_ID: - ftdi->eeprom->vendor_id = value; - break; - case PRODUCT_ID: - ftdi->eeprom->product_id = value; - break; - case SELF_POWERED: - ftdi->eeprom->self_powered = value; - break; - case REMOTE_WAKEUP: - ftdi->eeprom->remote_wakeup = value; - break; - case IS_NOT_PNP: - ftdi->eeprom->is_not_pnp = value; - break; - case SUSPEND_DBUS7: - ftdi->eeprom->suspend_dbus7 = value; - break; - case IN_IS_ISOCHRONOUS: - ftdi->eeprom->in_is_isochronous = value; - break; - case OUT_IS_ISOCHRONOUS: - ftdi->eeprom->out_is_isochronous = value; - break; - case SUSPEND_PULL_DOWNS: - ftdi->eeprom->suspend_pull_downs = value; - break; - case USE_SERIAL: - ftdi->eeprom->use_serial = value; - break; - case USB_VERSION: - ftdi->eeprom->usb_version = value; - break; - case USE_USB_VERSION: - ftdi->eeprom->use_usb_version = value; - break; - case MAX_POWER: - ftdi->eeprom->max_power = value; - break; - case CHANNEL_A_TYPE: - ftdi->eeprom->channel_a_type = value; - break; - case CHANNEL_B_TYPE: - ftdi->eeprom->channel_b_type = value; - break; - case CHANNEL_A_DRIVER: - ftdi->eeprom->channel_a_driver = value; - break; - case CHANNEL_B_DRIVER: - ftdi->eeprom->channel_b_driver = value; - break; - case CHANNEL_C_DRIVER: - ftdi->eeprom->channel_c_driver = value; - break; - case CHANNEL_D_DRIVER: - ftdi->eeprom->channel_d_driver = value; - break; - case CHANNEL_A_RS485: - ftdi->eeprom->channel_a_rs485enable = value; - break; - case CHANNEL_B_RS485: - ftdi->eeprom->channel_b_rs485enable = value; - break; - case CHANNEL_C_RS485: - ftdi->eeprom->channel_c_rs485enable = value; - break; - case CHANNEL_D_RS485: - ftdi->eeprom->channel_d_rs485enable = value; - break; - case CBUS_FUNCTION_0: - ftdi->eeprom->cbus_function[0] = value; - break; - case CBUS_FUNCTION_1: - ftdi->eeprom->cbus_function[1] = value; - break; - case CBUS_FUNCTION_2: - ftdi->eeprom->cbus_function[2] = value; - break; - case CBUS_FUNCTION_3: - ftdi->eeprom->cbus_function[3] = value; - break; - case CBUS_FUNCTION_4: - ftdi->eeprom->cbus_function[4] = value; - break; - case CBUS_FUNCTION_5: - ftdi->eeprom->cbus_function[5] = value; - break; - case CBUS_FUNCTION_6: - ftdi->eeprom->cbus_function[6] = value; - break; - case CBUS_FUNCTION_7: - ftdi->eeprom->cbus_function[7] = value; - break; - case CBUS_FUNCTION_8: - ftdi->eeprom->cbus_function[8] = value; - break; - case CBUS_FUNCTION_9: - ftdi->eeprom->cbus_function[9] = value; - break; - case HIGH_CURRENT: - ftdi->eeprom->high_current = value; - break; - case HIGH_CURRENT_A: - ftdi->eeprom->high_current_a = value; - break; - case HIGH_CURRENT_B: - ftdi->eeprom->high_current_b = value; - break; - case INVERT: - ftdi->eeprom->invert = value; - break; - case GROUP0_DRIVE: - ftdi->eeprom->group0_drive = value; - break; - case GROUP0_SCHMITT: - ftdi->eeprom->group0_schmitt = value; - break; - case GROUP0_SLEW: - ftdi->eeprom->group0_slew = value; - break; - case GROUP1_DRIVE: - ftdi->eeprom->group1_drive = value; - break; - case GROUP1_SCHMITT: - ftdi->eeprom->group1_schmitt = value; - break; - case GROUP1_SLEW: - ftdi->eeprom->group1_slew = value; - break; - case GROUP2_DRIVE: - ftdi->eeprom->group2_drive = value; - break; - case GROUP2_SCHMITT: - ftdi->eeprom->group2_schmitt = value; - break; - case GROUP2_SLEW: - ftdi->eeprom->group2_slew = value; - break; - case GROUP3_DRIVE: - ftdi->eeprom->group3_drive = value; - break; - case GROUP3_SCHMITT: - ftdi->eeprom->group3_schmitt = value; - break; - case GROUP3_SLEW: - ftdi->eeprom->group3_slew = value; - break; - case CHIP_TYPE: - ftdi->eeprom->chip = value; - break; - case POWER_SAVE: - ftdi->eeprom->powersave = value; - break; - case CLOCK_POLARITY: - ftdi->eeprom->clock_polarity = value; - break; - case DATA_ORDER: - ftdi->eeprom->data_order = value; - break; - case FLOW_CONTROL: - ftdi->eeprom->flow_control = value; - break; - case CHIP_SIZE: - ftdi_error_return(-2, "EEPROM Value can't be changed"); - default : - ftdi_error_return(-1, "Request to unknown EEPROM value"); - } - return 0; -} - -/** Get the read-only buffer to the binary EEPROM content - - \param ftdi pointer to ftdi_context - \param buf buffer to receive EEPROM content - \param size Size of receiving buffer - - \retval 0: All fine - \retval -1: struct ftdi_contxt or ftdi_eeprom missing - \retval -2: Not enough room to store eeprom -*/ -int ftdi_get_eeprom_buf(struct ftdi_context *ftdi, unsigned char * buf, int size) -{ - if (!ftdi || !(ftdi->eeprom)) - ftdi_error_return(-1, "No appropriate structure"); - - if (!buf || size < ftdi->eeprom->size) - ftdi_error_return(-1, "Not enough room to store eeprom"); - - // Only copy up to FTDI_MAX_EEPROM_SIZE bytes - if (size > FTDI_MAX_EEPROM_SIZE) - size = FTDI_MAX_EEPROM_SIZE; - - memcpy(buf, ftdi->eeprom->buf, size); - - return 0; -} - -/** Set the EEPROM content from the user-supplied prefilled buffer - - \param ftdi pointer to ftdi_context - \param buf buffer to read EEPROM content - \param size Size of buffer - - \retval 0: All fine - \retval -1: struct ftdi_contxt or ftdi_eeprom of buf missing -*/ -int ftdi_set_eeprom_buf(struct ftdi_context *ftdi, const unsigned char * buf, int size) -{ - if (!ftdi || !(ftdi->eeprom) || !buf) - ftdi_error_return(-1, "No appropriate structure"); - - // Only copy up to FTDI_MAX_EEPROM_SIZE bytes - if (size > FTDI_MAX_EEPROM_SIZE) - size = FTDI_MAX_EEPROM_SIZE; - - memcpy(ftdi->eeprom->buf, buf, size); - - return 0; -} - -/** - Read eeprom location - - \param ftdi pointer to ftdi_context - \param eeprom_addr Address of eeprom location to be read - \param eeprom_val Pointer to store read eeprom location - - \retval 0: all fine - \retval -1: read failed - \retval -2: USB device unavailable -*/ -int ftdi_read_eeprom_location (struct ftdi_context *ftdi, int eeprom_addr, unsigned short *eeprom_val) -{ - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_IN_REQTYPE, SIO_READ_EEPROM_REQUEST, 0, eeprom_addr, (unsigned char *)eeprom_val, 2, ftdi->usb_read_timeout) != 2) - ftdi_error_return(-1, "reading eeprom failed"); - - return 0; -} - -/** - Read eeprom - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: read failed - \retval -2: USB device unavailable -*/ -int ftdi_read_eeprom(struct ftdi_context *ftdi) -{ - int i; - unsigned char *buf; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - buf = ftdi->eeprom->buf; - - for (i = 0; i < FTDI_MAX_EEPROM_SIZE/2; i++) - { - if (libusb_control_transfer( - ftdi->usb_dev, FTDI_DEVICE_IN_REQTYPE,SIO_READ_EEPROM_REQUEST, 0, i, - buf+(i*2), 2, ftdi->usb_read_timeout) != 2) - ftdi_error_return(-1, "reading eeprom failed"); - } - - if (ftdi->type == TYPE_R) - ftdi->eeprom->size = 0x80; - /* Guesses size of eeprom by comparing halves - - will not work with blank eeprom */ - else if (strrchr((const char *)buf, 0xff) == ((const char *)buf +FTDI_MAX_EEPROM_SIZE -1)) - ftdi->eeprom->size = -1; - else if (memcmp(buf,&buf[0x80],0x80) == 0) - ftdi->eeprom->size = 0x80; - else if (memcmp(buf,&buf[0x40],0x40) == 0) - ftdi->eeprom->size = 0x40; - else - ftdi->eeprom->size = 0x100; - return 0; -} - -/* - ftdi_read_chipid_shift does the bitshift operation needed for the FTDIChip-ID - Function is only used internally - \internal -*/ -static unsigned char ftdi_read_chipid_shift(unsigned char value) -{ - return ((value & 1) << 1) | - ((value & 2) << 5) | - ((value & 4) >> 2) | - ((value & 8) << 4) | - ((value & 16) >> 1) | - ((value & 32) >> 1) | - ((value & 64) >> 4) | - ((value & 128) >> 2); -} - -/** - Read the FTDIChip-ID from R-type devices - - \param ftdi pointer to ftdi_context - \param chipid Pointer to store FTDIChip-ID - - \retval 0: all fine - \retval -1: read failed - \retval -2: USB device unavailable -*/ -int ftdi_read_chipid(struct ftdi_context *ftdi, unsigned int *chipid) -{ - unsigned int a = 0, b = 0; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_IN_REQTYPE, SIO_READ_EEPROM_REQUEST, 0, 0x43, (unsigned char *)&a, 2, ftdi->usb_read_timeout) == 2) - { - a = a << 8 | a >> 8; - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_IN_REQTYPE, SIO_READ_EEPROM_REQUEST, 0, 0x44, (unsigned char *)&b, 2, ftdi->usb_read_timeout) == 2) - { - b = b << 8 | b >> 8; - a = (a << 16) | (b & 0xFFFF); - a = ftdi_read_chipid_shift(a) | ftdi_read_chipid_shift(a>>8)<<8 - | ftdi_read_chipid_shift(a>>16)<<16 | ftdi_read_chipid_shift(a>>24)<<24; - *chipid = a ^ 0xa5f0f7d1; - return 0; - } - } - - ftdi_error_return(-1, "read of FTDIChip-ID failed"); -} - -/** - Write eeprom location - - \param ftdi pointer to ftdi_context - \param eeprom_addr Address of eeprom location to be written - \param eeprom_val Value to be written - - \retval 0: all fine - \retval -1: write failed - \retval -2: USB device unavailable - \retval -3: Invalid access to checksum protected area below 0x80 - \retval -4: Device can't access unprotected area - \retval -5: Reading chip type failed -*/ -int ftdi_write_eeprom_location(struct ftdi_context *ftdi, int eeprom_addr, - unsigned short eeprom_val) -{ - int chip_type_location; - unsigned short chip_type; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (eeprom_addr <0x80) - ftdi_error_return(-2, "Invalid access to checksum protected area below 0x80"); - - - switch (ftdi->type) - { - case TYPE_BM: - case TYPE_2232C: - chip_type_location = 0x14; - break; - case TYPE_2232H: - case TYPE_4232H: - chip_type_location = 0x18; - break; - case TYPE_232H: - chip_type_location = 0x1e; - break; - default: - ftdi_error_return(-4, "Device can't access unprotected area"); - } - - if (ftdi_read_eeprom_location( ftdi, chip_type_location>>1, &chip_type)) - ftdi_error_return(-5, "Reading failed failed"); - fprintf(stderr," loc 0x%04x val 0x%04x\n", chip_type_location,chip_type); - if ((chip_type & 0xff) != 0x66) - { - ftdi_error_return(-6, "EEPROM is not of 93x66"); - } - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_WRITE_EEPROM_REQUEST, eeprom_val, eeprom_addr, - NULL, 0, ftdi->usb_write_timeout) != 0) - ftdi_error_return(-1, "unable to write eeprom"); - - return 0; -} - -/** - Write eeprom - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: read failed - \retval -2: USB device unavailable - \retval -3: EEPROM not initialized for the connected device; -*/ -int ftdi_write_eeprom(struct ftdi_context *ftdi) -{ - unsigned short usb_val, status; - int i, ret; - unsigned char *eeprom; - - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if(ftdi->eeprom->initialized_for_connected_device == 0) - ftdi_error_return(-3, "EEPROM not initialized for the connected device"); - - eeprom = ftdi->eeprom->buf; - - /* These commands were traced while running MProg */ - if ((ret = ftdi_usb_reset(ftdi)) != 0) - return ret; - if ((ret = ftdi_poll_modem_status(ftdi, &status)) != 0) - return ret; - if ((ret = ftdi_set_latency_timer(ftdi, 0x77)) != 0) - return ret; - - for (i = 0; i < ftdi->eeprom->size/2; i++) - { - usb_val = eeprom[i*2]; - usb_val += eeprom[(i*2)+1] << 8; - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_WRITE_EEPROM_REQUEST, usb_val, i, - NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "unable to write eeprom"); - } - - return 0; -} - -/** - Erase eeprom - - This is not supported on FT232R/FT245R according to the MProg manual from FTDI. - - \param ftdi pointer to ftdi_context - - \retval 0: all fine - \retval -1: erase failed - \retval -2: USB device unavailable - \retval -3: Writing magic failed - \retval -4: Read EEPROM failed - \retval -5: Unexpected EEPROM value -*/ -#define MAGIC 0x55aa -int ftdi_erase_eeprom(struct ftdi_context *ftdi) -{ - unsigned short eeprom_value; - if (ftdi == NULL || ftdi->usb_dev == NULL) - ftdi_error_return(-2, "USB device unavailable"); - - if (ftdi->type == TYPE_R) - { - ftdi->eeprom->chip = 0; - return 0; - } - - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, SIO_ERASE_EEPROM_REQUEST, - 0, 0, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "unable to erase eeprom"); - - - /* detect chip type by writing 0x55AA as magic at word position 0xc0 - Chip is 93x46 if magic is read at word position 0x00, as wraparound happens around 0x40 - Chip is 93x56 if magic is read at word position 0x40, as wraparound happens around 0x80 - Chip is 93x66 if magic is only read at word position 0xc0*/ - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, - SIO_WRITE_EEPROM_REQUEST, MAGIC, 0xc0, - NULL, 0, ftdi->usb_write_timeout) != 0) - ftdi_error_return(-3, "Writing magic failed"); - if (ftdi_read_eeprom_location( ftdi, 0x00, &eeprom_value)) - ftdi_error_return(-4, "Reading failed failed"); - if (eeprom_value == MAGIC) - { - ftdi->eeprom->chip = 0x46; - } - else - { - if (ftdi_read_eeprom_location( ftdi, 0x40, &eeprom_value)) - ftdi_error_return(-4, "Reading failed failed"); - if (eeprom_value == MAGIC) - ftdi->eeprom->chip = 0x56; - else - { - if (ftdi_read_eeprom_location( ftdi, 0xc0, &eeprom_value)) - ftdi_error_return(-4, "Reading failed failed"); - if (eeprom_value == MAGIC) - ftdi->eeprom->chip = 0x66; - else - { - ftdi->eeprom->chip = -1; - } - } - } - if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_OUT_REQTYPE, SIO_ERASE_EEPROM_REQUEST, - 0, 0, NULL, 0, ftdi->usb_write_timeout) < 0) - ftdi_error_return(-1, "unable to erase eeprom"); - return 0; -} - -/** - Get string representation for last error code - - \param ftdi pointer to ftdi_context - - \retval Pointer to error string -*/ -char *ftdi_get_error_string (struct ftdi_context *ftdi) -{ - if (ftdi == NULL) - return ""; - - return ftdi->error_str; -} - -/* @} end of doxygen libftdi group */ diff --git a/lib/libftdi/src/ftdi.h b/lib/libftdi/src/ftdi.h deleted file mode 100644 index 38b0668..0000000 --- a/lib/libftdi/src/ftdi.h +++ /dev/null @@ -1,530 +0,0 @@ -/*************************************************************************** - ftdi.h - description - ------------------- - begin : Fri Apr 4 2003 - copyright : (C) 2003-2011 by Intra2net AG and the libftdi developers - email : opensource@intra2net.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License * - * version 2.1 as published by the Free Software Foundation; * - * * - ***************************************************************************/ - -#ifndef __libftdi_h__ -#define __libftdi_h__ - -#include - -/** FTDI chip type */ -enum ftdi_chip_type { TYPE_AM=0, TYPE_BM=1, TYPE_2232C=2, TYPE_R=3, TYPE_2232H=4, TYPE_4232H=5, TYPE_232H=6 }; -/** 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() */ -enum ftdi_stopbits_type { STOP_BIT_1=0, STOP_BIT_15=1, STOP_BIT_2=2 }; -/** Number of bits for ftdi_set_line_property() */ -enum ftdi_bits_type { BITS_7=7, BITS_8=8 }; -/** Break type for ftdi_set_line_property2() */ -enum ftdi_break_type { BREAK_OFF=0, BREAK_ON=1 }; - -/** MPSSE bitbang modes */ -enum ftdi_mpsse_mode -{ - BITMODE_RESET = 0x00, /**< switch off bitbang mode, back to regular serial/FIFO */ - BITMODE_BITBANG= 0x01, /**< classical asynchronous bitbang mode, introduced with B-type chips */ - BITMODE_MPSSE = 0x02, /**< MPSSE mode, available on 2232x chips */ - BITMODE_SYNCBB = 0x04, /**< synchronous bitbang mode, available on 2232x and R-type chips */ - BITMODE_MCU = 0x08, /**< MCU Host Bus Emulation mode, available on 2232x chips */ - /* CPU-style fifo mode gets set via EEPROM */ - BITMODE_OPTO = 0x10, /**< Fast Opto-Isolated Serial Interface Mode, available on 2232x chips */ - BITMODE_CBUS = 0x20, /**< Bitbang on CBUS pins of R-type chips, configure in EEPROM before */ - BITMODE_SYNCFF = 0x40, /**< Single Channel Synchronous FIFO mode, available on 2232H chips */ - BITMODE_FT1284 = 0x80, /**< FT1284 mode, available on 232H chips */ -}; - -/** Port interface for chips with multiple interfaces */ -enum ftdi_interface -{ - INTERFACE_ANY = 0, - INTERFACE_A = 1, - INTERFACE_B = 2, - INTERFACE_C = 3, - INTERFACE_D = 4 -}; - -/** Automatic loading / unloading of kernel modules */ -enum ftdi_module_detach_mode -{ - AUTO_DETACH_SIO_MODULE = 0, - DONT_DETACH_SIO_MODULE = 1 -}; - -/* Shifting commands IN MPSSE Mode*/ -#define MPSSE_WRITE_NEG 0x01 /* Write TDI/DO on negative TCK/SK edge*/ -#define MPSSE_BITMODE 0x02 /* Write bits, not bytes */ -#define MPSSE_READ_NEG 0x04 /* Sample TDO/DI on negative TCK/SK edge */ -#define MPSSE_LSB 0x08 /* LSB first */ -#define MPSSE_DO_WRITE 0x10 /* Write TDI/DO */ -#define MPSSE_DO_READ 0x20 /* Read TDO/DI */ -#define MPSSE_WRITE_TMS 0x40 /* Write TMS/CS */ - -/* FTDI MPSSE commands */ -#define SET_BITS_LOW 0x80 -/*BYTE DATA*/ -/*BYTE Direction*/ -#define SET_BITS_HIGH 0x82 -/*BYTE DATA*/ -/*BYTE Direction*/ -#define GET_BITS_LOW 0x81 -#define GET_BITS_HIGH 0x83 -#define LOOPBACK_START 0x84 -#define LOOPBACK_END 0x85 -#define TCK_DIVISOR 0x86 -/* H Type specific commands */ -#define DIS_DIV_5 0x8a -#define EN_DIV_5 0x8b -#define EN_3_PHASE 0x8c -#define DIS_3_PHASE 0x8d -#define CLK_BITS 0x8e -#define CLK_BYTES 0x8f -#define CLK_WAIT_HIGH 0x94 -#define CLK_WAIT_LOW 0x95 -#define EN_ADAPTIVE 0x96 -#define DIS_ADAPTIVE 0x97 -#define CLK_BYTES_OR_HIGH 0x9c -#define CLK_BYTES_OR_LOW 0x0d -/*FT232H specific commands */ -#define DRIVE_OPEN_COLLECTOR 0x9e -/* Value Low */ -/* Value HIGH */ /*rate is 12000000/((1+value)*2) */ -#define DIV_VALUE(rate) (rate > 6000000)?0:((6000000/rate -1) > 0xffff)? 0xffff: (6000000/rate -1) - -/* Commands in MPSSE and Host Emulation Mode */ -#define SEND_IMMEDIATE 0x87 -#define WAIT_ON_HIGH 0x88 -#define WAIT_ON_LOW 0x89 - -/* Commands in Host Emulation Mode */ -#define READ_SHORT 0x90 -/* Address_Low */ -#define READ_EXTENDED 0x91 -/* Address High */ -/* Address Low */ -#define WRITE_SHORT 0x92 -/* Address_Low */ -#define WRITE_EXTENDED 0x93 -/* Address High */ -/* Address Low */ - -/* Definitions for flow control */ -#define SIO_RESET 0 /* Reset the port */ -#define SIO_MODEM_CTRL 1 /* Set the modem control register */ -#define SIO_SET_FLOW_CTRL 2 /* Set flow control register */ -#define SIO_SET_BAUD_RATE 3 /* Set baud rate */ -#define SIO_SET_DATA 4 /* Set the data characteristics of the port */ - -#define FTDI_DEVICE_OUT_REQTYPE (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE | LIBUSB_ENDPOINT_OUT) -#define FTDI_DEVICE_IN_REQTYPE (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE | LIBUSB_ENDPOINT_IN) - -/* Requests */ -#define SIO_RESET_REQUEST SIO_RESET -#define SIO_SET_BAUDRATE_REQUEST SIO_SET_BAUD_RATE -#define SIO_SET_DATA_REQUEST SIO_SET_DATA -#define SIO_SET_FLOW_CTRL_REQUEST SIO_SET_FLOW_CTRL -#define SIO_SET_MODEM_CTRL_REQUEST SIO_MODEM_CTRL -#define SIO_POLL_MODEM_STATUS_REQUEST 0x05 -#define SIO_SET_EVENT_CHAR_REQUEST 0x06 -#define SIO_SET_ERROR_CHAR_REQUEST 0x07 -#define SIO_SET_LATENCY_TIMER_REQUEST 0x09 -#define SIO_GET_LATENCY_TIMER_REQUEST 0x0A -#define SIO_SET_BITMODE_REQUEST 0x0B -#define SIO_READ_PINS_REQUEST 0x0C -#define SIO_READ_EEPROM_REQUEST 0x90 -#define SIO_WRITE_EEPROM_REQUEST 0x91 -#define SIO_ERASE_EEPROM_REQUEST 0x92 - - -#define SIO_RESET_SIO 0 -#define SIO_RESET_PURGE_RX 1 -#define SIO_RESET_PURGE_TX 2 - -#define SIO_DISABLE_FLOW_CTRL 0x0 -#define SIO_RTS_CTS_HS (0x1 << 8) -#define SIO_DTR_DSR_HS (0x2 << 8) -#define SIO_XON_XOFF_HS (0x4 << 8) - -#define SIO_SET_DTR_MASK 0x1 -#define SIO_SET_DTR_HIGH ( 1 | ( SIO_SET_DTR_MASK << 8)) -#define SIO_SET_DTR_LOW ( 0 | ( SIO_SET_DTR_MASK << 8)) -#define SIO_SET_RTS_MASK 0x2 -#define SIO_SET_RTS_HIGH ( 2 | ( SIO_SET_RTS_MASK << 8 )) -#define SIO_SET_RTS_LOW ( 0 | ( SIO_SET_RTS_MASK << 8 )) - -#define SIO_RTS_CTS_HS (0x1 << 8) - -/* marker for unused usb urb structures - (taken from libusb) */ -#define FTDI_URB_USERCONTEXT_COOKIE ((void *)0x1) - -#ifdef __GNUC__ - #define DEPRECATED(func) func __attribute__ ((deprecated)) -#elif defined(_MSC_VER) - #define DEPRECATED(func) __declspec(deprecated) func -#else - #pragma message("WARNING: You need to implement DEPRECATED for this compiler") - #define DEPRECATED(func) func -#endif - -struct ftdi_transfer_control -{ - int completed; - unsigned char *buf; - int size; - int offset; - struct ftdi_context *ftdi; - struct libusb_transfer *transfer; -}; - -/** - \brief Main context structure for all libftdi functions. - - Do not access directly if possible. -*/ -struct ftdi_context -{ - /* USB specific */ - /** libusb's context */ - struct libusb_context *usb_ctx; - /** libusb's usb_dev_handle */ - struct libusb_device_handle *usb_dev; - /** usb read timeout */ - int usb_read_timeout; - /** usb write timeout */ - int usb_write_timeout; - - /* FTDI specific */ - /** FTDI chip type */ - enum ftdi_chip_type type; - /** baudrate */ - int baudrate; - /** bitbang mode state */ - unsigned char bitbang_enabled; - /** pointer to read buffer for ftdi_read_data */ - unsigned char *readbuffer; - /** read buffer offset */ - unsigned int readbuffer_offset; - /** number of remaining data in internal read buffer */ - unsigned int readbuffer_remaining; - /** read buffer chunk size */ - unsigned int readbuffer_chunksize; - /** write buffer chunk size */ - unsigned int writebuffer_chunksize; - /** maximum packet size. Needed for filtering modem status bytes every n packets. */ - unsigned int max_packet_size; - - /* FTDI FT2232C requirecments */ - /** FT2232C interface number: 0 or 1 */ - int interface; /* 0 or 1 */ - /** FT2232C index number: 1 or 2 */ - int index; /* 1 or 2 */ - /* Endpoints */ - /** FT2232C end points: 1 or 2 */ - int in_ep; - int out_ep; /* 1 or 2 */ - - /** Bitbang mode. 1: (default) Normal bitbang mode, 2: FT2232C SPI bitbang mode */ - unsigned char bitbang_mode; - - /** Decoded eeprom structure */ - struct ftdi_eeprom *eeprom; - - /** String representation of last error */ - char *error_str; - - /** Defines behavior in case a kernel module is already attached to the device */ - enum ftdi_module_detach_mode module_detach_mode; -}; - -/** - List all handled EEPROM values. - Append future new values only at the end to provide API/ABI stability*/ -enum ftdi_eeprom_value -{ - VENDOR_ID = 0, - PRODUCT_ID = 1, - SELF_POWERED = 2, - REMOTE_WAKEUP = 3, - IS_NOT_PNP = 4, - SUSPEND_DBUS7 = 5, - IN_IS_ISOCHRONOUS = 6, - OUT_IS_ISOCHRONOUS = 7, - SUSPEND_PULL_DOWNS = 8, - USE_SERIAL = 9, - USB_VERSION = 10, - USE_USB_VERSION = 11, - MAX_POWER = 12, - CHANNEL_A_TYPE = 13, - CHANNEL_B_TYPE = 14, - CHANNEL_A_DRIVER = 15, - CHANNEL_B_DRIVER = 16, - CBUS_FUNCTION_0 = 17, - CBUS_FUNCTION_1 = 18, - CBUS_FUNCTION_2 = 19, - CBUS_FUNCTION_3 = 20, - CBUS_FUNCTION_4 = 21, - CBUS_FUNCTION_5 = 22, - CBUS_FUNCTION_6 = 23, - CBUS_FUNCTION_7 = 24, - CBUS_FUNCTION_8 = 25, - CBUS_FUNCTION_9 = 26, - HIGH_CURRENT = 27, - HIGH_CURRENT_A = 28, - HIGH_CURRENT_B = 29, - INVERT = 30, - GROUP0_DRIVE = 31, - GROUP0_SCHMITT = 32, - GROUP0_SLEW = 33, - GROUP1_DRIVE = 34, - GROUP1_SCHMITT = 35, - GROUP1_SLEW = 36, - GROUP2_DRIVE = 37, - GROUP2_SCHMITT = 38, - GROUP2_SLEW = 39, - GROUP3_DRIVE = 40, - GROUP3_SCHMITT = 41, - GROUP3_SLEW = 42, - CHIP_SIZE = 43, - CHIP_TYPE = 44, - POWER_SAVE = 45, - CLOCK_POLARITY = 46, - DATA_ORDER = 47, - FLOW_CONTROL = 48, - CHANNEL_C_DRIVER = 49, - CHANNEL_D_DRIVER = 50, - CHANNEL_A_RS485 = 51, - CHANNEL_B_RS485 = 52, - CHANNEL_C_RS485 = 53, - CHANNEL_D_RS485 = 54, -}; - -/** - \brief list of usb devices created by ftdi_usb_find_all() -*/ -struct ftdi_device_list -{ - /** pointer to next entry */ - struct ftdi_device_list *next; - /** pointer to libusb's usb_device */ - struct libusb_device *dev; -}; -#define FT1284_CLK_IDLE_STATE 0x01 -#define FT1284_DATA_LSB 0x02 /* DS_FT232H 1.3 amd ftd2xx.h 1.0.4 disagree here*/ -#define FT1284_FLOW_CONTROL 0x04 -#define POWER_SAVE_DISABLE_H 0x80 - -#define USE_SERIAL_NUM 0x08 -enum ftdi_cbus_func {/* FIXME: Recheck value, especially the last */ - CBUS_TXDEN = 0, CBUS_PWREN = 1, CBUS_RXLED = 2, CBUS_TXLED = 3, CBUS_TXRXLED = 4, - CBUS_SLEEP = 5, CBUS_CLK48 = 6, CBUS_CLK24 = 7, CBUS_CLK12 = 8, CBUS_CLK6 = 9, - CBUS_IOMODE = 0xa, CBUS_BB_WR = 0xb, CBUS_BB_RD = 0xc, CBUS_BB = 0xd}; - -enum ftdi_cbush_func {/* FIXME: Recheck value, especially the last */ - CBUSH_TRISTATE = 0, CBUSH_RXLED = 1, CBUSH_TXLED = 2, CBUSH_TXRXLED = 3, CBUSH_PWREN = 4, - CBUSH_SLEEP = 5, CBUSH_DRIVE_0 = 6, CBUSG_DRIVE1 = 7, CBUSH_IOMODE = 8, CBUSH_TXDEN = 9, - CBUSH_CLK30 = 0xa, CBUSH_CLK15 = 0xb, CBUSH_CLK7_5 = 0xc}; - -/** Invert TXD# */ -#define INVERT_TXD 0x01 -/** Invert RXD# */ -#define INVERT_RXD 0x02 -/** Invert RTS# */ -#define INVERT_RTS 0x04 -/** Invert CTS# */ -#define INVERT_CTS 0x08 -/** Invert DTR# */ -#define INVERT_DTR 0x10 -/** Invert DSR# */ -#define INVERT_DSR 0x20 -/** Invert DCD# */ -#define INVERT_DCD 0x40 -/** Invert RI# */ -#define INVERT_RI 0x80 - -/** Interface Mode. */ -#define CHANNEL_IS_UART 0x0 -#define CHANNEL_IS_FIFO 0x1 -#define CHANNEL_IS_OPTO 0x2 -#define CHANNEL_IS_CPU 0x4 -#define CHANNEL_IS_FT1284 0x8 - -#define CHANNEL_IS_RS485 0x10 - -#define DRIVE_4MA 0 -#define DRIVE_8MA 1 -#define DRIVE_12MA 2 -#define DRIVE_16MA 3 -#define SLOW_SLEW 4 -#define IS_SCHMITT 8 - -/** Driver Type. */ -#define DRIVER_VCP 0x08 -#define DRIVER_VCPH 0x10 /* FT232H has moved the VCP bit */ - -#define USE_USB_VERSION_BIT 0x10 - -#define SUSPEND_DBUS7_BIT 0x80 - -/** High current drive. */ -#define HIGH_CURRENT_DRIVE 0x10 -#define HIGH_CURRENT_DRIVE_R 0x04 - -/** - \brief Progress Info for streaming read -*/ -struct size_and_time -{ - uint64_t totalBytes; - struct timeval time; -}; - -typedef struct -{ - struct size_and_time first; - struct size_and_time prev; - struct size_and_time current; - double totalTime; - double totalRate; - double currentRate; -} FTDIProgressInfo; - -typedef int (FTDIStreamCallback)(uint8_t *buffer, int length, - FTDIProgressInfo *progress, void *userdata); - -/** - * Provide libftdi version information - * major: Library major version - * minor: Library minor version - * micro: Currently unused, ight get used for hotfixes. - * version_str: Version as (static) string - * snapshot_str: Git snapshot version if known. Otherwise "unknown" or empty string. -*/ -struct ftdi_version_info -{ - int major; - int minor; - int micro; - const char *version_str; - const char *snapshot_str; -}; - - -#ifdef __cplusplus -extern "C" -{ -#endif - - int ftdi_init(struct ftdi_context *ftdi); - struct ftdi_context *ftdi_new(void); - int ftdi_set_interface(struct ftdi_context *ftdi, enum ftdi_interface interface); - - void ftdi_deinit(struct ftdi_context *ftdi); - void ftdi_free(struct ftdi_context *ftdi); - void ftdi_set_usbdev (struct ftdi_context *ftdi, struct libusb_device_handle *usbdev); - - struct ftdi_version_info ftdi_get_library_version(); - - int ftdi_usb_find_all(struct ftdi_context *ftdi, struct ftdi_device_list **devlist, - int vendor, int product); - void ftdi_list_free(struct ftdi_device_list **devlist); - void ftdi_list_free2(struct ftdi_device_list *devlist); - int ftdi_usb_get_strings(struct ftdi_context *ftdi, struct libusb_device *dev, - char * manufacturer, int mnf_len, - char * description, int desc_len, - char * serial, int serial_len); - - int ftdi_usb_open(struct ftdi_context *ftdi, int vendor, int product); - int ftdi_usb_open_desc(struct ftdi_context *ftdi, int vendor, int product, - const char* description, const char* serial); - int ftdi_usb_open_desc_index(struct ftdi_context *ftdi, int vendor, int product, - const char* description, const char* serial, unsigned int index); - int ftdi_usb_open_dev(struct ftdi_context *ftdi, struct libusb_device *dev); - int ftdi_usb_open_string(struct ftdi_context *ftdi, const char* description); - - int ftdi_usb_close(struct ftdi_context *ftdi); - int ftdi_usb_reset(struct ftdi_context *ftdi); - int ftdi_usb_purge_rx_buffer(struct ftdi_context *ftdi); - int ftdi_usb_purge_tx_buffer(struct ftdi_context *ftdi); - int ftdi_usb_purge_buffers(struct ftdi_context *ftdi); - - int ftdi_set_baudrate(struct ftdi_context *ftdi, int baudrate); - int ftdi_set_line_property(struct ftdi_context *ftdi, enum ftdi_bits_type bits, - enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity); - int ftdi_set_line_property2(struct ftdi_context *ftdi, enum ftdi_bits_type bits, - enum ftdi_stopbits_type sbit, enum ftdi_parity_type parity, - enum ftdi_break_type break_type); - - int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int size); - int ftdi_read_data_set_chunksize(struct ftdi_context *ftdi, unsigned int chunksize); - int ftdi_read_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize); - - int ftdi_write_data(struct ftdi_context *ftdi, unsigned char *buf, int size); - int ftdi_write_data_set_chunksize(struct ftdi_context *ftdi, unsigned int chunksize); - int ftdi_write_data_get_chunksize(struct ftdi_context *ftdi, unsigned int *chunksize); - - int ftdi_readstream(struct ftdi_context *ftdi, FTDIStreamCallback *callback, - void *userdata, int packetsPerTransfer, int numTransfers); - struct ftdi_transfer_control *ftdi_write_data_submit(struct ftdi_context *ftdi, unsigned char *buf, int size); - void ftdi_async_complete(struct ftdi_context *ftdi, int wait_for_more); - - struct ftdi_transfer_control *ftdi_read_data_submit(struct ftdi_context *ftdi, unsigned char *buf, int size); - int ftdi_transfer_data_done(struct ftdi_transfer_control *tc); - - int ftdi_set_bitmode(struct ftdi_context *ftdi, unsigned char bitmask, unsigned char mode); - int ftdi_disable_bitbang(struct ftdi_context *ftdi); - int ftdi_read_pins(struct ftdi_context *ftdi, unsigned char *pins); - - int ftdi_set_latency_timer(struct ftdi_context *ftdi, unsigned char latency); - int ftdi_get_latency_timer(struct ftdi_context *ftdi, unsigned char *latency); - - int ftdi_poll_modem_status(struct ftdi_context *ftdi, unsigned short *status); - - /* flow control */ - int ftdi_setflowctrl(struct ftdi_context *ftdi, int flowctrl); - int ftdi_setdtr_rts(struct ftdi_context *ftdi, int dtr, int rts); - int ftdi_setdtr(struct ftdi_context *ftdi, int state); - int ftdi_setrts(struct ftdi_context *ftdi, int state); - - int ftdi_set_event_char(struct ftdi_context *ftdi, unsigned char eventch, unsigned char enable); - int ftdi_set_error_char(struct ftdi_context *ftdi, unsigned char errorch, unsigned char enable); - - /* init eeprom for the given FTDI type */ - int ftdi_eeprom_initdefaults(struct ftdi_context *ftdi, - char * manufacturer, char *product, - char * serial); - int ftdi_eeprom_build(struct ftdi_context *ftdi); - int ftdi_eeprom_decode(struct ftdi_context *ftdi, int verbose); - - int ftdi_get_eeprom_value(struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int* value); - int ftdi_set_eeprom_value(struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int value); - - int ftdi_get_eeprom_buf(struct ftdi_context *ftdi, unsigned char * buf, int size); - int ftdi_set_eeprom_buf(struct ftdi_context *ftdi, const unsigned char * buf, int size); - - int ftdi_read_eeprom(struct ftdi_context *ftdi); - int ftdi_read_chipid(struct ftdi_context *ftdi, unsigned int *chipid); - int ftdi_write_eeprom(struct ftdi_context *ftdi); - int ftdi_erase_eeprom(struct ftdi_context *ftdi); - - int ftdi_read_eeprom_location (struct ftdi_context *ftdi, int eeprom_addr, unsigned short *eeprom_val); - int ftdi_write_eeprom_location(struct ftdi_context *ftdi, int eeprom_addr, unsigned short eeprom_val); - - char *ftdi_get_error_string(struct ftdi_context *ftdi); - -#ifdef __cplusplus -} -#endif - -#endif /* __libftdi_h__ */ diff --git a/lib/libftdi/src/ftdi_i.h b/lib/libftdi/src/ftdi_i.h deleted file mode 100644 index 8d8c77e..0000000 --- a/lib/libftdi/src/ftdi_i.h +++ /dev/null @@ -1,130 +0,0 @@ -/*************************************************************************** - ftdi_i.h - description - ------------------- - begin : Don Sep 9 2011 - copyright : (C) 2003-2011 by Intra2net AG and the libftdi developers - email : opensource@intra2net.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License * - * version 2.1 as published by the Free Software Foundation; * - * * - *************************************************************************** - - Non public definitions here - -*/ - -/* Even on 93xx66 at max 256 bytes are used (AN_121)*/ -#define FTDI_MAX_EEPROM_SIZE 256 - -/** - \brief FTDI eeprom structure -*/ -struct ftdi_eeprom -{ - /** vendor id */ - int vendor_id; - /** product id */ - int product_id; - - /** Was the eeprom structure initialized for the actual - connected device? **/ - int initialized_for_connected_device; - - /** self powered */ - int self_powered; - /** remote wakeup */ - int remote_wakeup; - - int is_not_pnp; - - /* Suspend on DBUS7 Low */ - int suspend_dbus7; - - /** input in isochronous transfer mode */ - int in_is_isochronous; - /** output in isochronous transfer mode */ - int out_is_isochronous; - /** suspend pull downs */ - int suspend_pull_downs; - - /** use serial */ - int use_serial; - /** usb version */ - int usb_version; - /** Use usb version on FT2232 devices*/ - int use_usb_version; - /** maximum power */ - int max_power; - - /** manufacturer name */ - char *manufacturer; - /** product name */ - char *product; - /** serial number */ - char *serial; - - /* 2232D/H specific */ - /* Hardware type, 0 = RS232 Uart, 1 = 245 FIFO, 2 = CPU FIFO, - 4 = OPTO Isolate */ - int channel_a_type; - int channel_b_type; - /* Driver Type, 1 = VCP */ - int channel_a_driver; - int channel_b_driver; - int channel_c_driver; - int channel_d_driver; - /* 4232H specific */ - int channel_a_rs485enable; - int channel_b_rs485enable; - int channel_c_rs485enable; - int channel_d_rs485enable; - - /* Special function of FT232R/FT232H devices (and possibly others as well) */ - /** CBUS pin function. See CBUS_xxx defines. */ - int cbus_function[10]; - /** Select hight current drive on R devices. */ - int high_current; - /** Select hight current drive on A channel (2232C */ - int high_current_a; - /** Select hight current drive on B channel (2232C). */ - int high_current_b; - /** Select inversion of data lines (bitmask). */ - int invert; - - /*2232H/4432H Group specific values */ - /* Group0 is AL on 2322H and A on 4232H - Group1 is AH on 2232H and B on 4232H - Group2 is BL on 2322H and C on 4232H - Group3 is BH on 2232H and C on 4232H*/ - int group0_drive; - int group0_schmitt; - int group0_slew; - int group1_drive; - int group1_schmitt; - int group1_slew; - int group2_drive; - int group2_schmitt; - int group2_slew; - int group3_drive; - int group3_schmitt; - int group3_slew; - - int powersave; - - int clock_polarity; - int data_order; - int flow_control; - - /** eeprom size in bytes. This doesn't get stored in the eeprom - but is the only way to pass it to ftdi_eeprom_build. */ - int size; - /* EEPROM Type 0x46 for 93xx46, 0x56 for 93xx56 and 0x66 for 93xx66*/ - int chip; - unsigned char buf[FTDI_MAX_EEPROM_SIZE]; -}; - diff --git a/lib/libftdi/src/ftdi_stream.c b/lib/libftdi/src/ftdi_stream.c deleted file mode 100644 index 7a8c140..0000000 --- a/lib/libftdi/src/ftdi_stream.c +++ /dev/null @@ -1,295 +0,0 @@ -/*************************************************************************** - ftdi_stream.c - description - ------------------- - copyright : (C) 2009 Micah Dowty 2010 Uwe Bonnes - email : opensource@intra2net.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License * - * version 2.1 as published by the Free Software Foundation; * - * * - ***************************************************************************/ - -/* Adapted from - * fastftdi.c - A minimal FTDI FT232H interface for which supports bit-bang - * mode, but focuses on very high-performance support for - * synchronous FIFO mode. Requires libusb-1.0 - * - * Copyright (C) 2009 Micah Dowty - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include - -#include "ftdi.h" - -typedef struct -{ - FTDIStreamCallback *callback; - void *userdata; - int packetsize; - int activity; - int result; - FTDIProgressInfo progress; -} FTDIStreamState; - -/* Handle callbacks - * - * With Exit request, free memory and release the transfer - * - * state->result is only set when some error happens - */ -static void -ftdi_readstream_cb(struct libusb_transfer *transfer) -{ - FTDIStreamState *state = transfer->user_data; - int packet_size = state->packetsize; - - state->activity++; - if (transfer->status == LIBUSB_TRANSFER_COMPLETED) - { - int i; - uint8_t *ptr = transfer->buffer; - int length = transfer->actual_length; - int numPackets = (length + packet_size - 1) / packet_size; - int res = 0; - - for (i = 0; i < numPackets; i++) - { - int payloadLen; - int packetLen = length; - - if (packetLen > packet_size) - packetLen = packet_size; - - payloadLen = packetLen - 2; - state->progress.current.totalBytes += payloadLen; - - res = state->callback(ptr + 2, payloadLen, - NULL, state->userdata); - - ptr += packetLen; - length -= packetLen; - } - if (res) - { - free(transfer->buffer); - libusb_free_transfer(transfer); - } - else - { - transfer->status = -1; - state->result = libusb_submit_transfer(transfer); - } - } - else - { - fprintf(stderr, "unknown status %d\n",transfer->status); - state->result = LIBUSB_ERROR_IO; - } -} - -/** - Helper function to calculate (unix) time differences - - \param a timeval - \param b timeval -*/ -static double -TimevalDiff(const struct timeval *a, const struct timeval *b) -{ - return (a->tv_sec - b->tv_sec) + 1e-6 * (a->tv_usec - b->tv_usec); -} - -/** - Streaming reading of data from the device - - Use asynchronous transfers in libusb-1.0 for high-performance - streaming of data from a device interface back to the PC. This - function continuously transfers data until either an error occurs - or the callback returns a nonzero value. This function returns - a libusb error code or the callback's return value. - - For every contiguous block of received data, the callback will - be invoked. - - \param ftdi pointer to ftdi_context - \param callback to user supplied function for one block of data - \param userdata - \param packetsPerTransfer number of packets per transfer - \param numTransfers Number of transfers per callback - -*/ - -int -ftdi_readstream(struct ftdi_context *ftdi, - FTDIStreamCallback *callback, void *userdata, - int packetsPerTransfer, int numTransfers) -{ - struct libusb_transfer **transfers; - FTDIStreamState state = { callback, userdata, ftdi->max_packet_size, 1 }; - int bufferSize = packetsPerTransfer * ftdi->max_packet_size; - int xferIndex; - int err = 0; - - /* Only FT2232H and FT232H know about the synchronous FIFO Mode*/ - if ((ftdi->type != TYPE_2232H) && (ftdi->type != TYPE_232H)) - { - fprintf(stderr,"Device doesn't support synchronous FIFO mode\n"); - return 1; - } - - /* We don't know in what state we are, switch to reset*/ - if (ftdi_set_bitmode(ftdi, 0xff, BITMODE_RESET) < 0) - { - fprintf(stderr,"Can't reset mode\n"); - return 1; - } - - /* Purge anything remaining in the buffers*/ - if (ftdi_usb_purge_buffers(ftdi) < 0) - { - fprintf(stderr,"Can't Purge\n"); - return 1; - } - - /* - * Set up all transfers - */ - - transfers = calloc(numTransfers, sizeof *transfers); - if (!transfers) { - err = LIBUSB_ERROR_NO_MEM; - goto cleanup; - } - - for (xferIndex = 0; xferIndex < numTransfers; xferIndex++) - { - struct libusb_transfer *transfer; - - transfer = libusb_alloc_transfer(0); - transfers[xferIndex] = transfer; - if (!transfer) { - err = LIBUSB_ERROR_NO_MEM; - goto cleanup; - } - - libusb_fill_bulk_transfer(transfer, ftdi->usb_dev, ftdi->out_ep, - malloc(bufferSize), bufferSize, - ftdi_readstream_cb, - &state, 0); - - if (!transfer->buffer) { - err = LIBUSB_ERROR_NO_MEM; - goto cleanup; - } - - transfer->status = -1; - err = libusb_submit_transfer(transfer); - if (err) - goto cleanup; - } - - /* Start the transfers only when everything has been set up. - * Otherwise the transfers start stuttering and the PC not - * fetching data for several to several ten milliseconds - * and we skip blocks - */ - if (ftdi_set_bitmode(ftdi, 0xff, BITMODE_SYNCFF) < 0) - { - fprintf(stderr,"Can't set synchronous fifo mode: %s\n", - ftdi_get_error_string(ftdi)); - goto cleanup; - } - - /* - * Run the transfers, and periodically assess progress. - */ - - gettimeofday(&state.progress.first.time, NULL); - - do - { - FTDIProgressInfo *progress = &state.progress; - const double progressInterval = 1.0; - struct timeval timeout = { 0, ftdi->usb_read_timeout }; - struct timeval now; - - int err = libusb_handle_events_timeout(ftdi->usb_ctx, &timeout); - if (err == LIBUSB_ERROR_INTERRUPTED) - /* restart interrupted events */ - err = libusb_handle_events_timeout(ftdi->usb_ctx, &timeout); - if (!state.result) - { - state.result = err; - } - if (state.activity == 0) - state.result = 1; - else - state.activity = 0; - - // If enough time has elapsed, update the progress - gettimeofday(&now, NULL); - if (TimevalDiff(&now, &progress->current.time) >= progressInterval) - { - progress->current.time = now; - progress->totalTime = TimevalDiff(&progress->current.time, - &progress->first.time); - - if (progress->prev.totalBytes) - { - // We have enough information to calculate rates - - double currentTime; - - currentTime = TimevalDiff(&progress->current.time, - &progress->prev.time); - - progress->totalRate = - progress->current.totalBytes /progress->totalTime; - progress->currentRate = - (progress->current.totalBytes - - progress->prev.totalBytes) / currentTime; - } - - state.callback(NULL, 0, progress, state.userdata); - progress->prev = progress->current; - - } - } while (!state.result); - - /* - * Cancel any outstanding transfers, and free memory. - */ - - cleanup: - fprintf(stderr, "cleanup\n"); - if (transfers) - free(transfers); - if (err) - return err; - else - return state.result; -} - diff --git a/lib/libftdi/src/ftdi_version_i.h b/lib/libftdi/src/ftdi_version_i.h deleted file mode 100644 index 901f707..0000000 --- a/lib/libftdi/src/ftdi_version_i.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef FTDI_VERSION_INTERNAL_H -#define FTDI_VERSION_INTERNAL_H - -#define FTDI_MAJOR_VERSION 2 -#define FTDI_MINOR_VERSION 0 -#define FTDI_MICRO_VERSION 0 - -const char FTDI_VERSION_STRING[] = ""; -const char FTDI_SNAPSHOT_VERSION[] = ""; - -#endif diff --git a/lib/libftdi/src/ftdi_version_i.h.in b/lib/libftdi/src/ftdi_version_i.h.in deleted file mode 100644 index 89e549a..0000000 --- a/lib/libftdi/src/ftdi_version_i.h.in +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef FTDI_VERSION_INTERNAL_H -#define FTDI_VERSION_INTERNAL_H - -#define FTDI_MAJOR_VERSION @MAJOR_VERSION@ -#define FTDI_MINOR_VERSION @MINOR_VERSION@ -#define FTDI_MICRO_VERSION 0 - -const char FTDI_VERSION_STRING[] = "@VERSION_STRING@"; -const char FTDI_SNAPSHOT_VERSION[] = "@SNAPSHOT_VERSION@"; - -#endif diff --git a/lib/libftdi/test/CMakeLists.txt b/lib/libftdi/test/CMakeLists.txt deleted file mode 100644 index 8737f66..0000000 --- a/lib/libftdi/test/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -# Optional unit test - -find_package(Boost COMPONENTS unit_test_framework) - -if(Boost_UNIT_TEST_FRAMEWORK_FOUND) - - message(STATUS "Building unit test") - - enable_testing() - - INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS}) - - set(cpp_tests - basic.cpp - baudrate.cpp - ) - - add_executable(test_libftdi ${cpp_tests}) - target_link_libraries(test_libftdi ftdi ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}) - - add_test(test_libftdi test_libftdi) - - # Add custom target so we run easily run "make check" - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS test_libftdi) - -else(Boost_UNIT_TEST_FRAMEWORK_FOUND) - - message(STATUS "NOT building unit test (requires boost unit test framework)") - -endif(Boost_UNIT_TEST_FRAMEWORK_FOUND) diff --git a/lib/libftdi/test/basic.cpp b/lib/libftdi/test/basic.cpp deleted file mode 100644 index 3710916..0000000 --- a/lib/libftdi/test/basic.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/**@file -@brief Test basic FTDI functionality - -@author Thomas Jarosch -*/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License * - * version 2.1 as published by the Free Software Foundation; * - * * - ***************************************************************************/ - -#define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MAIN -#include - -#include - -BOOST_AUTO_TEST_SUITE(Basic) - -BOOST_AUTO_TEST_CASE(SimpleInit) -{ - ftdi_context ftdi; - - int rtn_init = ftdi_init(&ftdi); - BOOST_REQUIRE_EQUAL(0, rtn_init); - - ftdi_deinit(&ftdi); -} - -BOOST_AUTO_TEST_SUITE_END() diff --git a/lib/libftdi/test/baudrate.cpp b/lib/libftdi/test/baudrate.cpp deleted file mode 100644 index 29bbd20..0000000 --- a/lib/libftdi/test/baudrate.cpp +++ /dev/null @@ -1,267 +0,0 @@ -/**@file -@brief Test baudrate calculator code - -@author Thomas Jarosch and Uwe Bonnes -*/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License * - * version 2.1 as published by the Free Software Foundation; * - * * - ***************************************************************************/ - -#include - -#define BOOST_TEST_DYN_LINK -#include -#include -#include -#include -#include - -using namespace std; - -extern "C" int convert_baudrate_UT_export(int baudrate, struct ftdi_context *ftdi, - unsigned short *value, unsigned short *index); - -/// Basic initialization of libftdi for every test -class BaseFTDIFixture -{ -protected: - ftdi_context *ftdi; - -public: - BaseFTDIFixture() - : ftdi(NULL) - { - ftdi = ftdi_new(); - } - - virtual ~BaseFTDIFixture() - { - delete ftdi; - ftdi = NULL; - } -}; - -BOOST_FIXTURE_TEST_SUITE(Baudrate, BaseFTDIFixture) - -/// Helper class to store the convert_baudrate_UT_export result -struct calc_result -{ - int actual_baudrate; - unsigned short divisor; - unsigned short fractional_bits; - unsigned short clock; - - calc_result(int actual, unsigned short my_divisor, unsigned short my_fractional_bits, unsigned short my_clock) - : actual_baudrate(actual) - , divisor(my_divisor) - , fractional_bits(my_fractional_bits) - , clock(my_clock) - { - } - - calc_result() - : actual_baudrate(0) - , divisor(0) - , fractional_bits(0) - , clock(0) - { - } -}; - -/** - * @brief Test convert_baudrate code against a list of baud rates - * - * @param baudrates Baudrates to check - **/ -static void test_baudrates(ftdi_context *ftdi, const map &baudrates) -{ - typedef std::pair baudrate_type; - BOOST_FOREACH(const baudrate_type &baudrate, baudrates) - { - unsigned short calc_value = 0, calc_index = 0; - int calc_baudrate = convert_baudrate_UT_export(baudrate.first, ftdi, &calc_value, &calc_index); - - const calc_result *res = &baudrate.second; - - unsigned short divisor = calc_value & 0x3fff; - unsigned short fractional_bits = (calc_value >> 14); - unsigned short clock = (calc_index & 0x200) ? 120 : 48; - - switch (ftdi->type) - { - case TYPE_232H: - case TYPE_2232H: - case TYPE_4232H: - fractional_bits |= (calc_index & 0x100) ? 4 : 0; - break; - case TYPE_R: - case TYPE_2232C: - case TYPE_BM: - fractional_bits |= (calc_index & 0x001) ? 4 : 0; - break; - default:; - } - - // Aid debugging since this test is a generic function - BOOST_CHECK_MESSAGE(res->actual_baudrate == calc_baudrate && res->divisor == divisor && res->fractional_bits == fractional_bits - && res->clock == clock, - "\n\nERROR: baudrate calculation failed for --" << baudrate.first << " baud--. Details below: "); - - BOOST_CHECK_EQUAL(res->actual_baudrate, calc_baudrate); - BOOST_CHECK_EQUAL(res->divisor, divisor); - BOOST_CHECK_EQUAL(res->fractional_bits, fractional_bits); - BOOST_CHECK_EQUAL(res->clock, clock); - } -} - -BOOST_AUTO_TEST_CASE(TypeAMFixedBaudrates) -{ - ftdi->type = TYPE_AM; - - map baudrates; - baudrates[183] = calc_result(183, 16383, 0, 48); - baudrates[300] = calc_result(300, 10000, 0, 48); - baudrates[600] = calc_result(600, 5000, 0, 48); - baudrates[1200] = calc_result(1200, 2500, 0, 48); - baudrates[2400] = calc_result(2400, 1250, 0, 48); - baudrates[4800] = calc_result(4800, 625, 0, 48); - baudrates[9600] = calc_result(9600, 312, 1, 48); - baudrates[19200] = calc_result(19200, 156, 2, 48); - baudrates[38400] = calc_result(38400, 78, 3, 48); - baudrates[57600] = calc_result(57554, 52, 3, 48); - baudrates[115200] = calc_result(115385, 26, 0, 48); - baudrates[230400] = calc_result(230769, 13, 0, 48); - baudrates[460800] = calc_result(461538, 6, 1, 48); - baudrates[921600] = calc_result(923077, 3, 2, 48); - baudrates[1000000] = calc_result(1000000, 3, 0, 48); - baudrates[1090512] = calc_result(1000000, 3, 0, 48); - baudrates[1090909] = calc_result(1000000, 3, 0, 48); - baudrates[1090910] = calc_result(1000000, 3, 0, 48); - baudrates[1200000] = calc_result(1200000, 2, 1, 48); - baudrates[1333333] = calc_result(1333333, 2, 2, 48); - baudrates[1411764] = calc_result(1411765, 2, 3, 48); - baudrates[1500000] = calc_result(1500000, 2, 0, 48); - baudrates[2000000] = calc_result(1500000, 2, 0, 48); - baudrates[3000000] = calc_result(3000000, 0, 0, 48); - - test_baudrates(ftdi, baudrates); -} - -BOOST_AUTO_TEST_CASE(TypeBMFixedBaudrates) -{ - // Unify testing of chips behaving the same - std::vector test_types; - test_types.push_back(TYPE_BM); - test_types.push_back(TYPE_2232C); - test_types.push_back(TYPE_R); - - map baudrates; - baudrates[183] = calc_result(183, 16383, 7, 48); - baudrates[184] = calc_result(184, 16304, 4, 48); - baudrates[300] = calc_result(300, 10000, 0, 48); - baudrates[600] = calc_result(600, 5000, 0, 48); - baudrates[1200] = calc_result(1200, 2500, 0, 48); - baudrates[2400] = calc_result(2400, 1250, 0, 48); - baudrates[4800] = calc_result(4800, 625, 0, 48); - baudrates[9600] = calc_result(9600, 312, 1, 48); - baudrates[19200] = calc_result(19200, 156, 2, 48); - baudrates[38400] = calc_result(38400, 78, 3, 48); - baudrates[57600] = calc_result(57554, 52, 3, 48); - baudrates[115200] = calc_result(115385, 26, 0, 48); - baudrates[230400] = calc_result(230769, 13, 0, 48); - baudrates[460800] = calc_result(461538, 6, 1, 48); - baudrates[921600] = calc_result(923077, 3, 2, 48); - baudrates[1000000] = calc_result(1000000, 3, 0, 48); - baudrates[1050000] = calc_result(1043478, 2, 7, 48); - baudrates[1400000] = calc_result(1411765, 2, 3, 48); - baudrates[1500000] = calc_result(1500000, 2, 0, 48); - baudrates[2000000] = calc_result(2000000, 1, 0, 48); - baudrates[3000000] = calc_result(3000000, 0, 0, 48); - - baudrates[(3000000*16/(2*16+15))-1] = calc_result(round(3000000/3.000), 3, 0, 48); - baudrates[ 3000000*16/(2*16+15) ] = calc_result(round(3000000/3.000), 3, 0, 48); - baudrates[(3000000*16/(2*16+15))+1] = calc_result(round(3000000/2.875), 2, 7, 48); - baudrates[ 3000000*16/(2*16+13) ] = calc_result(round(3000000/2.875), 2, 7, 48); - baudrates[(3000000*16/(2*16+13))+1] = calc_result(round(3000000/2.750), 2, 6, 48); - baudrates[ 3000000*16/(2*16+11) ] = calc_result(round(3000000/2.750), 2, 6, 48); - baudrates[(3000000*16/(2*16+11))+1] = calc_result(round(3000000/2.625), 2, 5, 48); - baudrates[ 3000000*16/(2*16+ 9) ] = calc_result(round(3000000/2.625), 2, 5, 48); - baudrates[(3000000*16/(2*16+ 9))+1] = calc_result(round(3000000/2.500), 2, 1, 48); - baudrates[ 3000000*16/(2*16+ 7) ] = calc_result(round(3000000/2.500), 2, 1, 48); - baudrates[(3000000*16/(2*16+ 7))+1] = calc_result(round(3000000/2.375), 2, 4, 48); - baudrates[ 3000000*16/(2*16+ 5) ] = calc_result(round(3000000/2.375), 2, 4, 48); - baudrates[(3000000*16/(2*16+ 5))+1] = calc_result(round(3000000/2.250), 2, 2, 48); - baudrates[ 3000000*16/(2*16+ 3) ] = calc_result(round(3000000/2.250), 2, 2, 48); - baudrates[(3000000*16/(2*16+ 3))+1] = calc_result(round(3000000/2.125), 2, 3, 48); - baudrates[ 3000000*16/(2*16+ 1) ] = calc_result(round(3000000/2.125), 2, 3, 48); - baudrates[(3000000*16/(2*16+ 1))+1] = calc_result(round(3000000/2.000), 2, 0, 48); - - BOOST_FOREACH(const enum ftdi_chip_type &test_chip_type, test_types) - { - ftdi->type = test_chip_type; - test_baudrates(ftdi, baudrates); - } -} - -BOOST_AUTO_TEST_CASE(TypeHFixedBaudrates) -{ - // Unify testing of chips behaving the same - std::vector test_types; - test_types.push_back(TYPE_2232H); - test_types.push_back(TYPE_4232H); - test_types.push_back(TYPE_232H); - - map baudrates; - baudrates[183] = calc_result(183, 16383, 7, 48); - baudrates[184] = calc_result(184, 16304, 4, 48); - baudrates[300] = calc_result(300, 10000, 0, 48); - baudrates[600] = calc_result(600, 5000, 0, 48); - baudrates[1200] = calc_result(1200, 10000, 0, 120); - baudrates[2400] = calc_result(2400, 5000, 0, 120); - baudrates[4800] = calc_result(4800, 2500, 0, 120); - baudrates[9600] = calc_result(9600, 1250, 0, 120); - baudrates[19200] = calc_result(19200, 625, 0, 120); - baudrates[38400] = calc_result(38400, 312, 1, 120); - baudrates[57600] = calc_result(57588, 208, 4, 120); - baudrates[115200] = calc_result(115246, 104, 3, 120); - baudrates[230400] = calc_result(230216, 52, 3, 120); - baudrates[460800] = calc_result(461538, 26, 0, 120); - baudrates[921600] = calc_result(923077, 13, 0, 120); - baudrates[1000000] = calc_result(1000000, 12, 0, 120); - baudrates[1000000] = calc_result(1000000, 12, 0, 120); - baudrates[6000000] = calc_result(6000000, 2, 0, 120); - baudrates[4173913] = calc_result(4173913, 2, 7, 120); - baudrates[8000000] = calc_result(8000000, 1, 0, 120); - baudrates[12000000] = calc_result(12000000, 0, 0, 120); - - baudrates[(12000000*16/(2*16+15))-1] = calc_result(round(12000000/3.000), 3, 0, 120); - baudrates[ 12000000*16/(2*16+15) ] = calc_result(round(12000000/3.000), 3, 0, 120); - baudrates[(12000000*16/(2*16+15))+1] = calc_result(round(12000000/2.875), 2, 7, 120); - baudrates[ 12000000*16/(2*16+13) ] = calc_result(round(12000000/2.875), 2, 7, 120); - baudrates[(12000000*16/(2*16+13))+1] = calc_result(round(12000000/2.750), 2, 6, 120); - baudrates[ 12000000*16/(2*16+11) ] = calc_result(round(12000000/2.750), 2, 6, 120); - baudrates[(12000000*16/(2*16+11))+1] = calc_result(round(12000000/2.625), 2, 5, 120); - baudrates[ 12000000*16/(2*16+ 9) ] = calc_result(round(12000000/2.625), 2, 5, 120); - baudrates[(12000000*16/(2*16+ 9))+1] = calc_result(round(12000000/2.500), 2, 1, 120); - baudrates[ 12000000*16/(2*16+ 7) ] = calc_result(round(12000000/2.500), 2, 1, 120); - baudrates[(12000000*16/(2*16+ 7))+1] = calc_result(round(12000000/2.375), 2, 4, 120); - baudrates[ 12000000*16/(2*16+ 5) ] = calc_result(round(12000000/2.375), 2, 4, 120); - baudrates[(12000000*16/(2*16+ 5))+1] = calc_result(round(12000000/2.250), 2, 2, 120); - baudrates[ 12000000*16/(2*16+ 3) ] = calc_result(round(12000000/2.250), 2, 2, 120); - baudrates[(12000000*16/(2*16+ 3))+1] = calc_result(round(12000000/2.125), 2, 3, 120); - baudrates[ 12000000*16/(2*16+ 1) ] = calc_result(round(12000000/2.125), 2, 3, 120); - baudrates[(12000000*16/(2*16+ 1))+1] = calc_result(round(12000000/2.000), 2, 0, 120); - - BOOST_FOREACH(const enum ftdi_chip_type &test_chip_type, test_types) - { - ftdi->type = test_chip_type; - test_baudrates(ftdi, baudrates); - } -} - -BOOST_AUTO_TEST_SUITE_END() diff --git a/lib/libusb/.clang-tidy b/lib/libusb/.clang-tidy deleted file mode 100644 index 1f59ae9..0000000 --- a/lib/libusb/.clang-tidy +++ /dev/null @@ -1,34 +0,0 @@ ---- -Checks: "-*,\ -boost-*,\ -bugprone-*,\ --bugprone-easily-swappable-parameters,\ --bugprone-narrowing-conversions,\ --bugprone-signed-char-misuse,\ --bugprone-switch-missing-default-case,\ -clang-analyzer-*,\ --clang-analyzer-core.NullDereference,\ --clang-analyzer-deadcode.DeadStores,\ --clang-analyzer-optin.portability.UnixAPI,\ --clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,\ --clang-analyzer-security.insecureAPI.strcpy,\ --clang-analyzer-unix.Malloc,\ -misc-*,\ --misc-no-recursion,\ --misc-include-cleaner,\ -modernize-*,\ --modernize-macro-to-enum,\ -performance-*,\ --performance-no-int-to-ptr,\ --performance-type-promotion-in-math-fn,\ -portability-*,\ -readability-*,\ --readability-braces-around-statements,\ --readability-else-after-return,\ --readability-identifier-length,\ --readability-function-cognitive-complexity,\ --readability-isolate-declaration,\ --readability-magic-numbers,\ -" -#WarningsAsErrors: "*" -... diff --git a/lib/libusb/.codespellrc b/lib/libusb/.codespellrc deleted file mode 100644 index dba3ab7..0000000 --- a/lib/libusb/.codespellrc +++ /dev/null @@ -1,3 +0,0 @@ -[codespell] -skip = strerror.c,AUTHORS -ignore-words-list = numer,ser,xwindows diff --git a/lib/libusb/.gitattributes b/lib/libusb/.gitattributes deleted file mode 100644 index f93e0b6..0000000 --- a/lib/libusb/.gitattributes +++ /dev/null @@ -1,7 +0,0 @@ -*.ac eol=lf -*.am eol=lf -*.bat eol=crlf -*.sh eol=lf -.gitattributes export-ignore -.gitignore export-ignore -INSTALL_WIN.txt eol=crlf diff --git a/lib/libusb/.github/cifuzz.yml b/lib/libusb/.github/cifuzz.yml deleted file mode 100644 index 2a80713..0000000 --- a/lib/libusb/.github/cifuzz.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: CIFuzz -on: [pull_request] -jobs: - Fuzzing: - runs-on: ubuntu-latest - steps: - - name: Build Fuzzers - id: build - uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master - with: - oss-fuzz-project-name: 'libusb' - dry-run: false - language: c - - name: Run Fuzzers - uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master - with: - oss-fuzz-project-name: 'libusb' - fuzz-seconds: 600 - dry-run: false - language: c - - name: Upload Crash - uses: actions/upload-artifact@v1 - if: failure() && steps.build.outcome == 'success' - with: - name: artifacts - path: ./out/artifacts diff --git a/lib/libusb/.github/workflows/linux.yml b/lib/libusb/.github/workflows/linux.yml deleted file mode 100644 index cae0184..0000000 --- a/lib/libusb/.github/workflows/linux.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: linux - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: [push, pull_request] - -# A workflow run is made up of one or more jobs that can run -# sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job - # can access it - - uses: actions/checkout@v3 - - - name: setup prerequisites - run: | - sudo apt update - sudo apt install autoconf automake libtool libudev-dev m4 - - - name: bootstrap - run: ./bootstrap.sh - - - name: netlink - # Disable tests for netlink as it doesn't seem to work in the CI environment. - run: .private/ci-build.sh --build-dir build-netlink --no-test -- --disable-udev - - - name: udev - run: .private/ci-build.sh --build-dir build-udev -- --enable-udev - - - name: debug-log - run: .private/ci-build.sh --build-dir build-debug -- --enable-debug-log - - - name: disable-log - run: .private/ci-build.sh --build-dir build-nolog -- --disable-log - - - uses: mymindstorm/setup-emsdk@v13 - - - run: npm ci - working-directory: tests/webusb-test-shim - - - name: emscripten - run: emconfigure .private/ci-build.sh --build-dir build-emscripten -- --host=wasm32-unknown-emscripten - - - name: umockdev test - run: .private/ci-container-build.sh docker.io/amd64/ubuntu:rolling diff --git a/lib/libusb/.github/workflows/macos.yml b/lib/libusb/.github/workflows/macos.yml deleted file mode 100644 index 308ea2a..0000000 --- a/lib/libusb/.github/workflows/macos.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: macOS - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: [push, pull_request] - -# A workflow run is made up of one or more jobs that can run -# sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - runs-on: macos-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job - # can access it - - uses: actions/checkout@v3 - - - name: setup prerequisites - shell: bash - run: | - brew update - brew install autoconf automake libtool m4 - - - name: bootstrap - shell: bash - run: ./bootstrap.sh - - - name: compile - shell: bash - run: .private/ci-build.sh --build-dir build - - - name: Xcode - shell: bash - run: cd Xcode && xcodebuild -project libusb.xcodeproj diff --git a/lib/libusb/.github/workflows/msys2.yml b/lib/libusb/.github/workflows/msys2.yml deleted file mode 100644 index dc7f114..0000000 --- a/lib/libusb/.github/workflows/msys2.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: MSYS2 build -on: [push, pull_request] - -jobs: - build: - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} - steps: - - uses: actions/checkout@v3 - - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - update: true - install: git mingw-w64-x86_64-cc mingw-w64-x86_64-autotools - - name: bootstrap - run: ./bootstrap.sh - - name: Build - # GCC on MSYS2 doesn't have ASAN support (but Clang does). - run: ./.private/ci-build.sh --build-dir build-msys2 --no-asan - - name: Build with logging disabled - run: ./.private/ci-build.sh --build-dir build-msys2-nolog --no-asan -- --disable-log diff --git a/lib/libusb/.github/workflows/msys2_clang32.yml b/lib/libusb/.github/workflows/msys2_clang32.yml deleted file mode 100644 index 3ca91bd..0000000 --- a/lib/libusb/.github/workflows/msys2_clang32.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: MSYS2 clang32 build -on: [push, pull_request] - -jobs: - build: - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} - steps: - - uses: actions/checkout@v3 - - uses: msys2/setup-msys2@v2 - with: - msystem: clang32 - update: true - install: git mingw-w64-clang-i686-cc mingw-w64-clang-i686-autotools - - name: CI-Build - run: | - echo 'Running in MSYS2!' - ./bootstrap.sh - # Disabling tests as there is some issue that prevents libtool from - # finalizing its executable wrappers. - # Perhaps this one https://github.com/msys2/MSYS2-packages/issues/1351 - # but it only occurs on clang32 configuration. - ./.private/ci-build.sh --build-dir build-msys2-clang32 --no-test diff --git a/lib/libusb/.github/workflows/msys2_clang64.yml b/lib/libusb/.github/workflows/msys2_clang64.yml deleted file mode 100644 index 72905d5..0000000 --- a/lib/libusb/.github/workflows/msys2_clang64.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: MSYS2 clang64 build -on: [push, pull_request] - -jobs: - build: - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} - steps: - - uses: actions/checkout@v3 - - uses: msys2/setup-msys2@v2 - with: - msystem: clang64 - update: true - install: git mingw-w64-clang-x86_64-cc mingw-w64-clang-x86_64-autotools - - name: CI-Build - run: | - echo 'Running in MSYS2!' - ./bootstrap.sh - ./.private/ci-build.sh --build-dir build-msys2-clang64 diff --git a/lib/libusb/.gitignore b/lib/libusb/.gitignore deleted file mode 100644 index 8886c6b..0000000 --- a/lib/libusb/.gitignore +++ /dev/null @@ -1,84 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -!doc/Makefile.in -*.la -*.lo -*.o -*.js -!/tests/webusb-test-shim/*.js -*.wasm -*.html -libtool -ltmain.sh -missing -stamp-h1 -m4/ -autom4te.cache -INSTALL -install-sh -depcomp -configure -aclocal.m4 -compile -test-driver -config.guess -config.h* -!msvc/config.h -!android/config.h -!Xcode/config.h -.vs -config.log -config.status -config.sub -*.swp -doxygen.cfg -examples/listdevs -examples/xusb -examples/dpfp -examples/dpfp_threaded -examples/fxload -examples/hotplugtest -examples/sam3u_benchmark -examples/testlibusb -tests/init_context -tests/macos -tests/set_option -tests/stress -tests/stress_mt -tests/*.log -tests/*.trs -android/libs -android/obj -*.exe -*.pc -doc/api-1.0 -*.plg -*.ncb -*.opt -Debug -Release -Debug-MT -Release-MT -*.db -*.user -*.suo -*.sdf -*.opensdf -*.patch -*~ -*.orig -.dirstamp -.amend -.DS_Store -Xcode/build -xcshareddata -xcuserdata -*.xcuserdatad -*.xccheckout -*.xcscmblueprint -*.xcworkspace -build/ -tags -cscope.out diff --git a/lib/libusb/.private/README.txt b/lib/libusb/.private/README.txt deleted file mode 100644 index 7f63479..0000000 --- a/lib/libusb/.private/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -This directory contains private internal scripts used by the libusb -project maintainers. - -These scripts are not intended for general usage and will not be -exported when producing release archives. diff --git a/lib/libusb/.private/appveyor_build.sh b/lib/libusb/.private/appveyor_build.sh deleted file mode 100755 index 0f8c34c..0000000 --- a/lib/libusb/.private/appveyor_build.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -set -eu - -buildsys="${1}-${Platform}" - -if [ "${buildsys}" == "MinGW-Win32" ]; then - export PATH="/c/mingw-w64/i686-6.3.0-posix-dwarf-rt_v5-rev1/mingw32/bin:${PATH}" -elif [ "${buildsys}" == "MinGW-x64" ]; then - export PATH="/c/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin:${PATH}" -fi - -builddir="build-${buildsys}" -installdir="${PWD}/libusb-${buildsys}" - -cd libusb - -echo "Bootstrapping ..." -./bootstrap.sh -echo "" - -extra_args="" -if [ "${Configuration}" == "Release" ]; then - extra_args="--no-asan" -fi -exec .private/ci-build.sh --build-dir "${builddir}" --install ${extra_args} -- "--prefix=${installdir}" diff --git a/lib/libusb/.private/bm.sh b/lib/libusb/.private/bm.sh deleted file mode 100755 index 0f45a98..0000000 --- a/lib/libusb/.private/bm.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# produce the MinGW binary files for snapshots -# !!!THIS SCRIPT IS FOR INTERNAL DEVELOPER USE ONLY!!! - -PWD=`pwd` -cd .. -date=`date +%Y.%m.%d` -target=e:/dailies/$date -mkdir -p $target/include/libusb-1.0 -cp -v libusb/libusb-1.0.def $target -cp -v libusb/libusb.h $target/include/libusb-1.0 - -# -# 32 bit binaries -# -target=e:/dailies/$date/MinGW32 -git clean -fdx -# Not using debug (-g) in CFLAGS DRAMATICALLY reduces the size of the binaries -export CFLAGS="-O2 -m32" -export LDFLAGS="-m32" -export RCFLAGS="--target=pe-i386" -export DLLTOOLFLAGS="-m i386 -f --32" -echo `pwd` -(glibtoolize --version) < /dev/null > /dev/null 2>&1 && LIBTOOLIZE=glibtoolize || LIBTOOLIZE=libtoolize -$LIBTOOLIZE --copy --force || exit 1 -aclocal || exit 1 -autoheader || exit 1 -autoconf || exit 1 -automake -a -c || exit 1 -./configure -make -j2 -mkdir -p $target/static -mkdir -p $target/dll -cp -v libusb/.libs/libusb-1.0.a $target/static -cp -v libusb/.libs/libusb-1.0.dll $target/dll -cp -v libusb/.libs/libusb-1.0.dll.a $target/dll -make clean -j2 - -# -# 64 bit binaries -# -target=e:/dailies/$date/MinGW64 -export CFLAGS="-O2" -export LDFLAGS="" -export RCFLAGS="" -export DLLTOOLFLAGS="" -./configure -make -j2 -mkdir -p $target/static -mkdir -p $target/dll -cp -v libusb/.libs/libusb-1.0.a $target/static -cp -v libusb/.libs/libusb-1.0.dll $target/dll -cp -v libusb/.libs/libusb-1.0.dll.a $target/dll -cd $PWD diff --git a/lib/libusb/.private/ci-build.sh b/lib/libusb/.private/ci-build.sh deleted file mode 100755 index 33dfb3b..0000000 --- a/lib/libusb/.private/ci-build.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash - -set -e - -builddir= -scriptdir=$(dirname $(readlink -f "$0")) -install=no -test=yes -asan=yes - -while [ $# -gt 0 ]; do - case "$1" in - --build-dir) - if [ $# -lt 2 ]; then - echo "ERROR: missing argument for --build-dir option" >&2 - exit 1 - fi - builddir=$2 - shift 2 - ;; - --install) - install=yes - shift - ;; - --no-test) - test=no - shift - ;; - --no-asan) - asan=no - shift - ;; - --) - shift - break; - ;; - *) - echo "ERROR: Unexpected argument: $1" >&2 - exit 1 - esac -done - -if [ -z "${builddir}" ]; then - echo "ERROR: --build-dir option not specified" >&2 - exit 1 -fi - -if [ -e "${builddir}" ]; then - echo "ERROR: directory entry named '${builddir}' already exists" >&2 - exit 1 -fi - -mkdir "${builddir}" -cd "${builddir}" - -cflags="-O2" - -# enable extra warnings -cflags+=" -Winline" -cflags+=" -Wmissing-include-dirs" -cflags+=" -Wnested-externs" -cflags+=" -Wpointer-arith" -cflags+=" -Wredundant-decls" -cflags+=" -Wswitch-enum" - -# enable address sanitizer -if [ "${asan}" = "yes" ]; then - cflags+=" -fsanitize=address" -fi - -echo "" -echo "Configuring ..." -CFLAGS="${cflags}" CXXFLAGS="${cflags}" ../configure --enable-examples-build --enable-tests-build "$@" - -echo "" -echo "Building ..." -make -j4 -k - -if [ "${test}" = "yes" ]; then - # Load custom shim for WebUSB tests that simulates Web environment. - export NODE_OPTIONS="--require ${scriptdir}/../tests/webusb-test-shim/" - if ! make check ; then - cat tests/test-suite.log - exit 1 - fi -fi - -if [ "${install}" = "yes" ]; then - echo "" - echo "Installing ..." - make install -fi diff --git a/lib/libusb/.private/ci-container-build.sh b/lib/libusb/.private/ci-container-build.sh deleted file mode 100755 index aa34941..0000000 --- a/lib/libusb/.private/ci-container-build.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -set -eu - -# keep container around if $DEBUG is set -[ -n "${DEBUG:-}" ] || OPTS="--rm" - -if type podman >/dev/null 2>&1; then - RUNC=podman -else - RUNC="sudo docker" -fi - -MOUNT_MODE=":ro" - -$RUNC run --interactive ${RUNC_OPTIONS:-} ${OPTS:-} --volume `pwd`:/source${MOUNT_MODE:-} ${1:-docker.io/amd64/ubuntu:rolling} /bin/bash << EOF -set -ex - -# avoid meson exit code 125; https://github.com/containers/podman/issues/11540 -trap '[ \$? -eq 0 ] || exit 1' EXIT - -# go-faster apt -echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/90nolanguages - -# upgrade -export DEBIAN_FRONTEND=noninteractive -apt-get update -apt-get install -y eatmydata -eatmydata apt-get -y --purge dist-upgrade - -# install build and test dependencies -eatmydata apt-get install -y make libtool libudev-dev pkg-config umockdev libumockdev-dev - -# run build as user -useradd build -su -s /bin/bash - build << EOG -set -ex - -mkdir "/tmp/builddir" -cd "/tmp/builddir" - -CFLAGS="-O2" - -# enable extra warnings -CFLAGS+=" -Winline" -CFLAGS+=" -Wmissing-include-dirs" -CFLAGS+=" -Wnested-externs" -CFLAGS+=" -Wpointer-arith" -CFLAGS+=" -Wredundant-decls" -CFLAGS+=" -Wswitch-enum" -export CFLAGS - -export CXXFLAGS="\${CFLAGS}" - -echo "" -echo "Configuring ..." -/source/configure --enable-examples-build --enable-tests-build - -echo "" -echo "Building ..." -make -j4 -k - -echo "" -echo "Running umockdev tests ..." -tests/umockdev -EOG -EOF diff --git a/lib/libusb/.private/post-rewrite.sh b/lib/libusb/.private/post-rewrite.sh deleted file mode 100755 index d1f9999..0000000 --- a/lib/libusb/.private/post-rewrite.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# Detect amended commits and warn user if .amend is missing -# -# To have git run this script on commit, create a "post-rewrite" text file in -# .git/hooks/ with the following content: -# #!/bin/sh -# if [ -x .private/post-rewrite.sh ]; then -# . .private/post-rewrite.sh -# fi -# -# NOTE: These versioning hooks are intended to be used *INTERNALLY* by the -# libusb development team and are NOT intended to solve versioning for any -# derivative branch, such as one you would create for private development. -# - -if [ -n "$LIBUSB_SKIP_NANO" ]; then - exit 0 -fi - -case "$1" in - amend) - # Check if a .amend exists. If none, create one and warn user to re-commit. - if [ -f .amend ]; then - rm .amend - else - echo "Amend commit detected, but no .amend file - One has now been created." - echo "Please re-commit as is (amend), so that the version number is correct." - touch .amend - fi ;; - *) ;; -esac diff --git a/lib/libusb/.private/pre-commit.sh b/lib/libusb/.private/pre-commit.sh deleted file mode 100755 index 1c30c0f..0000000 --- a/lib/libusb/.private/pre-commit.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# -# Sets the nano version according to the number of commits on this branch, as -# well as the branch offset. -# -# To have git run this script on commit, first make sure you change -# BRANCH_OFFSET to 60000 or higher, then create a "pre-commit" text file in -# .git/hooks/ with the following content: -# #!/bin/sh -# if [ -x .private/pre-commit.sh ]; then -# . .private/pre-commit.sh -# fi -# -# NOTE: These versioning hooks are intended to be used *INTERNALLY* by the -# libusb development team and are NOT intended to solve versioning for any -# derivative branch, such as one you would create for private development. -# -# Should you wish to reuse these scripts for your own versioning, in your own -# private branch, we kindly ask you to first set BRANCH_OFFSET to 60000, or -# higher, as any offset below below 60000 is *RESERVED* for libusb official -# usage. - -################################################################################ -## YOU *MUST* SET THE FOLLOWING TO 60000 OR HIGHER IF YOU REUSE THIS SCRIPT ## -################################################################################ -BRANCH_OFFSET=10000 -################################################################################ - -if [ -n "$LIBUSB_SKIP_NANO" ]; then - exit 0 -fi - -if [ "$BASH_VERSION" = '' ]; then - TYPE_CMD="type git >/dev/null 2>&1" -else - TYPE_CMD="type -P git &>/dev/null" -fi - -eval $TYPE_CMD || { echo "git command not found. Aborting." >&2; exit 1; } - -NANO=`git log --oneline | wc -l` -NANO=`expr $NANO + $BRANCH_OFFSET` -# Amended commits need to have the nano corrected. Current versions of git hooks -# only allow detection of amending post commit, so we require a .amend file, -# which will be created post commit with a user warning if none exists when an -# amend is detected. -if [ -f .amend ]; then - NANO=`expr $NANO - 1` -fi -echo "setting nano to $NANO" -echo "#define LIBUSB_NANO $NANO" > libusb/version_nano.h -git add libusb/version_nano.h diff --git a/lib/libusb/.private/wbs.txt b/lib/libusb/.private/wbs.txt deleted file mode 100644 index c6a7e82..0000000 --- a/lib/libusb/.private/wbs.txt +++ /dev/null @@ -1,43 +0,0 @@ - libusb 1.0 Windows binary snapshot - README - - ********************************************************************* - * The latest version of this snapshot can always be downloaded at: * - * https://github.com/libusb/libusb/releases * - ********************************************************************* - -o Visual Studio: - - Open existing or create a new project for your application - - Copy libusb.h, from the include\libusb-1.0\ directory, into your project and - make sure that the location where the file reside appears in the 'Additional - Include Directories' section (Configuration Properties -> C/C++ -> General). - - Copy the relevant .lib file from MS32\ or MS64\ and add 'libusb-1.0.lib' to - your 'Additional Dependencies' (Configuration Properties -> Linker -> Input) - Also make sure that the directory where libusb-1.0.lib resides is added to - 'Additional Library Directories' (Configuration Properties -> Linker - -> General) - - By default, static libusb statically links against the CRT and the dll build - dynamically links against CRT. You need to rebuild libusb from source to - change this if required by your application. - - Compile and run your application. If you use the DLL version of libusb-1.0, - remember that the DLL needs to be in the DLL search path of your application. - -o MinGW/cygwin - - Copy libusb.h, from include/libusb-1.0/ to your default include directory, - and copy the MinGW32/ or MinGW64/ .a files to your default library directory. - Or, if you don't want to use the default locations, make sure that you feed - the relevant -I and -L options to the compiler. - - Add the '-lusb-1.0' linker option when compiling. - -o Additional information: - - The libusb 1.0 API documentation can be accessed at: - http://api.libusb.info - - For some libusb samples (including source), please have a look in examples/ - - For additional information on the libusb 1.0 Windows backend please visit: - http://windows.libusb.info - - Using the UsbDk backend is now a run-time choice rather than a compile-time - choice. For additional information, including example usage, please visit: - http://windows.libusb.info/#Driver_Installation - - The MinGW and MS generated DLLs are fully interchangeable, provided that you - use the import libs provided or generate one from the .def also provided. - - If you find any issue, please visit https://libusb.info/ and check the - Support section diff --git a/lib/libusb/.travis.yml b/lib/libusb/.travis.yml deleted file mode 100644 index e92f0c4..0000000 --- a/lib/libusb/.travis.yml +++ /dev/null @@ -1,58 +0,0 @@ -language: c - -git: - depth: 1 - -matrix: - include: - - os: linux - dist: focal - compiler: clang - - os: linux - dist: focal - compiler: gcc - - os: linux - dist: bionic - compiler: clang - - os: linux - dist: bionic - compiler: gcc - - os: linux - dist: xenial - compiler: clang - - os: linux - dist: xenial - compiler: gcc - - os: osx - osx_image: xcode12.2 - compiler: clang - - os: osx - osx_image: xcode11.3 - compiler: clang - - os: osx - osx_image: xcode9.4 - compiler: clang - -addons: - apt: - packages: - - autoconf - - automake - - libtool - - libudev-dev - - m4 - homebrew: - packages: - - autoconf - - automake - - libtool - - m4 - -before_script: - - ./bootstrap.sh - -script: - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then .private/ci-build.sh --build-dir build-netlink -- --disable-udev; fi - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then .private/ci-build.sh --build-dir build-udev -- --enable-udev; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then .private/ci-build.sh --build-dir build; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cd Xcode && xcodebuild -project libusb.xcodeproj; fi diff --git a/lib/libusb/AUTHORS b/lib/libusb/AUTHORS deleted file mode 100644 index 50b9c5e..0000000 --- a/lib/libusb/AUTHORS +++ /dev/null @@ -1,224 +0,0 @@ -Copyright © 2001 Johannes Erdfelt -Copyright © 2007-2009 Daniel Drake -Copyright © 2010-2012 Peter Stuge -Copyright © 2008-2016 Nathan Hjelm -Copyright © 2009-2013 Pete Batard -Copyright © 2009-2013 Ludovic Rousseau -Copyright © 2010-2012 Michael Plante -Copyright © 2011-2013 Hans de Goede -Copyright © 2012-2013 Martin Pieuchot -Copyright © 2012-2013 Toby Gray -Copyright © 2013-2018 Chris Dickens - -Other contributors: -Aaron Luft -Adam Korcz -Addison Crump -Adrian Bunk -Adrien Destugues -Akshay Jaggi -Alan Ott -Alan Stern -Aleksandr Mezin -Alexander Mot -Alexander Pyhalov -Alexander Schlarb -Alexander Stein -Alex Feinman -Alex Vatchenko -Andrew Aldridge -Andrew Fernandes -Andrew Goodney -Andy Chunyu -Andy McFadden -Angus Gratton -Anil Nair -Ankur Verma -Anthony Clay -Antonio Ospite -Artem Egorkine -Aurelien Jarno -Axel Gembe -Aymeric Vincent -Baruch Siach -Bastien Nocera -Bei Zhang -Bence Csokas -Benjamin Berg -Benjamin Dobell -Bohdan Tymkiv -Brad Smith -Brent Rector -Bruno Harbulot -Carl Karsten -Christophe Zeitouny -Chris Zhu -Chunyu Xie -Colin Walters -Craig Hutchinson -Dave Camarillo -David Engraf -Davidlohr Bueso -David Moore -Dmitry Fleytman -Dmitry Kostjuchenko -Dmitry Zakablukov -Dominik Boehi -Doug Johnston -Edgar Fuß -Evan Hunter -Evan Miller -Fabrice Fontaine -Federico Manzan -Felipe Balbi -Florian Albrechtskirchinger -Francesco Montorsi -Francisco Facioni -Francis Hart -Frank Li -Frederik Carlier -Freek Dijkstra -Gaurav Gupta -Graeme Gill -Greg Kroah-Hartman -Gustavo Zacarias -Haidong Zheng -Hans Ulrich Niedermann -Harry Mallon -Hector Martin -Hoi-Ho Chan -Ido Yariv -Igor Anokhin -Ihor Dutchak -Ilya Konstantinov -Ingvar Stepanyan -Jakub Klama -James Hanko -Jeffrey Nichols -Jie Zhang -Jim Chen -Johann Richard -John Keeping -John Sheu -Jonas Malaco -Jonathon Jongsma -Joost Muller -Josh Gao -Joshua Blake -Joshua Hou -Joshua M. Clulow -Juan Cruz Viotti -Julian Scheel -Justin Bischoff -Karsten Koenig -Keith Ahluwalia -Kenjiro Tsuji -Kimura Masaru -Konrad Rzepecki -Kuangye Guo -Lars Kanis -Lars Wirzenius -Lei Chen -Léo Lam -Liang Yunwang -Lonnie Abelbeck -Luca Longinotti -Luz Paz -Mac Wang -Marco Trevisan (Treviño) -Marcus Meissner -Mario Kleiner -Mark Kuo -Markus Heidelberg -Martin Ettl -Martin Koegler -Martin Ling -Martin Thierer -Mathias Hjärtström -Matthew Stapleton -Matthias Bolte -Michael Dickens -Michel Zou -Mike Frysinger -Mikhail Gusarov -Mikolaj Kucharski -Morgan Leborgne -Moritz Fischer -Nancy Li -Nia Alarie -Nicholas Corgan -Niklas Gürtler -Omri Iluz -Orhan aib Kavrakoglu -Orin Eman -Ozkan Sezer -Pablo Prietz -Patrick Stewart -Paul Cercueil -Paul Fertser -Paul Qureshi -Pekka Nikander -Petr Pazourek -Philémon Favrod -Pino Toscano -Rob Walker -Romain Vimont -Roman Kalashnikov -Rosen Penev -Ryan Hileman -Ryan Metcalfe -Ryan Schmidt -Saleem Rashid -Sameeh Jubran -Sean McBride -Sebastian Pipping -Sebastian von Ohr -Sergey Serb -Shawn Hoffman -Simon Chan -Simon Haggett -Simon Newton -Slash Gordon -Stefan Agner -Stefan Tauner -Steinar H. Gunderson -Stephen Groat -Sylvain Fasel -Theo Buehler -Thomas Röfer -Tim Hutt -Tim Roberts -Tobias Klauser -Toby Peterson -Tormod Volden -Trygve Laugstøl -Uri Lublin -Uwe Bonnes -Vasily Khoruzhick -Vegard Storheil Eriksen -Venkatesh Shukla -Vianney le Clément de Saint-Marcq -Victor Toso -Vinicius Tinti -Vitali Lovich -Vladimir Beloborodov -William Orr -William Skellenger -Xiaofan Chen -Yegor Yefremov -Zeng Guang -Zhiqiang Liu -Zoltán Kovács -Сергей Валерьевич -Ларионов Даниил -Роман Донченко -jonner -orbitcowboy -osy -parafin -RipleyTom -Seneral -saur0n -SomeAlphabetGuy -winterrace -xloem diff --git a/lib/libusb/COPYING b/lib/libusb/COPYING deleted file mode 100644 index 5ab7695..0000000 --- a/lib/libusb/COPYING +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/lib/libusb/ChangeLog b/lib/libusb/ChangeLog deleted file mode 100644 index 3db5baa..0000000 --- a/lib/libusb/ChangeLog +++ /dev/null @@ -1,351 +0,0 @@ -For detailed information about the changes below, please see the git log -or visit: http://log.libusb.info - -2024-01-31: v1.0.27 -* New libusb_init_context API to replace libusb_init -* New libusb_get_max_alt_packet_size API -* New libusb_get_platform_descriptor API (BOS) -* Allow setting log callback with libusb_set_option/libusb_init_context -* New WebAssembly + WebUSB backend using Emscripten -* Fix regression in libusb_set_interface_alt_setting -* Fix sync transfer completion race and use-after-free -* Fix hotplug exit ordering -* Linux: NO_DEVICE_DISCOVERY option set per context -* macOS: Fix missing device list cleanup locking -* macOS: Do not clear device data toggle for newer OS versions -* macOS: Fix running binaries on older OS than build host -* Windows: Allow claiming multiple associated interfaces -* Windows: Ignore non-configured devices instead of waiting -* Windows: Improved root hub detection - -2022-04-10: v1.0.26 -* Fix regression with transfer free's after closing device -* Fix regression with destroyed context if API is misused -* Workaround for applications using missing default context -* Fix hotplog enumeration regression -* Fix Windows isochronous transfer regression since 1.0.24 -* Fix macOS exit crash in some multi-context cases -* Build fixes for various platforms and configurations -* Fix Windows HID multi-interface product string retrieval -* Update isochronous OUT packet actual lengths on Windows -* Add interface bound checking for broken devices -* Add umockdev tests on Linux - -2022-01-31: v1.0.25 -* Linux: Fix regression with some particular devices -* Linux: Fix regression with libusb_handle_events_timeout_completed() -* Linux: Fix regression with cpu usage in libusb_bulk_transfer -* Darwin (macOS): Add support for detaching kernel drivers with authorization. -* Darwin (macOS): Do not drop partial data on timeout. -* Darwin (macOS): Silence pipe error in set_interface_alt_setting(). -* Windows: Fix HID backend missing byte -* Windows: Fix segfault with libusbk driver -* Windows: Fix regression when using libusb0 driver -* Windows: Support LIBUSB_TRANSFER_ADD_ZERO_PACKET on winusb -* New NO_DEVICE_DISCOVERY option replaces WEAK_AUTHORITY option -* Various other bug fixes and improvements - -2020-12-09: v1.0.24 -* Add new platform abstraction (#252) -* Add Null POSIX backend -* Add support for eventfd -* Add support for thread IDs on Haiku, NetBSD and Solaris -* New API libusb_hotplug_get_user_data() -* Darwin (macOS): Fix race condition that results in segmentation fault (#701) -* Darwin (macOS): Fix stale descriptor information post reset (#733) -* Darwin (macOS): use IOUSBDevice as darwin_device_class explicitly (#693) -* Linux: Drop support for kernel older than 2.6.32 -* Linux: Provide an event thread name (#689) -* Linux: Wait until all URBs have been reaped before freeing them (#607) -* NetBSD: Recognize device timeouts (#710) -* OpenBSD: Allow opening ugen devices multiple times (#763) -* OpenBSD: Support libusb_get_port_number() (#764) -* SunOS: Fix a memory leak (#756) -* SunOS: Various fixes (#627, #628, #629) -* Windows: Add Visual Studio 2019 support -* Windows: Drop support for WinCE and Visual Studio older than 2013 -* Windows: Drop support for Windows XP -* Windows: Support building all examples using Visual Studio (#151) -* Documentation fixes and improvements -* Various other bug fixes and improvements - -2019-08-28: v1.0.23 -* Add German translation (#446) -* Add Hungarian translation (#493) -* Android: Improved support for Android -* BSD: Remove infinite recursion in OpenBSD backend -* configure.ac: Fix detection of clock_gettime library (#439) -* Core: abandon synchronous transfers when device closure is detected. -* Core: fix error in handling the removal of file descriptors while handling - events. -* Darwin(macOS): Switch from using ResetDevice to USBDeviceReEnumerate (#455) -* Darwin(macOS): Remove code that changed the device class used (#428) -* Darwin(macOS): Reduce hotplug timeout to 1ms (from 5s) -* New API libusb_set_log_cb() to redirect global and per context log - messages to the provided log handling function -* New API libusb_wrap_sys_device to allow the user to specify the - usb device to use. -* Solaris: Break infinite recursion in backend clock_gettime -* Solaris: Enable timerfd on sunos when available -* Windows: Add support for isochronous transfers with WinUSB -* Various other bug fixes and improvements - -2018-03-24: v1.0.22 -* New libusb_set_option() API -* Fix transfer timeout not being cleared upon resubmission -* Report super speed plus devices on modern Linux and macOS -* Darwin: Improve support for macOS Sierra and High Sierra -* Darwin: SDK fixes and improvements -* Linux: Let initialization succeed when no devices are present -* Linux: Mark internal file descriptors with CLOEXEC flag -* Solaris: Add support for attach/detach kernel driver -* Windows: Add dynamic UsbDk backend selection -* Windows: Add isochronous transfer support via libusbK -* Windows: Add Visual Studio 2017 support -* Windows: Fix enumeration problems on Windows 8 and later -* Windows: Major rework of poll() emulation -* Windows: Numerous HID API fixes -* Windows: Support cancellation of individual transfers (Vista and later) -* Various other bug fixes and improvements - -2016-10-01: v1.0.21 -* Core: Refactor code related to transfer flags and timeout handling -* Darwin: Ignore root hub simulation devices -* Darwin: Improved support for OS X El Capitan -* Darwin: Work around devices with buggy endpoint descriptors -* Darwin: Do not use objc_registerThreadWithCollector after its deprecation -* Darwin: Use C11 atomics on 10.12+ as the OS atomics are now deprecated -* Linux: Support preallocating kernel memory for zerocopy USB -* Linux: Deal with receiving POLLERR before all transfers have completed -* Solaris: Add solaris backend -* Windows: Add Visual Studio 2015 support -* Windows: Add usbdk backend -* Prevent attempts to recursively handle events -* Fix race condition in handle_timeout() -* Allow transferred argument to be optional in bulk APIs -* Various other bug fixes and improvements - -2015-09-13: v1.0.20 -* Add Haiku support -* Fix multiple memory and resource leaks (#16, #52, #76, #81) -* Fix possible deadlock when executing transfer callback -* New libusb_free_pollfds() API -* Darwin: Fix devices not being detected on OS X 10.8 (#48) -* Linux: Allow larger isochronous transfer submission (#23) -* Windows: Fix broken builds Cygwin/MinGW builds and compiler warnings -* Windows: Fix broken bus number lookup -* Windows: Improve submission of control requests for composite devices -* Examples: Add two-stage load support to fxload (#12) -* Correctly report cancellations due to timeouts -* Improve efficiency of event handling -* Improve speed of transfer submission in multi-threaded environments -* Various other bug fixes and improvements -The (#xx) numbers are libusb issue numbers, see ie: -https://github.com/libusb/libusb/issues/16 - -2014-05-30: v1.0.19 -* Add support for USB bulk streams on Linux and Mac OS X (#11) -* Windows: Add AMD and Intel USB-3.0 root hub support -* Windows: Fix USB 3.0 speed detection on Windows 8 or later (#10) -* Added Russian translation for libusb_strerror strings -* All: Various small fixes and cleanups - -2014-01-25: v1.0.18 -* Fix multiple memory leaks -* Fix a crash when HID transfers return no data on Windows -* Ensure all pending events are consumed -* Improve Android and ucLinux support -* Multiple Windows improvements (error logging, VS2013, VIA xHCI support) -* Multiple OS X improvements (broken compilation, SIGFPE, 64bit support) - -2013-09-06: v1.0.17 -* Hotplug callbacks now always get passed a libusb_context, even if it is - the default context. Previously NULL would be passed for the default context, - but since the first context created is the default context, and most apps - use only 1 context, this meant that apps explicitly creating a context would - still get passed NULL -* Android: Add .mk files to build with the Android NDK -* Darwin: Add Xcode project -* Darwin: Fix crash on unplug (#121) -* Linux: Fix hang (deadlock) on libusb_exit -* Linux: Fix libusb build failure with --disable-udev (#124) -* Linux: Fix libusb_get_device_list() hang with --disable-udev (#130) -* OpenBSD: Update OpenBSD backend with support for control transfers to - non-ugen(4) devices and make get_configuration() no longer generate I/O. - Note that using this libusb version on OpenBSD requires using - OpenBSD 5.3-current or later. Users of older OpenBSD versions are advised - to stay with the libusb shipped with OpenBSD (mpi) -* Windows: fix libusb_dll_2010.vcxproj link errors (#129) -* Various other bug fixes and improvements - -2013-07-11: v1.0.16 -* Add hotplug support for Darwin and Linux (#9) -* Add superspeed endpoint companion descriptor support (#15) -* Add BOS descriptor support (#15) -* Make descriptor parsing code more robust -* New libusb_get_port_numbers API, this is libusb_get_port_path without - the unnecessary context parameter, libusb_get_port_path is now deprecated -* New libusb_strerror API (#14) -* New libusb_set_auto_detach_kernel_driver API (#17) -* Improve topology API docs (#95) -* Logging now use a single write call per log-message, avoiding log-message - "interlacing" when using multiple threads. -* Android: use Android logging when building on Android (#101) -* Darwin: make libusb_reset reenumerate device on descriptors change (#89) -* Darwin: add support for the LIBUSB_TRANSFER_ADD_ZERO_PACKET flag (#91) -* Darwin: add a device cache (#112, #114) -* Examples: Add sam3u_benchmark isochronous example by Harald Welte (#109) -* Many other bug fixes and improvements -The (#xx) numbers are libusbx issue numbers, see ie: -https://github.com/libusbx/libusbx/issues/9 - -2013-04-15: v1.0.15 -* Improve transfer cancellation and avoid short read failures on broken descriptors -* Filter out 8-bit characters in libusb_get_string_descriptor_ascii() -* Add WinCE support -* Add library stress tests -* Add Cypress FX3 firmware upload support for fxload sample -* Add HID and kernel driver detach support capabilities detection -* Add SuperSpeed detection on OS X -* Fix bInterval value interpretation on OS X -* Fix issues with autoclaim, composite HID devices, interface autoclaim and - early abort in libusb_close() on Windows. Also add VS2012 solution files. -* Improve fd event handling on Linux -* Other bug fixes and improvements - -2012-09-26: v1.0.14 -* Reverts the previous API change with regards to bMaxPower. - If this doesn't matter to you, you are encouraged to keep using v1.0.13, - as it will use the same attribute as v2.0, to be released soon. -* Note that LIBUSB_API_VERSION is *decreased* to 0x010000FF and the previous - guidelines with regards to concurrent use of MaxPower/bMaxPower still apply. - -2012-09-20: v1.0.13 -* [MAJOR] Fix a typo in the API with struct libusb_config_descriptor where - MaxPower was used instead of bMaxPower, as defined in the specs. If your - application was accessing the MaxPower attribute, and you need to maintain - compatibility with libusb or older versions, see APPENDIX A below. -* Fix broken support for the 0.1 -> 1.0 libusb-compat layer -* Fix unwanted cancellation of pending timeouts as well as major timeout related bugs -* Fix handling of HID and composite devices on Windows -* Introduce LIBUSB_API_VERSION macro -* Add Cypress FX/FX2 firmware upload sample, based on fxload from - http://linux-hotplug.sourceforge.net -* Add libusb0 (libusb-win32) and libusbK driver support on Windows. Note that while - the drivers allow it, isochronous transfers are not supported yet in libusb. Also - not supported yet is the use of libusb-win32 filter drivers on composite interfaces -* Add support for the new get_capabilities ioctl on Linux and avoid unnecessary - splitting of bulk transfers -* Improve support for newer Intel and Renesas USB 3.0 controllers on Windows -* Harmonize the device number for root hubs across platforms -* Other bug fixes and improvements - -2012-06-15: v1.0.12 -* Fix a potential major regression with pthread on Linux -* Fix missing thread ID from debug log output on cygwin -* Fix possible crash when using longjmp and MinGW's gcc 4.6 -* Add topology calls: libusb_get_port_number(), libusb_get_parent() & libusb_get_port_path() -* Add toggleable debug, using libusb_set_debug() or the LIBUSB_DEBUG environment variable -* Define log levels in libusb.h and set timestamp origin to first libusb_init() call -* All logging is now sent to to stderr (info was sent to stdout previously) -* Update log messages severity and avoid polluting log output on OS-X -* Add HID driver support on Windows -* Enable interchangeability of MSVC and MinGW DLLs -* Additional bug fixes and improvements - -2012-05-08: v1.0.11 -* Revert removal of critical Windows event handling that was introduced in 1.0.10 -* Fix a possible deadlock in Windows when submitting transfers -* Add timestamped logging -* Add NetBSD support (experimental) and BSD libusb_get_device_speed() data -* Add bootstrap.sh alongside autogen.sh (bootstrap.sh doesn't invoke configure) -* Search for device nodes in /dev for Android support -* Other bug fixes - -2012-04-17: v1.0.10 -* Public release -* Add libusb_get_version -* Add Visual Studio 2010 project files -* Some Windows code cleanup -* Fix xusb sample warnings - -2012-04-02: v1.0.9 -* First libusbx release -* Add libusb_get_device_speed (all, except BSD) and libusb_error_name -* Add Windows support (WinUSB driver only) -* Add OpenBSD support -* Add xusb sample -* Tons of bug fixes - -2010-05-07: v1.0.8 -* Bug fixes - -2010-04-19: v1.0.7 -* Bug fixes and documentation tweaks -* Add more interface class definitions - -2009-11-22: v1.0.6 -* Bug fixes -* Increase libusb_handle_events() timeout to 60s for powersaving - -2009-11-15: v1.0.5 - * Use timerfd when available for timer management - * Small fixes/updates - -2009-11-06: v1.0.4 release - * Bug fixes including transfer locking to fix some potential threading races - * More flexibility with clock types on Linux - * Use new bulk continuation tracking in Linux 2.6.32 for improved handling - of short/failed transfers - -2009-08-27: v1.0.3 release - * Bug fixes - * Add libusb_get_max_iso_packet_size() - -2009-06-13: v1.0.2 release - * Bug fixes - -2009-05-12: v1.0.1 release - * Bug fixes - * Darwin backend - -2008-12-13: v1.0.0 release - * Bug fixes - -2008-11-21: v0.9.4 release - * Bug fixes - * Add libusb_attach_kernel_driver() - -2008-08-23: v0.9.3 release - * Bug fixes - -2008-07-19: v0.9.2 release - * Bug fixes - -2008-06-28: v0.9.1 release - * Bug fixes - * Introduce contexts to the API - * Compatibility with new Linux kernel features - -2008-05-25: v0.9.0 release - * First libusb-1.0 beta release - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -APPENDIX A - How to maintain code compatibility with versions of libusb and -libusb that use MaxPower: - -If you must to maintain compatibility with versions of the library that aren't -using the bMaxPower attribute in struct libusb_config_descriptor, the -recommended way is to use the new LIBUSB_API_VERSION macro with an #ifdef. -For instance, if your code was written as follows: - - if (dev->config[0].MaxPower < 250) - -Then you should modify it to have: - -#if defined(LIBUSB_API_VERSION) && (LIBUSB_API_VERSION >= 0x01000100) - if (dev->config[0].bMaxPower < 250) -#else - if (dev->config[0].MaxPower < 250) -#endif diff --git a/lib/libusb/HACKING b/lib/libusb/HACKING deleted file mode 100644 index 2961163..0000000 --- a/lib/libusb/HACKING +++ /dev/null @@ -1,25 +0,0 @@ -Contributing to libusb -********************** - -For larger changes or API changes/extensions it may be wise to first -discuss on the mailing list or in the issue tracker before larger -coding efforts are initiated. - -If you extend or change the API make sure documentation is updated. -Please run make -C doc and check for any Doxygen warnings. - -Commit messages should be formatted to 72 chars width and have a -free-standing summary line. See for instance "Commit Guidelines" on -https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project -or https://cbea.ms/git-commit/ about how to make well-formed commit -messages. - -Put detailed information in the commit message itself, which will end -up in the git history. On the other hand the description that you fill -in the GitHub pull request web page does not go anywhere. - -For copyright reasons it is preferable to have your full name in the -commit author field. Do not update the AUTHOR file yourself, the -maintainers will update it as part of the release preparation. - -Please don't touch version_nano.h in your patches or pull requests. diff --git a/lib/libusb/INSTALL_WIN.txt b/lib/libusb/INSTALL_WIN.txt deleted file mode 100644 index 802e29a..0000000 --- a/lib/libusb/INSTALL_WIN.txt +++ /dev/null @@ -1,52 +0,0 @@ -Installation Instructions for Windows -************************************* - -If you are compiling for MinGW or cygwin, please refer to the INSTALL file, -which is automatically generated by autotools (e.g. running bootstrap.sh). - -If you are using Microsoft Visual Studio: -- Using Visual Studio 2022, open /msvc/libusb.sln -- If you want to debug the library, uncomment the ENABLE_DEBUG_LOGGING define - in msvc/config.h -- Select your configuration and compile the project. -- To target a specific toolset (previous version of Visual Studio), either - edit PlatformToolset in /msvc/Configuration.Base.props, or supply the value - to msbuild on the command line. -- For example, to build for VS2015 (from a different version): - msbuild -p:PlatformToolset=v140,Platform=x64,Configuration=Release libusb.sln - -Installing and building libusb via vcpkg -**************************************** - -You can download and install libusb using the vcpkg dependency manager: - - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - ./bootstrap-vcpkg.bat - ./vcpkg integrate install - vcpkg install libusb - -The libusb port in vcpkg is kept up to date by Microsoft team members and -community contributors. If the version is out of date, please create an issue -or pull request (https://github.com/Microsoft/vcpkg) on the vcpkg repository. - -Destination directories -*********************** - -The binaries are located at: -/build////(lib|dll)/libusb-1.0.(lib|dll) -For example: /build/v143/x64/Release/dll/libusb-1.0.dll - -Troubleshooting -*************** - -If the compilation process complains about missing libraries, ensure that the -default library paths for your project points to the relevant directories. -If needed, these libraries can be obtained by installing the latest Windows -SDK. - -Links -***** - -Additional information related to the Windows backend: - http://windows.libusb.info diff --git a/lib/libusb/KEYS b/lib/libusb/KEYS deleted file mode 100644 index 06d0148..0000000 --- a/lib/libusb/KEYS +++ /dev/null @@ -1,123 +0,0 @@ -This file contains the PGP keys of libusb release managers. - -Users: - pgp < KEYS -or - gpg --import KEYS - -Maintainers: - pgp -kxa and append it to this file. -or - (pgpk -ll && pgpk -xa ) >> this file. -or - (gpg --list-sigs && gpg --armor --export ) >> this file. - -pub rsa4096 2020-06-23 [SC] - C68187379B23DE9EFC46651E2C80FF56C6830A0E -uid [ultimate] Tormod Volden -sub rsa4096 2020-06-23 [E] -sub rsa4096 2020-06-23 [S] - ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBF7yPL0BEADQc/2dx8H7a7r1SGYph5hmkszs0O9V/43m8XhNnbnFraXjmbEv -xm2wE6AuR301mjAqYSt/mphmH54z4GBbgmLBrK8TGdhlK0K11PeSudRN4jsLs+U3 -ErtkAHODmzyg7QiW3GWudP/lJQRSqNBoadeOdOsKMoJxm7T2a9fyyf8FR/FfShjv -NB62jSWq0x0WnglI/V/ZOi/mOnqoggCoWXLzwqbKasicvfNsTPJIsjiu24US6mif -nRllMWr/6aHyCOX6+x6PsQ35NF5C5B7b0c1fY7zU/UiM/JBF4HDf7jltzTIjHjho -jTwcEkCVmunW+jSwjsLcr/zkOsu1re0W/VJJNXOhSnNUDpM7t9FeSfJ0LGlXYnGI -5ZUCQ8w4RcKmkHYhepCjDVWYkCmxmTgO7LaAXZ5S0GeOoSDsvHNHYywAXNmB6A0s -3kv/8i3wT8K1w9972eYW+NA6T7BfdbNk/EKxZQ74eezpRWDDPEl/zehoHQoPO3m1 -N2b06nnSKLv263IJAPdpLPUJowYdWnvmw/wyakeBMRJdI1FsDkEdI2KAvQxRKHfU -/cTtMEJuGGR5qyze4jMHUuVqSvEsoXmSA2OLcWeZyn12jfd0CrGbCZ7jZ0R7Q1Ab -cZ7hPsLKtgKHKyrmAdlmTgpOb2Kk2LP4ar0tuDa02YcFFAAWdRY9pORI+wARAQAB -tCdUb3Jtb2QgVm9sZGVuIDx0b3Jtb2Qudm9sZGVuQGdtYWlsLmNvbT6JAlAEEwEI -ADsCGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AWIQTGgYc3myPenvxGZR4sgP9W -xoMKDgUCXvI9hAIZAQAKCRAsgP9WxoMKDpcrD/i7ejrtzMGhDbB+IS5vvoK/Vk+s -Oszn+Bi4kjq+S4wv93gByDQy5L8YHSecKS60Qi0XW3VP7qoMXaI10oo0+4pZjheM -Lz38Xh7nOhnmzKzyPgB9sg/KuuSvcy6dZZ120ye035uckO3qDIvrV6rG9sx9EV8d -rOKppgpXBhCC52bFp45S6bbWRLQrKlmWDNdMSQcknt86ntSqxNJDdbKoxL0JxSI8 -mB+XrM7TZvyP9eA0ZVy55cbm0ZwU2beJty72GB0Niz0ZiGWeoBcuotDkpAwou7/B -Worgonw5yLMjL4NatZXRhym7YTNvKVovLwuG7krScghDCuGo1VswHyRi8xkkuvJ2 -YS51UBpvLsrDeLlBNd8JzL/FuBgFohkXzXjezx3gEUJe0+mc4gPdHULh8q9suRvF -ewOuQshiqvRUacuKNYglqnxqM4aJxqO0BCNDofgnu8JYk+llXzKT5bKiIXHDMWwd -eq9Y4NJzruAAilqM0tc1iI+qDmD4SabEjAmGREPeirVrASfrZFrOKBwF0PQE9fVN -PsXdYCHhfXLjlEFVv5pmJkhw3euFoxDz3auZ6OhGo1ffCOZ62On5joiIRhhGQ57l -qpW3W2Ph9TmWLRtOwR7DgiP/qUCrngBmk+Vl3KdwmSECDTXnFFKtOIHHomHEziEV -wnjxNpVBwrvZZZkPiF0EExEIAB0WIQQsLnerYFFdSZykiO+jLYR2uvQdDAUCXvJG -mgAKCRCjLYR2uvQdDNyVAJ9qmD3ioM5cVU3t7h4YSb6FuZ7CvQCggtBzoovIo6UJ -WsMd6NvtKXSVsii0J1Rvcm1vZCBWb2xkZW4gPGRlYmlhbi50b3Jtb2RAZ21haWwu -Y29tPokCTgQTAQgAOBYhBMaBhzebI96e/EZlHiyA/1bGgwoOBQJe8jy9AhsDBQsJ -CAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJECyA/1bGgwoOFdQP/R3oBQ/fQTFoaRVK -Q7KOp0MI2Bo1l9kRYnjj+CxlFUIEKTs06AER55IUpt1bjh4drldLVwaFP8rx/V5A -62Z2yvIAhkrEKRFkTEbdnfH5S23VF9T8n2L4nZ6L0VBK8bgdZsiTKWk4aVy4YdQG -yUC8mcXq1beZS8WiL7X/aH81uO+Bwaszmwgi2/NHEGdTuE1jUIslWyOHGhEe5Ygo -+mEltm+PLdZJ9dJAEI3fWYl0Y+5y+eDNBBNXEsTiZ0R/7xFakcT2AWSnRPxbllJk -4tG8FTlnSU8WY3VODec0L04UFJE64Ywupae0Xqc7ycJNk72FG3VEDgQhZC6e/L+a -vSgCvzI9U8mdypxS9znyYblCGigR46M/CMzUp6oA78u3cHPUyL2fVYMm6FcQN1Bv -nIlDSgHZJjFdpmAqYPvs+LR4+8dLXgwUKdIufka8yLJ2W3x5HQMtqBkgL8QqJTt1 -PdDbAaZdA1RHPJU2rE7sBI5EOOnQJu1cdFMOAXQR7BUad2au5IJ2oxy+z1fsZZeh -1X8OjypTQuKrQA3oAgaAERu/qRC4c6SKG8bMMR+3tf6NVWlYS+gK2wGxXCM5DuEJ -LYlHj2vQ/xeauq9MR23rgufVrmmnPEawMnsM5dD2ArR9FIq+sOAeZM/SJQC/I5Zf -uM+khtkurI63QMKLxzJAJjeS/gmliF0EExEIAB0WIQQsLnerYFFdSZykiO+jLYR2 -uvQdDAUCXvJGowAKCRCjLYR2uvQdDIIVAKDcEF7MFwV/xjr7M5bTkSITiLfn/gCe -OTXlJl/vmuXHcJl7GOPkxr5Lrbu5Ag0EXvI8vQEQAN4TW0AbNnnQ4ZeVJZWYsfBW -dFkN42092q3herQuYRxzrEqqgwdVXplIQYKJKGdKmsBQGuqY4eXktz5EXSFPk6Ui -YrDD6WffQoJOpZPYWB70clWSSvz+moSQSNyMOT+DhZ//CZ74YiOJTE4844HuzmkG -lg+zS9cKKAYcz+KICKWxRaTfX/LtXKZBF3QSSy8qxCM9PipoO8bblQBGnY8rzneQ -vAXuhsGgbtjR+o23owWHbFZKgvphsXgnmx6brJoY1o5x4qXpGrpG6XzNYp2zd3RJ -0+8R6OIoukil/x3TGSFFp4cp2Nahb8XxV8neZ7Ng8O0+/P7sMJxPm0wuU8+DEnpB -F6/bI1hvMNvF20dhWzpChOmArJQRZbCDM+EouZhAbh3T0n/5bx4EBezCMpDSO90V -n0Uy3KAHbf6QohCt0PEmRSZkrGPFs3fSzuP4U8cWa07sUL02CW/pTn2i96fGgh+F -+SfY1E56vN2Rzv7OSrbD+cNai9E4gwDGElX9ML/O3lTOok9cfSvbFxXr0ALnLCAT -u1bI/f4Ohu9yQy4sYR+FSMNBaQmbb213PpoT5rNdn5XT/v067r8iWQlwi48a7IIM -TNsTSGSNiBm3UoETipqQZVrgbk4gEwPsf/6BB9e2H0GSY7XBBcQb99UGQ9k88ieQ -3jinfc2Mj8bIqCcRqwnNABEBAAGJAjYEGAEIACAWIQTGgYc3myPenvxGZR4sgP9W -xoMKDgUCXvI8vQIbDAAKCRAsgP9WxoMKDuYcD/4rd2U6ca2/mQmNGoT2r315j2j0 -ej61a3BwoL42dX+0SgbjstIhpHo4Ng0b6MAvsA7Y6RX2P0FnBhxHQhkBUu0EbtfU -Pewxn1WPn7qdXHLh/U3JBTWFgIvaRaqEoUVx1FAaShOex77rgwL+7NZyATSLNaW9 -J3NBY4LaKIHeqEbyHnIs9NAdnaDXxwXjTwvlz5rAbBG6r2uoUca95rWkAi/iT9D2 -cki5ouq7Lk6SGLOZAzeilKB81UsjryHmiJ1tzOWdpVTYw1Y0c30qDH/EgylmTscU -+e4cFYo7ZqJeVXM8fNDMnU89UhOzArMgKNZEijfnUE/1qqLKNK3BRoaQrISZkYdF -AILOfvE4yfoQxJ0joA5RJmGg1BoBsCxh6Bm25bwr9fckf2no42bG9E6a7Ib8Stkl -MMkzdSL+6ei8wMZ/EJAGa7JYXu8wHR6fZ1bgpzbS3zejO1qReNrs+zyyT+tMHTT2 -Ax2HUpBokbPSjT6ZgWNj5XZJAPSF9S+f073D0Zr8051VU5cnI+TfGzK1OLiAcVNx -cKM6cjSH40MUWFzHuRjlNnqrVWLcYHje8KhmfHRc6LzLR0yjz4RCfLhUnf/56Zz+ -kDGYEAOdx3mon/RG8q1yQZc0Uz3xr6+tV8jUJOaeTxvEVa6dwncBBma2BJIeVOFk -fgu0j2XHDAKcyhnG97kCDQRe8j3JARAAs11IfLfybhdX3yjbVzxPiJ3RzkFZBbHy -YcL8NJYdpxOGEK5pLu7zOe7z+TQpW4mMfQunbHreABunjCPuZwvME4ekQva/pky7 -S9ajdsm1HMVpoXNQ0cSD+WTkiJaDJC6LFH6+XDzrUK7Kp/6NGKCSwU5xXmZudSVd -pCNuziE+KQ5qEXPT6P7H+1TLNKgZvxmksHA76+/ZahpVTCgVVMpTmlRa3jnH0MoN -v5fwUMuC7fx09zdqb09D1bBcjrTltVcO6Ij8yUnw5DaQS8y8boIsIIK9YaJHk7uI -o1qzilT7a71GKmz1Cs90qmLvRpN8nJGY6q28BXyM68E1Wx7x720IgXTR/JL/j3dB -Yggil3GGdBLEwVPtAy8VeeiNGsJe1ZmYUYMc6rgOjghWZogjI5mJOqOXOs3Iilic -sRTySCP4x7uRquWWlNNyeVE17ScGiUqsNCyzzwQ3MKbASswNrKnu0iIBfdYyWF+w -iyB+kr8o23QMA7TIJnRj++ShOSeoPNg0wOns97Yj4VobSvWBmiX+VjFWkhOQFY9Q -eFibQX3iBcSUBZh4eilQMWOx4vD9usBF9NsvrZKvIXrQI456BsTzoKFspqlka9y4 -YISw3fbGjfOSNXab2R5xEkHX8fF/u8Xs897kVIi/imRrVSgmzf3X4QdTLQJ2MdhH -02lhlYdkvecAEQEAAYkEawQYAQgAIBYhBMaBhzebI96e/EZlHiyA/1bGgwoOBQJe -8j3JAhsCAj8JECyA/1bGgwoOwXMgBBkBCAAdFiEEnH6pSTnGnE+8Pb+oqgY5B577 -YbkFAl7yPckACgkQqgY5B577YbkUig/3XOT/88S0edOfgNfFtntAYCj4w3NztXiR -ClFQFohRupjP7h6y24VgKD1I0595fCGs9YKl9MiI9PAxNUVdKD6WOcjrRL6B8eMh -xle4MefL4UK5kvUKTn2QqE8GgwAqgFkn0wbdOOxPVmGtJ3tuS5Hok9nn9RHUkeMK -vOeRHx38NyozjZxoUJ+3gFngliM1BKlR3Dq1XlvXz/7fWKzl3AkneLHfca/0yzB6 -7qvs3G6q0btyZqjp0GSrGSVUnqpK670b1l6DQd6raej76RPq8OsxP1DkfwVsyNQV -/EN0atj+MsruUPBbesZ5oP/XFrQkjjDDIGhbmg0xB9Bxp8v+y9EiFB9LC4nmLvw9 -gn2cK3j1JXdiKUVWzPMKdUrZ/Y5lksrn6a326zDOJZwT4/XYiclgM+vKQb1RWdXv -bz3oTpSyeCdKZQ845aNM1Q8AHJ2NVlGBbiMsFTmKnM/wcU8+6saWflF0JeiNgal0 -wcGvmkossrOVQZh10959HT8Eb4Vzgf0MD4YATmM6CbGxv1tuDxhK12e8MDsI7wul -M5ODLWpb3zwgLU/O3IeinbRlr30lhvnTzgdYx5CgYqUYUm/MSb0+vWpr67smoBbR -pWi4j2zcTtay/iNL9pFCLFegkJtXwLehh8sgEj28c/jOH2XEfOgEEniVM57dFONm -n5ba3xTKRSS8D/44K3JJSPi2urzO+wXtcbZ1QSWypTV8dI7zLImySMmBtU7GEKLe -y8klXAQBnzyKTFrsS60A0JiNGbzw75kAi2677jgvEtzz0QAxvJUCianFT9QCqcxQ -okh/W8klVaJGLucAD5CRTLc9F4TNGV1jsHf90McWWf/bKANz875PZUDqMDtQ6hqH -Udn4AxVaLn1dAqn2ae3DQK043jViy7IivilQLLo5mmkGLs0bPQZgG4OBB0mgzS8Z -t2/3zJUvS/ygea0vqMzleEMlBJXWMyh6S8upEJVGdJfuMfRbOpvRBXZULLKwBVLn -/vcB6QianT31AtxpWRtXjk52DxrqP85jMZtrlXWECmOanNM41cN/hoVVcXYLYYrt -f8ZYM4cjB744M3XqCjh8aw8p8sg/sMQ4yJMlLuS6tGR/4WS1EU+Rq3ukg5jFfAQ/ -PfXrj4iCFjUBD4CnRAQIXhPCqMl6hFMZw61BpKFpZNLlJ205R+elqGBbrLibhu3u -RAeFxk23S035hxBZnC2CDQL7zLwnzk1DPx6ywS6ky2qENwISR9tNldehFuPHXnSf -5/DxUzfWd2Tj35vxZDhKjJ1HiT3o++HKCRX9cP/cALsd5zvIxSVN6RRCUI2U8N+b -k5/dfKNq8Q4FX9TZFSBnWudih+bT74v5f4LwhidPgOiYugiLoJh2ZqIVvQ== -=5EaQ ------END PGP PUBLIC KEY BLOCK----- diff --git a/lib/libusb/Makefile.am b/lib/libusb/Makefile.am deleted file mode 100644 index 09d7cf5..0000000 --- a/lib/libusb/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip -ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = INSTALL_WIN.txt PORTING doc/libusb.png \ - android msvc Xcode -SUBDIRS = libusb - -if BUILD_EXAMPLES -SUBDIRS += examples -endif - -if BUILD_TESTS -SUBDIRS += tests -endif - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libusb-1.0.pc - -# The package name is libusb-1.0, but we want the distribution -# to be created as libusb-x.y.z instead of libusb-1.0-x.y.z -distdir = libusb-$(VERSION) - -# Ensure any generated docs are cleaned out -# We need this here because make does not recurse into doc/ -clean-local: - rm -rf doc/$(DOXYGEN_HTMLDIR) - -# Use dist-hook to accomplish the following things for the dist recipe: -# 1) Remove the GitHub Markdown from the README file -# 2) Remove the .gitattributes file from the msvc directory -dist-hook: - chmod u+w $(distdir)/README $(distdir)/msvc - $(SED) -i.orig -e '/Build Status/d' $(distdir)/README - $(SED) -i.orig -e '/^$$/N;/^\n$$/D' $(distdir)/README - $(SED) -i.orig -e 's/\[\([A-Z]*\)\](\1)/\1/' $(distdir)/README - rm -f $(distdir)/README.orig - rm -f $(distdir)/msvc/.gitattributes - -reldir = .release/$(distdir) -sfurl = frs.sourceforge.net:/home/frs/project/libusb/libusb-1.0 -.PHONY: dist-upload -dist-upload: dist - rm -rf $(reldir) - mkdir -p $(reldir) - cp $(distdir).tar.bz2 $(reldir) - if [ -z "$$SF_USER" ]; then \ - rsync -rv $(reldir) $(sfurl); \ - else \ - rsync -rv $(reldir) $$SF_USER@$(sfurl); \ - fi - rm -rf $(reldir) diff --git a/lib/libusb/NEWS b/lib/libusb/NEWS deleted file mode 100644 index ba2a610..0000000 --- a/lib/libusb/NEWS +++ /dev/null @@ -1,2 +0,0 @@ -For the latest libusb news, please refer to the ChangeLog file, or visit: -https://libusb.info diff --git a/lib/libusb/PORTING b/lib/libusb/PORTING deleted file mode 100644 index fa9ec1e..0000000 --- a/lib/libusb/PORTING +++ /dev/null @@ -1,94 +0,0 @@ -PORTING LIBUSB TO OTHER PLATFORMS - -Introduction -============ - -This document is aimed at developers wishing to port libusb to unsupported -platforms. I believe the libusb API is OS-independent, so by supporting -multiple operating systems we pave the way for cross-platform USB device -drivers. - -Implementation-wise, the basic idea is that you provide an interface to -libusb's internal "backend" API, which performs the appropriate operations on -your target platform. - -In terms of USB I/O, your backend provides functionality to submit -asynchronous transfers (synchronous transfers are implemented in the higher -layers, based on the async interface). Your backend must also provide -functionality to cancel those transfers. - -Your backend must also provide an event handling function to "reap" ongoing -transfers and process their results. - -The backend must also provide standard functions for other USB operations, -e.g. setting configuration, obtaining descriptors, etc. - - -File descriptors for I/O polling -================================ - -For libusb to work, your event handling function obviously needs to be called -at various points in time. Your backend must provide a set of file descriptors -which libusb and its users can pass to poll() or select() to determine when -it is time to call the event handling function. - -On Linux, this is easy: the usbfs kernel interface exposes a file descriptor -which can be passed to poll(). If something similar is not true for your -platform, you can emulate this using an internal library thread to reap I/O as -necessary, and a pipe() with the main library to raise events. The file -descriptor of the pipe can then be provided to libusb as an event source. - - -Interface semantics and documentation -===================================== - -Documentation of the backend interface can be found in libusbi.h inside the -usbi_os_backend structure definition. - -Your implementations of these functions will need to call various internal -libusb functions, prefixed with "usbi_". Documentation for these functions -can be found in the .c files where they are implemented. - -You probably want to skim over *all* the documentation before starting your -implementation. For example, you probably need to allocate and store private -OS-specific data for device handles, but the documentation for the mechanism -for doing so is probably not the first thing you will see. - -The Linux backend acts as a good example - view it as a reference -implementation which you should try to match the behaviour of. - - -Getting started -=============== - -1. Modify configure.ac to detect your platform appropriately (see the OS_LINUX -stuff for an example). - -2. Implement your backend in the libusb/os/ directory, modifying -libusb/os/Makefile.am appropriately. - -3. Add preprocessor logic to the top of libusb/core.c to statically assign the -right usbi_backend for your platform. - -4. Produce and test your implementation. - -5. Send your implementation to libusb-devel mailing list. - - -Implementation difficulties? Questions? -======================================= - -If you encounter difficulties porting libusb to your platform, please raise -these issues on the libusb-devel mailing list. Where possible and sensible, I -am interested in solving problems preventing libusb from operating on other -platforms. - -The libusb-devel mailing list is also a good place to ask questions and -make suggestions about the internal API. Hopefully we can produce some -better documentation based on your questions and other input. - -You are encouraged to get involved in the process; if the library needs -some infrastructure additions/modifications to better support your platform, -you are encouraged to make such changes (in cleanly distinct patch -submissions). Even if you do not make such changes yourself, please do raise -the issues on the mailing list at the very minimum. diff --git a/lib/libusb/README b/lib/libusb/README deleted file mode 100644 index c25266a..0000000 --- a/lib/libusb/README +++ /dev/null @@ -1,33 +0,0 @@ -# libusb - -[![Build Status](https://travis-ci.org/libusb/libusb.svg?branch=master)](https://travis-ci.org/libusb/libusb) -[![Build Status](https://ci.appveyor.com/api/projects/status/xvrfam94jii4a6lw?svg=true)](https://ci.appveyor.com/project/LudovicRousseau/libusb) -[![Coverity Scan Build Status](https://scan.coverity.com/projects/2180/badge.svg)](https://scan.coverity.com/projects/libusb-libusb) - -libusb is a library for USB device access from Linux, macOS, -Windows, OpenBSD/NetBSD, Haiku, Solaris userspace, and WebAssembly -via WebUSB. -It is written in C (Haiku backend in C++) and licensed under the GNU -Lesser General Public License version 2.1 or, at your option, any later -version (see [COPYING](COPYING)). - -libusb is abstracted internally in such a way that it can hopefully -be ported to other operating systems. Please see the [PORTING](PORTING) -file for more information. - -libusb homepage: -https://libusb.info/ - -Developers will wish to consult the API documentation: -http://api.libusb.info - -Use the mailing list for questions, comments, etc: -http://mailing-list.libusb.info - -- Hans de Goede -- Xiaofan Chen -- Ludovic Rousseau -- Nathan Hjelm -- Chris Dickens - -(Please use the mailing list rather than mailing developers directly) diff --git a/lib/libusb/README.git b/lib/libusb/README.git deleted file mode 100644 index b845138..0000000 --- a/lib/libusb/README.git +++ /dev/null @@ -1,41 +0,0 @@ -Notes related to git compilation: --------------------------------- - -If you retrieved the libusb repository from git and are using a gcc based -toolchain, be mindful that you should have the autotools installed (autoconf, -automake) and will need to run either ./autogen.sh or ./bootstrap.sh to produce -the configure file. - -The difference between autogen.sh and bootstrap.sh is that the former invokes -configure with a default set of options, and will therefore generate a Makefile, -whereas the latter does not invoke configure at all. If using autogen.sh, note -that you can also append options, that will be passed as is to configure. - -macOS-specific notes: -------------------- - -Starting with Xcode 4.3, neither Xcode.app nor the Xcode 'command line tools' -includes autotools and so running either autogen.sh or bootstrap.sh will result -in the message: - -libtoolize or glibtoolize was not found! Please install libtool. - -To proceed, you must find and install it from somewhere. - -Alternatively, you can use the Xcode project at Xcode/libusb.xcodeproj. - -Notes related to submitting new developments: --------------------------------------------- - -If you submit a new development to libusb (eg: new backend), that is unlikely -to fit in a couple of small patches, we would kindly suggest that you create a -public account on github, if you don't have one already, and then fork a new -libusb repository under this account from https://github.com/libusb/libusb. - -Then you can create a git branch for your work, that we will be able to better -reference and test. - -We also suggest that, if you are planning to bring in a large development, you -try to involve the libusb community early by letting the mailing list know, as -you may find that other people might be eager to help you out. -See http://mailing-list.libusb.info for details on how to join the mailing list. diff --git a/lib/libusb/README.md b/lib/libusb/README.md deleted file mode 120000 index 100b938..0000000 --- a/lib/libusb/README.md +++ /dev/null @@ -1 +0,0 @@ -README \ No newline at end of file diff --git a/lib/libusb/TODO b/lib/libusb/TODO deleted file mode 100644 index 1e13760..0000000 --- a/lib/libusb/TODO +++ /dev/null @@ -1,2 +0,0 @@ -Please see the libusb roadmap by visiting: -https://github.com/libusb/libusb/milestones?direction=asc&sort=due_date&state=open diff --git a/lib/libusb/Xcode/common.xcconfig b/lib/libusb/Xcode/common.xcconfig deleted file mode 100644 index 6751445..0000000 --- a/lib/libusb/Xcode/common.xcconfig +++ /dev/null @@ -1,92 +0,0 @@ -// -// libusb Xcode configuration file -// Copyright © 2012 Pete Batard -// For more information, please visit: -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -// Use GNU11 dialect. -GCC_C_LANGUAGE_STANDARD = gnu11 - -// Don't search user paths with <> style #includes. -ALWAYS_SEARCH_USER_PATHS = NO - -// Enable weak references for Objective-C -CLANG_ENABLE_OBJC_WEAK = YES - -// Allocate even uninitialized global variables in the data section of the object file, rather than generating them as common blocks. This has the effect that if the same variable is declared (without 'extern') in two different compilations, you will get an error when you link them. -GCC_NO_COMMON_BLOCKS = YES - -// Keep private symbols private. The first setting is -fvisibility=hidden, the second is -fvisibility-inlines-hidden. -GCC_SYMBOLS_PRIVATE_EXTERN = YES -GCC_INLINES_ARE_PRIVATE_EXTERN = YES - -// Compiler errors. -GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES - -// Compiler warnings. -GCC_WARN_64_TO_32_BIT_CONVERSION = YES -GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES -GCC_WARN_ABOUT_MISSING_NEWLINE = YES -GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES -GCC_WARN_ABOUT_RETURN_TYPE = YES -GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES -GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES -GCC_WARN_SHADOW = YES -GCC_WARN_UNINITIALIZED_AUTOS = YES -GCC_WARN_UNKNOWN_PRAGMAS = YES -GCC_WARN_UNUSED_FUNCTION = YES -GCC_WARN_UNUSED_LABEL = YES -GCC_WARN_UNUSED_PARAMETER = YES -GCC_WARN_UNUSED_VARIABLE = YES -CLANG_WARN_ASSIGN_ENUM = YES -CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES -CLANG_WARN_BOOL_CONVERSION = YES -CLANG_WARN_COMMA = YES -CLANG_WARN_CONSTANT_CONVERSION = YES -CLANG_WARN_DOCUMENTATION_COMMENTS = YES -CLANG_WARN_EMPTY_BODY = YES -CLANG_WARN_ENUM_CONVERSION = YES -CLANG_WARN_FLOAT_CONVERSION = YES -CLANG_WARN_INFINITE_RECURSION = YES -CLANG_WARN_INT_CONVERSION = YES -CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES -CLANG_WARN_COMPLETION_HANDLER_MISUSE = YES -CLANG_WARN_IMPLICIT_FALLTHROUGH = YES -CLANG_WARN_FRAMEWORK_INCLUDE_PRIVATE_FROM_PUBLIC = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES -CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES -GCC_WARN_SIGN_COMPARE = YES -CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES -GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES -GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES -CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST = YES -CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES -CLANG_WARN_OBJC_INTERFACE_IVARS = YES -GCC_WARN_STRICT_SELECTOR_MATCH = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN_UNREACHABLE_CODE = YES -CLANG_WARN_RANGE_LOOP_ANALYSIS = YES -CLANG_WARN_SUSPICIOUS_MOVE = YES -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES -GCC_WARN_UNDECLARED_SELECTOR = YES - -// Static analyzer warnings. -CLANG_ANALYZER_NONNULL = YES -CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES -CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES diff --git a/lib/libusb/Xcode/config.h b/lib/libusb/Xcode/config.h deleted file mode 100644 index c589a0f..0000000 --- a/lib/libusb/Xcode/config.h +++ /dev/null @@ -1,31 +0,0 @@ -/* config.h. Manually generated for Xcode. */ - -#include - -/* Define to the attribute for default visibility. */ -#define DEFAULT_VISIBILITY __attribute__ ((visibility ("default"))) - -/* Define to 1 to enable message logging. */ -#define ENABLE_LOGGING 1 - -/* On 10.6 and later, use newly available pthread_threadid_np() function */ -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 -/* Define to 1 if you have the 'pthread_threadid_np' function. */ -#define HAVE_PTHREAD_THREADID_NP 1 -#endif - -/* Define to 1 if the system has the type `nfds_t'. */ -#define HAVE_NFDS_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if compiling for a POSIX platform. */ -#define PLATFORM_POSIX 1 - -/* Define to the attribute for enabling parameter checks on printf-like - functions. */ -#define PRINTF_FORMAT(a, b) __attribute__ ((__format__ (__printf__, a, b))) - -/* Enable GNU extensions. */ -#define _GNU_SOURCE 1 diff --git a/lib/libusb/Xcode/debug.xcconfig b/lib/libusb/Xcode/debug.xcconfig deleted file mode 100644 index ca8ce3d..0000000 --- a/lib/libusb/Xcode/debug.xcconfig +++ /dev/null @@ -1,32 +0,0 @@ -// -// libusb Xcode configuration file -// Copyright © 2012 Pete Batard -// For more information, please visit: -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -#include "common.xcconfig" - -// Embed debug symbols in binary itself. -DEBUG_INFORMATION_FORMAT = dwarf - -// No optimizations in debug. -GCC_OPTIMIZATION_LEVEL = 0 - -// -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG=1 - -// No need for Universal Binaries in debug. -ONLY_ACTIVE_ARCH = YES diff --git a/lib/libusb/Xcode/libusb.xcconfig b/lib/libusb/Xcode/libusb.xcconfig deleted file mode 100644 index a41eab5..0000000 --- a/lib/libusb/Xcode/libusb.xcconfig +++ /dev/null @@ -1,21 +0,0 @@ -// -// libusb Xcode configuration file -// Copyright © 2012 Pete Batard -// For more information, please visit: -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -PRODUCT_NAME = libusb-1.0.0 -LD_DYLIB_INSTALL_NAME = @rpath/libusb-1.0.0.dylib diff --git a/lib/libusb/Xcode/libusb.xcodeproj/project.pbxproj b/lib/libusb/Xcode/libusb.xcodeproj/project.pbxproj deleted file mode 100644 index 680bc19..0000000 --- a/lib/libusb/Xcode/libusb.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1391 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXAggregateTarget section */ - 008FC0321628BC9400BC5BE2 /* all */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 008FC0331628BC9400BC5BE2 /* Build configuration list for PBXAggregateTarget "all" */; - buildPhases = ( - ); - dependencies = ( - 008FC0371628BC9A00BC5BE2 /* PBXTargetDependency */, - 008FC03B1628BC9A00BC5BE2 /* PBXTargetDependency */, - 008FC03D1628BC9A00BC5BE2 /* PBXTargetDependency */, - 008FC03F1628BC9A00BC5BE2 /* PBXTargetDependency */, - 006AD4281C8C5BBC007F8C6A /* PBXTargetDependency */, - 008FC0411628BC9A00BC5BE2 /* PBXTargetDependency */, - 20468D8E24329E3800650534 /* PBXTargetDependency */, - 008A23DE236C8619004854AA /* PBXTargetDependency */, - 20468D9024329E3F00650534 /* PBXTargetDependency */, - 008FC0391628BC9A00BC5BE2 /* PBXTargetDependency */, - ); - name = all; - productName = all; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 006AD4251C8C5AC4007F8C6A /* hotplugtest.c in Sources */ = {isa = PBXBuildFile; fileRef = 006AD4231C8C5AAE007F8C6A /* hotplugtest.c */; }; - 006AD4261C8C5AD9007F8C6A /* libusb-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; }; - 008A23DA236C85AF004854AA /* stress.c in Sources */ = {isa = PBXBuildFile; fileRef = 008A23C6236C8445004854AA /* stress.c */; }; - 008A23DB236C85AF004854AA /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 008A23CB236C849A004854AA /* testlib.c */; }; - 008FBF861628B7E800BC5BE2 /* core.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBF541628B7E800BC5BE2 /* core.c */; }; - 008FBF871628B7E800BC5BE2 /* descriptor.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBF551628B7E800BC5BE2 /* descriptor.c */; }; - 008FBF881628B7E800BC5BE2 /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBF561628B7E800BC5BE2 /* io.c */; }; - 008FBF891628B7E800BC5BE2 /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 008FBF901628B7E800BC5BE2 /* libusbi.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF671628B7E800BC5BE2 /* libusbi.h */; }; - 008FBF921628B7E800BC5BE2 /* darwin_usb.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBF6C1628B7E800BC5BE2 /* darwin_usb.c */; }; - 008FBF931628B7E800BC5BE2 /* darwin_usb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF6D1628B7E800BC5BE2 /* darwin_usb.h */; }; - 008FBF9A1628B7E800BC5BE2 /* threads_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBF741628B7E800BC5BE2 /* threads_posix.c */; }; - 008FBF9B1628B7E800BC5BE2 /* threads_posix.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF751628B7E800BC5BE2 /* threads_posix.h */; }; - 008FBFA01628B7E800BC5BE2 /* sync.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBF7A1628B7E800BC5BE2 /* sync.c */; }; - 008FBFA11628B7E800BC5BE2 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF7B1628B7E800BC5BE2 /* version.h */; }; - 008FBFA21628B7E800BC5BE2 /* version_nano.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF7C1628B7E800BC5BE2 /* version_nano.h */; }; - 008FBFA51628B84200BC5BE2 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - 008FBFA71628B87000BC5BE2 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBFA61628B87000BC5BE2 /* CoreFoundation.framework */; }; - 008FBFA91628B88000BC5BE2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBFA81628B88000BC5BE2 /* IOKit.framework */; }; - 008FBFAB1628B8CB00BC5BE2 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBFAA1628B8CB00BC5BE2 /* libobjc.dylib */; }; - 008FBFEF1628BA3500BC5BE2 /* xusb.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBFED1628BA0E00BC5BE2 /* xusb.c */; }; - 008FBFFF1628BB9600BC5BE2 /* dpfp.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBFD71628BA0E00BC5BE2 /* dpfp.c */; }; - 008FC01F1628BC1500BC5BE2 /* fxload.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBFE11628BA0E00BC5BE2 /* fxload.c */; }; - 008FC0211628BC5200BC5BE2 /* ezusb.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBFDC1628BA0E00BC5BE2 /* ezusb.c */; }; - 008FC0301628BC7400BC5BE2 /* listdevs.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBFE71628BA0E00BC5BE2 /* listdevs.c */; }; - 1438D77A17A2ED9F00166101 /* hotplug.c in Sources */ = {isa = PBXBuildFile; fileRef = 1438D77817A2ED9F00166101 /* hotplug.c */; }; - 1438D77F17A2F0EA00166101 /* strerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 1438D77E17A2F0EA00166101 /* strerror.c */; }; - 2018D95F24E453BA001589B2 /* events_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = 2018D95E24E453BA001589B2 /* events_posix.c */; }; - 2018D96124E453D0001589B2 /* events_posix.h in Headers */ = {isa = PBXBuildFile; fileRef = 2018D96024E453D0001589B2 /* events_posix.h */; }; - 20468D70243298C100650534 /* sam3u_benchmark.c in Sources */ = {isa = PBXBuildFile; fileRef = 20468D6E243298C100650534 /* sam3u_benchmark.c */; }; - 20468D7E2432990100650534 /* testlibusb.c in Sources */ = {isa = PBXBuildFile; fileRef = 20468D7C2432990000650534 /* testlibusb.c */; }; - 20951C0325630F5F00ED6351 /* dpfp.c in Sources */ = {isa = PBXBuildFile; fileRef = 008FBFD71628BA0E00BC5BE2 /* dpfp.c */; settings = {COMPILER_FLAGS = "-DDPFP_THREADED"; }; }; - 20951C0625630F8F00ED6351 /* ezusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFDD1628BA0E00BC5BE2 /* ezusb.h */; }; - 20951C0F25630FD300ED6351 /* libusb_testlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 008A23CA236C849A004854AA /* libusb_testlib.h */; }; - 20951C152563125200ED6351 /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; }; - CEA0F5EF26321FAA00ADF3EC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - CEA0F5F026321FAA00ADF3EC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - CEA0F5F126321FAA00ADF3EC /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; }; - CEA0F5F226321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; }; - CEA0F5F326321FAA00ADF3EC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - CEA0F5F426321FAA00ADF3EC /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; }; - CEA0F5F526321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; }; - CEA0F5F626321FAA00ADF3EC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - CEA0F5F726321FAA00ADF3EC /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; }; - CEA0F5F826321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; }; - CEA0F5F926321FAA00ADF3EC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - CEA0F5FA26321FAA00ADF3EC /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; }; - CEA0F5FB26321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; }; - CEA0F5FC26321FAA00ADF3EC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - CEA0F5FD26321FAA00ADF3EC /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; }; - CEA0F5FE26321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; }; - CEA0F5FF26321FAA00ADF3EC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - CEA0F60026321FAA00ADF3EC /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; }; - CEA0F60126321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; }; - CEA0F60226321FAA00ADF3EC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - CEA0F60326321FAA00ADF3EC /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; }; - CEA0F60426321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; }; - CEA0F60526321FAA00ADF3EC /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBFA41628B84200BC5BE2 /* config.h */; }; - CEA0F60626321FAA00ADF3EC /* libusb.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FBF5A1628B7E800BC5BE2 /* libusb.h */; }; - CEA0F60726321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; }; - CEA45DFB2634CDFA002FA97D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEDCEA6E2632200A00F7AA49 /* Security.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 006AD4271C8C5BBC007F8C6A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 006AD41B1C8C5A90007F8C6A; - remoteInfo = hotplugtest; - }; - 008A23DD236C8619004854AA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008A23D2236C8594004854AA; - remoteInfo = stress; - }; - 008FC0361628BC9A00BC5BE2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 008FC0381628BC9A00BC5BE2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBFBC1628B9FE00BC5BE2; - remoteInfo = xusb; - }; - 008FC03A1628BC9A00BC5BE2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBFF41628BB8B00BC5BE2; - remoteInfo = dpfp; - }; - 008FC03C1628BC9A00BC5BE2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FC0041628BBDB00BC5BE2; - remoteInfo = dpfp_threaded; - }; - 008FC03E1628BC9A00BC5BE2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FC0141628BC0300BC5BE2; - remoteInfo = fxload; - }; - 008FC0401628BC9A00BC5BE2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FC0251628BC6B00BC5BE2; - remoteInfo = listdevs; - }; - 1443EE8B1641926D007E0579 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 1443EE8D16419273007E0579 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 1443EE8F16419276007E0579 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 1443EE911641927A007E0579 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 1443EE931641927D007E0579 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 20468D812432999C00650534 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 20468D83243299A900650534 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 20468D85243299B200650534 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 20468D87243299BA00650534 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 008FBF301628B79300BC5BE2; - remoteInfo = libusb; - }; - 20468D8D24329E3800650534 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 20468D66243298AE00650534; - remoteInfo = sam3u_benchmark; - }; - 20468D8F24329E3F00650534 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 008FBF281628B79300BC5BE2 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 20468D74243298D300650534; - remoteInfo = testlibusb; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 006AD41C1C8C5A90007F8C6A /* hotplugtest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = hotplugtest; sourceTree = BUILT_PRODUCTS_DIR; }; - 006AD4231C8C5AAE007F8C6A /* hotplugtest.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = hotplugtest.c; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 008A23C6236C8445004854AA /* stress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stress.c; sourceTree = ""; usesTabs = 1; }; - 008A23CA236C849A004854AA /* libusb_testlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libusb_testlib.h; sourceTree = ""; usesTabs = 1; }; - 008A23CB236C849A004854AA /* testlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testlib.c; sourceTree = ""; usesTabs = 1; }; - 008A23D3236C8594004854AA /* stress */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = stress; sourceTree = BUILT_PRODUCTS_DIR; }; - 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libusb-1.0.0.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; - 008FBF541628B7E800BC5BE2 /* core.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = core.c; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 008FBF551628B7E800BC5BE2 /* descriptor.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = descriptor.c; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 008FBF561628B7E800BC5BE2 /* io.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = io.c; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 008FBF5A1628B7E800BC5BE2 /* libusb.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = libusb.h; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBF671628B7E800BC5BE2 /* libusbi.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = libusbi.h; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBF6C1628B7E800BC5BE2 /* darwin_usb.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = darwin_usb.c; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - 008FBF6D1628B7E800BC5BE2 /* darwin_usb.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = darwin_usb.h; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - 008FBF741628B7E800BC5BE2 /* threads_posix.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = threads_posix.c; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBF751628B7E800BC5BE2 /* threads_posix.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = threads_posix.h; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBF7A1628B7E800BC5BE2 /* sync.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = sync.c; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 008FBF7B1628B7E800BC5BE2 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBF7C1628B7E800BC5BE2 /* version_nano.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = version_nano.h; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBFA41628B84200BC5BE2 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBFA61628B87000BC5BE2 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; - 008FBFA81628B88000BC5BE2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 008FBFAA1628B8CB00BC5BE2 /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = usr/lib/libobjc.dylib; sourceTree = SDKROOT; }; - 008FBFBD1628B9FE00BC5BE2 /* xusb */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = xusb; sourceTree = BUILT_PRODUCTS_DIR; }; - 008FBFD71628BA0E00BC5BE2 /* dpfp.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = dpfp.c; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBFDC1628BA0E00BC5BE2 /* ezusb.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = ezusb.c; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBFDD1628BA0E00BC5BE2 /* ezusb.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ezusb.h; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBFE11628BA0E00BC5BE2 /* fxload.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = fxload.c; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBFE71628BA0E00BC5BE2 /* listdevs.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = listdevs.c; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBFED1628BA0E00BC5BE2 /* xusb.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = xusb.c; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 008FBFF51628BB8B00BC5BE2 /* dpfp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dpfp; sourceTree = BUILT_PRODUCTS_DIR; }; - 008FC0051628BBDB00BC5BE2 /* dpfp_threaded */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dpfp_threaded; sourceTree = BUILT_PRODUCTS_DIR; }; - 008FC0151628BC0300BC5BE2 /* fxload */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fxload; sourceTree = BUILT_PRODUCTS_DIR; }; - 008FC0261628BC6B00BC5BE2 /* listdevs */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = listdevs; sourceTree = BUILT_PRODUCTS_DIR; }; - 1438D77817A2ED9F00166101 /* hotplug.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = hotplug.c; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 1438D77E17A2F0EA00166101 /* strerror.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = strerror.c; sourceTree = ""; tabWidth = 4; usesTabs = 1; }; - 1443EE8416417E63007E0579 /* common.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = common.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; }; - 1443EE8516417E63007E0579 /* debug.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = debug.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; }; - 1443EE8616417E63007E0579 /* libusb_debug.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = libusb_debug.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; }; - 1443EE8716417E63007E0579 /* libusb.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = libusb.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; }; - 1443EE8816417E63007E0579 /* release.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = release.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; }; - 1443EE8916417EA6007E0579 /* libusb_release.xcconfig */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xcconfig; path = libusb_release.xcconfig; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 1; }; - 14EC13E12B3D5BA600CF9AD0 /* emscripten_webusb.cpp */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = emscripten_webusb.cpp; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13E22B3D5BBE00CF9AD0 /* sunos_usb.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = sunos_usb.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13E32B3D5BBE00CF9AD0 /* openbsd_usb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = openbsd_usb.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13E42B3D5BBE00CF9AD0 /* netbsd_usb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = netbsd_usb.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13E52B3D5BBE00CF9AD0 /* events_windows.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = events_windows.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13E62B3D5BBE00CF9AD0 /* haiku_usb_raw.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = haiku_usb_raw.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13E72B3D5BBE00CF9AD0 /* linux_netlink.c */ = {isa = PBXFileReference; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = linux_netlink.c; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 14EC13E82B3D5BBE00CF9AD0 /* haiku_usb_backend.cpp */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = haiku_usb_backend.cpp; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13E92B3D5BBE00CF9AD0 /* haiku_usb_raw.cpp */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = haiku_usb_raw.cpp; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13EA2B3D5BBE00CF9AD0 /* linux_usbfs.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = linux_usbfs.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13EB2B3D5BBE00CF9AD0 /* sunos_usb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = sunos_usb.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13EC2B3D5BBE00CF9AD0 /* linux_udev.c */ = {isa = PBXFileReference; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = linux_udev.c; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 14EC13ED2B3D5BBE00CF9AD0 /* haiku_usb.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = haiku_usb.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13EE2B3D5BBE00CF9AD0 /* events_windows.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = events_windows.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13EF2B3D5BBE00CF9AD0 /* null_usb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = null_usb.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13F02B3D5BBE00CF9AD0 /* haiku_pollfs.cpp */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = haiku_pollfs.cpp; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13F12B3D5BBE00CF9AD0 /* linux_usbfs.c */ = {isa = PBXFileReference; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = linux_usbfs.c; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 14EC13F22B3D5BC800CF9AD0 /* windows_common.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = windows_common.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13F32B3D5BC800CF9AD0 /* threads_windows.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = threads_windows.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13F42B3D5BC800CF9AD0 /* windows_winusb.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = windows_winusb.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13F52B3D5BC800CF9AD0 /* windows_common.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = windows_common.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13F62B3D5BC800CF9AD0 /* windows_winusb.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = windows_winusb.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13F72B3D5BC800CF9AD0 /* threads_windows.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = threads_windows.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13F82B3D5BC800CF9AD0 /* windows_usbdk.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = windows_usbdk.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 14EC13F92B3D5BC800CF9AD0 /* windows_usbdk.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = windows_usbdk.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 1472E1592B43D66B00850BA3 /* init_context.c */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = init_context.c; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - 1472E15A2B43D68600850BA3 /* stress_mt.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = stress_mt.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 1472E15D2B43D68600850BA3 /* macos.c */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = macos.c; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - 1472E15F2B43D68600850BA3 /* set_option.c */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = set_option.c; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - 1472E1602B43D69800850BA3 /* umockdev.c */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = umockdev.c; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; - 2018D95E24E453BA001589B2 /* events_posix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = events_posix.c; sourceTree = ""; }; - 2018D96024E453D0001589B2 /* events_posix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = events_posix.h; sourceTree = ""; }; - 20468D67243298AE00650534 /* sam3u_benchmark */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = sam3u_benchmark; sourceTree = BUILT_PRODUCTS_DIR; }; - 20468D6E243298C100650534 /* sam3u_benchmark.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sam3u_benchmark.c; sourceTree = ""; usesTabs = 1; }; - 20468D75243298D300650534 /* testlibusb */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testlibusb; sourceTree = BUILT_PRODUCTS_DIR; }; - 20468D7C2432990000650534 /* testlibusb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testlibusb.c; sourceTree = ""; usesTabs = 1; }; - CEDCEA6E2632200A00F7AA49 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 006AD4191C8C5A90007F8C6A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5F826321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008A23D0236C8594004854AA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F60126321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FBF2E1628B79300BC5BE2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 008FBFAB1628B8CB00BC5BE2 /* libobjc.dylib in Frameworks */, - 008FBFA91628B88000BC5BE2 /* IOKit.framework in Frameworks */, - CEA45DFB2634CDFA002FA97D /* Security.framework in Frameworks */, - 008FBFA71628B87000BC5BE2 /* CoreFoundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FBFBA1628B9FE00BC5BE2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F60726321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FBFF21628BB8B00BC5BE2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 006AD4261C8C5AD9007F8C6A /* libusb-1.0.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FC0021628BBDB00BC5BE2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5F226321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FC0121628BC0300BC5BE2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5F526321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FC0231628BC6B00BC5BE2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5FB26321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20468D64243298AE00650534 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5FE26321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20468D72243298D300650534 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F60426321FAA00ADF3EC /* libusb-1.0.0.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 001B1F09236C836000F231DC /* tests */ = { - isa = PBXGroup; - children = ( - 1472E1592B43D66B00850BA3 /* init_context.c */, - 008A23CA236C849A004854AA /* libusb_testlib.h */, - 1472E15D2B43D68600850BA3 /* macos.c */, - 1472E15F2B43D68600850BA3 /* set_option.c */, - 1472E15A2B43D68600850BA3 /* stress_mt.c */, - 008A23C6236C8445004854AA /* stress.c */, - 008A23CB236C849A004854AA /* testlib.c */, - 1472E1602B43D69800850BA3 /* umockdev.c */, - ); - name = tests; - path = ../tests; - sourceTree = ""; - }; - 008FBF261628B79300BC5BE2 = { - isa = PBXGroup; - children = ( - 1443EE8316417DE3007E0579 /* xcconfig */, - 008FBFA41628B84200BC5BE2 /* config.h */, - 008FBF3B1628B7E800BC5BE2 /* libusb */, - 008FBFC81628BA0E00BC5BE2 /* examples */, - 001B1F09236C836000F231DC /* tests */, - 1443EE8A16419057007E0579 /* Apple */, - 008FBF321628B79300BC5BE2 /* Products */, - ); - sourceTree = ""; - }; - 008FBF321628B79300BC5BE2 /* Products */ = { - isa = PBXGroup; - children = ( - 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */, - 008FBFF51628BB8B00BC5BE2 /* dpfp */, - 008FC0051628BBDB00BC5BE2 /* dpfp_threaded */, - 008FC0151628BC0300BC5BE2 /* fxload */, - 008FC0261628BC6B00BC5BE2 /* listdevs */, - 006AD41C1C8C5A90007F8C6A /* hotplugtest */, - 008A23D3236C8594004854AA /* stress */, - 20468D67243298AE00650534 /* sam3u_benchmark */, - 20468D75243298D300650534 /* testlibusb */, - 008FBFBD1628B9FE00BC5BE2 /* xusb */, - ); - name = Products; - sourceTree = ""; - }; - 008FBF3B1628B7E800BC5BE2 /* libusb */ = { - isa = PBXGroup; - children = ( - 008FBF541628B7E800BC5BE2 /* core.c */, - 008FBF551628B7E800BC5BE2 /* descriptor.c */, - 1438D77817A2ED9F00166101 /* hotplug.c */, - 008FBF561628B7E800BC5BE2 /* io.c */, - 008FBF5A1628B7E800BC5BE2 /* libusb.h */, - 008FBF671628B7E800BC5BE2 /* libusbi.h */, - 008FBF6B1628B7E800BC5BE2 /* os */, - 1438D77E17A2F0EA00166101 /* strerror.c */, - 008FBF7A1628B7E800BC5BE2 /* sync.c */, - 008FBF7B1628B7E800BC5BE2 /* version.h */, - 008FBF7C1628B7E800BC5BE2 /* version_nano.h */, - ); - name = libusb; - path = ../libusb; - sourceTree = ""; - }; - 008FBF6B1628B7E800BC5BE2 /* os */ = { - isa = PBXGroup; - children = ( - 008FBF6C1628B7E800BC5BE2 /* darwin_usb.c */, - 008FBF6D1628B7E800BC5BE2 /* darwin_usb.h */, - 14EC13E12B3D5BA600CF9AD0 /* emscripten_webusb.cpp */, - 2018D95E24E453BA001589B2 /* events_posix.c */, - 2018D96024E453D0001589B2 /* events_posix.h */, - 14EC13E52B3D5BBE00CF9AD0 /* events_windows.c */, - 14EC13EE2B3D5BBE00CF9AD0 /* events_windows.h */, - 14EC13F02B3D5BBE00CF9AD0 /* haiku_pollfs.cpp */, - 14EC13E82B3D5BBE00CF9AD0 /* haiku_usb_backend.cpp */, - 14EC13E92B3D5BBE00CF9AD0 /* haiku_usb_raw.cpp */, - 14EC13E62B3D5BBE00CF9AD0 /* haiku_usb_raw.h */, - 14EC13ED2B3D5BBE00CF9AD0 /* haiku_usb.h */, - 14EC13E72B3D5BBE00CF9AD0 /* linux_netlink.c */, - 14EC13EC2B3D5BBE00CF9AD0 /* linux_udev.c */, - 14EC13F12B3D5BBE00CF9AD0 /* linux_usbfs.c */, - 14EC13EA2B3D5BBE00CF9AD0 /* linux_usbfs.h */, - 14EC13E42B3D5BBE00CF9AD0 /* netbsd_usb.c */, - 14EC13EF2B3D5BBE00CF9AD0 /* null_usb.c */, - 14EC13E32B3D5BBE00CF9AD0 /* openbsd_usb.c */, - 14EC13EB2B3D5BBE00CF9AD0 /* sunos_usb.c */, - 14EC13E22B3D5BBE00CF9AD0 /* sunos_usb.h */, - 008FBF741628B7E800BC5BE2 /* threads_posix.c */, - 008FBF751628B7E800BC5BE2 /* threads_posix.h */, - 14EC13F32B3D5BC800CF9AD0 /* threads_windows.c */, - 14EC13F72B3D5BC800CF9AD0 /* threads_windows.h */, - 14EC13F52B3D5BC800CF9AD0 /* windows_common.c */, - 14EC13F22B3D5BC800CF9AD0 /* windows_common.h */, - 14EC13F92B3D5BC800CF9AD0 /* windows_usbdk.c */, - 14EC13F82B3D5BC800CF9AD0 /* windows_usbdk.h */, - 14EC13F42B3D5BC800CF9AD0 /* windows_winusb.c */, - 14EC13F62B3D5BC800CF9AD0 /* windows_winusb.h */, - ); - path = os; - sourceTree = ""; - }; - 008FBFC81628BA0E00BC5BE2 /* examples */ = { - isa = PBXGroup; - children = ( - 008FBFD71628BA0E00BC5BE2 /* dpfp.c */, - 008FBFDC1628BA0E00BC5BE2 /* ezusb.c */, - 008FBFDD1628BA0E00BC5BE2 /* ezusb.h */, - 008FBFE11628BA0E00BC5BE2 /* fxload.c */, - 006AD4231C8C5AAE007F8C6A /* hotplugtest.c */, - 008FBFE71628BA0E00BC5BE2 /* listdevs.c */, - 20468D6E243298C100650534 /* sam3u_benchmark.c */, - 20468D7C2432990000650534 /* testlibusb.c */, - 008FBFED1628BA0E00BC5BE2 /* xusb.c */, - ); - name = examples; - path = ../examples; - sourceTree = ""; - }; - 1443EE8316417DE3007E0579 /* xcconfig */ = { - isa = PBXGroup; - children = ( - 1443EE8416417E63007E0579 /* common.xcconfig */, - 1443EE8516417E63007E0579 /* debug.xcconfig */, - 1443EE8816417E63007E0579 /* release.xcconfig */, - 1443EE8716417E63007E0579 /* libusb.xcconfig */, - 1443EE8616417E63007E0579 /* libusb_debug.xcconfig */, - 1443EE8916417EA6007E0579 /* libusb_release.xcconfig */, - ); - name = xcconfig; - path = ../libusb; - sourceTree = ""; - }; - 1443EE8A16419057007E0579 /* Apple */ = { - isa = PBXGroup; - children = ( - 008FBFAA1628B8CB00BC5BE2 /* libobjc.dylib */, - 008FBFA81628B88000BC5BE2 /* IOKit.framework */, - 008FBFA61628B87000BC5BE2 /* CoreFoundation.framework */, - CEDCEA6E2632200A00F7AA49 /* Security.framework */, - ); - name = Apple; - path = ../libusb; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 008FBF2F1628B79300BC5BE2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 008FBF891628B7E800BC5BE2 /* libusb.h in Headers */, - 008FBFA51628B84200BC5BE2 /* config.h in Headers */, - 008FBF931628B7E800BC5BE2 /* darwin_usb.h in Headers */, - 2018D96124E453D0001589B2 /* events_posix.h in Headers */, - 008FBF901628B7E800BC5BE2 /* libusbi.h in Headers */, - 008FBF9B1628B7E800BC5BE2 /* threads_posix.h in Headers */, - 008FBFA11628B7E800BC5BE2 /* version.h in Headers */, - 008FBFA21628B7E800BC5BE2 /* version_nano.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20951BFF25630EBE00ED6351 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5EF26321FAA00ADF3EC /* config.h in Headers */, - 20951C152563125200ED6351 /* libusb.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20951C0125630F4100ED6351 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5F026321FAA00ADF3EC /* config.h in Headers */, - CEA0F5F126321FAA00ADF3EC /* libusb.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20951C0425630F7600ED6351 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5F326321FAA00ADF3EC /* config.h in Headers */, - 20951C0625630F8F00ED6351 /* ezusb.h in Headers */, - CEA0F5F426321FAA00ADF3EC /* libusb.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20951C0725630F9D00ED6351 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5F626321FAA00ADF3EC /* config.h in Headers */, - CEA0F5F726321FAA00ADF3EC /* libusb.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20951C0925630FA900ED6351 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5F926321FAA00ADF3EC /* config.h in Headers */, - CEA0F5FA26321FAA00ADF3EC /* libusb.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20951C0B25630FB400ED6351 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5FC26321FAA00ADF3EC /* config.h in Headers */, - CEA0F5FD26321FAA00ADF3EC /* libusb.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20951C0D25630FC000ED6351 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F5FF26321FAA00ADF3EC /* config.h in Headers */, - 20951C0F25630FD300ED6351 /* libusb_testlib.h in Headers */, - CEA0F60026321FAA00ADF3EC /* libusb.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20951C1025630FE300ED6351 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F60226321FAA00ADF3EC /* config.h in Headers */, - CEA0F60326321FAA00ADF3EC /* libusb.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20951C1225630FEE00ED6351 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CEA0F60526321FAA00ADF3EC /* config.h in Headers */, - CEA0F60626321FAA00ADF3EC /* libusb.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 006AD41B1C8C5A90007F8C6A /* hotplugtest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 006AD4221C8C5A90007F8C6A /* Build configuration list for PBXNativeTarget "hotplugtest" */; - buildPhases = ( - 20951C0725630F9D00ED6351 /* Headers */, - 006AD4181C8C5A90007F8C6A /* Sources */, - 006AD4191C8C5A90007F8C6A /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 20468D822432999C00650534 /* PBXTargetDependency */, - ); - name = hotplugtest; - productName = hotplugtest; - productReference = 006AD41C1C8C5A90007F8C6A /* hotplugtest */; - productType = "com.apple.product-type.tool"; - }; - 008A23D2236C8594004854AA /* stress */ = { - isa = PBXNativeTarget; - buildConfigurationList = 008A23D7236C8594004854AA /* Build configuration list for PBXNativeTarget "stress" */; - buildPhases = ( - 20951C0D25630FC000ED6351 /* Headers */, - 008A23CF236C8594004854AA /* Sources */, - 008A23D0236C8594004854AA /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 20468D86243299B200650534 /* PBXTargetDependency */, - ); - name = stress; - productName = stress; - productReference = 008A23D3236C8594004854AA /* stress */; - productType = "com.apple.product-type.tool"; - }; - 008FBF301628B79300BC5BE2 /* libusb */ = { - isa = PBXNativeTarget; - buildConfigurationList = 008FBF351628B79300BC5BE2 /* Build configuration list for PBXNativeTarget "libusb" */; - buildPhases = ( - 008FBF2F1628B79300BC5BE2 /* Headers */, - 008FBF2D1628B79300BC5BE2 /* Sources */, - 008FBF2E1628B79300BC5BE2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = libusb; - productName = libusb; - productReference = 008FBF311628B79300BC5BE2 /* libusb-1.0.0.dylib */; - productType = "com.apple.product-type.library.dynamic"; - }; - 008FBFBC1628B9FE00BC5BE2 /* xusb */ = { - isa = PBXNativeTarget; - buildConfigurationList = 008FBFC61628B9FE00BC5BE2 /* Build configuration list for PBXNativeTarget "xusb" */; - buildPhases = ( - 20951C1225630FEE00ED6351 /* Headers */, - 008FBFB91628B9FE00BC5BE2 /* Sources */, - 008FBFBA1628B9FE00BC5BE2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 1443EE941641927D007E0579 /* PBXTargetDependency */, - ); - name = xusb; - productName = xusb; - productReference = 008FBFBD1628B9FE00BC5BE2 /* xusb */; - productType = "com.apple.product-type.tool"; - }; - 008FBFF41628BB8B00BC5BE2 /* dpfp */ = { - isa = PBXNativeTarget; - buildConfigurationList = 008FBFFC1628BB8C00BC5BE2 /* Build configuration list for PBXNativeTarget "dpfp" */; - buildPhases = ( - 20951BFF25630EBE00ED6351 /* Headers */, - 008FBFF11628BB8B00BC5BE2 /* Sources */, - 008FBFF21628BB8B00BC5BE2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 1443EE921641927A007E0579 /* PBXTargetDependency */, - ); - name = dpfp; - productName = dpfp; - productReference = 008FBFF51628BB8B00BC5BE2 /* dpfp */; - productType = "com.apple.product-type.tool"; - }; - 008FC0041628BBDB00BC5BE2 /* dpfp_threaded */ = { - isa = PBXNativeTarget; - buildConfigurationList = 008FC00C1628BBDB00BC5BE2 /* Build configuration list for PBXNativeTarget "dpfp_threaded" */; - buildPhases = ( - 20951C0125630F4100ED6351 /* Headers */, - 008FC0011628BBDB00BC5BE2 /* Sources */, - 008FC0021628BBDB00BC5BE2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 1443EE9016419276007E0579 /* PBXTargetDependency */, - ); - name = dpfp_threaded; - productName = dpfp_threaded; - productReference = 008FC0051628BBDB00BC5BE2 /* dpfp_threaded */; - productType = "com.apple.product-type.tool"; - }; - 008FC0141628BC0300BC5BE2 /* fxload */ = { - isa = PBXNativeTarget; - buildConfigurationList = 008FC01C1628BC0300BC5BE2 /* Build configuration list for PBXNativeTarget "fxload" */; - buildPhases = ( - 20951C0425630F7600ED6351 /* Headers */, - 008FC0111628BC0300BC5BE2 /* Sources */, - 008FC0121628BC0300BC5BE2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 1443EE8E16419273007E0579 /* PBXTargetDependency */, - ); - name = fxload; - productName = fxload; - productReference = 008FC0151628BC0300BC5BE2 /* fxload */; - productType = "com.apple.product-type.tool"; - }; - 008FC0251628BC6B00BC5BE2 /* listdevs */ = { - isa = PBXNativeTarget; - buildConfigurationList = 008FC02D1628BC6B00BC5BE2 /* Build configuration list for PBXNativeTarget "listdevs" */; - buildPhases = ( - 20951C0925630FA900ED6351 /* Headers */, - 008FC0221628BC6B00BC5BE2 /* Sources */, - 008FC0231628BC6B00BC5BE2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 1443EE8C1641926D007E0579 /* PBXTargetDependency */, - ); - name = listdevs; - productName = listdevs; - productReference = 008FC0261628BC6B00BC5BE2 /* listdevs */; - productType = "com.apple.product-type.tool"; - }; - 20468D66243298AE00650534 /* sam3u_benchmark */ = { - isa = PBXNativeTarget; - buildConfigurationList = 20468D6B243298AE00650534 /* Build configuration list for PBXNativeTarget "sam3u_benchmark" */; - buildPhases = ( - 20951C0B25630FB400ED6351 /* Headers */, - 20468D63243298AE00650534 /* Sources */, - 20468D64243298AE00650534 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 20468D84243299A900650534 /* PBXTargetDependency */, - ); - name = sam3u_benchmark; - productName = sam3u_benchmark; - productReference = 20468D67243298AE00650534 /* sam3u_benchmark */; - productType = "com.apple.product-type.tool"; - }; - 20468D74243298D300650534 /* testlibusb */ = { - isa = PBXNativeTarget; - buildConfigurationList = 20468D79243298D300650534 /* Build configuration list for PBXNativeTarget "testlibusb" */; - buildPhases = ( - 20951C1025630FE300ED6351 /* Headers */, - 20468D71243298D300650534 /* Sources */, - 20468D72243298D300650534 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 20468D88243299BA00650534 /* PBXTargetDependency */, - ); - name = testlibusb; - productName = testlibusb; - productReference = 20468D75243298D300650534 /* testlibusb */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 008FBF281628B79300BC5BE2 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1120; - ORGANIZATIONNAME = libusb; - TargetAttributes = { - 006AD41B1C8C5A90007F8C6A = { - CreatedOnToolsVersion = 7.2.1; - }; - 008A23D2236C8594004854AA = { - CreatedOnToolsVersion = 11.2; - }; - 20468D66243298AE00650534 = { - CreatedOnToolsVersion = 10.1; - }; - 20468D74243298D300650534 = { - CreatedOnToolsVersion = 10.1; - }; - }; - }; - buildConfigurationList = 008FBF2B1628B79300BC5BE2 /* Build configuration list for PBXProject "libusb" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 008FBF261628B79300BC5BE2; - productRefGroup = 008FBF321628B79300BC5BE2 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 008FBF301628B79300BC5BE2 /* libusb */, - 008FBFF41628BB8B00BC5BE2 /* dpfp */, - 008FC0041628BBDB00BC5BE2 /* dpfp_threaded */, - 008FC0141628BC0300BC5BE2 /* fxload */, - 006AD41B1C8C5A90007F8C6A /* hotplugtest */, - 008FC0251628BC6B00BC5BE2 /* listdevs */, - 20468D66243298AE00650534 /* sam3u_benchmark */, - 008A23D2236C8594004854AA /* stress */, - 20468D74243298D300650534 /* testlibusb */, - 008FBFBC1628B9FE00BC5BE2 /* xusb */, - 008FC0321628BC9400BC5BE2 /* all */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 006AD4181C8C5A90007F8C6A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 006AD4251C8C5AC4007F8C6A /* hotplugtest.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008A23CF236C8594004854AA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 008A23DA236C85AF004854AA /* stress.c in Sources */, - 008A23DB236C85AF004854AA /* testlib.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FBF2D1628B79300BC5BE2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 008FBF861628B7E800BC5BE2 /* core.c in Sources */, - 008FBF921628B7E800BC5BE2 /* darwin_usb.c in Sources */, - 008FBF871628B7E800BC5BE2 /* descriptor.c in Sources */, - 2018D95F24E453BA001589B2 /* events_posix.c in Sources */, - 1438D77A17A2ED9F00166101 /* hotplug.c in Sources */, - 008FBF881628B7E800BC5BE2 /* io.c in Sources */, - 1438D77F17A2F0EA00166101 /* strerror.c in Sources */, - 008FBFA01628B7E800BC5BE2 /* sync.c in Sources */, - 008FBF9A1628B7E800BC5BE2 /* threads_posix.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FBFB91628B9FE00BC5BE2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 008FBFEF1628BA3500BC5BE2 /* xusb.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FBFF11628BB8B00BC5BE2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 008FBFFF1628BB9600BC5BE2 /* dpfp.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FC0011628BBDB00BC5BE2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 20951C0325630F5F00ED6351 /* dpfp.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FC0111628BC0300BC5BE2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 008FC0211628BC5200BC5BE2 /* ezusb.c in Sources */, - 008FC01F1628BC1500BC5BE2 /* fxload.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 008FC0221628BC6B00BC5BE2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 008FC0301628BC7400BC5BE2 /* listdevs.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20468D63243298AE00650534 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 20468D70243298C100650534 /* sam3u_benchmark.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 20468D71243298D300650534 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 20468D7E2432990100650534 /* testlibusb.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 006AD4281C8C5BBC007F8C6A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 006AD41B1C8C5A90007F8C6A /* hotplugtest */; - targetProxy = 006AD4271C8C5BBC007F8C6A /* PBXContainerItemProxy */; - }; - 008A23DE236C8619004854AA /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008A23D2236C8594004854AA /* stress */; - targetProxy = 008A23DD236C8619004854AA /* PBXContainerItemProxy */; - }; - 008FC0371628BC9A00BC5BE2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 008FC0361628BC9A00BC5BE2 /* PBXContainerItemProxy */; - }; - 008FC0391628BC9A00BC5BE2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBFBC1628B9FE00BC5BE2 /* xusb */; - targetProxy = 008FC0381628BC9A00BC5BE2 /* PBXContainerItemProxy */; - }; - 008FC03B1628BC9A00BC5BE2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBFF41628BB8B00BC5BE2 /* dpfp */; - targetProxy = 008FC03A1628BC9A00BC5BE2 /* PBXContainerItemProxy */; - }; - 008FC03D1628BC9A00BC5BE2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FC0041628BBDB00BC5BE2 /* dpfp_threaded */; - targetProxy = 008FC03C1628BC9A00BC5BE2 /* PBXContainerItemProxy */; - }; - 008FC03F1628BC9A00BC5BE2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FC0141628BC0300BC5BE2 /* fxload */; - targetProxy = 008FC03E1628BC9A00BC5BE2 /* PBXContainerItemProxy */; - }; - 008FC0411628BC9A00BC5BE2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FC0251628BC6B00BC5BE2 /* listdevs */; - targetProxy = 008FC0401628BC9A00BC5BE2 /* PBXContainerItemProxy */; - }; - 1443EE8C1641926D007E0579 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 1443EE8B1641926D007E0579 /* PBXContainerItemProxy */; - }; - 1443EE8E16419273007E0579 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 1443EE8D16419273007E0579 /* PBXContainerItemProxy */; - }; - 1443EE9016419276007E0579 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 1443EE8F16419276007E0579 /* PBXContainerItemProxy */; - }; - 1443EE921641927A007E0579 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 1443EE911641927A007E0579 /* PBXContainerItemProxy */; - }; - 1443EE941641927D007E0579 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 1443EE931641927D007E0579 /* PBXContainerItemProxy */; - }; - 20468D822432999C00650534 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 20468D812432999C00650534 /* PBXContainerItemProxy */; - }; - 20468D84243299A900650534 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 20468D83243299A900650534 /* PBXContainerItemProxy */; - }; - 20468D86243299B200650534 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 20468D85243299B200650534 /* PBXContainerItemProxy */; - }; - 20468D88243299BA00650534 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 008FBF301628B79300BC5BE2 /* libusb */; - targetProxy = 20468D87243299BA00650534 /* PBXContainerItemProxy */; - }; - 20468D8E24329E3800650534 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 20468D66243298AE00650534 /* sam3u_benchmark */; - targetProxy = 20468D8D24329E3800650534 /* PBXContainerItemProxy */; - }; - 20468D9024329E3F00650534 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 20468D74243298D300650534 /* testlibusb */; - targetProxy = 20468D8F24329E3F00650534 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 006AD4201C8C5A90007F8C6A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 006AD4211C8C5A90007F8C6A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 008A23D8236C8594004854AA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 008A23D9236C8594004854AA /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 008FBF331628B79300BC5BE2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - 008FBF341628B79300BC5BE2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - }; - name = Release; - }; - 008FBF361628B79300BC5BE2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8616417E63007E0579 /* libusb_debug.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - 008FBF371628B79300BC5BE2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8916417EA6007E0579 /* libusb_release.xcconfig */; - buildSettings = { - }; - name = Release; - }; - 008FBFC41628B9FE00BC5BE2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 008FBFC51628B9FE00BC5BE2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 008FBFFD1628BB8C00BC5BE2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 008FBFFE1628BB8C00BC5BE2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 008FC00D1628BBDB00BC5BE2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - OTHER_CFLAGS = "-pthread"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 008FC00E1628BBDB00BC5BE2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - OTHER_CFLAGS = "-pthread"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 008FC01D1628BC0300BC5BE2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 008FC01E1628BC0300BC5BE2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 008FC02E1628BC6B00BC5BE2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 008FC02F1628BC6B00BC5BE2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 008FC0341628BC9400BC5BE2 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - 008FC0351628BC9400BC5BE2 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - 20468D6C243298AE00650534 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 20468D6D243298AE00650534 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 20468D7A243298D300650534 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8516417E63007E0579 /* debug.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 20468D7B243298D300650534 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1443EE8816417E63007E0579 /* release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 006AD4221C8C5A90007F8C6A /* Build configuration list for PBXNativeTarget "hotplugtest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 006AD4201C8C5A90007F8C6A /* Debug */, - 006AD4211C8C5A90007F8C6A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 008A23D7236C8594004854AA /* Build configuration list for PBXNativeTarget "stress" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 008A23D8236C8594004854AA /* Debug */, - 008A23D9236C8594004854AA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 008FBF2B1628B79300BC5BE2 /* Build configuration list for PBXProject "libusb" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 008FBF331628B79300BC5BE2 /* Debug */, - 008FBF341628B79300BC5BE2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 008FBF351628B79300BC5BE2 /* Build configuration list for PBXNativeTarget "libusb" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 008FBF361628B79300BC5BE2 /* Debug */, - 008FBF371628B79300BC5BE2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 008FBFC61628B9FE00BC5BE2 /* Build configuration list for PBXNativeTarget "xusb" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 008FBFC41628B9FE00BC5BE2 /* Debug */, - 008FBFC51628B9FE00BC5BE2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 008FBFFC1628BB8C00BC5BE2 /* Build configuration list for PBXNativeTarget "dpfp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 008FBFFD1628BB8C00BC5BE2 /* Debug */, - 008FBFFE1628BB8C00BC5BE2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 008FC00C1628BBDB00BC5BE2 /* Build configuration list for PBXNativeTarget "dpfp_threaded" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 008FC00D1628BBDB00BC5BE2 /* Debug */, - 008FC00E1628BBDB00BC5BE2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 008FC01C1628BC0300BC5BE2 /* Build configuration list for PBXNativeTarget "fxload" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 008FC01D1628BC0300BC5BE2 /* Debug */, - 008FC01E1628BC0300BC5BE2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 008FC02D1628BC6B00BC5BE2 /* Build configuration list for PBXNativeTarget "listdevs" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 008FC02E1628BC6B00BC5BE2 /* Debug */, - 008FC02F1628BC6B00BC5BE2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 008FC0331628BC9400BC5BE2 /* Build configuration list for PBXAggregateTarget "all" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 008FC0341628BC9400BC5BE2 /* Debug */, - 008FC0351628BC9400BC5BE2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 20468D6B243298AE00650534 /* Build configuration list for PBXNativeTarget "sam3u_benchmark" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 20468D6C243298AE00650534 /* Debug */, - 20468D6D243298AE00650534 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 20468D79243298D300650534 /* Build configuration list for PBXNativeTarget "testlibusb" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 20468D7A243298D300650534 /* Debug */, - 20468D7B243298D300650534 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 008FBF281628B79300BC5BE2 /* Project object */; -} diff --git a/lib/libusb/Xcode/libusb_debug.xcconfig b/lib/libusb/Xcode/libusb_debug.xcconfig deleted file mode 100644 index bc2c08c..0000000 --- a/lib/libusb/Xcode/libusb_debug.xcconfig +++ /dev/null @@ -1,21 +0,0 @@ -// -// libusb Xcode configuration file -// Copyright © 2012 Pete Batard -// For more information, please visit: -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -#include "debug.xcconfig" -#include "libusb.xcconfig" diff --git a/lib/libusb/Xcode/libusb_release.xcconfig b/lib/libusb/Xcode/libusb_release.xcconfig deleted file mode 100644 index 10a339a..0000000 --- a/lib/libusb/Xcode/libusb_release.xcconfig +++ /dev/null @@ -1,21 +0,0 @@ -// -// libusb Xcode configuration file -// Copyright © 2012 Pete Batard -// For more information, please visit: -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -#include "release.xcconfig" -#include "libusb.xcconfig" diff --git a/lib/libusb/Xcode/release.xcconfig b/lib/libusb/Xcode/release.xcconfig deleted file mode 100644 index 760df51..0000000 --- a/lib/libusb/Xcode/release.xcconfig +++ /dev/null @@ -1,30 +0,0 @@ -// -// libusb Xcode configuration file -// Copyright © 2012 Pete Batard -// For more information, please visit: -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -#include "common.xcconfig" - -// Put debug symbols in separate .dym file. -DEBUG_INFORMATION_FORMAT = dwarf-with-dsym - -// Optimizations in release. -GCC_OPTIMIZATION_LEVEL = s -LLVM_LTO = YES - -// Define NDEBUG so asserts go away in release. -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) NDEBUG=1 diff --git a/lib/libusb/android/README b/lib/libusb/android/README deleted file mode 100644 index 4af4c3d..0000000 --- a/lib/libusb/android/README +++ /dev/null @@ -1,152 +0,0 @@ -libusb for Android -================== - -Building: ---------- - -To build libusb for Android do the following: - - 1. Download the latest NDK from: - http://developer.android.com/tools/sdk/ndk/index.html - - 2. Extract the NDK. - - 3. Open a shell and make sure there exist an NDK global variable - set to the directory where you extracted the NDK. - - 4. Change directory to libusb's "android/jni" - - 5. Run "$NDK/ndk-build". - -The libusb library, examples and tests can then be found in: - "android/libs/$ARCH" - -Where $ARCH is one of: - armeabi - armeabi-v7a - mips - mips64 - x86 - x86_64 - -Installing: ------------ - -If you wish to use libusb from native code in own Android application -then you should add the following line to your Android.mk file: - - include $(PATH_TO_LIBUSB_SRC)/android/jni/libusb.mk - -You will then need to add the following lines to the build -configuration for each native binary which uses libusb: - - LOCAL_C_INCLUDES += $(LIBUSB_ROOT_ABS) - LOCAL_SHARED_LIBRARIES += libusb1.0 - -The Android build system will then correctly include libusb in the -application package (APK) file, provided ndk-build is invoked before -the package is built. - - -Runtime Permissions: --------------------- - -The Runtime Permissions on Android can be transferred from Java to Native -over the following approach: - - JAVA: - - --> Obtain USB permissions over the android.hardware.usb.UsbManager class - - usbManager = (UsbManager) getSystemService(Context.USB_SERVICE); - HashMap deviceList = usbManager.getDeviceList(); - for (UsbDevice usbDevice : deviceList.values()) { - usbManager.requestPermission(usbDevice, mPermissionIntent); - } - - --> Get the native FileDescriptor of the UsbDevice and transfer it to - Native over JNI or JNA - - UsbDeviceConnection usbDeviceConnection = usbManager.openDevice(camDevice); - int fileDescriptor = usbDeviceConnection.getFileDescriptor(); - - --> JNA sample method: - - JNA.INSTANCE.set_the_native_Descriptor(fileDescriptor); - - NATIVE: - - --> Initialize libusb on Android - - set_the_native_Descriptor(int fileDescriptor) { - libusb_context *ctx; - libusb_device_handle *devh; - libusb_set_option(&ctx, LIBUSB_OPTION_NO_DEVICE_DISCOVERY, NULL); - libusb_init(&ctx); - libusb_wrap_sys_device(NULL, (intptr_t)fileDescriptor, &devh); - } - /* From this point you can regularly use all libusb functions as usual */ - - About LIBUSB_OPTION_NO_DEVICE_DISCOVERY: - - The method libusb_set_option(&ctx, LIBUSB_OPTION_NO_DEVICE_DISCOVERY, NULL) - does not affect the ctx. - It allows initializing libusb on unrooted Android devices by skipping - the device enumeration. - -Rooted Devices: ---------------- - - For rooted devices the code using libusb could be executed as root - using the "su" command. An alternative would be to use the "su" command - to change the permissions on the appropriate /dev/bus/usb/ files. - - Users have reported success in using android.hardware.usb.UsbManager - to request permission to use the UsbDevice and then opening the - device. The difficulties in this method is that there is no guarantee - that it will continue to work in the future Android versions, it - requires invoking Java APIs and running code to match each - android.hardware.usb.UsbDevice to a libusb_device. - - For a rooted device it is possible to install libusb into the system - image of a running device: - - 1. Enable ADB on the device. - - 2. Connect the device to a machine running ADB. - - 3. Execute the following commands on the machine - running ADB: - - # Make the system partition writable - adb shell su -c "mount -o remount,rw /system" - - # Install libusb - adb push obj/local/armeabi/libusb1.0.so /sdcard/ - adb shell su -c "cat > /system/lib/libusb1.0.so < /sdcard/libusb1.0.so" - adb shell rm /sdcard/libusb1.0.so - - # Install the samples and tests - for B in listdevs fxload xusb sam3u_benchmark hotplugtest stress - do - adb push "obj/local/armeabi/$B" /sdcard/ - adb shell su -c "cat > /system/bin/$B < /sdcard/$B" - adb shell su -c "chmod 0755 /system/bin/$B" - adb shell rm "/sdcard/$B" - done - - # Make the system partition read only again - adb shell su -c "mount -o remount,ro /system" - - # Run listdevs to - adb shell su -c "listdevs" - - 4. If your device only has a single OTG port then ADB can generally - be switched to using Wifi with the following commands when connected - via USB: - - adb shell netcfg - # Note the wifi IP address of the phone - adb tcpip 5555 - # Use the IP address from netcfg - adb connect 192.168.1.123:5555 diff --git a/lib/libusb/android/config.h b/lib/libusb/android/config.h deleted file mode 100644 index 1092f65..0000000 --- a/lib/libusb/android/config.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Android build config for libusb - * Copyright © 2012-2013 RealVNC Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* Define to the attribute for default visibility. */ -#define DEFAULT_VISIBILITY __attribute__ ((visibility ("default"))) - -/* Define to 1 to start with debug message logging enabled. */ -/* #undef ENABLE_DEBUG_LOGGING */ - -/* Define to 1 to enable message logging. */ -#define ENABLE_LOGGING 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ASM_TYPES_H 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if the system has the type `nfds_t'. */ -#define HAVE_NFDS_T 1 - -/* Define to 1 if you have the `pipe2' function. */ -#define HAVE_PIPE2 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if compiling for a POSIX platform. */ -#define PLATFORM_POSIX 1 - -/* Define to the attribute for enabling parameter checks on printf-like - functions. */ -#define PRINTF_FORMAT(a, b) __attribute__ ((__format__ (__printf__, a, b))) - -/* Define to 1 to output logging messages to the systemwide log. */ -#define USE_SYSTEM_LOGGING_FACILITY 1 - -/* Enable GNU extensions. */ -#define _GNU_SOURCE 1 diff --git a/lib/libusb/android/examples/unrooted_android.c b/lib/libusb/android/examples/unrooted_android.c deleted file mode 100644 index 5134c54..0000000 --- a/lib/libusb/android/examples/unrooted_android.c +++ /dev/null @@ -1,301 +0,0 @@ -/* - * libusb example program for reading out USB descriptors on unrooted Android - * (based on testlibusb.c) - * - * Copyright 2020-2021 Peter Stoiber - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Please contact the author if you need another license. - * This Repository is provided "as is", without warranties of any kind. -*/ - -/* - * This example creates a shared object which can be accessed over JNA or JNI from Java or Kotlin in Android. - * Hint: If you are using Android Studio, set the "Debug type" to "Java Only" to receive debug messages. - */ - -/* - * Usage: - * First, you have to connect your USB device from the Java side. - * Use the android.hardware.usb class to find the USB device, claim the interfaces, and open the usb_device_connection - * Obtain the native File Descriptor --> usb_device_connection.getFileDescriptor() - * Pass the received int value to the unrooted_usb_description method of this code (over JNA) - */ - -/* - * libusb can only be included in Android projects using NDK for now. (CMake is not supported at the moment) - * Clone the libusb git repo into your Android project and include the Android.mk file in your build.gradle. - */ - -/* - Example JNA Approach: - public interface unrooted_sample extends Library { - public static final unrooted_sample INSTANCE = Native.load("unrooted_android", unrooted_sample.class); - public int unrooted_usb_description (int fileDescriptor); - } - unrooted_sample.INSTANCE.unrooted_usb_description( usbDeviceConnection.getFileDescriptor()); - */ - -#include -#include -#include "unrooted_android.h" -#include "libusb.h" -#include -#define LOG_TAG "LibUsb" -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) - -int verbose = 0; - -static void print_endpoint_comp(const struct libusb_ss_endpoint_companion_descriptor *ep_comp) -{ - LOGD(" USB 3.0 Endpoint Companion:\n"); - LOGD(" bMaxBurst: %u\n", ep_comp->bMaxBurst); - LOGD(" bmAttributes: %02xh\n", ep_comp->bmAttributes); - LOGD(" wBytesPerInterval: %u\n", ep_comp->wBytesPerInterval); -} - -static void print_endpoint(const struct libusb_endpoint_descriptor *endpoint) -{ - int i, ret; - - LOGD(" Endpoint:\n"); - LOGD(" bEndpointAddress: %02xh\n", endpoint->bEndpointAddress); - LOGD(" bmAttributes: %02xh\n", endpoint->bmAttributes); - LOGD(" wMaxPacketSize: %u\n", endpoint->wMaxPacketSize); - LOGD(" bInterval: %u\n", endpoint->bInterval); - LOGD(" bRefresh: %u\n", endpoint->bRefresh); - LOGD(" bSynchAddress: %u\n", endpoint->bSynchAddress); - - for (i = 0; i < endpoint->extra_length;) { - if (LIBUSB_DT_SS_ENDPOINT_COMPANION == endpoint->extra[i + 1]) { - struct libusb_ss_endpoint_companion_descriptor *ep_comp; - - ret = libusb_get_ss_endpoint_companion_descriptor(NULL, endpoint, &ep_comp); - if (LIBUSB_SUCCESS != ret) - continue; - - print_endpoint_comp(ep_comp); - - libusb_free_ss_endpoint_companion_descriptor(ep_comp); - } - - i += endpoint->extra[i]; - } -} - -static void print_altsetting(const struct libusb_interface_descriptor *interface) -{ - uint8_t i; - - LOGD(" Interface:\n"); - LOGD(" bInterfaceNumber: %u\n", interface->bInterfaceNumber); - LOGD(" bAlternateSetting: %u\n", interface->bAlternateSetting); - LOGD(" bNumEndpoints: %u\n", interface->bNumEndpoints); - LOGD(" bInterfaceClass: %u\n", interface->bInterfaceClass); - LOGD(" bInterfaceSubClass: %u\n", interface->bInterfaceSubClass); - LOGD(" bInterfaceProtocol: %u\n", interface->bInterfaceProtocol); - LOGD(" iInterface: %u\n", interface->iInterface); - - for (i = 0; i < interface->bNumEndpoints; i++) - print_endpoint(&interface->endpoint[i]); -} - -static void print_2_0_ext_cap(struct libusb_usb_2_0_extension_descriptor *usb_2_0_ext_cap) -{ - LOGD(" USB 2.0 Extension Capabilities:\n"); - LOGD(" bDevCapabilityType: %u\n", usb_2_0_ext_cap->bDevCapabilityType); - LOGD(" bmAttributes: %08xh\n", usb_2_0_ext_cap->bmAttributes); -} - -static void print_ss_usb_cap(struct libusb_ss_usb_device_capability_descriptor *ss_usb_cap) -{ - LOGD(" USB 3.0 Capabilities:\n"); - LOGD(" bDevCapabilityType: %u\n", ss_usb_cap->bDevCapabilityType); - LOGD(" bmAttributes: %02xh\n", ss_usb_cap->bmAttributes); - LOGD(" wSpeedSupported: %u\n", ss_usb_cap->wSpeedSupported); - LOGD(" bFunctionalitySupport: %u\n", ss_usb_cap->bFunctionalitySupport); - LOGD(" bU1devExitLat: %u\n", ss_usb_cap->bU1DevExitLat); - LOGD(" bU2devExitLat: %u\n", ss_usb_cap->bU2DevExitLat); -} - -static void print_bos(libusb_device_handle *handle) -{ - struct libusb_bos_descriptor *bos; - uint8_t i; - int ret; - - ret = libusb_get_bos_descriptor(handle, &bos); - if (ret < 0) - return; - - LOGD(" Binary Object Store (BOS):\n"); - LOGD(" wTotalLength: %u\n", bos->wTotalLength); - LOGD(" bNumDeviceCaps: %u\n", bos->bNumDeviceCaps); - - for (i = 0; i < bos->bNumDeviceCaps; i++) { - struct libusb_bos_dev_capability_descriptor *dev_cap = bos->dev_capability[i]; - - if (dev_cap->bDevCapabilityType == LIBUSB_BT_USB_2_0_EXTENSION) { - struct libusb_usb_2_0_extension_descriptor *usb_2_0_extension; - - ret = libusb_get_usb_2_0_extension_descriptor(NULL, dev_cap, &usb_2_0_extension); - if (ret < 0) - return; - - print_2_0_ext_cap(usb_2_0_extension); - libusb_free_usb_2_0_extension_descriptor(usb_2_0_extension); - } else if (dev_cap->bDevCapabilityType == LIBUSB_BT_SS_USB_DEVICE_CAPABILITY) { - struct libusb_ss_usb_device_capability_descriptor *ss_dev_cap; - - ret = libusb_get_ss_usb_device_capability_descriptor(NULL, dev_cap, &ss_dev_cap); - if (ret < 0) - return; - - print_ss_usb_cap(ss_dev_cap); - libusb_free_ss_usb_device_capability_descriptor(ss_dev_cap); - } - } - - libusb_free_bos_descriptor(bos); -} - -static void print_interface(const struct libusb_interface *interface) -{ - int i; - - for (i = 0; i < interface->num_altsetting; i++) - print_altsetting(&interface->altsetting[i]); -} - -static void print_configuration(struct libusb_config_descriptor *config) -{ - uint8_t i; - - LOGD(" Configuration:\n"); - LOGD(" wTotalLength: %u\n", config->wTotalLength); - LOGD(" bNumInterfaces: %u\n", config->bNumInterfaces); - LOGD(" bConfigurationValue: %u\n", config->bConfigurationValue); - LOGD(" iConfiguration: %u\n", config->iConfiguration); - LOGD(" bmAttributes: %02xh\n", config->bmAttributes); - LOGD(" MaxPower: %u\n", config->MaxPower); - - for (i = 0; i < config->bNumInterfaces; i++) - print_interface(&config->interface[i]); -} - -static void print_device(libusb_device *dev, libusb_device_handle *handle) -{ - struct libusb_device_descriptor desc; - unsigned char string[256]; - const char *speed; - int ret; - uint8_t i; - - switch (libusb_get_device_speed(dev)) { - case LIBUSB_SPEED_LOW: speed = "1.5M"; break; - case LIBUSB_SPEED_FULL: speed = "12M"; break; - case LIBUSB_SPEED_HIGH: speed = "480M"; break; - case LIBUSB_SPEED_SUPER: speed = "5G"; break; - case LIBUSB_SPEED_SUPER_PLUS: speed = "10G"; break; - case LIBUSB_SPEED_SUPER_PLUS_X2: speed = "20G"; break; - default: speed = "Unknown"; - } - - ret = libusb_get_device_descriptor(dev, &desc); - if (ret < 0) { - LOGD("failed to get device descriptor"); - return; - } - - LOGD("Dev (bus %u, device %u): %04X - %04X speed: %s\n", - libusb_get_bus_number(dev), libusb_get_device_address(dev), - desc.idVendor, desc.idProduct, speed); - - if (!handle) - libusb_open(dev, &handle); - - if (handle) { - if (desc.iManufacturer) { - ret = libusb_get_string_descriptor_ascii(handle, desc.iManufacturer, string, sizeof(string)); - if (ret > 0) - LOGD(" Manufacturer: %s\n", (char *)string); - } - - if (desc.iProduct) { - ret = libusb_get_string_descriptor_ascii(handle, desc.iProduct, string, sizeof(string)); - if (ret > 0) - LOGD(" Product: %s\n", (char *)string); - } - - if (desc.iSerialNumber && verbose) { - ret = libusb_get_string_descriptor_ascii(handle, desc.iSerialNumber, string, sizeof(string)); - if (ret > 0) - LOGD(" Serial Number: %s\n", (char *)string); - } - } - - if (verbose) { - for (i = 0; i < desc.bNumConfigurations; i++) { - struct libusb_config_descriptor *config; - - ret = libusb_get_config_descriptor(dev, i, &config); - if (LIBUSB_SUCCESS != ret) { - LOGD(" Couldn't retrieve descriptors\n"); - continue; - } - - print_configuration(config); - - libusb_free_config_descriptor(config); - } - - if (handle && desc.bcdUSB >= 0x0201) - print_bos(handle); - } - - if (handle) - libusb_close(handle); -} - - -/* fileDescriptor = the native file descriptor obtained in Java and transferred to native over JNA, for example */ -int unrooted_usb_description(int fileDescriptor) -{ - libusb_context *ctx = NULL; - libusb_device_handle *devh = NULL; - int r = 0; - verbose = 1; - r = libusb_set_option(NULL, LIBUSB_OPTION_NO_DEVICE_DISCOVERY, NULL); - if (r != LIBUSB_SUCCESS) { - LOGD("libusb_set_option failed: %d\n", r); - return -1; - } - r = libusb_init(&ctx); - if (r < 0) { - LOGD("libusb_init failed: %d\n", r); - return r; - } - r = libusb_wrap_sys_device(ctx, (intptr_t)fileDescriptor, &devh); - if (r < 0) { - LOGD("libusb_wrap_sys_device failed: %d\n", r); - return r; - } else if (devh == NULL) { - LOGD("libusb_wrap_sys_device returned invalid handle\n"); - return r; - } - print_device(libusb_get_device(devh), devh); - return r; -} diff --git a/lib/libusb/android/examples/unrooted_android.h b/lib/libusb/android/examples/unrooted_android.h deleted file mode 100644 index 7ccd408..0000000 --- a/lib/libusb/android/examples/unrooted_android.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2021 Peter Stoiber - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Please contact the author if you need another license. - * This Repository is provided "as is", without warranties of any kind. -*/ - -#ifndef unrooted_android_H -#define unrooted_android_H - -#ifdef __cplusplus -extern "C" { -#endif - -extern int unrooted_usb_description(int fileDescriptor); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/lib/libusb/android/jni/Android.mk b/lib/libusb/android/jni/Android.mk deleted file mode 100644 index 29146b2..0000000 --- a/lib/libusb/android/jni/Android.mk +++ /dev/null @@ -1,23 +0,0 @@ -# Android build config for libusb, examples and tests -# Copyright © 2012-2013 RealVNC Ltd. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# - -LOCAL_PATH := $(call my-dir) - -include $(LOCAL_PATH)/libusb.mk -include $(LOCAL_PATH)/examples.mk -include $(LOCAL_PATH)/tests.mk diff --git a/lib/libusb/android/jni/Application.mk b/lib/libusb/android/jni/Application.mk deleted file mode 100644 index c113726..0000000 --- a/lib/libusb/android/jni/Application.mk +++ /dev/null @@ -1,40 +0,0 @@ -# Android application build config for libusb -# Copyright © 2012-2013 RealVNC Ltd. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# - -APP_ABI := all - -APP_CFLAGS := \ - -std=gnu11 \ - -Wall \ - -Wextra \ - -Wshadow \ - -Wunused \ - -Wwrite-strings \ - -Werror=format-security \ - -Werror=implicit-function-declaration \ - -Werror=implicit-int \ - -Werror=init-self \ - -Werror=missing-prototypes \ - -Werror=strict-prototypes \ - -Werror=undef \ - -Werror=uninitialized - -# Workaround for MIPS toolchain linker being unable to find liblog dependency -# of shared object in NDK versions at least up to r9. -# -APP_LDFLAGS := -llog diff --git a/lib/libusb/android/jni/examples.mk b/lib/libusb/android/jni/examples.mk deleted file mode 100644 index 9e41d77..0000000 --- a/lib/libusb/android/jni/examples.mk +++ /dev/null @@ -1,168 +0,0 @@ -# Android build config for libusb examples -# Copyright © 2012-2013 RealVNC Ltd. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# - -LOCAL_PATH := $(call my-dir) -LIBUSB_ROOT_REL := ../.. -LIBUSB_ROOT_ABS := $(LOCAL_PATH)/../.. - -ifeq ($(USE_PC_NAME),1) - LIBUSB_MODULE := usb-1.0 -else - LIBUSB_MODULE := libusb1.0 -endif - -# dpfp - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/examples/dpfp.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS) - -LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE) - -LOCAL_MODULE := dpfp - -include $(BUILD_EXECUTABLE) - -# dpfp_threaded - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/examples/dpfp.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS) - -LOCAL_CFLAGS := -DDPFP_THREADED -pthread - -LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE) - -LOCAL_MODULE := dpfp_threaded - -include $(BUILD_EXECUTABLE) - -# fxload - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/examples/ezusb.c \ - $(LIBUSB_ROOT_REL)/examples/fxload.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS) - -LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE) - -LOCAL_MODULE := fxload - -include $(BUILD_EXECUTABLE) - -# hotplugtest - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/examples/hotplugtest.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS) - -LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE) - -LOCAL_MODULE := hotplugtest - -include $(BUILD_EXECUTABLE) - -# listdevs - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/examples/listdevs.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS) - -LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE) - -LOCAL_MODULE := listdevs - -include $(BUILD_EXECUTABLE) - -# sam3u_benchmark - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/examples/sam3u_benchmark.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS) - -LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE) - -LOCAL_MODULE := sam3u_benchmark - -include $(BUILD_EXECUTABLE) - -# xusb - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/examples/xusb.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS) - -LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE) - -LOCAL_MODULE := xusb - -include $(BUILD_EXECUTABLE) - -# unrooted_android - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/android/examples/unrooted_android.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS) - -LOCAL_SHARED_LIBRARIES += libusb1.0 - -LOCAL_LDLIBS += -llog - -LOCAL_MODULE := unrooted_android - -include $(BUILD_SHARED_LIBRARY) diff --git a/lib/libusb/android/jni/libusb.mk b/lib/libusb/android/jni/libusb.mk deleted file mode 100644 index 8786626..0000000 --- a/lib/libusb/android/jni/libusb.mk +++ /dev/null @@ -1,60 +0,0 @@ -# Android build config for libusb -# Copyright © 2012-2013 RealVNC Ltd. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# - -LOCAL_PATH := $(call my-dir) -LIBUSB_ROOT_REL := ../.. -LIBUSB_ROOT_ABS := $(LOCAL_PATH)/../.. - -# libusb - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/libusb/core.c \ - $(LIBUSB_ROOT_REL)/libusb/descriptor.c \ - $(LIBUSB_ROOT_REL)/libusb/hotplug.c \ - $(LIBUSB_ROOT_REL)/libusb/io.c \ - $(LIBUSB_ROOT_REL)/libusb/sync.c \ - $(LIBUSB_ROOT_REL)/libusb/strerror.c \ - $(LIBUSB_ROOT_REL)/libusb/os/linux_usbfs.c \ - $(LIBUSB_ROOT_REL)/libusb/os/events_posix.c \ - $(LIBUSB_ROOT_REL)/libusb/os/threads_posix.c \ - $(LIBUSB_ROOT_REL)/libusb/os/linux_netlink.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS)/libusb \ - $(LIBUSB_ROOT_ABS)/libusb/os - -LOCAL_EXPORT_C_INCLUDES := \ - $(LIBUSB_ROOT_ABS)/libusb - -LOCAL_CFLAGS := -fvisibility=hidden -pthread - -LOCAL_LDLIBS := -llog - -ifeq ($(USE_PC_NAME),1) - LOCAL_MODULE := usb-1.0 -else - LOCAL_MODULE := libusb1.0 - $(warning Building to legacy library name libusb1.0, which differs from pkg-config.) - $(warning Use ndk-build USE_PC_NAME=1 to change the module name to the compatible usb-1.0.) - $(warning USE_PC_NAME=1 may be the default in the future.) -endif - -include $(BUILD_SHARED_LIBRARY) diff --git a/lib/libusb/android/jni/tests.mk b/lib/libusb/android/jni/tests.mk deleted file mode 100644 index a32942a..0000000 --- a/lib/libusb/android/jni/tests.mk +++ /dev/null @@ -1,45 +0,0 @@ -# Android build config for libusb tests -# Copyright © 2012-2013 RealVNC Ltd. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# - -LOCAL_PATH := $(call my-dir) -LIBUSB_ROOT_REL := ../.. -LIBUSB_ROOT_ABS := $(LOCAL_PATH)/../.. - -ifeq ($(USE_PC_NAME),1) - LIBUSB_MODULE := usb-1.0 -else - LIBUSB_MODULE := libusb1.0 -endif - -# stress - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(LIBUSB_ROOT_REL)/tests/stress.c \ - $(LIBUSB_ROOT_REL)/tests/testlib.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/.. \ - $(LIBUSB_ROOT_ABS) - -LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE) - -LOCAL_MODULE := stress - -include $(BUILD_EXECUTABLE) diff --git a/lib/libusb/appveyor.yml b/lib/libusb/appveyor.yml deleted file mode 100644 index a03c62b..0000000 --- a/lib/libusb/appveyor.yml +++ /dev/null @@ -1,108 +0,0 @@ -version: 1.0.{build} -image: - - Visual Studio 2013 - - Visual Studio 2015 - - Visual Studio 2017 - - Visual Studio 2019 - - Visual Studio 2022 -platform: - - Win32 - - x64 -configuration: - - Debug - - Release -environment: - toolset: UNK -clone_depth: 1 -build: - parallel: true -for: - - - matrix: - only: - - image: Visual Studio 2013 - environment: - toolset: v120 - build: - project: msvc\libusb.sln - - - - matrix: - only: - - image: Visual Studio 2015 - configuration: Debug - environment: - toolset: v140 - build: - project: msvc\libusb.sln - - - - matrix: - only: - - image: Visual Studio 2015 - platform: Win32 - configuration: Release - environment: - toolset: v140 - install: - - cmd: xcopy /S /I "%APPVEYOR_BUILD_FOLDER%" C:\msys64\home\appveyor\libusb - - cmd: xcopy /S /I "%APPVEYOR_BUILD_FOLDER%" C:\cygwin\home\appveyor\libusb - build_script: - - cmd: msbuild "%APPVEYOR_BUILD_FOLDER%\msvc\libusb.sln" /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - - cmd: C:\msys64\usr\bin\bash -l "%APPVEYOR_BUILD_FOLDER%\.private\appveyor_build.sh" MinGW - - cmd: C:\cygwin\bin\bash -l "%APPVEYOR_BUILD_FOLDER%\.private\appveyor_build.sh" cygwin - after_build: - - cmd: 7z a "libusb-build_%APPVEYOR_BUILD_WORKER_IMAGE%_%PLATFORM%_%CONFIGURATION%.7z" tag_* README-build.txt build\%TOOLSET%\%PLATFORM%\%CONFIGURATION%\dll build\%TOOLSET%\%PLATFORM%\%CONFIGURATION%\lib build\%TOOLSET%\%PLATFORM%\%CONFIGURATION%\*.exe C:\msys64\home\appveyor\libusb-MinGW-Win32 C:\cygwin\home\appveyor\libusb-cygwin-Win32 - - - - matrix: - only: - - image: Visual Studio 2015 - platform: x64 - configuration: Release - environment: - toolset: v140 - install: - - cmd: xcopy /S /I "%APPVEYOR_BUILD_FOLDER%" C:\msys64\home\appveyor\libusb - - cmd: xcopy /S /I "%APPVEYOR_BUILD_FOLDER%" C:\cygwin64\home\appveyor\libusb - build_script: - - cmd: msbuild "%APPVEYOR_BUILD_FOLDER%\msvc\libusb.sln" /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - - cmd: C:\msys64\usr\bin\bash -l "%APPVEYOR_BUILD_FOLDER%\.private\appveyor_build.sh" MinGW - - cmd: C:\cygwin64\bin\bash -l "%APPVEYOR_BUILD_FOLDER%\.private\appveyor_build.sh" cygwin - after_build: - - cmd: 7z a "libusb-build_%APPVEYOR_BUILD_WORKER_IMAGE%_%PLATFORM%_%CONFIGURATION%.7z" tag_* README-build.txt build\%TOOLSET%\%PLATFORM%\%CONFIGURATION%\dll build\%TOOLSET%\%PLATFORM%\%CONFIGURATION%\lib build\%TOOLSET%\%PLATFORM%\%CONFIGURATION%\*.exe C:\msys64\home\appveyor\libusb-MinGW-x64 C:\cygwin64\home\appveyor\libusb-cygwin-x64 - - - - matrix: - only: - - image: Visual Studio 2017 - environment: - toolset: v141 - build: - project: msvc\libusb.sln - - - - matrix: - only: - - image: Visual Studio 2019 - environment: - toolset: v142 - build: - project: msvc\libusb.sln - - - - matrix: - only: - - image: Visual Studio 2022 - environment: - toolset: v143 - build: - project: msvc\libusb.sln - -after_build: - - cmd: ECHO This was built by %APPVEYOR_BUILD_WORKER_IMAGE% from %APPVEYOR_REPO_NAME% commit %APPVEYOR_REPO_COMMIT% > README-build.txt - - cmd: ECHO > tag_%APPVEYOR_REPO_TAG_NAME%_commit_%APPVEYOR_REPO_COMMIT% - - cmd: 7z a "libusb-build_%APPVEYOR_BUILD_WORKER_IMAGE%_%PLATFORM%_%CONFIGURATION%.7z" tag_* README-build.txt build\%TOOLSET%\%PLATFORM%\%CONFIGURATION%\dll build\%TOOLSET%\%PLATFORM%\%CONFIGURATION%\lib build\%TOOLSET%\%PLATFORM%\%CONFIGURATION%\*.exe - -artifacts: - - path: "libusb-build_%APPVEYOR_BUILD_WORKER_IMAGE%_%PLATFORM%_%CONFIGURATION%.7z" diff --git a/lib/libusb/autogen.sh b/lib/libusb/autogen.sh deleted file mode 100755 index 2ffb10e..0000000 --- a/lib/libusb/autogen.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -srcdir="$(dirname "$0")" - -"$srcdir"/bootstrap.sh -if [ -z "$NOCONFIGURE" ]; then - exec "$srcdir"/configure --enable-examples-build --enable-tests-build "$@" -fi diff --git a/lib/libusb/bootstrap.sh b/lib/libusb/bootstrap.sh deleted file mode 100755 index fc555d5..0000000 --- a/lib/libusb/bootstrap.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -cd "$(dirname "$0")" - -if [ ! -d m4 ]; then - mkdir m4 -fi -exec autoreconf -ivf diff --git a/lib/libusb/configure.ac b/lib/libusb/configure.ac deleted file mode 100644 index 6dc7c69..0000000 --- a/lib/libusb/configure.ac +++ /dev/null @@ -1,450 +0,0 @@ -dnl These m4 macros are whitespace sensitive and break if moved around much. -m4_define([LU_VERSION_H], m4_include([libusb/version.h])) -m4_define([LU_DEFINE_VERSION_ATOM], - [m4_define([$1], m4_bregexp(LU_VERSION_H, - [^#define\s*$1\s*\([0-9]*\).*], [\1]))]) -m4_define([LU_DEFINE_VERSION_RC_ATOM], - [m4_define([$1], m4_bregexp(LU_VERSION_H, - [^#define\s*$1\s*"\(-rc[0-9]*\)".*], [\1]))]) -dnl The m4_bregexp() returns (only) the numbers following the #define named -dnl in the first macro parameter. m4_define() then defines the name for use -dnl in AC_INIT. - -LU_DEFINE_VERSION_ATOM([LIBUSB_MAJOR]) -LU_DEFINE_VERSION_ATOM([LIBUSB_MINOR]) -LU_DEFINE_VERSION_ATOM([LIBUSB_MICRO]) -LU_DEFINE_VERSION_RC_ATOM([LIBUSB_RC]) - -AC_PREREQ([2.69]) -AC_INIT([libusb-1.0], [LIBUSB_MAJOR[.]LIBUSB_MINOR[.]LIBUSB_MICRO[]LIBUSB_RC], [libusb-devel@lists.sourceforge.net], [libusb-1.0], [https://libusb.info]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_SRCDIR([libusb/core.c]) -AC_CONFIG_MACRO_DIR([m4]) -AC_PROG_CC -AC_PROG_CXX -AC_C_INLINE -AM_INIT_AUTOMAKE -LT_INIT -LT_LANG([Windows Resource]) - -dnl Library versioning -dnl These numbers should be tweaked on every release. Read carefully: -dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html -dnl http://sourceware.org/autobook/autobook/autobook_91.html -lt_current=4 -lt_revision=0 -lt_age=4 -LT_LDFLAGS="-version-info ${lt_current}:${lt_revision}:${lt_age} -no-undefined" - -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - -EXTRA_CPPFLAGS= -EXTRA_CFLAGS= - -dnl check for -std=gnu11 compiler support (optional) -dnl note that we don't just check if the compiler accepts '-std=x11' -dnl but also that it supports the _Thread_local keyword because some compilers -dnl (e.g. gcc 4.8) accept the command line option but do not implement TLS -saved_CFLAGS="${CFLAGS}" -CFLAGS="-std=gnu11" -AC_MSG_CHECKING([if $CC supports -std=gnu11]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_Thread_local int x;], [x = 42;])], - [AC_MSG_RESULT([yes]) - c_dialect=gnu], - [AC_MSG_RESULT([no]) - c_dialect=]) -if test "x$c_dialect" != xgnu; then - dnl fallback check for -std=c11 compiler support (required) - CFLAGS="-std=c11" - AC_MSG_CHECKING([if $CC supports -std=c11]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_Thread_local int x;], [x = 42;])], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([compiler with C11 support is required to build libusb])]) - c_dialect=c -fi -CFLAGS="${saved_CFLAGS}" - -AC_DEFINE([_GNU_SOURCE], [1], [Enable GNU extensions.]) -AC_DEFINE([DEFAULT_VISIBILITY], [__attribute__ ((visibility ("default")))], [Define to the attribute for default visibility.]) -AC_DEFINE([PRINTF_FORMAT(a, b)], [__attribute__ ((__format__ (__printf__, a, b)))], [Define to the attribute for enabling parameter checks on printf-like functions.]) - -create_import_lib= -is_android_linux= -AC_MSG_CHECKING([operating system]) -case $host in -*-darwin*) - AC_MSG_RESULT([Darwin/Mac OS X]) - backend=darwin - platform=posix - ;; -*-haiku*) - AC_MSG_RESULT([Haiku]) - backend=haiku - platform=posix - ;; -wasm*-emscripten) - AC_MSG_RESULT([Emscripten]) - backend=emscripten - platform=posix - ;; -wasm*-unknown-none) - AC_MSG_ERROR([ ---host=$host_alias is not accepted as it might become ambiguous in the future. -Please use an explicit --host=$host_cpu-emscripten instead. - ]) - ;; -*-linux* | *-uclinux*) - dnl on Android Linux, some functions are in different places - case $host in - *-linux-android*) - AC_MSG_RESULT([Android Linux]) - is_android_linux=yes - ;; - *) - AC_MSG_RESULT([Linux]) - ;; - esac - backend=linux - platform=posix - ;; -*-netbsd*) - AC_MSG_RESULT([NetBSD]) - backend=netbsd - platform=posix - ;; -*-openbsd*) - AC_MSG_RESULT([OpenBSD]) - backend=openbsd - platform=posix - ;; -*-solaris*) - AC_MSG_RESULT([SunOS]) - backend=sunos - platform=posix - ;; -*-cygwin*) - AC_MSG_RESULT([Windows (using Cygwin)]) - backend=windows - platform=windows - EXTRA_CFLAGS="-mwin32" - ;; -*-mingw* | *msys*) - AC_MSG_RESULT([Windows]) - backend=windows - platform=windows - test "x$enable_shared" = xyes && create_import_lib=yes - EXTRA_CFLAGS="-fno-omit-frame-pointer" - EXTRA_LDFLAGS="-static-libgcc" - ;; -*) - AC_MSG_RESULT([Null]) - AC_MSG_WARN([The host being compiled for is not supported.]) - AC_MSG_WARN([The library may compile but will not function in any useful manner.]) - backend=null - platform=posix - ;; -esac - -if test "x$platform" = xposix; then - AC_DEFINE([PLATFORM_POSIX], [1], [Define to 1 if compiling for a POSIX platform.]) - AC_CHECK_TYPES([nfds_t], [], [], [[#include ]]) - if test "x$backend" != xemscripten; then - # pipe2 is detected as present on Emscripten, but it isn't actually ported and always - # returns an error. https://github.com/emscripten-core/emscripten/issues/14824 - AC_CHECK_FUNCS([pipe2]) - fi - dnl Some compilers do not support the '-pthread' option so check for it here - saved_CFLAGS="${CFLAGS}" - CFLAGS="-Wall -Werror -pthread" - AC_MSG_CHECKING([if $CC recognizes -pthread]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], - [AC_MSG_RESULT([yes]) - AC_SUBST(THREAD_CFLAGS, [-pthread])], - [AC_MSG_RESULT([no])]) - CFLAGS="${saved_CFLAGS}" - dnl Android Linux and Darwin provide pthread functions directly in libc - dnl glibc also provides some pthread functions directly, so search for a thread-specific function - AC_SEARCH_LIBS([pthread_create], [pthread], - [test "x$ac_cv_search_pthread_create" != "xnone required" && AC_SUBST(THREAD_LIBS, [-lpthread])], - [], []) - dnl Check for new-style atomic builtins. We first check without linking to -latomic. - AC_MSG_CHECKING(whether __atomic_load_n is supported) - AC_LINK_IFELSE([AC_LANG_SOURCE([[ - #include - int main() { - struct { - uint64_t *v; - } x; - return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) & - (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); - }]])], GCC_ATOMIC_BUILTINS_SUPPORTED=yes, GCC_ATOMIC_BUILTINS_SUPPORTED=no) - AC_MSG_RESULT($GCC_ATOMIC_BUILTINS_SUPPORTED) - if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" != xyes; then - AC_SEARCH_LIBS([__atomic_fetch_add_4], [atomic]) - fi -elif test "x$platform" = xwindows; then - AC_DEFINE([PLATFORM_WINDOWS], [1], [Define to 1 if compiling for a Windows platform.]) -else - AC_MSG_ERROR([Unknown platform]) -fi - -case $backend in -darwin) - AC_CHECK_FUNCS([pthread_threadid_np]) - LIBS="${LIBS} -lobjc -Wl,-framework,IOKit -Wl,-framework,CoreFoundation -Wl,-framework,Security" - AC_CHECK_HEADERS([IOKit/usb/IOUSBHostFamilyDefinitions.h]) - ;; -haiku) - LIBS="${LIBS} -lbe" - ;; -linux) - AC_SEARCH_LIBS([clock_gettime], [rt], [], [], []) - AC_CHECK_FUNCS([pthread_setname_np]) - AC_ARG_ENABLE([udev], - [AS_HELP_STRING([--enable-udev], [use udev for device enumeration and hotplug support (recommended) [default=yes]])], - [use_udev=$enableval], [use_udev=yes]) - if test "x$use_udev" = xyes; then - dnl system has udev. use it or fail! - AC_CHECK_HEADER([libudev.h], [], [AC_MSG_ERROR([udev support requested but libudev header not installed])]) - AC_CHECK_LIB([udev], [udev_new], [], [AC_MSG_ERROR([udev support requested but libudev not installed])]) - - # We can build umockdev tests (if available) - m4_ifdef([PKG_PROG_PKG_CONFIG],[ - PKG_PROG_PKG_CONFIG - PKG_CHECK_MODULES([UMOCKDEV], [umockdev-1.0 >= 0.16.0], [ac_have_umockdev=yes], [ac_have_umockdev=no]) - PKG_CHECK_MODULES([UMOCKDEV_HOTPLUG], [umockdev-1.0 >= 0.17.7], [ac_umockdev_hotplug=yes], [ac_umockdev_hotplug=no]) - if test $ac_umockdev_hotplug = yes; then - AC_DEFINE([UMOCKDEV_HOTPLUG], [1], [UMockdev hotplug code is not racy]) - fi - ], []) - else - AC_CHECK_HEADERS([asm/types.h]) - AC_CHECK_HEADER([linux/netlink.h], [], [AC_MSG_ERROR([Linux netlink header not found])]) - AC_CHECK_HEADER([sys/socket.h], [], [AC_MSG_ERROR([Linux socket header not found])]) - fi - ;; -sunos) - LIBS="${LIBS} -ldevinfo" - ;; -windows) - AC_CHECK_TYPES([struct timespec], [], [], [[#include ]]) - AC_DEFINE([_WIN32_WINNT], [_WIN32_WINNT_VISTA], [Define to the oldest supported Windows version.]) - LT_LDFLAGS="${LT_LDFLAGS} -avoid-version" - ;; -emscripten) - # Note: LT_LDFLAGS is not enough here because we need link flags for executable. - EM_LDFLAGS="--bind -s ASYNCIFY" - AM_LDFLAGS="${AM_LDFLAGS} ${EM_LDFLAGS} -s ASSERTIONS -s ALLOW_MEMORY_GROWTH" - LIBS="${LIBS} ${EM_LDFLAGS}" - ;; -*) - dnl no special handling required - ;; -esac - -dnl headers not available on all platforms but required on others -AC_CHECK_HEADERS([sys/time.h]) - -dnl check availability of clock_gettime(), except don't bother on Darwin, because the result is not used. -if test "x$platform" = xposix && test "x$backend" != xdarwin; then - AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes], [AC_MSG_ERROR([clock_gettime() is required on this platform])]) - - if test "x$have_clock_gettime" = xyes; then - dnl the clock_gettime() function needs certain clock IDs defined - AC_CHECK_DECL([CLOCK_MONOTONIC], [], [AC_MSG_ERROR([C library headers missing definition for CLOCK_MONOTONIC])], [[#include ]]) - dnl use the monotonic clock for condition variable timed waits if possible - AC_CHECK_FUNCS([pthread_condattr_setclock], [need_clock_realtime=], [need_clock_realtime=yes]) - if test "x$need_clock_realtime" = xyes; then - AC_CHECK_DECL([CLOCK_REALTIME], [], [AC_MSG_ERROR([C library headers missing definition for CLOCK_REALTIME])], [[#include ]]) - fi - fi -fi - -dnl eventfd support -if test "x$backend" = xlinux || test "x$backend" = xsunos; then - AC_ARG_ENABLE([eventfd], - [AS_HELP_STRING([--enable-eventfd], [use eventfd for signalling [default=auto]])], - [use_eventfd=$enableval], - [use_eventfd=auto]) - if test "x$use_eventfd" != xno; then - AC_CHECK_HEADER([sys/eventfd.h], [eventfd_h=yes], [eventfd_h=]) - if test "x$eventfd_h" = xyes; then - AC_CHECK_DECLS([EFD_NONBLOCK, EFD_CLOEXEC], [eventfd_h_ok=yes], [eventfd_h_ok=], [[#include ]]) - if test "x$eventfd_h_ok" = xyes; then - AC_CHECK_FUNC([eventfd], [eventfd_ok=yes], [eventfd_ok=]) - if test "x$eventfd_ok" = xyes; then - AC_DEFINE([HAVE_EVENTFD], [1], [Define to 1 if the system has eventfd functionality.]) - elif test "x$use_eventfd" = xyes; then - AC_MSG_ERROR([eventfd() function not found; glibc 2.9+ required]) - fi - elif test "x$use_eventfd" = xyes; then - AC_MSG_ERROR([eventfd header not usable; glibc 2.9+ required]) - fi - elif test "x$use_eventfd" = xyes; then - AC_MSG_ERROR([eventfd header not available; glibc 2.9+ required]) - fi - fi - AC_MSG_CHECKING([whether to use eventfd for signalling]) - if test "x$use_eventfd" = xno; then - AC_MSG_RESULT([no (disabled by user)]) - elif test "x$eventfd_h" != xyes; then - AC_MSG_RESULT([no (header not available)]) - elif test "x$eventfd_h_ok" != xyes; then - AC_MSG_RESULT([no (header not usable)]) - elif test "x$eventfd_ok" != xyes; then - AC_MSG_RESULT([no (functions not available)]) - else - AC_MSG_RESULT([yes]) - fi -fi - -dnl timerfd support -if test "x$backend" = xlinux || test "x$backend" = xsunos; then - AC_ARG_ENABLE([timerfd], - [AS_HELP_STRING([--enable-timerfd], [use timerfd for timing [default=auto]])], - [use_timerfd=$enableval], - [use_timerfd=auto]) - if test "x$use_timerfd" != xno; then - AC_CHECK_HEADER([sys/timerfd.h], [timerfd_h=yes], [timerfd_h=]) - if test "x$timerfd_h" = xyes; then - AC_CHECK_DECLS([TFD_NONBLOCK, TFD_CLOEXEC], [timerfd_h_ok=yes], [timerfd_h_ok=], [[#include ]]) - if test "x$timerfd_h_ok" = xyes; then - AC_CHECK_FUNC([timerfd_create], [timerfd_ok=yes], [timerfd_ok=]) - if test "x$timerfd_ok" = xyes; then - AC_DEFINE([HAVE_TIMERFD], [1], [Define to 1 if the system has timerfd functionality.]) - elif test "x$use_timerfd" = xyes; then - AC_MSG_ERROR([timerfd_create() function not found; glibc 2.9+ required]) - fi - elif test "x$use_timerfd" = xyes; then - AC_MSG_ERROR([timerfd header not usable; glibc 2.9+ required]) - fi - elif test "x$use_timerfd" = xyes; then - AC_MSG_ERROR([timerfd header not available; glibc 2.9+ required]) - fi - fi - AC_MSG_CHECKING([whether to use timerfd for timing]) - if test "x$use_timerfd" = xno; then - AC_MSG_RESULT([no (disabled by user)]) - elif test "x$timerfd_h" != xyes; then - AC_MSG_RESULT([no (header not available)]) - elif test "x$timerfd_h_ok" != xyes; then - AC_MSG_RESULT([no (header not usable)]) - elif test "x$timerfd_ok" != xyes; then - AC_MSG_RESULT([no (functions not available)]) - else - AC_MSG_RESULT([yes]) - fi -fi - -dnl Message logging -AC_ARG_ENABLE([log], - [AS_HELP_STRING([--disable-log], [disable all logging])], - [log_enabled=$enableval], - [log_enabled=yes]) -if test "x$log_enabled" != xno; then - AC_DEFINE([ENABLE_LOGGING], [1], [Define to 1 to enable message logging.]) -fi - -AC_ARG_ENABLE([debug-log], - [AS_HELP_STRING([--enable-debug-log], [start with debug message logging enabled [default=no]])], - [debug_log_enabled=$enableval], - [debug_log_enabled=no]) -if test "x$debug_log_enabled" != xno; then - AC_DEFINE([ENABLE_DEBUG_LOGGING], [1], [Define to 1 to start with debug message logging enabled.]) -fi - -AC_ARG_ENABLE([system-log], - [AS_HELP_STRING([--enable-system-log], [output logging messages to the systemwide log, if supported by the OS [default=no]])], - [system_log_enabled=$enableval], - [system_log_enabled=no]) -if test "x$system_log_enabled" != xno; then - AC_DEFINE([USE_SYSTEM_LOGGING_FACILITY], [1], [Define to 1 to output logging messages to the systemwide log.]) - if test "x$backend" != xwindows && test "x$is_android_linux" != xyes; then - dnl Check if syslog is available in standard C library - AC_CHECK_HEADER([syslog.h], [syslog_h=yes], [syslog_h=]) - if test "x$syslog_h" = xyes; then - AC_CHECK_FUNCS([syslog]) - fi - fi -fi - -dnl Examples build -AC_ARG_ENABLE([examples-build], - [AS_HELP_STRING([--enable-examples-build], [build example applications [default=no]])], - [build_examples=$enableval], - [build_examples=no]) - -dnl Tests build -AC_ARG_ENABLE([tests-build], - [AS_HELP_STRING([--enable-tests-build], [build test applications [default=no]])], - [build_tests=$enableval], - [build_tests=no]) - -AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != xno]) -AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno]) -AM_CONDITIONAL([BUILD_UMOCKDEV_TEST], [test "x$ac_have_umockdev" = xyes -a "x$log_enabled" != xno -a "x$debug_log_enabled" != xyes]) -AM_CONDITIONAL([CREATE_IMPORT_LIB], [test "x$create_import_lib" = xyes]) -AM_CONDITIONAL([OS_DARWIN], [test "x$backend" = xdarwin]) -AM_CONDITIONAL([OS_HAIKU], [test "x$backend" = xhaiku]) -AM_CONDITIONAL([OS_LINUX], [test "x$backend" = xlinux]) -AM_CONDITIONAL([OS_NETBSD], [test "x$backend" = xnetbsd]) -AM_CONDITIONAL([OS_NULL], [test "x$backend" = xnull]) -AM_CONDITIONAL([OS_OPENBSD], [test "x$backend" = xopenbsd]) -AM_CONDITIONAL([OS_SUNOS], [test "x$backend" = xsunos]) -AM_CONDITIONAL([OS_WINDOWS], [test "x$backend" = xwindows]) -AM_CONDITIONAL([OS_EMSCRIPTEN], [test "x$backend" = xemscripten]) -AM_CONDITIONAL([PLATFORM_POSIX], [test "x$platform" = xposix]) -AM_CONDITIONAL([PLATFORM_WINDOWS], [test "x$platform" = xwindows]) -AM_CONDITIONAL([USE_UDEV], [test "x$use_udev" = xyes]) - -dnl The -Wcast-function-type warning causes a flurry of warnings when compiling -dnl Windows with GCC 8 or later because of dynamically loaded functions -if test "x$backend" = xwindows; then - saved_CFLAGS="${CFLAGS}" - CFLAGS="-Werror -Wcast-function-type" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], - [EXTRA_CFLAGS="${EXTRA_CFLAGS} -Wno-cast-function-type"], - []) - CFLAGS="${saved_CFLAGS}" -fi - -dnl Some linkers do not support the '--add-stdcall-alias' option so check for it here -if test "x$backend" = xwindows; then - saved_CFLAGS="${CFLAGS}" - CFLAGS="-Wl,--add-stdcall-alias" - AC_MSG_CHECKING([if linker supports --add-stdcall-alias]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [AC_MSG_RESULT([yes]) - LT_LDFLAGS="${LT_LDFLAGS} -Wl,--add-stdcall-alias"], - [AC_MSG_RESULT([no])]) - CFLAGS="${saved_CFLAGS}" -fi - -SHARED_CFLAGS="-Wall -Wextra -Wshadow -Wunused -Wwrite-strings -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=init-self -Werror=missing-prototypes -Werror=strict-prototypes -Werror=undef -Werror=uninitialized" - -AM_CPPFLAGS="${EXTRA_CPPFLAGS}" -AC_SUBST(AM_CPPFLAGS) - -AM_CFLAGS="-std=${c_dialect}11 ${EXTRA_CFLAGS} ${SHARED_CFLAGS}" -AC_SUBST(AM_CFLAGS) - -AM_CXXFLAGS="-std=${c_dialect}++11 ${EXTRA_CFLAGS} ${SHARED_CFLAGS} -Wmissing-declarations" -AC_SUBST(AM_CXXFLAGS) - -AC_SUBST(LT_LDFLAGS) -AC_SUBST(AM_LDFLAGS) - -AC_SUBST([EXTRA_LDFLAGS]) - -dnl set name of html output directory for doxygen -AC_SUBST(DOXYGEN_HTMLDIR, [api-1.0]) - -AC_CONFIG_FILES([libusb-1.0.pc]) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([libusb/Makefile]) -AC_CONFIG_FILES([examples/Makefile]) -AC_CONFIG_FILES([tests/Makefile]) -AC_CONFIG_FILES([doc/Makefile]) -AC_CONFIG_FILES([doc/doxygen.cfg]) -AC_OUTPUT diff --git a/lib/libusb/doc/Makefile.in b/lib/libusb/doc/Makefile.in deleted file mode 100644 index 6568c4f..0000000 --- a/lib/libusb/doc/Makefile.in +++ /dev/null @@ -1,22 +0,0 @@ -LIBUSB_SRC_DIR = @top_srcdir@/libusb -EXCLUDED_FILES = libusbi.h version.h version_nano.h -LIBUSB_SRC = $(wildcard $(LIBUSB_SRC_DIR)/*.c) $(wildcard $(LIBUSB_SRC_DIR)/*.h) -LIBUSB_DOC_SRC = $(filter-out $(addprefix $(LIBUSB_SRC_DIR)/,$(EXCLUDED_FILES)),$(LIBUSB_SRC)) - -docs: @DOXYGEN_HTMLDIR@ - -@DOXYGEN_HTMLDIR@: doxygen.cfg @top_srcdir@/doc/libusb.png $(LIBUSB_DOC_SRC) - doxygen $< - -sfurl = web.sourceforge.net:/home/project-web/libusb/htdocs -docs-upload: @DOXYGEN_HTMLDIR@ - if [ -z "$$SF_USER" ]; then \ - rsync -rv --delete $< $(sfurl); \ - else \ - rsync -rv --delete $< $$SF_USER@$(sfurl); \ - fi - -clean: - rm -rf @DOXYGEN_HTMLDIR@ - -.PHONY: clean docs docs-upload diff --git a/lib/libusb/doc/doxygen.cfg.in b/lib/libusb/doc/doxygen.cfg.in deleted file mode 100644 index b6e6219..0000000 --- a/lib/libusb/doc/doxygen.cfg.in +++ /dev/null @@ -1,2571 +0,0 @@ -# Doxyfile 1.9.0 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the configuration -# file that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = libusb - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = @PACKAGE_VERSION@ - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "A cross-platform user library to access USB devices" - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = @top_srcdir@/doc/libusb.png - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all generated output in the proper direction. -# Possible values are: None, LTR, RTL and Context. -# The default value is: None. - -OUTPUT_TEXT_DIRECTION = None - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = NO - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = YES - -# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line -# such as -# /*************** -# as being the beginning of a Javadoc-style comment "banner". If set to NO, the -# Javadoc-style will behave just like regular comments and it will not be -# interpreted by doxygen. -# The default value is: NO. - -JAVADOC_BANNER = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# By default Python docstrings are displayed as preformatted text and doxygen's -# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the -# doxygen's special commands can be used and the contents of the docstring -# documentation blocks is shown as doxygen documentation. -# The default value is: YES. - -PYTHON_DOCSTRING = YES - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. -# When you need a literal { or } or , in the value part of an alias you have to -# escape them by means of a backslash (\), this can lead to conflicts with the -# commands \{ and \} for these it is advised to use the version @{ and @} or use -# a double escape (\\{ and \\}) - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice -# sources only. Doxygen will then generate output that is more tailored for that -# language. For instance, namespaces will be presented as modules, types will be -# separated into more groups, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_SLICE = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, -# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: -# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser -# tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files). For instance to make doxygen treat .inc files -# as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. When specifying no_extension you should add -# * to the FILE_PATTERNS. -# -# Note see also the list of default file extension mappings. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 5. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 5 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use -# during processing. When set to 0 doxygen will based this on the number of -# cores available in the system. You can set it explicitly to a value larger -# than 0 to get more control over the balance between CPU load and processing -# speed. At this moment only the input processing can be done using multiple -# threads. Since this is still an experimental feature the default is set to 1, -# which efficively disables parallel processing. Please report any issues you -# encounter. Generating dot graphs in parallel is controlled by the -# DOT_NUM_THREADS setting. -# Minimum value: 0, maximum value: 32, default value: 1. - -NUM_PROC_THREADS = 1 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual -# methods of a class will be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIV_VIRTUAL = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If this flag is set to YES, the name of an unnamed parameter in a declaration -# will be determined by the corresponding definition. By default unnamed -# parameters remain unnamed in the output. -# The default value is: YES. - -RESOLVE_UNNAMED_PARAMS = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# declarations. If set to NO, these declarations will be included in the -# documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# With the correct setting of option CASE_SENSE_NAMES doxygen will better be -# able to match the capabilities of the underlying filesystem. In case the -# filesystem is case sensitive (i.e. it supports files in the same directory -# whose names only differ in casing), the option must be set to YES to properly -# deal with such files in case they appear in the input. For filesystems that -# are not case sensitive the option should be be set to NO to properly deal with -# output files written for symbols that only differ in casing, such as for two -# classes, one named CLASS and the other named Class, and to also support -# references to files without having to specify the exact matching casing. On -# Windows (including Cygwin) and MacOS, users should typically set this option -# to NO, whereas on Linux or other Unix flavors it should typically be set to -# YES. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. If -# EXTRACT_ALL is set to YES then this flag will automatically be disabled. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS -# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but -# at the end of the doxygen process doxygen will return with a non-zero status. -# Possible values are: NO, YES and FAIL_ON_WARNINGS. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = @top_srcdir@/libusb - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: -# https://www.gnu.org/software/libiconv/) for the list of possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# Note the list of default checked file patterns might differ from the list of -# default file extension mappings. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), -# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, -# *.ucf, *.qsf and *.ice. - -FILE_PATTERNS = *.c \ - *.h - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = @top_srcdir@/libusb/libusbi.h \ - @top_srcdir@/libusb/version.h \ - @top_srcdir@/libusb/version_nano.h \ - @top_srcdir@/libusb/os - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# entity all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = @DOXYGEN_HTMLDIR@ - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via JavaScript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have JavaScript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = YES - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: -# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To -# create a documentation set, doxygen will generate a Makefile in the HTML -# output directory. Running make will produce the docset in that directory and -# running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy -# genXcode/_index.html for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: -# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the main .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location (absolute path -# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to -# run qhelpgenerator on the generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg -# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see -# https://inkscape.org) to generate formulas as SVG images instead of PNGs for -# the HTML output. These images will generally look nicer at scaled resolutions. -# Possible values are: png (the default) and svg (looks nicer but requires the -# pdf2svg or inkscape tool). -# The default value is: png. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FORMULA_FORMAT = png - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands -# to create new LaTeX commands to be used in formulas as building blocks. See -# the section "Including formulas" for details. - -FORMULA_MACROFILE = - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /