diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a39f8f3..0a26882 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,7 +67,7 @@ unit_test windows/x86: script: - apt update -y - apt upgrade -y - - apt install -y g++ ninja-build cmake libusb-1.0-0-dev libpcap-dev git + - apt install -y g++ ninja-build cmake libpcap-dev git - sh ci/build-posix.sh artifacts: when: always @@ -82,7 +82,7 @@ unit_test windows/x86: script: - apt update -y - apt upgrade -y - - apt install -y libusb-1.0-0-dev libpcap-dev + - apt install -y libpcap-dev - build/libicsneo-unit-tests tags: - linux-build @@ -93,7 +93,7 @@ unit_test windows/x86: script: - apt update -y - apt upgrade -y - - apt install -y clang lld ninja-build cmake libusb-1.0-0-dev libpcap-dev git + - apt install -y clang lld ninja-build cmake libpcap-dev git - CC=clang CXX=clang++ LDFLAGS=-fuse-ld=lld sh ci/build-posix.sh artifacts: when: always @@ -108,7 +108,7 @@ unit_test windows/x86: script: - apt update -y - apt upgrade -y - - apt install -y libusb-1.0-0-dev libpcap-dev + - apt install -y libpcap-dev - build/libicsneo-unit-tests tags: - linux-build @@ -175,7 +175,7 @@ unit_test linux/ubuntu/2204/amd64/clang: - echo max_parallel_downloads=10 >>/etc/dnf/dnf.conf - echo fastestmirror=True >>/etc/dnf/dnf.conf - dnf upgrade -y - - dnf install -y g++ libpcap-devel cmake ninja-build libusb1-devel git + - dnf install -y g++ libpcap-devel cmake ninja-build git - sh ci/build-posix.sh artifacts: when: always @@ -194,7 +194,7 @@ unit_test linux/ubuntu/2204/amd64/clang: - echo max_parallel_downloads=10 >>/etc/dnf/dnf.conf - echo fastestmirror=True >>/etc/dnf/dnf.conf - dnf upgrade -y - - dnf install -y libpcap-devel libusb1-devel + - dnf install -y libpcap-devel - build/libicsneo-unit-tests tags: - linux-build @@ -209,7 +209,7 @@ unit_test linux/ubuntu/2204/amd64/clang: - echo max_parallel_downloads=10 >>/etc/dnf/dnf.conf - echo fastestmirror=True >>/etc/dnf/dnf.conf - dnf upgrade -y - - dnf install -y clang lld libpcap-devel cmake ninja-build libusb1-devel git + - dnf install -y clang lld libpcap-devel cmake ninja-build git - CC=clang CXX=clang++ LDFLAGS=-fuse-ld=lld sh ci/build-posix.sh artifacts: when: always @@ -228,7 +228,7 @@ unit_test linux/ubuntu/2204/amd64/clang: - echo max_parallel_downloads=10 >>/etc/dnf/dnf.conf - echo fastestmirror=True >>/etc/dnf/dnf.conf - dnf upgrade -y - - dnf install -y libpcap-devel libusb1-devel + - dnf install -y libpcap-devel - build/libicsneo-unit-tests tags: - linux-build @@ -320,13 +320,13 @@ build python/linux/amd64: entrypoint: ["env", "-u", "DOCKER_HOST"] command: ["dockerd-entrypoint.sh"] variables: - CIBW_BEFORE_ALL: yum install -y flex && sh ci/bootstrap-libpcap.sh && sh ci/bootstrap-libusb.sh + CIBW_BEFORE_ALL: yum install -y flex && sh ci/bootstrap-libpcap.sh CIBW_BUILD: "*manylinux*" # no musl CIBW_ARCHS: x86_64 DOCKER_HOST: unix:///var/run/docker.sock DOCKER_DRIVER: overlay2 DOCKER_TLS_CERTDIR: "" - CIBW_ENVIRONMENT: CMAKE_PREFIX_PATH=/project/libpcap/install:/project/libusb/install + CIBW_ENVIRONMENT: CMAKE_PREFIX_PATH=/project/libpcap/install script: - curl -sSL https://get.docker.com/ | sh - sh ci/build-wheel-posix.sh @@ -339,10 +339,10 @@ build python/linux/arm64: tags: - arm64-linux-build variables: - CIBW_BEFORE_ALL: yum install -y flex && sh ci/bootstrap-libpcap.sh && sh ci/bootstrap-libusb.sh + CIBW_BEFORE_ALL: yum install -y flex && sh ci/bootstrap-libpcap.sh CIBW_BUILD: "*manylinux*" # no musl CIBW_ARCHS: aarch64 - CIBW_ENVIRONMENT: CMAKE_PREFIX_PATH=/project/libpcap/install:/project/libusb/install + CIBW_ENVIRONMENT: CMAKE_PREFIX_PATH=/project/libpcap/install script: - sh ci/build-wheel-posix.sh artifacts: @@ -354,9 +354,9 @@ build python/macos: tags: - macos-arm64 variables: - CIBW_BEFORE_ALL: sh ci/bootstrap-libpcap.sh && sh ci/bootstrap-libusb.sh + CIBW_BEFORE_ALL: sh ci/bootstrap-libpcap.sh CIBW_ARCHS: arm64 - CIBW_ENVIRONMENT: CMAKE_PREFIX_PATH=$CI_PROJECT_DIR/libpcap/install:$CI_PROJECT_DIR/libusb/install + CIBW_ENVIRONMENT: CMAKE_PREFIX_PATH=$CI_PROJECT_DIR/libpcap/install MACOSX_DEPLOYMENT_TARGET: 10.14 script: - sh ci/build-wheel-posix.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a70f44..adfdf48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,9 +22,8 @@ set(LIBICSNEO_NPCAP_INCLUDE_DIR "" CACHE STRING "Npcap include directory; set to option(LIBICSNEO_ENABLE_FIRMIO "Enable communication between Linux and CoreMini within the same device" OFF) option(LIBICSNEO_ENABLE_RAW_ETHERNET "Enable devices which communicate over raw ethernet" ON) option(LIBICSNEO_ENABLE_CDCACM "Enable devices which communicate over USB CDC ACM" ON) -option(LIBICSNEO_ENABLE_FTDI "Enable devices which communicate over USB FTDI2XX" ON) option(LIBICSNEO_ENABLE_TCP "Enable devices which communicate over TCP" OFF) -option(LIBICSNEO_ENABLE_FTD3XX "Enable devices which communicate over USB FTD3XX" ON) +option(LIBICSNEO_ENABLE_DXX "Enable devices which communicate over D2XX/D3XX via libredxx" ON) option(LIBICSNEO_ENABLE_BINDINGS_PYTHON "Enable Python library" OFF) @@ -109,7 +108,6 @@ if(LIBICSNEO_BUILD_DOCS) endif() if(WIN32) - add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS) set(PLATFORM_SRC platform/windows/strings.cpp platform/windows/registry.cpp @@ -122,9 +120,9 @@ if(WIN32) ) endif() - if(LIBICSNEO_ENABLE_CDCACM OR LIBICSNEO_ENABLE_FTDI) + if(LIBICSNEO_ENABLE_CDCACM) list(APPEND PLATFORM_SRC - platform/windows/vcp.cpp + platform/windows/cdcacm.cpp ) endif() else() # Darwin or Linux @@ -142,12 +140,6 @@ else() # Darwin or Linux ) endif() - if(LIBICSNEO_ENABLE_FTDI) - list(APPEND PLATFORM_SRC - platform/posix/ftdi.cpp - ) - endif() - if(LIBICSNEO_ENABLE_CDCACM) list(APPEND PLATFORM_SRC platform/posix/cdcacm.cpp @@ -171,51 +163,9 @@ else() # Darwin or Linux endif() endif() -if(LIBICSNEO_ENABLE_FTD3XX) - if(NOT FTD3XX_ROOT) # allow system override - include(FetchContent) - if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8) - set(LIBICSNEO_FTD3XX_URL "https://github.com/intrepidcs/libftd3xx-repack/releases/download/24.34.0/libftd3xx-1.3.0.10-win-x64.zip") - set(LIBICSNEO_FTD3XX_URL_HASH "SHA256=459e635496ab47d6069c9d3515fdd6d82cba3d95e7ae34f794d66ffdf336e9d1") - elseif(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4) - set(LIBICSNEO_FTD3XX_URL "https://github.com/intrepidcs/libftd3xx-repack/releases/download/24.34.0/libftd3xx-1.3.0.10-win-i686.zip") - set(LIBICSNEO_FTD3XX_URL_HASH "SHA256=ce4259ae11772d6ede7d217172156fa392f329b29d9455131f4126a2fb89dad1") - elseif(APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8) - set(LIBICSNEO_FTD3XX_URL "https://github.com/intrepidcs/libftd3xx-repack/releases/download/24.34.0/libftd3xx-1.0.16-macos-universal2.zip") - set(LIBICSNEO_FTD3XX_URL_HASH "SHA256=0904ac5eda8e1dc4b5aac3714383bcc7792b42dfeb585dce6cbfb8b67b8c0c51") - elseif(UNIX) - if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64") - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(LIBICSNEO_FTD3XX_URL "https://github.com/intrepidcs/libftd3xx-repack/releases/download/24.34.0/libftd3xx-1.0.16-linux-x64.zip") - set(LIBICSNEO_FTD3XX_URL_HASH "SHA256=cf66bf299fc722f050cdd3c36998a670f1df69f7c0df18afa73707277067114b") - endif() - elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*|aarch64") - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(LIBICSNEO_FTD3XX_URL "https://github.com/intrepidcs/libftd3xx-repack/releases/download/24.34.0/libftd3xx-1.0.16-linux-aarch64.zip") - set(LIBICSNEO_FTD3XX_URL_HASH "SHA256=66341b5112b9841e959e81400b51711be96fec91894477c5cbfc29b10a0c00a6") - elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(LIBICSNEO_FTD3XX_URL "https://github.com/intrepidcs/libftd3xx-repack/releases/download/24.34.0/libftd3xx-1.0.16-linux-armhf.zip") - set(LIBICSNEO_FTD3XX_URL_HASH "SHA256=cec1f959b48a11eb6b829ed43c81b6ba1c0bcf3e797bafcc84a6376e5ffc3c47") - endif() - endif() - endif() - if(NOT LIBICSNEO_FTD3XX_URL) - message(FATAL_ERROR "Unsupported platform for FTD3XX driver") - endif() - FetchContent_Declare( - ftdi3xx - URL ${LIBICSNEO_FTD3XX_URL} - URL_HASH ${LIBICSNEO_FTD3XX_URL_HASH} - ) - FetchContent_GetProperties(ftdi3xx) - if(NOT ftdi3xx_POPULATED) - FetchContent_Populate(ftdi3xx) - endif() - set(FTD3XX_ROOT "${ftdi3xx_SOURCE_DIR}") - endif() - find_package(FTD3XX REQUIRED) +if(LIBICSNEO_ENABLE_DXX) list(APPEND PLATFORM_SRC - platform/ftd3xx.cpp + platform/dxx.cpp ) endif() @@ -384,12 +334,9 @@ endif() if(LIBICSNEO_ENABLE_CDCACM) target_compile_definitions(icsneocpp PRIVATE ICSNEO_ENABLE_CDCACM) endif() -if(LIBICSNEO_ENABLE_FTDI) - target_compile_definitions(icsneocpp PRIVATE ICSNEO_ENABLE_FTDI) -endif() -if(LIBICSNEO_ENABLE_FTD3XX) - target_compile_definitions(icsneocpp PRIVATE ICSNEO_ENABLE_FTD3XX) - target_link_libraries(icsneocpp PRIVATE FTD3XX::FTD3XX) +if(LIBICSNEO_ENABLE_DXX) + target_compile_definitions(icsneocpp PRIVATE ICSNEO_ENABLE_DXX) + target_link_libraries(icsneocpp PRIVATE libredxx::libredxx) endif() if(LIBICSNEO_ENABLE_TCP) target_compile_definitions(icsneocpp PRIVATE ICSNEO_ENABLE_TCP) @@ -403,25 +350,15 @@ add_subdirectory(third-party/fatfs) set_property(TARGET fatfs PROPERTY POSITION_INDEPENDENT_CODE ON) target_link_libraries(icsneocpp PRIVATE fatfs) -# libftdi -if(LIBICSNEO_ENABLE_FTDI) - if(NOT WIN32) - target_include_directories(icsneocpp PUBLIC third-party/libftdi/src) - set(LIBFTDI_DOCUMENTATION OFF CACHE INTERNAL "") - set(LIBFTDI_BUILD_TESTS OFF CACHE INTERNAL "") - set(LIBFTDI_INSTALL OFF CACHE INTERNAL "") - set(LIBFTDI_PYTHON_BINDINGS OFF CACHE INTERNAL "") - set(LIBFTDI_LINK_PYTHON_LIBRARY OFF CACHE INTERNAL "") - set(FTDIPP OFF CACHE INTERNAL "") - set(FTDI_EEPROM OFF CACHE INTERNAL "") - add_subdirectory(third-party/libftdi) - target_include_directories(icsneocpp PRIVATE ${LIBUSB_INCLUDE_DIR}) - - set_property(TARGET ftdi1-static PROPERTY POSITION_INDEPENDENT_CODE ON) - target_link_libraries(icsneocpp PUBLIC ftdi1-static) - target_link_libraries(icsneocpp PUBLIC ${CMAKE_THREAD_LIBS_INIT}) - endif(NOT WIN32) -endif(LIBICSNEO_ENABLE_FTDI) +# dxx +if(LIBICSNEO_ENABLE_DXX) + include(FetchContent) + FetchContent_Declare(libredxx + GIT_REPOSITORY https://github.com/Zeranoe/libredxx.git + GIT_TAG 2b7932fe7f2fc006ef269c7a72595f3940178a10 + ) + FetchContent_MakeAvailable(libredxx) +endif() # pcap if(LIBICSNEO_ENABLE_RAW_ETHERNET) diff --git a/api/icsneocpp/event.cpp b/api/icsneocpp/event.cpp index 6983b32..53984e2 100644 --- a/api/icsneocpp/event.cpp +++ b/api/icsneocpp/event.cpp @@ -28,7 +28,7 @@ std::string APIEvent::describe() const noexcept { ss << *device; // Makes use of device.describe() else ss << "API"; - + Severity severity = getSeverity(); if(severity == Severity::EventInfo) { ss << " Info: "; @@ -76,6 +76,7 @@ static constexpr const char* RESTRICTED_ENTRY_FLAG = "Attempted to set a restric static constexpr const char* NOT_SUPPORTED = "The requested feature is not supported."; static constexpr const char* FIXED_POINT_OVERFLOW = "Value is too large to convert to fixed point."; static constexpr const char* FIXED_POINT_PRECISION = "Value is too small for fixed point precision."; +static constexpr const char* SYSCALL_ERROR = "Error returned from syscall, check errno/GetLastError()."; // Device Errors static constexpr const char* POLLING_MESSAGE_OVERFLOW = "Too many messages have been recieved for the polling message buffer, some have been lost!"; @@ -116,7 +117,7 @@ static constexpr const char* ATOMIC_OPERATION_RETRIED = "An operation failed to static constexpr const char* ATOMIC_OPERATION_COMPLETED_NONATOMICALLY = "An ideally-atomic operation was completed nonatomically."; static constexpr const char* WIVI_STACK_REFRESH_FAILED = "The Wireless neoVI stack encountered a communication error."; static constexpr const char* WIVI_UPLOAD_STACK_OVERFLOW = "The Wireless neoVI upload stack has encountered an overflow condition."; -static constexpr const char* A2B_MESSAGE_INCOMPLETE_FRAME = "At least one of the frames of the A2B message does not contain samples for each channel and stream."; +static constexpr const char* A2B_MESSAGE_INCOMPLETE_FRAME = "At least one of the frames of the A2B message does not contain samples for each channel and stream."; static constexpr const char* COREMINI_UPLOAD_VERSION_MISMATCH = "The version of the coremini engine on the device and the script uploaded are not the same."; static constexpr const char* DISK_NOT_CONNECTED = "The program tried to access a disk that is not connected."; static constexpr const char* UNEXPECTED_RESPONSE = "Received an unexpected or invalid response from the device."; @@ -146,41 +147,6 @@ static constexpr const char* ERROR_SETTING_SOCKET_OPTION = "A call to setsockopt static constexpr const char* GETIFADDRS_ERROR = "A call to getifaddrs() failed."; static constexpr const char* SEND_TO_ERROR = "A call to sendto() failed."; -// FTD3XX -static constexpr const char* FT_OK = "FTD3XX success."; -static constexpr const char* FT_INVALID_HANDLE = "Invalid FTD3XX handle."; -static constexpr const char* FT_DEVICE_NOT_FOUND = "FTD3XX device not found."; -static constexpr const char* FT_DEVICE_NOT_OPENED = "FTD3XX device not opened."; -static constexpr const char* FT_IO_ERROR = "FTD3XX IO error."; -static constexpr const char* FT_INSUFFICIENT_RESOURCES = "Insufficient resources for FTD3XX."; -static constexpr const char* FT_INVALID_PARAMETER = "Invalid FTD3XX parameter."; -static constexpr const char* FT_INVALID_BAUD_RATE = "Invalid FTD3XX baud rate."; -static constexpr const char* FT_DEVICE_NOT_OPENED_FOR_ERASE = "FTD3XX device not opened for erase."; -static constexpr const char* FT_DEVICE_NOT_OPENED_FOR_WRITE = "FTD3XX not opened for write."; -static constexpr const char* FT_FAILED_TO_WRITE_DEVICE = "FTD3XX failed to write device."; -static constexpr const char* FT_EEPROM_READ_FAILED = "FTD3XX EEPROM read failed."; -static constexpr const char* FT_EEPROM_WRITE_FAILED = "FTD3XX EEPROM write failed."; -static constexpr const char* FT_EEPROM_ERASE_FAILED = "FTD3XX EEPROM erase failed."; -static constexpr const char* FT_EEPROM_NOT_PRESENT = "FTD3XX EEPROM not present."; -static constexpr const char* FT_EEPROM_NOT_PROGRAMMED = "FTD3XX EEPROM not programmed."; -static constexpr const char* FT_INVALID_ARGS = "Invalid FTD3XX arguments."; -static constexpr const char* FT_NOT_SUPPORTED = "FTD3XX not supported."; -static constexpr const char* FT_NO_MORE_ITEMS = "No more FTD3XX items."; -static constexpr const char* FT_TIMEOUT = "FTD3XX timeout."; -static constexpr const char* FT_OPERATION_ABORTED = "FTD3XX operation aborted."; -static constexpr const char* FT_RESERVED_PIPE = "Reserved FTD3XX pipe."; -static constexpr const char* FT_INVALID_CONTROL_REQUEST_DIRECTION = "Invalid FTD3XX control request direction."; -static constexpr const char* FT_INVALID_CONTROL_REQUEST_TYPE = "Invalid FTD3XX control request type."; -static constexpr const char* FT_IO_PENDING = "FTD3XX IO pending."; -static constexpr const char* FT_IO_INCOMPLETE = "FTD3XX IO incomplete."; -static constexpr const char* FT_HANDLE_EOF = "Handle FTD3XX EOF."; -static constexpr const char* FT_BUSY = "FTD3XX busy."; -static constexpr const char* FT_NO_SYSTEM_RESOURCES = "No FTD3XX system resources."; -static constexpr const char* FT_DEVICE_LIST_NOT_READY = "FTD3XX device list not ready."; -static constexpr const char* FT_DEVICE_NOT_CONNECTED = "FTD3XX device not connected."; -static constexpr const char* FT_INCORRECT_DEVICE_PATH = "Incorrect FTD3XX device path."; -static constexpr const char* FT_OTHER_ERROR = "Other FTD3XX error."; - // VSA static constexpr const char* VSA_BUFFER_CORRUPTED = "VSA data in record buffer is corrupted."; static constexpr const char* VSA_TIMESTAMP_NOT_FOUND = "Unable to find a VSA record with a valid timestamp."; @@ -203,6 +169,13 @@ static constexpr const char* SERVD_POLL_ERROR = "Error polling on Servd socket"; static constexpr const char* SERVD_NODATA_ERROR = "No data received from Servd"; static constexpr const char* SERVD_JOIN_MULTICAST_ERROR = "Error joining Servd multicast group"; +// DXX +static constexpr const char* DXX_ERROR_SYS = "System error, check errno/GetLastError()"; +static constexpr const char* DXX_ERROR_INT = "DXX interrupt called"; +static constexpr const char* DXX_ERROR_OVERFLOW = "Overflow in DXX"; +static constexpr const char* DXX_ERROR_IO = "I/O failure in DXX"; +static constexpr const char* DXX_ERROR_ARG = "Invalid arg passed to DXX"; + static constexpr const char* TOO_MANY_EVENTS = "Too many events have occurred. The list has been truncated."; static constexpr const char* UNKNOWN = "An unknown internal error occurred."; static constexpr const char* INVALID = "An invalid internal error occurred."; @@ -250,6 +223,8 @@ const char* APIEvent::DescriptionForType(Type type) { return FIXED_POINT_OVERFLOW; case Type::FixedPointPrecision: return FIXED_POINT_PRECISION; + case Type::SyscallError: + return SYSCALL_ERROR; // Device Errors case Type::PollingMessageOverflow: @@ -379,74 +354,6 @@ const char* APIEvent::DescriptionForType(Type type) { return DISK_FORMAT_NOT_SUPPORTED; case Type::DiskFormatInvalidCount: return DISK_FORMAT_INVALID_COUNT; - - // FTD3XX - case Type::FTOK: - return FT_OK; - case Type::FTInvalidHandle: - return FT_INVALID_HANDLE; - case Type::FTDeviceNotFound: - return FT_DEVICE_NOT_FOUND; - case Type::FTDeviceNotOpened: - return FT_DEVICE_NOT_OPENED; - case Type::FTIOError: - return FT_IO_ERROR; - case Type::FTInsufficientResources: - return FT_INSUFFICIENT_RESOURCES; - case Type::FTInvalidParameter: - return FT_INVALID_PARAMETER; - case Type::FTInvalidBaudRate: - return FT_INVALID_BAUD_RATE; - case Type::FTDeviceNotOpenedForErase: - return FT_DEVICE_NOT_OPENED_FOR_ERASE; - case Type::FTDeviceNotOpenedForWrite: - return FT_DEVICE_NOT_OPENED_FOR_WRITE; - case Type::FTFailedToWriteDevice: - return FT_FAILED_TO_WRITE_DEVICE; - case Type::FTEEPROMReadFailed: - return FT_EEPROM_READ_FAILED; - case Type::FTEEPROMWriteFailed: - return FT_EEPROM_WRITE_FAILED; - case Type::FTEEPROMEraseFailed: - return FT_EEPROM_ERASE_FAILED; - case Type::FTEEPROMNotPresent: - return FT_EEPROM_NOT_PRESENT; - case Type::FTEEPROMNotProgrammed: - return FT_EEPROM_NOT_PROGRAMMED; - case Type::FTInvalidArgs: - return FT_INVALID_ARGS; - case Type::FTNotSupported: - return FT_NOT_SUPPORTED; - case Type::FTNoMoreItems: - return FT_NO_MORE_ITEMS; - case Type::FTTimeout: - return FT_TIMEOUT; - case Type::FTOperationAborted: - return FT_OPERATION_ABORTED; - case Type::FTReservedPipe: - return FT_RESERVED_PIPE; - case Type::FTInvalidControlRequestDirection: - return FT_INVALID_CONTROL_REQUEST_DIRECTION; - case Type::FTInvalidControlRequestType: - return FT_INVALID_CONTROL_REQUEST_TYPE; - case Type::FTIOPending: - return FT_IO_PENDING; - case Type::FTIOIncomplete: - return FT_IO_INCOMPLETE; - case Type::FTHandleEOF: - return FT_HANDLE_EOF; - case Type::FTBusy: - return FT_BUSY; - case Type::FTNoSystemResources: - return FT_NO_SYSTEM_RESOURCES; - case Type::FTDeviceListNotReady: - return FT_DEVICE_LIST_NOT_READY; - case Type::FTDeviceNotConnected: - return FT_DEVICE_NOT_CONNECTED; - case Type::FTIncorrectDevicePath: - return FT_INCORRECT_DEVICE_PATH; - case Type::FTOtherError: - return FT_OTHER_ERROR; // VSA case Type::VSABufferCorrupted: @@ -488,6 +395,18 @@ const char* APIEvent::DescriptionForType(Type type) { case Type::ServdJoinMulticastError: return SERVD_JOIN_MULTICAST_ERROR; + // DXX + case Type::DXXErrorSys: + return DXX_ERROR_SYS; + case Type::DXXErrorInt: + return DXX_ERROR_INT; + case Type::DXXErrorOverflow: + return DXX_ERROR_OVERFLOW; + case Type::DXXErrorIO: + return DXX_ERROR_IO; + case Type::DXXErrorArg: + return DXX_ERROR_ARG; + // Other Errors case Type::TooManyEvents: return TOO_MANY_EVENTS; @@ -501,7 +420,7 @@ const char* APIEvent::DescriptionForType(Type type) { bool EventFilter::match(const APIEvent& event) const noexcept { if(type != APIEvent::Type::Any && type != event.getType()) return false; - + if(matchOnDevicePtr && !event.isForDevice(device)) return false; diff --git a/api/icsneolegacy/dllhelper/icsneo40DLLAPI.h b/api/icsneolegacy/dllhelper/icsneo40DLLAPI.h index bbd0c43..557798b 100644 --- a/api/icsneolegacy/dllhelper/icsneo40DLLAPI.h +++ b/api/icsneolegacy/dllhelper/icsneo40DLLAPI.h @@ -1,5 +1,7 @@ //FILE: icsneo40DLLAPI.H +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include #include "icsneo/icsnVC40.h" diff --git a/bindings/python/icsneopy/api/event.cpp b/bindings/python/icsneopy/api/event.cpp index 18f1b0d..8bc18d9 100644 --- a/bindings/python/icsneopy/api/event.cpp +++ b/bindings/python/icsneopy/api/event.cpp @@ -28,6 +28,9 @@ void init_event(pybind11::module_& m) { .value("WiVINotSupported", APIEvent::Type::WiVINotSupported) .value("RestrictedEntryFlag", APIEvent::Type::RestrictedEntryFlag) .value("NotSupported", APIEvent::Type::NotSupported) + .value("FixedPointOverflow", APIEvent::Type::FixedPointOverflow) + .value("FixedPointPrecision", APIEvent::Type::FixedPointPrecision) + .value("SyscallError", APIEvent::Type::SyscallError) .value("PollingMessageOverflow", APIEvent::Type::PollingMessageOverflow) .value("NoSerialNumber", APIEvent::Type::NoSerialNumber) .value("IncorrectSerialNumber", APIEvent::Type::IncorrectSerialNumber) @@ -36,8 +39,6 @@ void init_event(pybind11::module_& m) { .value("SettingsLengthError", APIEvent::Type::SettingsLengthError) .value("SettingsChecksumError", APIEvent::Type::SettingsChecksumError) .value("SettingsNotAvailable", APIEvent::Type::SettingsNotAvailable) - .value("DiskFormatNotSupported", APIEvent::Type::DiskFormatNotSupported) - .value("DiskFormatInvalidCount", APIEvent::Type::DiskFormatInvalidCount) .value("SettingsReadOnly", APIEvent::Type::SettingsReadOnly) .value("CANSettingsNotAvailable", APIEvent::Type::CANSettingsNotAvailable) .value("CANFDSettingsNotAvailable", APIEvent::Type::CANFDSettingsNotAvailable) @@ -86,6 +87,10 @@ void init_event(pybind11::module_& m) { .value("LINSettingsNotAvailable", APIEvent::Type::LINSettingsNotAvailable) .value("ModeNotFound", APIEvent::Type::ModeNotFound) .value("AppErrorParsingFailed", APIEvent::Type::AppErrorParsingFailed) + .value("GPTPNotSupported", APIEvent::Type::GPTPNotSupported) + .value("SettingNotAvaiableDevice", APIEvent::Type::SettingNotAvaiableDevice) + .value("DiskFormatNotSupported", APIEvent::Type::DiskFormatNotSupported) + .value("DiskFormatInvalidCount", APIEvent::Type::DiskFormatInvalidCount) .value("FailedToRead", APIEvent::Type::FailedToRead) .value("FailedToWrite", APIEvent::Type::FailedToWrite) .value("DriverFailedToOpen", APIEvent::Type::DriverFailedToOpen) @@ -102,39 +107,6 @@ void init_event(pybind11::module_& m) { .value("GetIfAddrsError", APIEvent::Type::GetIfAddrsError) .value("SendToError", APIEvent::Type::SendToError) .value("MDIOMessageExceedsMaxLength", APIEvent::Type::MDIOMessageExceedsMaxLength) - .value("FTOK", APIEvent::Type::FTOK) - .value("FTInvalidHandle", APIEvent::Type::FTInvalidHandle) - .value("FTDeviceNotFound", APIEvent::Type::FTDeviceNotFound) - .value("FTDeviceNotOpened", APIEvent::Type::FTDeviceNotOpened) - .value("FTIOError", APIEvent::Type::FTIOError) - .value("FTInsufficientResources", APIEvent::Type::FTInsufficientResources) - .value("FTInvalidParameter", APIEvent::Type::FTInvalidParameter) - .value("FTInvalidBaudRate", APIEvent::Type::FTInvalidBaudRate) - .value("FTDeviceNotOpenedForErase", APIEvent::Type::FTDeviceNotOpenedForErase) - .value("FTDeviceNotOpenedForWrite", APIEvent::Type::FTDeviceNotOpenedForWrite) - .value("FTFailedToWriteDevice", APIEvent::Type::FTFailedToWriteDevice) - .value("FTEEPROMReadFailed", APIEvent::Type::FTEEPROMReadFailed) - .value("FTEEPROMWriteFailed", APIEvent::Type::FTEEPROMWriteFailed) - .value("FTEEPROMEraseFailed", APIEvent::Type::FTEEPROMEraseFailed) - .value("FTEEPROMNotPresent", APIEvent::Type::FTEEPROMNotPresent) - .value("FTEEPROMNotProgrammed", APIEvent::Type::FTEEPROMNotProgrammed) - .value("FTInvalidArgs", APIEvent::Type::FTInvalidArgs) - .value("FTNotSupported", APIEvent::Type::FTNotSupported) - .value("FTNoMoreItems", APIEvent::Type::FTNoMoreItems) - .value("FTTimeout", APIEvent::Type::FTTimeout) - .value("FTOperationAborted", APIEvent::Type::FTOperationAborted) - .value("FTReservedPipe", APIEvent::Type::FTReservedPipe) - .value("FTInvalidControlRequestDirection", APIEvent::Type::FTInvalidControlRequestDirection) - .value("FTInvalidControlRequestType", APIEvent::Type::FTInvalidControlRequestType) - .value("FTIOPending", APIEvent::Type::FTIOPending) - .value("FTIOIncomplete", APIEvent::Type::FTIOIncomplete) - .value("FTHandleEOF", APIEvent::Type::FTHandleEOF) - .value("FTBusy", APIEvent::Type::FTBusy) - .value("FTNoSystemResources", APIEvent::Type::FTNoSystemResources) - .value("FTDeviceListNotReady", APIEvent::Type::FTDeviceListNotReady) - .value("FTDeviceNotConnected", APIEvent::Type::FTDeviceNotConnected) - .value("FTIncorrectDevicePath", APIEvent::Type::FTIncorrectDevicePath) - .value("FTOtherError", APIEvent::Type::FTOtherError) .value("VSABufferCorrupted", APIEvent::Type::VSABufferCorrupted) .value("VSATimestampNotFound", APIEvent::Type::VSATimestampNotFound) .value("VSABufferFormatError", APIEvent::Type::VSABufferFormatError) @@ -142,18 +114,32 @@ void init_event(pybind11::module_& m) { .value("VSAByteParseFailure", APIEvent::Type::VSAByteParseFailure) .value("VSAExtendedMessageError", APIEvent::Type::VSAExtendedMessageError) .value("VSAOtherError", APIEvent::Type::VSAOtherError) + .value("ServdBindError", APIEvent::Type::ServdBindError) + .value("ServdNonblockError", APIEvent::Type::ServdNonblockError) + .value("ServdTransceiveError", APIEvent::Type::ServdTransceiveError) + .value("ServdOutdatedError", APIEvent::Type::ServdOutdatedError) + .value("ServdInvalidResponseError", APIEvent::Type::ServdInvalidResponseError) + .value("ServdLockError", APIEvent::Type::ServdLockError) + .value("ServdSendError", APIEvent::Type::ServdSendError) + .value("ServdRecvError", APIEvent::Type::ServdRecvError) + .value("ServdPollError", APIEvent::Type::ServdPollError) + .value("ServdNoDataError", APIEvent::Type::ServdNoDataError) + .value("ServdJoinMulticastError", APIEvent::Type::ServdJoinMulticastError) + .value("DXXErrorSys", APIEvent::Type::DXXErrorSys) + .value("DXXErrorInt", APIEvent::Type::DXXErrorInt) + .value("DXXErrorOverflow", APIEvent::Type::DXXErrorOverflow) + .value("DXXErrorIO", APIEvent::Type::DXXErrorIO) + .value("DXXErrorArg", APIEvent::Type::DXXErrorArg) .value("NoErrorFound", APIEvent::Type::NoErrorFound) .value("TooManyEvents", APIEvent::Type::TooManyEvents) - .value("Unknown", APIEvent::Type::Unknown) - .value("FixedPointOverflow", APIEvent::Type::FixedPointOverflow) - .value("FixedPointPrecision", APIEvent::Type::FixedPointPrecision); - - pybind11::enum_(apiEvent, "Severity") + .value("Unknown", APIEvent::Type::Unknown); + + pybind11::enum_(apiEvent, "Severity") .value("Any", APIEvent::Severity::Any) .value("EventInfo", APIEvent::Severity::EventInfo) .value("EventWarning", APIEvent::Severity::EventWarning) .value("Error", APIEvent::Severity::Error); - + apiEvent .def("get_type", &APIEvent::getType) .def("get_severity", &APIEvent::getSeverity) @@ -170,5 +156,5 @@ void init_event(pybind11::module_& m) { .def_readwrite("serial", &EventFilter::serial); } -} // namespace icsneo +} // namespace icsneo diff --git a/ci/bootstrap-libusb.sh b/ci/bootstrap-libusb.sh deleted file mode 100644 index 9e9987f..0000000 --- a/ci/bootstrap-libusb.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -VERSION="1.0.27" -ROOT="$PWD/libusb" -SOURCE="$ROOT/source" -BUILD="$ROOT/build" -INSTALL="$ROOT/install" - -mkdir -p "$ROOT" -cd "$ROOT" || exit 1 - -curl -LO "https://github.com/libusb/libusb/releases/download/v$VERSION/libusb-$VERSION.tar.bz2" || exit 1 -tar -xf "libusb-$VERSION.tar.bz2" || exit 1 -mv "libusb-$VERSION" "$SOURCE" || exit 1 - -mkdir "$BUILD" || exit 1 -cd "$BUILD" || exit 1 -"$SOURCE/configure" --prefix="$INSTALL" --disable-shared --disable-udev --disable-eventfd --disable-timerfd --with-pic || exit 1 -make || exit 1 -make install || exit 1 - diff --git a/cmake/FindFTD3XX.cmake b/cmake/FindFTD3XX.cmake deleted file mode 100644 index 78a13c5..0000000 --- a/cmake/FindFTD3XX.cmake +++ /dev/null @@ -1,22 +0,0 @@ -find_path(FTD3XX_INCLUDE_DIR - NAMES ftd3xx.h FTD3XX.h -) - -find_library(FTD3XX_LIBRARY - NAMES libftd3xx.a libftd3xx-static.a FTD3XX.lib - PATH_SUFFIXES x64/Static -) - -mark_as_advanced(FTD3XX_FOUND FTD3XX_INCLUDE_DIR FTD3XX_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(FTD3XX - REQUIRED_VARS FTD3XX_INCLUDE_DIR FTD3XX_LIBRARY -) -if(FTD3XX_FOUND AND NOT TARGET D3XX::D3XX) - add_library(FTD3XX::FTD3XX INTERFACE IMPORTED) - set_target_properties(FTD3XX::FTD3XX PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${FTD3XX_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "${FTD3XX_LIBRARY}" - ) -endif() diff --git a/device/devicefinder.cpp b/device/devicefinder.cpp index 1e7f976..cad92e2 100644 --- a/device/devicefinder.cpp +++ b/device/devicefinder.cpp @@ -16,12 +16,8 @@ #include "icsneo/platform/cdcacm.h" #endif -#ifdef ICSNEO_ENABLE_FTDI -#include "icsneo/platform/ftdi.h" -#endif - -#ifdef ICSNEO_ENABLE_FTD3XX -#include "icsneo/platform/ftd3xx.h" +#ifdef ICSNEO_ENABLE_DXX +#include "icsneo/platform/dxx.h" #endif #ifdef ICSNEO_ENABLE_TCP @@ -83,12 +79,8 @@ std::vector> DeviceFinder::FindAll() { CDCACM::Find(newDriverFoundDevices); #endif - #ifdef ICSNEO_ENABLE_FTDI - FTDI::Find(newDriverFoundDevices); - #endif - - #ifdef ICSNEO_ENABLE_FTD3XX - FTD3XX::Find(newDriverFoundDevices); + #ifdef ICSNEO_ENABLE_DXX + DXX::Find(newDriverFoundDevices); #endif } diff --git a/docs/icsneocpp/installation.rst b/docs/icsneocpp/installation.rst index 8927a83..8c2291a 100644 --- a/docs/icsneocpp/installation.rst +++ b/docs/icsneocpp/installation.rst @@ -8,7 +8,7 @@ Dependencies The minimum requirements to build libicsneo are: - CMake version 3.12 or newer - A C++17 compiler -- libusb and libpcap on Linux and macOS +- libpcap on Linux and macOS Building library & examples diff --git a/examples/c/interactive/README.md b/examples/c/interactive/README.md index 53b15ca..d7dcc82 100644 --- a/examples/c/interactive/README.md +++ b/examples/c/interactive/README.md @@ -52,7 +52,7 @@ Although the example program will build without successfully completing the step First, we are going to build the icsneoc library into a .so file that we can later use in order to access the library functions. -1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libusb-1.0-0-dev libpcap0.8-dev` +1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libpcap0.8-dev` 2. Change directories to `libicsneo-examples/third-party/libicsneo` and create a build directory by running `mkdir -p build` 3. Enter the build directory with `cd build` 4. Run `cmake ..` to generate your Makefile. diff --git a/examples/c/legacy/README.md b/examples/c/legacy/README.md index 53b15ca..d7dcc82 100644 --- a/examples/c/legacy/README.md +++ b/examples/c/legacy/README.md @@ -52,7 +52,7 @@ Although the example program will build without successfully completing the step First, we are going to build the icsneoc library into a .so file that we can later use in order to access the library functions. -1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libusb-1.0-0-dev libpcap0.8-dev` +1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libpcap0.8-dev` 2. Change directories to `libicsneo-examples/third-party/libicsneo` and create a build directory by running `mkdir -p build` 3. Enter the build directory with `cd build` 4. Run `cmake ..` to generate your Makefile. diff --git a/examples/c/simple/README.md b/examples/c/simple/README.md index 53b15ca..d7dcc82 100644 --- a/examples/c/simple/README.md +++ b/examples/c/simple/README.md @@ -52,7 +52,7 @@ Although the example program will build without successfully completing the step First, we are going to build the icsneoc library into a .so file that we can later use in order to access the library functions. -1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libusb-1.0-0-dev libpcap0.8-dev` +1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libpcap0.8-dev` 2. Change directories to `libicsneo-examples/third-party/libicsneo` and create a build directory by running `mkdir -p build` 3. Enter the build directory with `cd build` 4. Run `cmake ..` to generate your Makefile. diff --git a/examples/cpp/interactive/README.md b/examples/cpp/interactive/README.md index fa25980..895ed54 100644 --- a/examples/cpp/interactive/README.md +++ b/examples/cpp/interactive/README.md @@ -32,7 +32,7 @@ If you haven't done this, `third-party/libicsneo` will be empty and you won't be ### Ubuntu 18.04 LTS -1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libusb-1.0-0-dev libpcap0.8-dev` +1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libpcap0.8-dev` 2. Change directories to your `libicsneo-examples/libicsneocpp-example` folder and create a build directory by running `mkdir -p build` 3. Enter the build directory with `cd build` 4. Run `cmake ..` to generate your Makefile. diff --git a/examples/cpp/simple/README.md b/examples/cpp/simple/README.md index 2003d4d..6707f14 100644 --- a/examples/cpp/simple/README.md +++ b/examples/cpp/simple/README.md @@ -32,7 +32,7 @@ If you haven't done this, `third-party/libicsneo` will be empty and you won't be ### Ubuntu 18.04 LTS -1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libusb-1.0-0-dev libpcap0.8-dev` +1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libpcap0.8-dev` 2. Change directories to your `libicsneo-examples/libicsneocpp-example` folder and create a build directory by running `mkdir -p build` 3. Enter the build directory with `cd build` 4. Run `cmake ..` to generate your Makefile. diff --git a/include/icsneo/api/event.h b/include/icsneo/api/event.h index 9aa7fee..7b45c87 100644 --- a/include/icsneo/api/event.h +++ b/include/icsneo/api/event.h @@ -53,6 +53,7 @@ public: NotSupported = 0x1017, FixedPointOverflow = 0x1018, FixedPointPrecision = 0x1019, + SyscallError = 0x1020, // check errno/GetLastError() for details // Device Events PollingMessageOverflow = 0x2000, @@ -134,41 +135,6 @@ public: SendToError = 0x3109, MDIOMessageExceedsMaxLength = 0x3110, - // FTD3XX - FTOK = 0x4000, // placeholder - FTInvalidHandle = FTOK + 1, - FTDeviceNotFound = FTOK + 2, - FTDeviceNotOpened = FTOK + 3, - FTIOError = FTOK + 4, - FTInsufficientResources = FTOK + 5, - FTInvalidParameter = FTOK + 6, - FTInvalidBaudRate = FTOK + 7, - FTDeviceNotOpenedForErase = FTOK + 8, - FTDeviceNotOpenedForWrite = FTOK + 9, - FTFailedToWriteDevice = FTOK + 10, - FTEEPROMReadFailed = FTOK + 11, - FTEEPROMWriteFailed = FTOK + 12, - FTEEPROMEraseFailed = FTOK + 13, - FTEEPROMNotPresent = FTOK + 14, - FTEEPROMNotProgrammed = FTOK + 15, - FTInvalidArgs = FTOK + 16, - FTNotSupported = FTOK + 17, - FTNoMoreItems = FTOK + 18, - FTTimeout = FTOK + 19, - FTOperationAborted = FTOK + 20, - FTReservedPipe = FTOK + 21, - FTInvalidControlRequestDirection = FTOK + 22, - FTInvalidControlRequestType = FTOK + 23, - FTIOPending = FTOK + 24, - FTIOIncomplete = FTOK + 25, - FTHandleEOF = FTOK + 26, - FTBusy = FTOK + 27, - FTNoSystemResources = FTOK + 28, - FTDeviceListNotReady = FTOK + 29, - FTDeviceNotConnected = FTOK + 30, - FTIncorrectDevicePath = FTOK + 31, - FTOtherError = FTOK + 32, - // VSA VSABufferCorrupted = 0x5000, VSATimestampNotFound = VSABufferCorrupted + 1, @@ -191,6 +157,13 @@ public: ServdNoDataError = ServdBindError + 9, ServdJoinMulticastError = ServdBindError + 10, + // DXX + DXXErrorSys = 0x6100, + DXXErrorInt = 0x6101, + DXXErrorOverflow = 0x6102, + DXXErrorIO = 0x6103, + DXXErrorArg = 0x6104, + NoErrorFound = 0xFFFFFFFD, TooManyEvents = 0xFFFFFFFE, Unknown = 0xFFFFFFFF diff --git a/include/icsneo/api/eventcallback.h b/include/icsneo/api/eventcallback.h index 8ad20ca..2dab1a9 100644 --- a/include/icsneo/api/eventcallback.h +++ b/include/icsneo/api/eventcallback.h @@ -20,7 +20,7 @@ public: EventCallback(std::shared_ptr f, fn_eventCallback cb) : callback(cb), filter(f) {} EventCallback(EventFilter f, fn_eventCallback cb) : callback(cb), filter(std::make_shared(f)) {} - virtual bool callIfMatch(const std::shared_ptr& event) const { + bool callIfMatch(const std::shared_ptr& event) const { bool ret = filter->match(*event); if(ret) callback(event); diff --git a/include/icsneo/device/tree/neovifire/neovifire.h b/include/icsneo/device/tree/neovifire/neovifire.h index 5f5fcef..f1562ca 100644 --- a/include/icsneo/device/tree/neovifire/neovifire.h +++ b/include/icsneo/device/tree/neovifire/neovifire.h @@ -11,7 +11,7 @@ namespace icsneo { class NeoVIFIRE : public Device { public: - // USB PID is 0x0701, standard driver is FTDI + // USB PID is 0x0701, standard driver is DXX ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIFIRE, DeviceType::FIRE, 0x0701); static const std::vector& GetSupportedNetworks() { diff --git a/include/icsneo/device/tree/neovifire2/neovifire2.h b/include/icsneo/device/tree/neovifire2/neovifire2.h index 7eedbd6..79a6d0e 100644 --- a/include/icsneo/device/tree/neovifire2/neovifire2.h +++ b/include/icsneo/device/tree/neovifire2/neovifire2.h @@ -12,7 +12,7 @@ namespace icsneo { class NeoVIFIRE2 : public Device { public: // Serial numbers start with CY - // USB PID is 0x1000, standard driver is FTDI + // USB PID is 0x1000, standard driver is DXX // Ethernet MAC allocation is 0x04, standard driver is Raw ICSNEO_FINDABLE_DEVICE(NeoVIFIRE2, DeviceType::FIRE2, "CY"); diff --git a/include/icsneo/device/tree/plasion/neoviion.h b/include/icsneo/device/tree/plasion/neoviion.h index b3896f3..432c28c 100644 --- a/include/icsneo/device/tree/plasion/neoviion.h +++ b/include/icsneo/device/tree/plasion/neoviion.h @@ -12,7 +12,7 @@ namespace icsneo { class NeoVIION : public Plasion { public: - // USB PID is 0x0901, standard driver is FTDI + // USB PID is 0x0901, standard driver is DXX ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIION, DeviceType::ION, 0x0901); private: diff --git a/include/icsneo/device/tree/plasion/neoviplasma.h b/include/icsneo/device/tree/plasion/neoviplasma.h index 3f8f629..89af1bb 100644 --- a/include/icsneo/device/tree/plasion/neoviplasma.h +++ b/include/icsneo/device/tree/plasion/neoviplasma.h @@ -10,7 +10,7 @@ namespace icsneo { class NeoVIPLASMA : public Plasion { public: - // USB PID is 0x0801, standard driver is FTDI + // USB PID is 0x0801, standard driver is DXX ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIPLASMA, DeviceType::PLASMA, 0x0801); private: diff --git a/include/icsneo/device/tree/rada2b/rada2b.h b/include/icsneo/device/tree/rada2b/rada2b.h index 16972be..2a1dfb9 100644 --- a/include/icsneo/device/tree/rada2b/rada2b.h +++ b/include/icsneo/device/tree/rada2b/rada2b.h @@ -15,7 +15,7 @@ namespace icsneo { class RADA2B : public Device { public: // Serial numbers start with AB - // USB PID is 0x0006, standard driver is FTDI + // USB PID is 0x0006, standard driver is DXX // Ethernet MAC allocation is 0x18, standard driver is Raw ICSNEO_FINDABLE_DEVICE(RADA2B, DeviceType::RAD_A2B, "AB"); diff --git a/include/icsneo/device/tree/radcomet/radcomet.h b/include/icsneo/device/tree/radcomet/radcomet.h index 4a15086..4a8080c 100644 --- a/include/icsneo/device/tree/radcomet/radcomet.h +++ b/include/icsneo/device/tree/radcomet/radcomet.h @@ -12,7 +12,7 @@ class RADComet : public RADCometBase { public: // Serial numbers start with RC - // USB PID is 0x1207, standard driver is FTDI3 + // USB PID is 0x1207, standard driver is DXX // Ethernet MAC allocation is 0x1D, standard driver is Raw ICSNEO_FINDABLE_DEVICE_BY_SERIAL_RANGE(RADComet, DeviceType::RADComet, "RC0000", "RC0299"); diff --git a/include/icsneo/device/tree/radcomet/radcomet2.h b/include/icsneo/device/tree/radcomet/radcomet2.h index ca2c238..f05f1db 100644 --- a/include/icsneo/device/tree/radcomet/radcomet2.h +++ b/include/icsneo/device/tree/radcomet/radcomet2.h @@ -12,7 +12,7 @@ class RADComet2 : public RADCometBase { public: // Serial numbers start with RC, Comet2 starts at RC0300 - // USB PID is 0x1207, standard driver is FTDI3 + // USB PID is 0x1207, standard driver is DXX // Ethernet MAC allocation is 0x1D, standard driver is Raw ICSNEO_FINDABLE_DEVICE_BY_SERIAL_RANGE(RADComet2, DeviceType::RADComet, "RC0300", "RCZZZZ"); diff --git a/include/icsneo/device/tree/radcomet3/radcomet3.h b/include/icsneo/device/tree/radcomet3/radcomet3.h index 14cfc11..fa8af46 100644 --- a/include/icsneo/device/tree/radcomet3/radcomet3.h +++ b/include/icsneo/device/tree/radcomet3/radcomet3.h @@ -12,7 +12,7 @@ class RADComet3 : public Device { public: // Serial numbers start with C3 - // USB PID is 0x1208, standard driver is FTDI3 + // USB PID is 0x1208, standard driver is DXX // Ethernet MAC allocation is 0x20, standard driver is Raw ICSNEO_FINDABLE_DEVICE(RADComet3, DeviceType::RADComet3, "C3"); diff --git a/include/icsneo/device/tree/radgigastar/radgigastar.h b/include/icsneo/device/tree/radgigastar/radgigastar.h index 00dce12..ae2d976 100644 --- a/include/icsneo/device/tree/radgigastar/radgigastar.h +++ b/include/icsneo/device/tree/radgigastar/radgigastar.h @@ -14,7 +14,7 @@ namespace icsneo { class RADGigastar : public Device { public: // Serial numbers start with GS - // USB PID is 0x1204, standard driver is FTDI3 + // USB PID is 0x1204, standard driver is DXX // Ethernet MAC allocation is 0x0F, standard driver is Raw ICSNEO_FINDABLE_DEVICE(RADGigastar, DeviceType::RADGigastar, "GS"); diff --git a/include/icsneo/device/tree/radgigastar2/radgigastar2.h b/include/icsneo/device/tree/radgigastar2/radgigastar2.h index 9d5ed85..723a062 100644 --- a/include/icsneo/device/tree/radgigastar2/radgigastar2.h +++ b/include/icsneo/device/tree/radgigastar2/radgigastar2.h @@ -16,7 +16,7 @@ namespace icsneo { public: // Serial numbers start with GT - // USB PID is 0x1210, standard driver is FTDI3 + // USB PID is 0x1210, standard driver is DXX // Ethernet MAC allocation is 0x22, standard driver is Raw ICSNEO_FINDABLE_DEVICE(RADGigastar2, DeviceType::RADGigastar2, "GT"); diff --git a/include/icsneo/device/tree/radmars/radmars.h b/include/icsneo/device/tree/radmars/radmars.h index 4f318a0..d0e5fbe 100644 --- a/include/icsneo/device/tree/radmars/radmars.h +++ b/include/icsneo/device/tree/radmars/radmars.h @@ -14,7 +14,7 @@ namespace icsneo { class RADMars : public Device { public: // Serial numbers start with GL (previously, RAD-Gigalog) - // USB PID is 0x1203, standard driver is FTDI3 + // USB PID is 0x1203, standard driver is DXX // Ethernet MAC allocation is 0x0A, standard driver is Raw ICSNEO_FINDABLE_DEVICE(RADMars, DeviceType::RADMars, "GL"); diff --git a/include/icsneo/device/tree/radmoon2/radmoon2.h b/include/icsneo/device/tree/radmoon2/radmoon2.h index 7f7919b..5133735 100644 --- a/include/icsneo/device/tree/radmoon2/radmoon2.h +++ b/include/icsneo/device/tree/radmoon2/radmoon2.h @@ -11,7 +11,7 @@ namespace icsneo { class RADMoon2 : public RADMoon2Base { public: // Serial numbers start with RM - // USB PID is 0x1202, standard driver is FTDI3 + // USB PID is 0x1202, standard driver is DXX ICSNEO_FINDABLE_DEVICE(RADMoon2, DeviceType::RADMoon2, "RM"); uint8_t getPhyAddrOrPort() const override { return 6; }; diff --git a/include/icsneo/device/tree/radmoont1s/radmoont1s.h b/include/icsneo/device/tree/radmoont1s/radmoont1s.h index 64cbeb9..5ab376f 100644 --- a/include/icsneo/device/tree/radmoont1s/radmoont1s.h +++ b/include/icsneo/device/tree/radmoont1s/radmoont1s.h @@ -12,7 +12,7 @@ class RADMoonT1S : public Device { public: // Serial numbers start with MS - // USB PID is 0x1209, standard driver is FTDI3 + // USB PID is 0x1209, standard driver is DXX // Ethernet MAC allocation is 0x21, standard driver is Raw ICSNEO_FINDABLE_DEVICE(RADMoonT1S, DeviceType::RADMoonT1S, "MS"); diff --git a/include/icsneo/device/tree/radstar2/radstar2.h b/include/icsneo/device/tree/radstar2/radstar2.h index 27d1663..f511957 100644 --- a/include/icsneo/device/tree/radstar2/radstar2.h +++ b/include/icsneo/device/tree/radstar2/radstar2.h @@ -12,7 +12,7 @@ namespace icsneo { class RADStar2 : public Device { public: // Serial numbers start with RS - // USB PID is 0x0005, standard driver is FTDI + // USB PID is 0x0005, standard driver is DXX // Ethernet MAC allocation is 0x05, standard driver is Raw ICSNEO_FINDABLE_DEVICE(RADStar2, DeviceType::RADStar2, "RS"); diff --git a/include/icsneo/device/tree/radsupermoon/radsupermoon.h b/include/icsneo/device/tree/radsupermoon/radsupermoon.h index efeb25a..dc2c1fd 100644 --- a/include/icsneo/device/tree/radsupermoon/radsupermoon.h +++ b/include/icsneo/device/tree/radsupermoon/radsupermoon.h @@ -12,7 +12,7 @@ namespace icsneo { class RADSupermoon : public Device { public: // Serial numbers start with SM - // USB PID is 0x1201, standard driver is FTDI3 + // USB PID is 0x1201, standard driver is DXX ICSNEO_FINDABLE_DEVICE(RADSupermoon, DeviceType::RADSupermoon, "SM"); enum class SKU { diff --git a/include/icsneo/device/tree/valuecan3/valuecan3.h b/include/icsneo/device/tree/valuecan3/valuecan3.h index 4250cab..e9d3a79 100644 --- a/include/icsneo/device/tree/valuecan3/valuecan3.h +++ b/include/icsneo/device/tree/valuecan3/valuecan3.h @@ -11,7 +11,7 @@ namespace icsneo { class ValueCAN3 : public Device { public: - // USB PID is 0x0601, standard driver is FTDI + // USB PID is 0x0601, standard driver is DXX ICSNEO_FINDABLE_DEVICE_BY_PID(ValueCAN3, DeviceType::VCAN3, 0x0601); static const std::vector& GetSupportedNetworks() { diff --git a/include/icsneo/platform/dxx.h b/include/icsneo/platform/dxx.h new file mode 100644 index 0000000..781b4eb --- /dev/null +++ b/include/icsneo/platform/dxx.h @@ -0,0 +1,39 @@ +#ifndef __DXX_H_ +#define __DXX_H_ + +#ifdef __cplusplus + +#include "icsneo/communication/driver.h" +#include "icsneo/device/founddevice.h" + +#include "libredxx/libredxx.h" + +namespace icsneo { + +class DXX : public Driver { +public: + static void Find(std::vector& found); + + DXX(const device_eventhandler_t& err, neodevice_t& forDevice, uint16_t pid, libredxx_device_type type); + + bool open() override; + + bool isOpen() override; + + bool close() override; + +private: + void read(); + void write(); + neodevice_t neodevice; + uint16_t pid; + libredxx_device_type type; + libredxx_opened_device* device = nullptr; + std::thread readThread; + std::thread writeThread; +}; + +} + +#endif // __cplusplus +#endif // __DXX_H_ diff --git a/include/icsneo/platform/ftd3xx.h b/include/icsneo/platform/ftd3xx.h deleted file mode 100644 index e662921..0000000 --- a/include/icsneo/platform/ftd3xx.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef __FTD3XX_H_ -#define __FTD3XX_H_ - -#ifdef __cplusplus - -#include - -#include "icsneo/communication/driver.h" -#include "icsneo/device/founddevice.h" - -namespace icsneo { - -class FTD3XX : public Driver { -public: - static void Find(std::vector& foundDevices); - FTD3XX(const device_eventhandler_t& err, neodevice_t& forDevice); - ~FTD3XX() override { if(isOpen()) close(); } - bool open() override; - bool isOpen() override; - bool close() override; - bool isEthernet() const override { return false; } -private: - neodevice_t& device; - std::optional handle; - - std::thread readThread, writeThread; - void readTask(); - void writeTask(); -}; - -} - -#endif // __cplusplus - -#endif diff --git a/include/icsneo/platform/ftdi.h b/include/icsneo/platform/ftdi.h deleted file mode 100644 index b44a661..0000000 --- a/include/icsneo/platform/ftdi.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __FTDI_H_ -#define __FTDI_H_ - -#define INTREPID_USB_VENDOR_ID (0x093c) - -#if defined _WIN32 -#include "icsneo/platform/windows/ftdi.h" -#elif defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) -#include "icsneo/platform/posix/ftdi.h" -#else -#warning "This platform is not supported by the FTDI driver" -#endif - -#endif \ No newline at end of file diff --git a/include/icsneo/platform/posix/ftdi.h b/include/icsneo/platform/posix/ftdi.h deleted file mode 100644 index a200191..0000000 --- a/include/icsneo/platform/posix/ftdi.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef __FTDI_POSIX_H_ -#define __FTDI_POSIX_H_ - -#ifdef __cplusplus - -#include -#include -#include -#include -#include "icsneo/device/neodevice.h" -#include "icsneo/communication/driver.h" -#include "icsneo/third-party/concurrentqueue/blockingconcurrentqueue.h" -#include "icsneo/api/eventmanager.h" - -namespace icsneo { - -class FTDI : public Driver { -public: - static void Find(std::vector& found); - - FTDI(const device_eventhandler_t& err, neodevice_t& forDevice); - ~FTDI() { if(isOpen()) close(); } - bool open(); - bool close(); - bool isOpen() { return ftdi.isOpen(); } - -private: - class FTDIContext { - public: - FTDIContext() : context(ftdi_new()) {} - ~FTDIContext() { - if(context) - ftdi_free(context); // calls ftdi_deinit and ftdi_close if required - context = nullptr; - } - - // A PID of 0 disables filtering by PID - std::pair > > findDevices(int pid = 0); - - int openDevice(int pid, const char* serial); - bool closeDevice(); - bool isOpen() const { return deviceOpen; } - int flush() { return ftdi_usb_purge_buffers(context); } - int reset() { return ftdi_usb_reset(context); } - int read(uint8_t* data, size_t size) { return ftdi_read_data(context, data, (int)size); } - int write(const uint8_t* data, size_t size) { return ftdi_write_data(context, data, (int)size); } - int setBaudrate(int baudrate) { return ftdi_set_baudrate(context, baudrate); } - int setLatencyTimer(uint8_t latency) { return ftdi_set_latency_timer(context, latency); } - bool setReadTimeout(int timeout) { if(context == nullptr) return false; context->usb_read_timeout = timeout; return true; } - bool setWriteTimeout(int timeout) { if(context == nullptr) return false; context->usb_write_timeout = timeout; return true; } - private: - struct ftdi_context* context; - bool deviceOpen = false; - }; - FTDIContext ftdi; - - static std::vector handles; - - static bool ErrorIsDisconnection(int errorCode); - std::thread readThread, writeThread; - - void readTask(); - void writeTask(); - - bool openable; // Set to false in the constructor if the object has not been found in searchResultDevices - - neodevice_t& device; -}; - -} - -#endif // __cplusplus - -#endif \ No newline at end of file diff --git a/include/icsneo/platform/socket.h b/include/icsneo/platform/socket.h index 677528c..a4530c7 100644 --- a/include/icsneo/platform/socket.h +++ b/include/icsneo/platform/socket.h @@ -4,6 +4,8 @@ #ifdef __cplusplus #ifdef _WIN32 +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include #include #include diff --git a/include/icsneo/platform/windows/cdcacm.h b/include/icsneo/platform/windows/cdcacm.h index 11534ca..a975795 100644 --- a/include/icsneo/platform/windows/cdcacm.h +++ b/include/icsneo/platform/windows/cdcacm.h @@ -3,14 +3,34 @@ #ifdef __cplusplus -#include "icsneo/platform/windows/vcp.h" +#include "icsneo/communication/driver.h" +#include "icsneo/device/founddevice.h" + +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX +#include + +#include namespace icsneo { -class CDCACM : public VCP { +class CDCACM : public Driver { public: - CDCACM(const device_eventhandler_t& err, neodevice_t& forDevice) : VCP(err, forDevice) {} - static void Find(std::vector& found) { return VCP::Find(found, { L"usbser" }); } + CDCACM(const device_eventhandler_t& err, const std::wstring& path); + static void Find(std::vector& found); + bool open() override; + bool isOpen() override; + bool close() override; + +private: + void read(); + void write(); + std::wstring path; + HANDLE handle = INVALID_HANDLE_VALUE; + std::thread readThread; + std::thread writeThread; + OVERLAPPED readOverlapped = {}; + OVERLAPPED writeOverlapped = {}; }; } diff --git a/include/icsneo/platform/windows/dynamiclib.h b/include/icsneo/platform/windows/dynamiclib.h index 71e3039..40382c5 100644 --- a/include/icsneo/platform/windows/dynamiclib.h +++ b/include/icsneo/platform/windows/dynamiclib.h @@ -1,6 +1,8 @@ #ifndef __DYNAMICLIB_WINDOWS_H_ #define __DYNAMICLIB_WINDOWS_H_ +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include #ifndef ICSNEOC_BUILD_STATIC diff --git a/include/icsneo/platform/windows/ftdi.h b/include/icsneo/platform/windows/ftdi.h deleted file mode 100644 index dd9d971..0000000 --- a/include/icsneo/platform/windows/ftdi.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __FTDI_WINDOWS_H_ -#define __FTDI_WINDOWS_H_ - -#ifdef __cplusplus - -#include "icsneo/platform/windows/vcp.h" - -namespace icsneo { - -class FTDI : public VCP { -public: - FTDI(const device_eventhandler_t& err, neodevice_t& forDevice) : VCP(err, forDevice) {} - static void Find(std::vector& found) { return VCP::Find(found, { L"serenum" /*, L"ftdibus" */ }); } -}; - -} - -#endif // __cplusplus - -#endif \ No newline at end of file diff --git a/include/icsneo/platform/windows/internal/pcapdll.h b/include/icsneo/platform/windows/internal/pcapdll.h index ad9614b..b90d539 100644 --- a/include/icsneo/platform/windows/internal/pcapdll.h +++ b/include/icsneo/platform/windows/internal/pcapdll.h @@ -3,6 +3,8 @@ #ifdef __cplusplus +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include #include #include diff --git a/include/icsneo/platform/windows/vcp.h b/include/icsneo/platform/windows/vcp.h deleted file mode 100644 index 5dca6b9..0000000 --- a/include/icsneo/platform/windows/vcp.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __VCP_WINDOWS_H_ -#define __VCP_WINDOWS_H_ - -#ifdef __cplusplus - -#include -#include -#include -#include -#include -#include "icsneo/device/neodevice.h" -#include "icsneo/communication/driver.h" -#include "icsneo/api/eventmanager.h" - -namespace icsneo { - -// Virtual COM Port Communication -class VCP : public Driver { -public: - static void Find(std::vector& found, std::vector driverName); - static bool IsHandleValid(neodevice_handle_t handle); - typedef void(*fn_boolCallback)(bool success); - - VCP(const device_eventhandler_t& err, neodevice_t& forDevice); - virtual ~VCP(); - bool open() { return open(false); } - void openAsync(fn_boolCallback callback); - bool close(); - bool isOpen(); - -private: - bool open(bool fromAsync); - bool opening = false; - neodevice_t& device; - - struct Detail; - std::shared_ptr detail; - - std::vector> threads; - std::thread readThread, writeThread; - void readTask(); - void writeTask(); -}; - -} - -#endif // __cplusplus - -#endif \ No newline at end of file diff --git a/platform/dxx.cpp b/platform/dxx.cpp new file mode 100644 index 0000000..8dd869b --- /dev/null +++ b/platform/dxx.cpp @@ -0,0 +1,194 @@ +#include "icsneo/platform/dxx.h" + +#define ICS_USB_VID 0x093C + +using namespace icsneo; + +static APIEvent::Type eventError(libredxx_status status) { + switch (status) { + case LIBREDXX_STATUS_ERROR_SYS: return APIEvent::Type::DXXErrorSys; + case LIBREDXX_STATUS_ERROR_INTERRUPTED: return APIEvent::Type::DXXErrorSys; + case LIBREDXX_STATUS_ERROR_OVERFLOW: return APIEvent::Type::DXXErrorSys; + case LIBREDXX_STATUS_ERROR_IO: return APIEvent::Type::DXXErrorSys; + case LIBREDXX_STATUS_ERROR_INVALID_ARGUMENT: return APIEvent::Type::DXXErrorSys; + default: return APIEvent::Type::Unknown; + } +} + +void DXX::Find(std::vector& found) { + libredxx_status status; + static libredxx_find_filter filters[] = { + { LIBREDXX_DEVICE_TYPE_D2XX, { ICS_USB_VID, 0x0005 } }, // RAD-Star 2 + { LIBREDXX_DEVICE_TYPE_D2XX, { ICS_USB_VID, 0x0006 } }, // RAD-A2B Rev A + { LIBREDXX_DEVICE_TYPE_D2XX, { ICS_USB_VID, 0x1000 } }, // neoVI FIRE2 + { LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1201 } }, // RAD-SuperMoon + { LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1202 } }, // RAD-Moon2 + { LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1203 } }, // RAD-Gigalog + { LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1204 } }, // RAD-Gigastar + { LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1206 } }, // RAD-A2B Rev B + { LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1207 } }, // RAD-Comet + { LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1208 } }, // RAD-Comet3 + { LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1209 } }, // RAD-MoonT1S + { LIBREDXX_DEVICE_TYPE_D3XX, { ICS_USB_VID, 0x1210 } }, // RAD-Gigastar 2 + }; + static size_t filterCount = sizeof(filters) / sizeof(filters[0]); + + libredxx_found_device** foundDevices = nullptr; + size_t foundDevicesCount; + status = libredxx_find_devices(filters, filterCount, &foundDevices, &foundDevicesCount); + if(status != LIBREDXX_STATUS_SUCCESS) { + EventManager::GetInstance().add(eventError(status), APIEvent::Severity::Error); + return; + } + if(foundDevicesCount == 0) { + return; + } + for(size_t i = 0; i < foundDevicesCount; ++i) { + libredxx_found_device* foundDevice = foundDevices[i]; + libredxx_serial serial = {}; + status = libredxx_get_serial(foundDevice, &serial); + if(status != LIBREDXX_STATUS_SUCCESS) { + EventManager::GetInstance().add(eventError(status), APIEvent::Severity::Error); + continue; + } + + libredxx_device_id id; + status = libredxx_get_device_id(foundDevice, &id); + if(status != LIBREDXX_STATUS_SUCCESS) { + EventManager::GetInstance().add(eventError(status), APIEvent::Severity::Error); + continue; + } + + libredxx_device_type type; + status = libredxx_get_device_type(foundDevice, &type); + if(status != LIBREDXX_STATUS_SUCCESS) { + EventManager::GetInstance().add(eventError(status), APIEvent::Severity::Error); + continue; + } + + auto& device = found.emplace_back(); + std::copy(serial.serial, serial.serial + sizeof(device.serial), device.serial); + device.makeDriver = [id, type](device_eventhandler_t err, neodevice_t& forDevice) { + return std::make_unique(err, forDevice, id.pid, type); + }; + } + libredxx_free_found(foundDevices); +} + +DXX::DXX(const device_eventhandler_t& err, neodevice_t& forDevice, uint16_t pid, libredxx_device_type type) : + Driver(err), neodevice(forDevice), pid(pid), type(type) { +} + +bool DXX::open() { + libredxx_status status; + libredxx_find_filter filters[] = { + { (libredxx_device_type)type, { ICS_USB_VID, pid } } + }; + libredxx_found_device** foundDevices = nullptr; + size_t foundDevicesCount; + status = libredxx_find_devices(filters, 1, &foundDevices, &foundDevicesCount); + if(status != LIBREDXX_STATUS_SUCCESS) { + EventManager::GetInstance().add(eventError(status), APIEvent::Severity::Error); + return false; + } + if(foundDevicesCount == 0) { + EventManager::GetInstance().add(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error); + return false; + } + + libredxx_found_device* foundDevice = nullptr; + for(size_t i = 0; i < foundDevicesCount; ++i) { + libredxx_serial serial = {}; + status = libredxx_get_serial(foundDevices[i], &serial); + if(status != LIBREDXX_STATUS_SUCCESS) { + EventManager::GetInstance().add(eventError(status), APIEvent::Severity::EventWarning); + continue; + } + if(strcmp(serial.serial, neodevice.serial) == 0) { + foundDevice = foundDevices[i]; + break; + } + } + if(foundDevice == nullptr) { + EventManager::GetInstance().add(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error); + libredxx_free_found(foundDevices); + return false; + } + status = libredxx_open_device(foundDevice, &device); + if(status != LIBREDXX_STATUS_SUCCESS) { + EventManager::GetInstance().add(eventError(status), APIEvent::Severity::Error); + libredxx_free_found(foundDevices); + return false; + } + libredxx_free_found(foundDevices); + setIsDisconnected(false); + readThread = std::thread(&DXX::read, this); + writeThread = std::thread(&DXX::write, this); + return true; +} + +bool DXX::isOpen() { + return device != nullptr; +} + +bool DXX::close() { + setIsClosing(true); + libredxx_close_device(device); // unblock read thread & close + writeQueue.enqueue(WriteOperation{}); // unblock write thread + readThread.join(); + writeThread.join(); + device = nullptr; + setIsClosing(false); + return true; +} + +void DXX::read() { + EventManager::GetInstance().downgradeErrorsOnCurrentThread(); + + std::vector buffer(ICSNEO_DRIVER_RINGBUFFER_SIZE); + + while(!isDisconnected() && !isClosing()) { + size_t received = buffer.size(); + const auto status = libredxx_read(device, buffer.data(), &received); + if(isDisconnected() || isClosing()) { + return; + } + if(status != LIBREDXX_STATUS_SUCCESS) { + EventManager::GetInstance().add(eventError(status), APIEvent::Severity::Error); + setIsDisconnected(true); + return; + } + while(!isDisconnected() && !isClosing()) { + if(pushRx(buffer.data(), received)) + break; + } + } +} + +void DXX::write() { + EventManager::GetInstance().downgradeErrorsOnCurrentThread(); + + WriteOperation writeOp; + + while(!isDisconnected() && !isClosing()) { + writeQueue.wait_dequeue(writeOp); + + if(isDisconnected() || isClosing()) { + return; + } + + for(size_t totalWritten = 0; totalWritten < writeOp.bytes.size();) { + size_t size = writeOp.bytes.size() - totalWritten; + const auto status = libredxx_write(device, &writeOp.bytes[totalWritten], &size); + if(isDisconnected() || isClosing()) { + return; + } + if(status != LIBREDXX_STATUS_SUCCESS) { + EventManager::GetInstance().add(eventError(status), APIEvent::Severity::Error); + setIsDisconnected(true); + return; + } + totalWritten += size; + } + } +} diff --git a/platform/ftd3xx.cpp b/platform/ftd3xx.cpp deleted file mode 100644 index ed3619a..0000000 --- a/platform/ftd3xx.cpp +++ /dev/null @@ -1,182 +0,0 @@ -#include -#include "icsneo/api/eventmanager.h" - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4091) -#endif -#define FTD3XX_STATIC -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#include "icsneo/platform/ftd3xx.h" - -static constexpr auto READ_PIPE_ID = 0x82; -static constexpr auto WRITE_PIPE_ID = 0x02; - -using namespace icsneo; - -static void addEvent(FT_STATUS status, APIEvent::Severity severity) { - const auto internalEvent = static_cast(APIEvent::Type::FTOK) + status; - EventManager::GetInstance().add(APIEvent((APIEvent::Type)internalEvent, severity)); -} - -void FTD3XX::Find(std::vector& found) { - DWORD count; - if(const auto ret = FT_CreateDeviceInfoList(&count); ret != FT_OK) { - addEvent(ret, APIEvent::Severity::EventWarning); - return; - } - if(count == 0) { - return; - } - std::vector devices(count); - if(const auto ret = FT_GetDeviceInfoList(devices.data(), &count); ret != FT_OK) { - addEvent(ret, APIEvent::Severity::EventWarning); - return; - } - for(const auto& dev : devices) { - FoundDevice foundDevice = {}; - std::copy(dev.SerialNumber, dev.SerialNumber + sizeof(foundDevice.serial), foundDevice.serial); - foundDevice.makeDriver = [](const device_eventhandler_t& eh, neodevice_t& forDevice) { - return std::unique_ptr(new FTD3XX(eh, forDevice)); - }; - found.push_back(std::move(foundDevice)); - } -} - - -FTD3XX::FTD3XX(const device_eventhandler_t& err, neodevice_t& forDevice) : Driver(err), device(forDevice) { -} - -bool FTD3XX::open() { - if(isOpen()) { - report(APIEvent::Type::DeviceCurrentlyOpen, APIEvent::Severity::Error); - return false; - } - - void* tmpHandle; - if(const auto ret = FT_Create(device.serial, FT_OPEN_BY_SERIAL_NUMBER, &tmpHandle); ret != FT_OK) { - addEvent(ret, APIEvent::Severity::Error); - return false; - } - handle.emplace(tmpHandle); - - setIsClosing(false); - setIsDisconnected(false); - readThread = std::thread(&FTD3XX::readTask, this); - writeThread = std::thread(&FTD3XX::writeTask, this); - - return true; -} - -bool FTD3XX::isOpen() { - return handle.has_value(); -} - -bool FTD3XX::close() { - if(!isOpen() && !isDisconnected()) { - report(APIEvent::Type::DeviceCurrentlyClosed, APIEvent::Severity::Error); - return false; - } - - setIsClosing(true); - - // unblock the read thread - FT_AbortPipe(*handle, READ_PIPE_ID); - - if(readThread.joinable()) - readThread.join(); - if(writeThread.joinable()) - writeThread.join(); - - clearBuffers(); - - if(const auto ret = FT_Close(*handle); ret != FT_OK) { - addEvent(ret, APIEvent::Severity::EventWarning); - } - - handle.reset(); - - setIsClosing(false); - - return true; -} - -void FTD3XX::readTask() { - EventManager::GetInstance().downgradeErrorsOnCurrentThread(); - - std::vector buffer(2 * 1024 * 1024); - - FT_SetStreamPipe(*handle, false, false, READ_PIPE_ID, (ULONG)buffer.size()); - - // disable timeouts, we will interupt the read thread with AbortPipe - FT_SetPipeTimeout(*handle, READ_PIPE_ID, 0); - - OVERLAPPED overlapped = {}; - FT_InitializeOverlapped(*handle, &overlapped); - - FT_STATUS status; - ULONG received = 0; - - while(!isClosing() && !isDisconnected()) { - received = 0; - #ifdef _WIN32 - status = FT_ReadPipe(*handle, READ_PIPE_ID, buffer.data(), (ULONG)buffer.size(), &received, &overlapped); - #else - status = FT_ReadPipeAsync(*handle, 0, buffer.data(), buffer.size(), &received, &overlapped); - #endif - if(FT_FAILED(status)) { - if(status != FT_IO_PENDING) { - addEvent(status, APIEvent::Severity::Error); - setIsDisconnected(true); - break; - } - status = FT_GetOverlappedResult(*handle, &overlapped, &received, true); - if(FT_FAILED(status)) { - addEvent(status, APIEvent::Severity::Error); - setIsDisconnected(true); - break; - } - if(received > 0) { - pushRx(buffer.data(), received); - } - } - } - - FT_ReleaseOverlapped(*handle, &overlapped); -} - -void FTD3XX::writeTask() { - EventManager::GetInstance().downgradeErrorsOnCurrentThread(); - - FT_SetPipeTimeout(*handle, WRITE_PIPE_ID, 0); - WriteOperation writeOp; - ULONG sent; - FT_STATUS status; - - while(!isClosing() && !isDisconnected()) { - if(!writeQueue.wait_dequeue_timed(writeOp, std::chrono::milliseconds(100))) - continue; - - const auto size = static_cast(writeOp.bytes.size()); - sent = 0; - #ifdef _WIN32 - status = FT_WritePipe(*handle, WRITE_PIPE_ID, writeOp.bytes.data(), size, &sent, nullptr); - #else - status = FT_WritePipe(*handle, WRITE_PIPE_ID, writeOp.bytes.data(), size, &sent, 100); - #endif - if(FT_FAILED(status)) { - addEvent(status, APIEvent::Severity::Error); - setIsDisconnected(true); - break; - } - if(sent != size) { - report(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error); - setIsDisconnected(true); - break; - } - } -} diff --git a/platform/posix/ftdi.cpp b/platform/posix/ftdi.cpp deleted file mode 100644 index b10a1aa..0000000 --- a/platform/posix/ftdi.cpp +++ /dev/null @@ -1,242 +0,0 @@ -#include "icsneo/platform/ftdi.h" -#include "icsneo/device/founddevice.h" -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace icsneo; - -std::vector FTDI::handles; - -void FTDI::Find(std::vector& found) { - constexpr size_t deviceSerialBufferLength = sizeof(device.serial); - static FTDIContext context; - - const auto result = context.findDevices(); - if(result.first < 0) - return; // TODO Flag an error for the client application, there was an issue with FTDI - - for(const auto& [serial, pid] : result.second) { - FoundDevice d; - strncpy(d.serial, serial.c_str(), deviceSerialBufferLength - 1); - d.serial[deviceSerialBufferLength - 1] = '\0'; // strncpy does not write a null terminator if serial is too long - for(size_t i = 0; i < deviceSerialBufferLength - 1; i++) - d.serial[i] = toupper(serial[i]); - std::string devHandle = serial; - auto it = std::find(handles.begin(), handles.end(), devHandle); - size_t foundHandle = SIZE_MAX; - if(it != handles.end()) { - foundHandle = it - handles.begin(); - } else { - foundHandle = handles.size(); - handles.push_back(devHandle); - } - d.handle = foundHandle; - d.productId = pid; - - d.makeDriver = [](const device_eventhandler_t& report, neodevice_t& device) { - return std::unique_ptr(new FTDI(report, device)); - }; - - found.push_back(d); - } -} - -FTDI::FTDI(const device_eventhandler_t& err, neodevice_t& forDevice) : Driver(err), device(forDevice) { - openable = strlen(forDevice.serial) > 0 && device.handle >= 0 && device.handle < (neodevice_handle_t)handles.size(); -} - -bool FTDI::open() { - if(isOpen()) { - report(APIEvent::Type::DeviceCurrentlyOpen, APIEvent::Severity::Error); - return false; - } - - if(!openable) { - report(APIEvent::Type::InvalidNeoDevice, APIEvent::Severity::Error); - return false; - } - - // At this point the handle has been checked to be within the bounds of the handles array - auto& handle = handles[device.handle]; - const int openError = ftdi.openDevice(0, handle.c_str()); - if(openError == -5) { // Unable to claim device - report(APIEvent::Type::DeviceInUse, APIEvent::Severity::Error); - return false; - } else if(openError != 0) { - report(APIEvent::Type::DriverFailedToOpen, APIEvent::Severity::Error); - return false; - } - - ftdi.setReadTimeout(100); - ftdi.setWriteTimeout(1000); - ftdi.reset(); - ftdi.setBaudrate(500000); - ftdi.setLatencyTimer(1); - ftdi.flush(); - - // Create threads - setIsClosing(false); - readThread = std::thread(&FTDI::readTask, this); - writeThread = std::thread(&FTDI::writeTask, this); - - return true; -} - -bool FTDI::close() { - if(!isOpen() && !isDisconnected()) { - report(APIEvent::Type::DeviceCurrentlyClosed, APIEvent::Severity::Error); - return false; - } - - setIsClosing(true); - - if(readThread.joinable()) - readThread.join(); - - if(writeThread.joinable()) - writeThread.join(); - - bool ret = true; - if(!isDisconnected()) { - ret = ftdi.closeDevice(); - if(!ret) - report(APIEvent::Type::DriverFailedToClose, APIEvent::Severity::Error); - } - - clearBuffers(); - - setIsClosing(false); - setIsDisconnected(false); - return ret; -} - -std::pair > > FTDI::FTDIContext::findDevices(int pid) { - std::pair > > ret; - - if(context == nullptr) { - ret.first = -1; - return ret; - } - - struct ftdi_device_list* devlist = nullptr; - ret.first = ftdi_usb_find_all(context, &devlist, INTREPID_USB_VENDOR_ID, pid); - if(ret.first < 1) { - // Didn't find anything, maybe got an error - if(devlist != nullptr) - ftdi_list_free(&devlist); - return ret; - } - - if(devlist == nullptr) { - ret.first = -4; - return ret; - } - - for(struct ftdi_device_list* curdev = devlist; curdev != nullptr; curdev = curdev->next) { - struct libusb_device_descriptor descriptor = {}; - // Check against bDeviceClass here as it will be 0 for FTDI devices - // It will be 2 for CDC ACM devices, which we don't want to handle here - if(libusb_get_device_descriptor(curdev->dev, &descriptor) != 0 || descriptor.bDeviceClass != 0) - continue; - - char serial[16] = {}; - if(ftdi_usb_get_strings(context, curdev->dev, nullptr, 0, nullptr, 0, serial, sizeof(serial)) < 0) - continue; - - const auto len = strnlen(serial, sizeof(serial)); - if(len > 4 && len < 10) - ret.second.emplace_back(serial, descriptor.idProduct); - } - - ret.first = static_cast(ret.second.size()); - ftdi_list_free(&devlist); - return ret; -} - -int FTDI::FTDIContext::openDevice(int pid, const char* serial) { - if(context == nullptr) - return 1; - if(serial == nullptr) - return 2; - if(serial[0] == '\0') - return 3; - if(deviceOpen) - return 4; - int ret = ftdi_usb_open_desc(context, INTREPID_USB_VENDOR_ID, pid, nullptr, serial); - if(ret == 0 /* all ok */) - deviceOpen = true; - return ret; -} - -bool FTDI::FTDIContext::closeDevice() { - if(context == nullptr) - return false; - - - if(!deviceOpen) - return true; - - int ret = ftdi_usb_close(context); - if(ret != 0) - return false; - - deviceOpen = false; - return true; -} - -bool FTDI::ErrorIsDisconnection(int errorCode) { - return errorCode == LIBUSB_ERROR_NO_DEVICE || - errorCode == LIBUSB_ERROR_PIPE || - errorCode == LIBUSB_ERROR_IO; -} - -void FTDI::readTask() { - constexpr size_t READ_BUFFER_SIZE = 8; - uint8_t readbuf[READ_BUFFER_SIZE]; - EventManager::GetInstance().downgradeErrorsOnCurrentThread(); - while(!isClosing() && !isDisconnected()) { - auto readBytes = ftdi.read(readbuf, READ_BUFFER_SIZE); - if(readBytes < 0) { - if(ErrorIsDisconnection(readBytes)) { - if(!isDisconnected()) { - setIsDisconnected(true); - report(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error); - } - } else - report(APIEvent::Type::FailedToRead, APIEvent::Severity::EventWarning); - } else - pushRx(readbuf, readBytes); - } -} - -void FTDI::writeTask() { - WriteOperation writeOp; - EventManager::GetInstance().downgradeErrorsOnCurrentThread(); - while(!isClosing() && !isDisconnected()) { - if(!writeQueue.wait_dequeue_timed(writeOp, std::chrono::milliseconds(100))) - continue; - - size_t offset = 0; - while(offset < writeOp.bytes.size()) { - auto writeBytes = ftdi.write(writeOp.bytes.data() + offset, (int)writeOp.bytes.size() - offset); - if(writeBytes < 0) { - if(ErrorIsDisconnection(writeBytes)) { - if(!isDisconnected()) { - setIsDisconnected(true); - report(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error); - } - break; - } else - report(APIEvent::Type::FailedToWrite, APIEvent::Severity::EventWarning); - } else - offset += writeBytes; - } - - } -} \ No newline at end of file diff --git a/platform/servd.cpp b/platform/servd.cpp index e24be88..91809fa 100644 --- a/platform/servd.cpp +++ b/platform/servd.cpp @@ -2,6 +2,8 @@ #include +#include + using namespace icsneo; #define SERVD_VERSION 1 @@ -10,7 +12,14 @@ static const Address SERVD_ADDRESS = Address("127.0.0.1", 26741); static const std::string SERVD_VERSION_STR = std::to_string(SERVD_VERSION); bool Servd::Enabled() { + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable : 4996) + #endif char* enabled = std::getenv("LIBICSNEO_USE_SERVD"); + #ifdef _MSC_VER + #pragma warning(pop) + #endif return enabled ? enabled[0] == '1' : false; } diff --git a/platform/windows/cdcacm.cpp b/platform/windows/cdcacm.cpp new file mode 100644 index 0000000..b595dd4 --- /dev/null +++ b/platform/windows/cdcacm.cpp @@ -0,0 +1,233 @@ +#include "icsneo/platform/windows/cdcacm.h" + +#include +#include +#include +#include + +using namespace icsneo; + +CDCACM::CDCACM(const device_eventhandler_t& err, const std::wstring& path) : Driver(err), path(path) { +} + +bool CDCACM::open() { + handle = CreateFileW(path.c_str(), GENERIC_READ | GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, nullptr); + if(handle == INVALID_HANDLE_VALUE) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + return false; + } + COMMTIMEOUTS timeouts; + timeouts.ReadIntervalTimeout = MAXDWORD; + timeouts.ReadTotalTimeoutMultiplier = MAXDWORD; + timeouts.ReadTotalTimeoutConstant = MAXDWORD - 1; + timeouts.WriteTotalTimeoutMultiplier = 0; + timeouts.WriteTotalTimeoutConstant = 0; + + if(!SetCommTimeouts(handle, &timeouts)) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + CloseHandle(handle); + handle = INVALID_HANDLE_VALUE; + return false; + } + + DCB comstate; + if(!GetCommState(handle, &comstate)) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + CloseHandle(handle); + handle = INVALID_HANDLE_VALUE; + return false; + } + comstate.BaudRate = 115200; + comstate.ByteSize = 8; + comstate.fRtsControl = RTS_CONTROL_DISABLE; + if(!SetCommState(handle, &comstate)) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + CloseHandle(handle); + handle = INVALID_HANDLE_VALUE; + return false; + } + + PurgeComm(handle, PURGE_RXCLEAR); + + readOverlapped.hEvent = CreateEventA(nullptr, false, false, nullptr); + writeOverlapped.hEvent = CreateEventA(nullptr, false, false, nullptr); + + setIsDisconnected(false); + readThread = std::thread(&CDCACM::read, this); + writeThread = std::thread(&CDCACM::write, this); + return true; +} + +bool CDCACM::isOpen() { + return handle != INVALID_HANDLE_VALUE; +} + +bool CDCACM::close() { + setIsClosing(true); + SetEvent(readOverlapped.hEvent); // unblock read thread + SetEvent(writeOverlapped.hEvent); // unblock write thread if waiting on COM write + writeQueue.enqueue(WriteOperation{}); // unblock write thread if waiting on write queue pop + readThread.join(); + writeThread.join(); + CloseHandle(readOverlapped.hEvent); + CloseHandle(writeOverlapped.hEvent); + CloseHandle(handle); + handle = INVALID_HANDLE_VALUE; + setIsClosing(false); + return true; +} + +void CDCACM::read() { + EventManager::GetInstance().downgradeErrorsOnCurrentThread(); + + std::vector buffer(ICSNEO_DRIVER_RINGBUFFER_SIZE); + + while(!isDisconnected() && !isClosing()) { + if(!ReadFile(handle, buffer.data(), (DWORD)buffer.size(), nullptr, &readOverlapped)) { + if(GetLastError() != ERROR_IO_PENDING) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + setIsDisconnected(true); + return; + } + } + DWORD read = 0; + if(!GetOverlappedResult(handle, &readOverlapped, &read, true)) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + setIsDisconnected(true); + return; + } + if(read == 0) { + continue; + } + while(!isDisconnected() && !isClosing()) { + if(pushRx(buffer.data(), read)) + break; + } + } +} + +void CDCACM::write() { + EventManager::GetInstance().downgradeErrorsOnCurrentThread(); + + WriteOperation writeOp; + + while(!isDisconnected() && !isClosing()) { + writeQueue.wait_dequeue(writeOp); + + if(isDisconnected() || isClosing()) { + return; + } + + if(!WriteFile(handle, writeOp.bytes.data(), (DWORD)writeOp.bytes.size(), nullptr, &writeOverlapped)) { + if(GetLastError() != ERROR_IO_PENDING) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + setIsDisconnected(true); + return; + } + } + DWORD written; + if(!GetOverlappedResult(handle, &writeOverlapped, &written, true)) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + setIsDisconnected(true); + return; + } + + if(written != writeOp.bytes.size()) { + EventManager::GetInstance().add(APIEvent::Type::FailedToWrite, APIEvent::Severity::Error); + setIsDisconnected(true); + return; + } + } +} + + +class DeviceInfo { +public: + DeviceInfo() { + mDeviceInfo = SetupDiGetClassDevsW(&GUID_DEVINTERFACE_USB_DEVICE, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE); + } + ~DeviceInfo() { + SetupDiDestroyDeviceInfoList(mDeviceInfo); + } + operator HDEVINFO() const { + return mDeviceInfo; + } + operator bool() const { + return mDeviceInfo != INVALID_HANDLE_VALUE; + } +private: + HDEVINFO mDeviceInfo; +}; + +class DeviceInfoData { +public: + DeviceInfoData() { + mDeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); + } + operator SP_DEVINFO_DATA*() { + return &mDeviceInfoData; + } +private: + SP_DEVINFO_DATA mDeviceInfoData; +}; + +static constexpr size_t WSTRING_ELEMENT_SIZE = sizeof(std::wstring::value_type); + +void CDCACM::Find(std::vector& found) { + DeviceInfoData deviceInfoData; + const std::wstring intrepidUSB(L"USB\\VID_093C"); + DeviceInfo deviceInfoSet; + if(!deviceInfoSet) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + return; + } + + for(DWORD i = 0; SetupDiEnumDeviceInfo(deviceInfoSet, i, deviceInfoData); ++i) { + DWORD DataT; + DWORD buffersize = 0; + + std::wstring wclass; + while(!SetupDiGetDevicePropertyW(deviceInfoSet, deviceInfoData, &DEVPKEY_Device_Class, &DataT, reinterpret_cast(wclass.data()), static_cast((wclass.size() + 1) * WSTRING_ELEMENT_SIZE), &buffersize, 0)) { + wclass.resize((buffersize - 1) / WSTRING_ELEMENT_SIZE); + } + + if(wclass != L"Ports") { + continue; + } + + // TODO: is this a bug in Windows? why is this returned size different/wrong? It's like it's not a wstring at all + std::wstring deviceInstanceId; + while(!SetupDiGetDeviceInstanceIdW(deviceInfoSet, deviceInfoData, deviceInstanceId.data(), static_cast(deviceInstanceId.size() + 1), &buffersize)) { + deviceInstanceId.resize(buffersize - 1); + } + + if(deviceInstanceId.find(intrepidUSB) != 0) { + continue; + } + + std::wstring wserial; + while(!SetupDiGetDevicePropertyW(deviceInfoSet, deviceInfoData, &DEVPKEY_Device_BusReportedDeviceDesc, &DataT, reinterpret_cast(wserial.data()), static_cast((wserial.size() + 1) * WSTRING_ELEMENT_SIZE), &buffersize, 0)) { + wserial.resize((buffersize - 1) / WSTRING_ELEMENT_SIZE); + } + + FoundDevice device; + + if(WideCharToMultiByte(CP_ACP, 0, wserial.c_str(), (int)wserial.size(), device.serial, sizeof(device.serial), NULL, NULL) == 0) { + EventManager::GetInstance().add(APIEvent::Type::SyscallError, APIEvent::Severity::Error); + continue; + } + + std::wstring wport; + while(!SetupDiGetCustomDevicePropertyW(deviceInfoSet, deviceInfoData, L"PortName", 0, &DataT, reinterpret_cast(wport.data()), static_cast((wport.size() + 1) * WSTRING_ELEMENT_SIZE), &buffersize)) { + wport.resize((buffersize - 1) / WSTRING_ELEMENT_SIZE); + } + + const std::wstring path(L"\\\\.\\" + wport); + + device.makeDriver = [path](device_eventhandler_t err, neodevice_t&) { + return std::make_unique(err, path); + }; + + found.emplace_back(std::move(device)); + } +} diff --git a/platform/windows/pcap.cpp b/platform/windows/pcap.cpp index d2c3d00..1436d92 100644 --- a/platform/windows/pcap.cpp +++ b/platform/windows/pcap.cpp @@ -1,3 +1,5 @@ +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include #include diff --git a/platform/windows/registry.cpp b/platform/windows/registry.cpp index 4df2170..9b20e9f 100644 --- a/platform/windows/registry.cpp +++ b/platform/windows/registry.cpp @@ -1,6 +1,8 @@ #include "icsneo/platform/windows/registry.h" #include "icsneo/platform/windows/strings.h" +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include #include #include diff --git a/platform/windows/strings.cpp b/platform/windows/strings.cpp index 84eb276..f8efce7 100644 --- a/platform/windows/strings.cpp +++ b/platform/windows/strings.cpp @@ -1,4 +1,7 @@ #include + +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include #include diff --git a/platform/windows/vcp.cpp b/platform/windows/vcp.cpp deleted file mode 100644 index 43e6922..0000000 --- a/platform/windows/vcp.cpp +++ /dev/null @@ -1,471 +0,0 @@ -#include "icsneo/platform/windows/ftdi.h" -#include "icsneo/platform/windows/strings.h" -#include "icsneo/platform/ftdi.h" -#include "icsneo/platform/registry.h" -#include "icsneo/device/founddevice.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace icsneo; - -static const std::wstring DRIVER_SERVICES_REG_KEY = L"SYSTEM\\CurrentControlSet\\services\\"; -static const std::wstring ALL_ENUM_REG_KEY = L"SYSTEM\\CurrentControlSet\\Enum\\"; -static constexpr unsigned int RETRY_TIMES = 5; -static constexpr unsigned int RETRY_DELAY = 50; - -struct VCP::Detail { - Detail() { - overlappedRead.hEvent = INVALID_HANDLE_VALUE; - overlappedWrite.hEvent = INVALID_HANDLE_VALUE; - overlappedWait.hEvent = INVALID_HANDLE_VALUE; - } - HANDLE handle = INVALID_HANDLE_VALUE; - OVERLAPPED overlappedRead = {}; - OVERLAPPED overlappedWrite = {}; - OVERLAPPED overlappedWait = {}; -}; - -void VCP::Find(std::vector& found, std::vector driverNames) { - for(auto& driverName : driverNames) { - std::wstringstream regss; - regss << DRIVER_SERVICES_REG_KEY << driverName << L"\\Enum\\"; - std::wstring driverEnumRegKey = regss.str(); - - uint32_t deviceCount = 0; - if(!Registry::Get(driverEnumRegKey, L"Count", deviceCount)) - continue; - - for(uint32_t i = 0; i < deviceCount; i++) { - FoundDevice device; - - device.makeDriver = [](const device_eventhandler_t& reportFn, neodevice_t& device) { - return std::unique_ptr(new VCP(reportFn, device)); - }; - - // First we want to look at what devices FTDI is enumerating (inside driverEnumRegKey) - // The entry for a ValueCAN 3 with SN 138635 looks like "FTDIBUS\VID_093C+PID_0601+138635A\0000" - // The entry for a ValueCAN 4 with SN V20227 looks like "USB\VID_093C&PID_1101\V20227" - std::wstringstream ss; - ss << i; - std::wstring entry; - if(!Registry::Get(driverEnumRegKey, ss.str(), entry)) - continue; - - std::transform(entry.begin(), entry.end(), entry.begin(), std::towupper); - - std::wstringstream vss; - vss << "VID_" << std::setfill(L'0') << std::setw(4) << std::uppercase << std::hex << INTREPID_USB_VENDOR_ID; // Intrepid Vendor ID - if(entry.find(vss.str()) == std::wstring::npos) - continue; - - auto pidpos = entry.find(L"PID_"); - if(pidpos == std::wstring::npos) - continue; - // We will later use this and startchar to parse the PID - - // Okay, this is a device we want - // Get the serial number - auto startchar = entry.find(L"+", pidpos + 1); - if(startchar == std::wstring::npos) - startchar = entry.find(L"\\", pidpos + 1); - bool conversionError = false; - int sn = 0; - try { - sn = std::stoi(entry.substr(startchar + 1)); - } - catch(...) { - conversionError = true; - } - - std::wstringstream oss; - if(!sn || conversionError) - oss << entry.substr(startchar + 1, 6); // This is a device with characters in the serial number - else - oss << sn; - - device.productId = uint16_t(std::wcstol(entry.c_str() + pidpos + 4, nullptr, 16)); - if(!device.productId) - continue; - - std::string serial = convertWideString(oss.str()); - // The serial number should not have a path slash in it. If it does, that means we don't have the real serial. - if(serial.find_first_of('\\') != std::string::npos) { - // The serial number was not in the first serenum key where we expected it. - // We can try to match the ContainerID with the one in ALL_ENUM\USB and get a serial that way - std::wstringstream uess; - uess << ALL_ENUM_REG_KEY << L"\\USB\\" << vss.str() << L"&PID_" << std::setfill(L'0') << std::setw(4) - << std::uppercase << std::hex << device.productId << L'\\'; - std::wstringstream ciss; - ciss << ALL_ENUM_REG_KEY << entry; - std::wstring containerIDFromEntry, containerIDFromEnum; - if(!Registry::Get(ciss.str(), L"ContainerID", containerIDFromEntry)) - continue; // We did not get a container ID. This can happen on Windows XP and before. - if(containerIDFromEntry.empty()) - continue; // The container ID was empty? - std::vector subkeys; - if(!Registry::EnumerateSubkeys(uess.str(), subkeys)) - continue; // VID/PID combo was not present at all. - if(subkeys.empty()) - continue; // No devices for VID/PID. - std::wstring correctSerial; - for(auto& subkey : subkeys) { - std::wstringstream skss; - skss << uess.str() << L'\\' << subkey; - if(!Registry::Get(skss.str(), L"ContainerID", containerIDFromEnum)) - continue; - if(containerIDFromEntry != containerIDFromEnum) - continue; - correctSerial = subkey; - break; - } - if(correctSerial.empty()) - continue; // Didn't find the device within the subkeys of the enumeration - - sn = 0; - conversionError = false; - try { - sn = std::stoi(correctSerial); - } - catch(...) { - conversionError = true; - } - - if(!sn || conversionError) { - // This is a device with characters in the serial number - if(correctSerial.size() != 6) - continue; - serial = convertWideString(correctSerial); - } - else { - std::wstringstream soss; - soss << sn; - serial = convertWideString(soss.str()); - } - - if(serial.find_first_of('\\') != std::string::npos) - continue; - } - for(char& c : serial) - c = static_cast(toupper(c)); - strcpy_s(device.serial, sizeof(device.serial), serial.c_str()); - - // Serial number is saved, we want the COM port number now - // This will be stored under ALL_ENUM_REG_KEY\entry\Device Parameters\PortName (entry from the FTDI_ENUM) - std::wstringstream dpss; - dpss << ALL_ENUM_REG_KEY << entry << L"\\Device Parameters"; - std::wstring port; - Registry::Get(dpss.str(), L"PortName", port); // TODO If error do something else (Plasma maybe?) - std::transform(port.begin(), port.end(), port.begin(), std::towupper); - auto compos = port.find(L"COM"); - device.handle = 0; - if(compos != std::wstring::npos) { - try { - device.handle = std::stoi(port.substr(compos + 3)); - } - catch(...) {} // In case of this, or any other error, handle has already been initialized to 0 - } - - bool alreadyFound = false; - FoundDevice* shouldReplace = nullptr; - for(auto& foundDev : found) { - if((foundDev.handle == device.handle || foundDev.handle == 0 || device.handle == 0) && serial == foundDev.serial) { - alreadyFound = true; - if(foundDev.handle == 0) - shouldReplace = &foundDev; - break; - } - } - - if(!alreadyFound) - found.push_back(device); - else if(shouldReplace != nullptr) - *shouldReplace = device; - } - } -} - -VCP::VCP(const device_eventhandler_t& err, neodevice_t& forDevice) : Driver(err), device(forDevice) { - detail = std::make_shared(); -} - -VCP::~VCP() { - if(isOpen()) - close(); -} - -bool VCP::IsHandleValid(neodevice_handle_t handle) { - if(handle < 1) - return false; - - if(handle > 256) // Windows default max COM port is COM256 - return false; // TODO Enumerate subkeys of HKLM\HARDWARE\DEVICEMAP\SERIALCOMM as a user might have more serial ports somehow - - return true; -} - -bool VCP::open(bool fromAsync) { - if(isOpen() || (!fromAsync && opening)) { - report(APIEvent::Type::DeviceCurrentlyOpen, APIEvent::Severity::Error); - return false; - } - - if(!IsHandleValid(device.handle)) { - report(APIEvent::Type::DriverFailedToOpen, APIEvent::Severity::Error); - return false; - } - - opening = true; - - std::wstringstream comss; - comss << L"\\\\.\\COM" << device.handle; - - // We're going to attempt to open 5 (RETRY_TIMES) times in a row - for(int i = 0; !isOpen() && i < RETRY_TIMES; i++) { - detail->handle = CreateFileW(comss.str().c_str(), GENERIC_READ | GENERIC_WRITE, 0, nullptr, - OPEN_EXISTING, FILE_FLAG_OVERLAPPED, nullptr); - if(GetLastError() == ERROR_SUCCESS) - break; // We have the file handle - - std::this_thread::sleep_for(std::chrono::milliseconds(RETRY_DELAY)); - } - - opening = false; - - if(!isOpen()) { - report(APIEvent::Type::DriverFailedToOpen, APIEvent::Severity::Error); - return false; - } - - // Set the timeouts - COMMTIMEOUTS timeouts; - if(!GetCommTimeouts(detail->handle, &timeouts)) { - close(); - report(APIEvent::Type::DriverFailedToOpen, APIEvent::Severity::Error); - return false; - } - - // See https://docs.microsoft.com/en-us/windows/desktop/api/winbase/ns-winbase-_commtimeouts#remarks - timeouts.ReadIntervalTimeout = MAXDWORD; - timeouts.ReadTotalTimeoutMultiplier = MAXDWORD; - timeouts.ReadTotalTimeoutConstant = 100; - timeouts.WriteTotalTimeoutConstant = 10000; - timeouts.WriteTotalTimeoutMultiplier = 0; - - if(!SetCommTimeouts(detail->handle, &timeouts)) { - close(); - report(APIEvent::Type::DriverFailedToOpen, APIEvent::Severity::Error); - return false; - } - - // Set the COM state - DCB comstate; - if(!GetCommState(detail->handle, &comstate)) { - close(); - report(APIEvent::Type::DriverFailedToOpen, APIEvent::Severity::Error); - return false; - } - - comstate.BaudRate = 115200; - comstate.ByteSize = 8; - comstate.Parity = NOPARITY; - comstate.StopBits = 0; - comstate.fDtrControl = DTR_CONTROL_ENABLE; - comstate.fRtsControl = RTS_CONTROL_ENABLE; - - if(!SetCommState(detail->handle, &comstate)) { - close(); - report(APIEvent::Type::DriverFailedToOpen, APIEvent::Severity::Error); - return false; - } - - PurgeComm(detail->handle, PURGE_RXCLEAR); - - // Set up events so that overlapped IO can work with them - detail->overlappedRead.hEvent = CreateEvent(nullptr, false, false, nullptr); - detail->overlappedWrite.hEvent = CreateEvent(nullptr, false, false, nullptr); - detail->overlappedWait.hEvent = CreateEvent(nullptr, true, false, nullptr); - if (detail->overlappedRead.hEvent == nullptr || detail->overlappedWrite.hEvent == nullptr || detail->overlappedWait.hEvent == nullptr) { - close(); - report(APIEvent::Type::DriverFailedToOpen, APIEvent::Severity::Error); - return false; - } - - // Set up event so that we will satisfy overlappedWait when a character comes in - if(!SetCommMask(detail->handle, EV_RXCHAR)) { - close(); - report(APIEvent::Type::DriverFailedToOpen, APIEvent::Severity::Error); - return false; - } - - // TODO Set up some sort of shared memory, save which COM port we have open so we don't try to open it again - - // Create threads - readThread = std::thread(&VCP::readTask, this); - writeThread = std::thread(&VCP::writeTask, this); - - return true; -} - -void VCP::openAsync(fn_boolCallback callback) { - threads.push_back(std::make_shared([&]() { - callback(open(true)); - })); -} - -bool VCP::close() { - if(!isOpen()) { - report(APIEvent::Type::DeviceCurrentlyClosed, APIEvent::Severity::Error); - return false; - } - - setIsClosing(true); // Signal the threads that we are closing - for(auto& t : threads) - t->join(); // Wait for the threads to close - readThread.join(); - writeThread.join(); - setIsClosing(false); - - if(!CloseHandle(detail->handle)) { - report(APIEvent::Type::DriverFailedToClose, APIEvent::Severity::Error); - return false; - } - - detail->handle = INVALID_HANDLE_VALUE; - - bool ret = true; // If one of the events fails closing, we probably still want to try and close the others - if(detail->overlappedRead.hEvent != INVALID_HANDLE_VALUE) { - if(!CloseHandle(detail->overlappedRead.hEvent)) - ret = false; - detail->overlappedRead.hEvent = INVALID_HANDLE_VALUE; - } - if(detail->overlappedWrite.hEvent != INVALID_HANDLE_VALUE) { - if(!CloseHandle(detail->overlappedWrite.hEvent)) - ret = false; - detail->overlappedWrite.hEvent = INVALID_HANDLE_VALUE; - } - if(detail->overlappedWait.hEvent != INVALID_HANDLE_VALUE) { - if(!CloseHandle(detail->overlappedWait.hEvent)) - ret = false; - detail->overlappedWait.hEvent = INVALID_HANDLE_VALUE; - } - - clearBuffers(); - - if(!ret) - report(APIEvent::Type::DriverFailedToClose, APIEvent::Severity::Error); - - // TODO Set up some sort of shared memory, free which COM port we had open so we can try to open it again - - return ret; -} - -bool VCP::isOpen() { - return detail->handle != INVALID_HANDLE_VALUE; -} - -void VCP::readTask() { - constexpr size_t READ_BUFFER_SIZE = 10240; - uint8_t readbuf[READ_BUFFER_SIZE]; - IOTaskState state = LAUNCH; - DWORD bytesRead = 0; - EventManager::GetInstance().downgradeErrorsOnCurrentThread(); - while(!isClosing() && !isDisconnected()) { - switch(state) { - case LAUNCH: { - COMSTAT comStatus; - unsigned long errorCodes; - ClearCommError(detail->handle, &errorCodes, &comStatus); - - bytesRead = 0; - if(ReadFile(detail->handle, readbuf, READ_BUFFER_SIZE, nullptr, &detail->overlappedRead)) { - if(GetOverlappedResult(detail->handle, &detail->overlappedRead, &bytesRead, FALSE)) { - if(bytesRead) - pushRx(readbuf, bytesRead); - } - continue; - } - - auto lastError = GetLastError(); - if(lastError == ERROR_IO_PENDING) - state = WAIT; - else if(lastError != ERROR_SUCCESS) { - if(lastError == ERROR_ACCESS_DENIED) { - if(!isDisconnected()) { - setIsDisconnected(true); - report(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error); - } - } else - report(APIEvent::Type::FailedToRead, APIEvent::Severity::Error); - } - } - break; - case WAIT: { - auto ret = WaitForSingleObject(detail->overlappedRead.hEvent, 100); - if(ret == WAIT_OBJECT_0) { - if(GetOverlappedResult(detail->handle, &detail->overlappedRead, &bytesRead, FALSE)) { - pushRx(readbuf, bytesRead); - state = LAUNCH; - } else - report(APIEvent::Type::FailedToRead, APIEvent::Severity::Error); - } - if(ret == WAIT_ABANDONED || ret == WAIT_FAILED) { - state = LAUNCH; - report(APIEvent::Type::FailedToRead, APIEvent::Severity::Error); - } - } - } - } -} - -void VCP::writeTask() { - IOTaskState state = LAUNCH; - VCP::WriteOperation writeOp; - DWORD bytesWritten = 0; - EventManager::GetInstance().downgradeErrorsOnCurrentThread(); - while(!isClosing() && !isDisconnected()) { - switch(state) { - case LAUNCH: { - if(!writeQueue.wait_dequeue_timed(writeOp, std::chrono::milliseconds(100))) - continue; - - bytesWritten = 0; - if(WriteFile(detail->handle, writeOp.bytes.data(), (DWORD)writeOp.bytes.size(), nullptr, &detail->overlappedWrite)) - continue; - - auto winerr = GetLastError(); - if(winerr == ERROR_IO_PENDING) { - state = WAIT; - } - else if(winerr == ERROR_ACCESS_DENIED) { - if(!isDisconnected()) { - setIsDisconnected(true); - report(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error); - } - } else - report(APIEvent::Type::FailedToWrite, APIEvent::Severity::Error); - } - break; - case WAIT: { - auto ret = WaitForSingleObject(detail->overlappedWrite.hEvent, 50); - if(ret == WAIT_OBJECT_0) { - if(!GetOverlappedResult(detail->handle, &detail->overlappedWrite, &bytesWritten, FALSE)) - report(APIEvent::Type::FailedToWrite, APIEvent::Severity::Error); - state = LAUNCH; - } - - if(ret == WAIT_ABANDONED) { - report(APIEvent::Type::FailedToWrite, APIEvent::Severity::Error); - state = LAUNCH; - } - } - } - } -} \ No newline at end of file diff --git a/third-party/libftdi/.gitignore b/third-party/libftdi/.gitignore deleted file mode 100644 index d05881d..0000000 --- a/third-party/libftdi/.gitignore +++ /dev/null @@ -1,53 +0,0 @@ -# Normal stuff -*.o -*.a -*.so -*.lo -*.la -*.pc -.deps/ -.libs/ -.kdev4/ -build/ - -# kdevelop -*.kdevelop.pcs -*.kdevses - -# Doxygen documentation -Doxyfile -Doxyfile.xml -doc/Doxyfile -doc/html -doc/man -doc/xml - -# 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 -libftdi1-config -libftdi1.spec - -# CMake -CMakeCache.txt -cmake_install.cmake -CMakeFiles - -# Misc. binaries -*.dylib -opt diff --git a/third-party/libftdi/AUTHORS b/third-party/libftdi/AUTHORS deleted file mode 100644 index 43e5218..0000000 --- a/third-party/libftdi/AUTHORS +++ /dev/null @@ -1,79 +0,0 @@ -Main developers: - - Intra2net AG - -Contributors in alphabetical order, -see Changelog for full details: - - Adam Malinowski - Alain Abbas - Alexander Lehmann - Alex Harford - Anders Larsen - Andrei Errapart - Andrew John Rogers - Arnim Läuger - Aurelien Jarno - Benjamin Vanheuverzwijn - Chris Morgan - Chris Zeh - Clifford Wolf - Daniel Kirkham - David Challis - Davide Michelizza - Denis Sirotkin - Emil - Eric Schott - Eugene Hutorny - Evan Nemerson - Evgeny Sinelnikov - Fahrzin Hemmati - Flynn Marquardt - Forest Crossman - Ian Abbott - Jared Boone - Jarkko Sonninen - Jean-Daniel Merkli - Jochen Sprickerhof - Joe Zbiciak - Jon Beniston - Juergen Beisert - Lorenz Moesenlechner - Marek Vavruša - Marius Kintel - Mark Hämmerling - Matthias Janke - Matthias Kranz - Matthias Richter - Matthijs ten Berge - Max - Maxwell Dreytser - Michel Zou - Mike Frysinger - Nathael Pajani - Nathan Fraser - Oleg Seiljus - Paul Fertser - Peter Holik - Raphael Assenat - Robert Cox - Robin Haberkorn - Rodney Sinclair - Rogier Wolff - Rolf Fiedler - Salvador Eduardo Tropea - Stephan Linz - Steven Turner - Tarek Heiland - Thilo Schulz - Thimo Eichstaedt - Thomas Fischl - Thomas Klose - Tim Ansell - Tom Saunders - Uwe Bonnes - Vladimir Yakovlev - Wilfried Holzke - Xiaofan Chen - Yegor Yefremov - Yi-Shin Li diff --git a/third-party/libftdi/CMakeLists.txt b/third-party/libftdi/CMakeLists.txt deleted file mode 100644 index 57f739b..0000000 --- a/third-party/libftdi/CMakeLists.txt +++ /dev/null @@ -1,250 +0,0 @@ -# Project -project(libftdi1) -set(MAJOR_VERSION 1) -set(MINOR_VERSION 4) -set(PACKAGE libftdi1) -set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}) -set(VERSION ${VERSION_STRING}) -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) - -# CMake -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - set(CMAKE_BUILD_TYPE RelWithDebInfo) -endif("${CMAKE_BUILD_TYPE}" STREQUAL "") -set(CMAKE_COLOR_MAKEFILE ON) -cmake_minimum_required(VERSION 3.16 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 libusb -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 libftdi1 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") - -option ( LIBFTDI_INSTALL "Generate install step" ON ) - -option ( LIBFTDI_STATICLIBS "Build static libraries" ON ) - -# guess LIB_SUFFIX, don't take debian multiarch into account -if ( NOT DEFINED LIB_SUFFIX ) - if( CMAKE_SYSTEM_NAME MATCHES "Linux" - AND NOT CMAKE_CROSSCOMPILING - AND NOT EXISTS "/etc/debian_version" - AND NOT EXISTS "/etc/arch-release" ) - if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" ) - set ( LIB_SUFFIX 64 ) - endif () - 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 "libftdi1 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 () - -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 "libftdi1" ) - set ( CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win32") - set ( CPACK_NSIS_DISPLAY_NAME "libftdi1" ) - set ( CPACK_NSIS_MODIFY_PATH ON ) -endif () - -set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE) - -set(CPACK_SOURCE_GENERATOR TGZ) -set(CPACK_SOURCE_IGNORE_FILES "\\\\.git;~$;build/") -set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}) - -# Subdirectories -if ( UNIX ) - set ( CPACK_SET_DESTDIR ON ) -endif () - -# "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 ${PROJECT_SOURCE_DIR}) - -# Tests -option ( LIBFTDI_BUILD_TESTS "Build unit tests with Boost Unit Test framework" ON ) - -# Documentation -option ( LIBFTDI_DOCUMENTATION "Generate API documentation with Doxygen" ON ) - - -find_package ( Doxygen ) -if ( LIBFTDI_DOCUMENTATION AND DOXYGEN_FOUND ) - - # Find doxy config - message(STATUS "Doxygen found.") - - # Copy doxy.config.in - set(top_srcdir ${PROJECT_SOURCE_DIR}) - configure_file(${PROJECT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile ) - configure_file(${PROJECT_SOURCE_DIR}/doc/Doxyfile.xml.in ${CMAKE_BINARY_DIR}/Doxyfile.xml ) - - # Run doxygen - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/doc/html/index.html - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/doc - COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile - DEPENDS ${c_headers};${c_sources};${cpp_sources};${cpp_headers} - ) - - add_custom_target(docs ALL DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html) - - message(STATUS "Generating API documentation with Doxygen") -else(LIBFTDI_DOCUMENTATION AND DOXYGEN_FOUND) - message(STATUS "Not generating API documentation") -endif(LIBFTDI_DOCUMENTATION AND DOXYGEN_FOUND) - -add_subdirectory(src) -add_subdirectory(ftdipp) -add_subdirectory(python) -add_subdirectory(ftdi_eeprom) -add_subdirectory(packages) -add_subdirectory(test) - -# 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(${PROJECT_SOURCE_DIR}/libftdi1.spec.in ${CMAKE_BINARY_DIR}/libftdi1.spec @ONLY) -configure_file(${PROJECT_SOURCE_DIR}/libftdi1.pc.in ${CMAKE_BINARY_DIR}/libftdi1.pc @ONLY) -configure_file(${PROJECT_SOURCE_DIR}/libftdipp1.pc.in ${CMAKE_BINARY_DIR}/libftdipp1.pc @ONLY) -if (LIBFTDI_INSTALL) - install(FILES ${CMAKE_BINARY_DIR}/libftdi1.pc ${CMAKE_BINARY_DIR}/libftdipp1.pc - DESTINATION lib${LIB_SUFFIX}/pkgconfig) -endif() - -if (UNIX OR MINGW) - configure_file ( libftdi1-config.in ${CMAKE_CURRENT_BINARY_DIR}/libftdi1-config @ONLY ) - if (LIBFTDI_INSTALL) - install ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libftdi1-config - DESTINATION bin ) - endif() -endif () - -# config script install path -if ( NOT DEFINED LIBFTDI_CMAKE_CONFIG_DIR ) - set ( LIBFTDI_CMAKE_CONFIG_DIR lib${LIB_SUFFIX}/cmake/libftdi1 ) -endif () - -set ( LIBFTDI_INCLUDE_DIR ${includedir} ) -set ( LIBFTDI_INCLUDE_DIRS ${LIBFTDI_INCLUDE_DIR} ) -set ( LIBFTDI_LIBRARY ftdi1 ) -set ( LIBFTDI_LIBRARIES ${LIBFTDI_LIBRARY} ) -list ( APPEND LIBFTDI_LIBRARIES ${LIBUSB_LIBRARIES} ) -set ( LIBFTDI_STATIC_LIBRARY ftdi1.a ) -set ( LIBFTDI_STATIC_LIBRARIES ${LIBFTDI_STATIC_LIBRARY} ) -list ( APPEND LIBFTDI_STATIC_LIBRARIES ${LIBUSB_LIBRARIES} ) -if (FTDI_BUILD_CPP) - set ( LIBFTDIPP_LIBRARY ftdipp1 ) - set ( LIBFTDIPP_LIBRARIES ${LIBFTDIPP_LIBRARY} ) - list ( APPEND LIBFTDIPP_LIBRARIES ${LIBUSB_LIBRARIES} ) -endif () -set ( LIBFTDI_LIBRARY_DIRS ${libdir} ) -set ( LIBFTDI_ROOT_DIR ${prefix} ) -set ( LIBFTDI_VERSION_STRING ${VERSION_STRING} ) -set ( LIBFTDI_VERSION_MAJOR ${MAJOR_VERSION} ) -set ( LIBFTDI_VERSION_MINOR ${MINOR_VERSION} ) - -set ( LIBFTDI_USE_FILE ${CMAKE_INSTALL_PREFIX}/${LIBFTDI_CMAKE_CONFIG_DIR}/UseLibFTDI1.cmake ) - -if(CMAKE_VERSION VERSION_LESS 2.8.8) - configure_file ( cmake/LibFTDI1Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake @ONLY ) - configure_file ( cmake/LibFTDI1ConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1ConfigVersion.cmake @ONLY ) -else () - include(CMakePackageConfigHelpers) - - configure_package_config_file ( - cmake/LibFTDI1Config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake - INSTALL_DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR} - PATH_VARS - LIBFTDI_USE_FILE - LIBFTDI_ROOT_DIR - LIBFTDI_INCLUDE_DIR - LIBFTDI_INCLUDE_DIRS - LIBFTDI_LIBRARY_DIRS - NO_CHECK_REQUIRED_COMPONENTS_MACRO - ) - write_basic_package_version_file ( - LibFTDI1ConfigVersion.cmake - VERSION ${LIBFTDI_VERSION_STRING} - COMPATIBILITY AnyNewerVersion - ) -endif () - -if (LIBFTDI_INSTALL) - install ( FILES - ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1ConfigVersion.cmake - cmake/UseLibFTDI1.cmake - - DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR} - ) -endif (LIBFTDI_INSTALL) - - - - -include(CPack) diff --git a/third-party/libftdi/COPYING-CMAKE-SCRIPTS b/third-party/libftdi/COPYING-CMAKE-SCRIPTS deleted file mode 100644 index 4b41776..0000000 --- a/third-party/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/third-party/libftdi/COPYING.GPL b/third-party/libftdi/COPYING.GPL deleted file mode 100644 index d511905..0000000 --- a/third-party/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/third-party/libftdi/COPYING.LIB b/third-party/libftdi/COPYING.LIB deleted file mode 100644 index 5bc8fb2..0000000 --- a/third-party/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. - 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 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 Library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library 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/third-party/libftdi/ChangeLog b/third-party/libftdi/ChangeLog deleted file mode 100644 index 04acd31..0000000 --- a/third-party/libftdi/ChangeLog +++ /dev/null @@ -1,251 +0,0 @@ -New in 1.4 - 2017-08-07 ------------------------ -* New ftdi_usb_open_bus_addr() open function -* Use BM/R series baud rate computation for FT230X -* ftdi_get_error_string() now returns const char* -* C++ API: Ability to open devices with empty descriptor strings -* C++ API: Fix enumerations for buffer purge and modem controls -* small build fixes and improvements in the python examples -* ftdi_eeprom / eeprom handling: - * New API function: ftdi_eeprom_get_strings() - * Fix USE_SERIAL handling for 230X type chips - * Make ftdi_read_eeprom_location() endianness independent - * Fix flashing of FT245R - -New in 1.3 - 2016-05-20 ------------------------ -* Added ftdi_usb_get_strings2() to prevent automatic device close (Fahrzin Hemmati) -* Added ftdi_transfer_data_cancel() for cancellation of a submitted transfer, - avoided resubmittion of a canceled transfer in the callbacks, - replaced calls to libusb_handle_events with - libusb_handle_events_timeout_completed (Eugene Hutorny) -* ftdi_eeprom / eeprom handling: - * Add support for arbitrary user data (Salvador Eduardo Tropea) - * Add --build-eeprom support (Salvador Eduardo Tropea) - * Fix use_usb_version config file option (Thilo Schulz) - * Ability to include other config files in EEPROM config file (Thilo Schulz) - * Add external oscillator enable bit (Raphael Assenat) - * Support channel configuration (Stephan Linz) - * Added --device option to ftdi_eeprom to specify FTDI device (Robin Haberkorn) - * Fixed EEPROM user-area space checks for FT232R and FT245R chips (Robin Haberkorn) -* Various improvements to CBUS handling, including the EEPROM (Robin Haberkorn) -* swig wrapper: Fix handling of binary strings in ftdi_write_data() - for python 3 (xantares09) -* cbus python example code (Rodney Sinclair) -* ftdi_stream: fix timeout setting (Ларионов Даниил) -* Fixed typo in CBUS defines: CBUSG_DRIVE1 -> CBUSH_DRIVE1 - -New in 1.2 - 2014-11-21 ------------------------ -* Support for FT230X devices (Uwe Bonnes) -* ftdi_usb_get_strings(): Don't try to open an already open device (Denis Sirotkin) -* Support for finding devices bricked by the Windows driver (Forest Crossman) -* cmake build system: New LibFTDI1ConfigVersion.cmake file (xantares09) -* Fix a typo in the MPSSE command CLK_BYTES_OR_LOW (Benjamin Vanheuverzwijn) -* Minor fixes for MSVC++ (Andrei Errapart) -* Various small code improvements (Florian Preinstorfer, Jochen Sprickerhof, xantares09) - -New in 1.1 - 2014-02-05 ------------------------ -* Fix FT232H eeprom suspend pulldown setting (Davide Michelizza) -* Fix FT232H eeprom user area size (Davide Michelizza) -* Improved mingw build (Paul Fertser and Michel Zou) -* C++ wrapper: Get/set functions for USB timeouts (Jochen Sprickerhof) -* Partial support for FT230X (Nathael Pajani) -* New API function: ftdi_eeprom_set_strings() (Nathael Pajani) -* Prevent possible segfault in ftdi_eeprom_decode() (Nathael Pajani) -* Save device release number in eeprom (Jarkko Sonninen) -* Fix "self powered" eeprom flag (Jarkko Sonninen) -* Improved python wrapper (Michel Zou) -* Many buildsystem improvements (Michel Zou and Mike Frysinger) -* See the git history for more changes and fixes - -New in 1.0 - 2013-01-29 ------------------------ -* Ported to libusb 1.x (initial work by Jie Zhang) -* Many eeprom handling improvements (Uwe Bonnes, Anders Larsen) -* Renamed pkconfig, library .so etc. files to "libftdi1" (Intra2net) -* ftdi_eeprom is part of libftdi now (Intra2net) - -* New baudrate calculation code + unit tests (Uwe Bonnes and Intra2net) -* Improved python bindings including python3 support (Michel Zou) -* Switched completely to cmake build system (Intra2net) -* cmake: Easy libftdi discovery via find_package() (Michel Zou) -* eeprom handling now done via get()/set() functions (Uwe Bonnes) -* C++ wrapper: Fixed use-after-free in List::find_all() (Intra2net) -* Documentation updates (Xiaofan Chen) -* See the git history for more changes and fixes - -New in 0.20 - 2012-03-19 ------------------------- -* Support for FT232H (Uwe Bonnes) -* Fixed install location of header files (Uwe Bonnes and Intra2net) -* Backported serial_test tool from libftdi 1.x (Uwe Bonnes) - -New in 0.19 - 2011-05-23 ------------------------- -* Make kernel driver detach configurable (Thomas Klose) -* Correct ftdi_poll_modem_status() result code (Tom Saunders) -* cmake build system improvements (Evgeny Sinelnikov) -* Fix uninitialized memory access in async mode (Intra2net) -* Support for FT232R eeprom features (Hermann Kraus) -* Fix size returned by ftdi_read_data (Hermann Kraus) -* C++ wrapper: Fix infinite recursion in set_bitmode (Intra2net) -* Improvements to the python wrapper (Flynn Marquardt and Chris Zeh) - -New in 0.18 - 2010-06-25 ------------------------- -* Add ftdi_eeprom_free() to free allocated memory in eeprom (Wilfried Holzke) -* More generic error message for the FTDI kernel driver (Intra2net) -* Honor CPPFLAGS in python wrapper build (Alexander Lehmann) -* cmake: Fix package creation on 32-bit machines (Uwe Bonnes) -* Fix swig argument constraints (Intra2net) -* Don't segfault if device is closed or ftdi context is invalid (Intra2net) -* Ability to disable build of examples / documentation (Mike Frysinger and Intra2net) -* Fix typo in python wrapper build (Mike Frysinger) -* Autoconf build system improvements (Mike Frysinger) - -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/third-party/libftdi/FindUSB1.cmake b/third-party/libftdi/FindUSB1.cmake deleted file mode 100644 index ebcac99..0000000 --- a/third-party/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/third-party/libftdi/LICENSE b/third-party/libftdi/LICENSE deleted file mode 100644 index f1831c0..0000000 --- a/third-party/libftdi/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -The C library "libftdi1" 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 "ftdipp1" 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/third-party/libftdi/README b/third-party/libftdi/README deleted file mode 100644 index 072b671..0000000 --- a/third-party/libftdi/README +++ /dev/null @@ -1,52 +0,0 @@ --------------------------------------------------------------------- -libftdi version 1.4 --------------------------------------------------------------------- - -libftdi - A library (using libusb) to talk to FTDI's UART/FIFO chips -including the popular bitbang mode. - -The following chips are supported: -* FT230X -- FT4232H / FT2232H -- FT232R / FT245R -- FT2232L / FT2232D / FT2232C -- FT232BM / FT245BM (and the BL/BQ variants) -- FT8U232AM / FT8U245AM - -libftdi requires libusb 1.x. - -The AUTHORS file contains a list of all the people -that made libftdi possible what it is today. - -Changes -------- -* New ftdi_usb_open_bus_addr() open function -* Use BM/R series baud rate computation for FT230X -* ftdi_get_error_string() now returns const char* -* C++ API: Ability to open devices with empty descriptor strings -* C++ API: Fix enumerations for buffer purge and modem controls -* small build fixes and improvements in the python examples -* ftdi_eeprom / eeprom handling: - * New API function: ftdi_eeprom_get_strings() - * Fix USE_SERIAL handling for 230X type chips - * Make ftdi_read_eeprom_location() endianness independent - * Fix flashing of FT245R - -You'll find the newest version of libftdi at: -https://www.intra2net.com/en/developer/libftdi - - -Quick start ------------ -mkdir build -cd build - -cmake -DCMAKE_INSTALL_PREFIX="/usr" ../ -make -make install - -More verbose build instructions are in "README.build" - --------------------------------------------------------------------- -www.intra2net.com 2003-2017 Intra2net AG --------------------------------------------------------------------- diff --git a/third-party/libftdi/README.build b/third-party/libftdi/README.build deleted file mode 100644 index e130ca0..0000000 --- a/third-party/libftdi/README.build +++ /dev/null @@ -1,96 +0,0 @@ -Here is a short tutorial on how to build libftdi git under -Ubuntu 12.10, But it is similar on other Linux distros. - -1) Install the build tools -sudo apt-get install build-essential (yum install make automake gcc gcc-c++ kernel-devel) -sudo apt-get install git-core (yum install git) -sudo apt-get install cmake (yum install cmake) -sudo apt-get install doxygen (for building documentations) (yum install doxygen) - -2) Install dependencies -sudo apt-get install libusb-1.0-devel (yum install libusb-devel) -(if the system comes with older version like 1.0.8 or -earlier, it is recommended you build libusbx-1.0.14 or later). - -sudo apt-get install libconfuse-dev (for ftdi-eeprom) (yum install libconfuse-devel) -sudo apt-get install swig python-dev (for python bindings) (yum install swig python-devel) -sudo apt-get install libboost-all-dev (for C++ binding and unit test) (yum install boost-devel) - -3) Clone the git repository -mkdir libftdi -cd libftdi -git clone git://developer.intra2net.com/libftdi - -If you are building the release tar ball, just extract the source -tar ball. - -4) Build the git source and install -cd libftdi -mkdir build -cd build -cmake -DCMAKE_INSTALL_PREFIX="/usr" ../ -make -sudo make install - -5) carry out some tests -cd examples - -mcuee@Ubuntu1210VM:~/Desktop/build/libftdi/libftdi/build/examples$ -./find_all_pp -v 0x0403 -p 0x6001 -Found devices ( VID: 0x403, PID: 0x6001 ) ------------------------------------------------- -FTDI (0x8730800): ftdi, usb serial converter, ftDEH51S (Open OK) -FTDI (0x8730918): FTDI, FT232R USB UART, A8007Ub5 (Open OK) - -mcuee@Ubuntu1210VM:~/Desktop/build/libftdi/libftdi/build/examples$ ./eeprom -2 FTDI devices found: Only Readout on EEPROM done. Use -VID/PID/desc/serial to select device -Decoded values of device 1: -Chip type 1 ftdi_eeprom_size: 128 -0x000: 00 00 03 04 01 60 00 04 a0 16 08 00 10 01 94 0a .....`.. ........ -0x010: 9e 2a c8 12 0a 03 66 00 74 00 64 00 69 00 2a 03 .*....f. t.d.i.*. -0x020: 75 00 73 00 62 00 20 00 73 00 65 00 72 00 69 00 u.s.b. . s.e.r.i. -0x030: 61 00 6c 00 20 00 63 00 6f 00 6e 00 76 00 65 00 a.l. .c. o.n.v.e. -0x040: 72 00 74 00 65 00 72 00 12 03 66 00 74 00 44 00 r.t.e.r. ..f.t.D. -0x050: 45 00 48 00 35 00 31 00 53 00 02 03 00 00 00 00 E.H.5.1. S....... -0x060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ -0x070: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 16 02 ........ ........ -VID: 0x0403 -PID: 0x6001 -Release: 0x0400 -Bus Powered: 44 mA USB Remote Wake Up -Manufacturer: ftdi -Product: usb serial converter -Serial: ftDEH51S -Checksum : 0216 -Enable Remote Wake Up -PNP: 1 -Decoded values of device 2: -Chip type 3 ftdi_eeprom_size: 128 -0x000: 00 40 03 04 01 60 00 00 a0 2d 08 00 00 00 98 0a .@...`.. .-...... -0x010: a2 20 c2 12 23 10 05 00 0a 03 46 00 54 00 44 00 . ..#... ..F.T.D. -0x020: 49 00 20 03 46 00 54 00 32 00 33 00 32 00 52 00 I. .F.T. 2.3.2.R. -0x030: 20 00 55 00 53 00 42 00 20 00 55 00 41 00 52 00 .U.S.B. .U.A.R. -0x040: 54 00 12 03 41 00 38 00 30 00 30 00 37 00 55 00 T...A.8. 0.0.7.U. -0x050: 62 00 35 00 c9 bf 1c 80 00 00 00 00 00 00 00 00 b.5..... ........ -0x060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ -0x070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0f 23 ........ .......# -0x080: 2c 04 d3 fb 00 00 c9 bf 1c 80 42 00 00 00 00 00 ,....... ..B..... -0x090: 00 00 00 00 00 00 00 00 38 41 32 52 4a 33 47 4f ........ 8A2RJ3GO -VID: 0x0403 -PID: 0x6001 -Release: 0x0000 -Bus Powered: 90 mA USB Remote Wake Up -Manufacturer: FTDI -Product: FT232R USB UART -Serial: A8007Ub5 -Checksum : 230f -Internal EEPROM -Enable Remote Wake Up -PNP: 1 -Channel A has Mode UART VCP -C0 Function: TXLED -C1 Function: RXLED -C2 Function: TXDEN -C3 Function: PWREN -C4 Function: SLEEP diff --git a/third-party/libftdi/README.mingw b/third-party/libftdi/README.mingw deleted file mode 100644 index 771204c..0000000 --- a/third-party/libftdi/README.mingw +++ /dev/null @@ -1,38 +0,0 @@ -* How to cross compile libftdi-1.x for Windows? * - 1 - Prepare a pkg-config wrapper according to - https://www.flameeyes.eu/autotools-mythbuster/pkgconfig/cross-compiling.html , - additionally export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS and - PKG_CONFIG_ALLOW_SYSTEM_LIBS. - 2 - Write a CMake toolchain file according to - http://www.vtk.org/Wiki/CmakeMingw . Change the path to your future sysroot. - 3 - Get libusb sources (either by cloning the git repo or by downloading a - tarball). Unpack, autogen.sh (when building from git), and configure like this: - ./configure --build=`./config.guess` --host=i686-w64-mingw32 \ - --prefix=/usr --with-sysroot=$HOME/i686-w64-mingw32-root/ - 4 - run - make install DESTDIR=$HOME/i686-w64-mingw32-root/ - 5 - go to libftdi-1.x source directory and run - cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-mingw.cmake \ - -DCMAKE_INSTALL_PREFIX="/usr" \ - -DPKG_CONFIG_EXECUTABLE=`which i686-w64-mingw32-pkg-config` - 6 - run - make install DESTDIR=$HOME/i686-w64-mingw32-root/ - -* How to run libftdi 1.x under Windows * - -On 26-Jan-2014, libusbx and libusb project were merged with the release -of libusb-1.0.18 and now the project is called libusb. - -libusb Windows backend will need to rely on a proper driver to run. -Please refer to the following wiki page for proper driver installation. -https://github.com/libusb/libusb/wiki/Windows#wiki-How_to_use_libusb_on_Windows - -As of 26-Jan-2014, libusb Windows backend supports WinUSB, -libusb0.sys and libusbk.sys driver. However, libusb's support of -libusb0.sys and libusbk.sys is considered to be less mature than -WinUSB. Therefore, WinUSB driver installation using Zadig -is recommended. - -Take note once you replace the original FTDI driver with WinUSB driver, -you can no longer use the functionality the original FTDI driver provides -(eg. Virtual Serial Port or D2XX). diff --git a/third-party/libftdi/TODO b/third-party/libftdi/TODO deleted file mode 100644 index 517178c..0000000 --- a/third-party/libftdi/TODO +++ /dev/null @@ -1,3 +0,0 @@ -*** TODO for 1.0 release *** -Documentation: -- Document the new EEPROM function diff --git a/third-party/libftdi/cmake/FindConfuse.cmake b/third-party/libftdi/cmake/FindConfuse.cmake deleted file mode 100644 index ab25eef..0000000 --- a/third-party/libftdi/cmake/FindConfuse.cmake +++ /dev/null @@ -1,74 +0,0 @@ -# libConfuse is a configuration file parser library -# available at http://www.nongnu.org/confuse/ -# -# The module defines the following variables: -# CONFUSE_FOUND - the system has Confuse -# CONFUSE_INCLUDE_DIR - where to find confuse.h -# CONFUSE_INCLUDE_DIRS - confuse includes -# CONFUSE_LIBRARY - where to find the Confuse library -# CONFUSE_LIBRARIES - aditional libraries -# CONFUSE_ROOT_DIR - root dir (ex. /usr/local) - -#============================================================================= -# Copyright 2010-2013, Julien Schueller -# All rights reserved. -# -# 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 above copyright notice, this -# list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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. - -# The views and conclusions contained in the software and documentation are those -# of the authors and should not be interpreted as representing official policies, -# either expressed or implied, of the FreeBSD Project. -#============================================================================= - - -find_path ( CONFUSE_INCLUDE_DIR - NAMES confuse.h -) - -set ( CONFUSE_INCLUDE_DIRS ${CONFUSE_INCLUDE_DIR} ) - -find_library ( CONFUSE_LIBRARY - NAMES confuse -) - -set ( CONFUSE_LIBRARIES ${CONFUSE_LIBRARY} ) - - -# try to guess root dir from include dir -if ( CONFUSE_INCLUDE_DIR ) - string ( REGEX REPLACE "(.*)/include.*" "\\1" CONFUSE_ROOT_DIR ${CONFUSE_INCLUDE_DIR} ) -# try to guess root dir from library dir -elseif ( CONFUSE_LIBRARY ) - string ( REGEX REPLACE "(.*)/lib[/|32|64].*" "\\1" CONFUSE_ROOT_DIR ${CONFUSE_LIBRARY} ) -endif () - - -# handle the QUIETLY and REQUIRED arguments -include ( FindPackageHandleStandardArgs ) -find_package_handle_standard_args( Confuse DEFAULT_MSG CONFUSE_LIBRARY CONFUSE_INCLUDE_DIR ) - -mark_as_advanced ( - CONFUSE_LIBRARY - CONFUSE_LIBRARIES - CONFUSE_INCLUDE_DIR - CONFUSE_INCLUDE_DIRS - CONFUSE_ROOT_DIR -) diff --git a/third-party/libftdi/cmake/FindLibintl.cmake b/third-party/libftdi/cmake/FindLibintl.cmake deleted file mode 100644 index 65ed91c..0000000 --- a/third-party/libftdi/cmake/FindLibintl.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# Try to find Libintl functionality -# Once done this will define -# -# LIBINTL_FOUND - system has Libintl -# LIBINTL_INCLUDE_DIR - Libintl include directory -# LIBINTL_LIBRARIES - Libraries needed to use Libintl -# -# TODO: This will enable translations only if Gettext functionality is -# present in libc. Must have more robust system for release, where Gettext -# functionality can also reside in standalone Gettext library, or the one -# embedded within kdelibs (cf. gettext.m4 from Gettext source). - -# Copyright (c) 2006, Chusslove Illich, -# Copyright (c) 2007, Alexander Neundorf, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) - set(Libintl_FIND_QUIETLY TRUE) -endif(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) - -find_path(LIBINTL_INCLUDE_DIR libintl.h) - -set(LIBINTL_LIB_FOUND FALSE) - -if(LIBINTL_INCLUDE_DIR) - include(CheckFunctionExists) - check_function_exists(dgettext LIBINTL_LIBC_HAS_DGETTEXT) - - if (LIBINTL_LIBC_HAS_DGETTEXT) - set(LIBINTL_LIBRARIES) - set(LIBINTL_LIB_FOUND TRUE) - else (LIBINTL_LIBC_HAS_DGETTEXT) - find_library(LIBINTL_LIBRARIES NAMES intl libintl ) - if(LIBINTL_LIBRARIES) - set(LIBINTL_LIB_FOUND TRUE) - endif(LIBINTL_LIBRARIES) - endif (LIBINTL_LIBC_HAS_DGETTEXT) - -endif(LIBINTL_INCLUDE_DIR) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Libintl DEFAULT_MSG LIBINTL_INCLUDE_DIR LIBINTL_LIB_FOUND) - -mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARIES LIBINTL_LIBC_HAS_DGETTEXT LIBINTL_LIB_FOUND) - diff --git a/third-party/libftdi/cmake/FindUSB1.cmake b/third-party/libftdi/cmake/FindUSB1.cmake deleted file mode 100644 index 95119e6..0000000 --- a/third-party/libftdi/cmake/FindUSB1.cmake +++ /dev/null @@ -1,43 +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) - # 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) - - FIND_PATH(LIBUSB_INCLUDE_DIR libusb.h - PATH_SUFFIXES libusb-1.0 - PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) - - FIND_LIBRARY(LIBUSB_LIBRARY NAMES usb-1.0 - PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) - - if (APPLE) - set(LIBUSB_LIBRARIES "${LIBUSB_LIBRARY};-lobjc;-Wl,-framework,IOKit;-Wl,-framework,CoreFoundation;-Wl,-framework,Security") - else() - set(LIBUSB_LIBRARIES "${LIBUSB_LIBRARY}") - endif (APPLE) - - 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/third-party/libftdi/cmake/LibFTDI1Config.cmake.in b/third-party/libftdi/cmake/LibFTDI1Config.cmake.in deleted file mode 100644 index ecc615e..0000000 --- a/third-party/libftdi/cmake/LibFTDI1Config.cmake.in +++ /dev/null @@ -1,53 +0,0 @@ -# -*- cmake -*- -# -# LibFTDI1Config.cmake(.in) -# -# Copyright (C) 2013 Intra2net AG and the libftdi developers -# -# This file is part of LibFTDI. -# -# LibFTDI 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; -# - -# Use the following variables to compile and link against LibFTDI: -# LIBFTDI_FOUND - True if LibFTDI was found on your system -# LIBFTDI_USE_FILE - The file making LibFTDI usable -# LIBFTDI_DEFINITIONS - Definitions needed to build with LibFTDI -# LIBFTDI_INCLUDE_DIRS - Directory where ftdi.h can be found -# LIBFTDI_INCLUDE_DIRS - List of directories of LibFTDI and it's dependencies -# LIBFTDI_LIBRARY - LibFTDI library location -# LIBFTDI_LIBRARIES - List of libraries to link against LibFTDI library -# LIBFTDIPP_LIBRARY - LibFTDI C++ wrapper library location -# LIBFTDIPP_LIBRARIES - List of libraries to link against LibFTDI C++ wrapper -# LIBFTDI_LIBRARY_DIRS - List of directories containing LibFTDI' libraries -# LIBFTDI_ROOT_DIR - The base directory of LibFTDI -# LIBFTDI_VERSION_STRING - A human-readable string containing the version -# LIBFTDI_VERSION_MAJOR - The major version of LibFTDI -# LIBFTDI_VERSION_MINOR - The minor version of LibFTDI -# LIBFTDI_VERSION_PATCH - The patch version of LibFTDI -# LIBFTDI_PYTHON_MODULE_PATH - Path to the python module - -set ( LIBFTDI_FOUND 1 ) -set ( LIBFTDI_USE_FILE "@LIBFTDI_USE_FILE@" ) - -set ( LIBFTDI_DEFINITIONS "@LIBFTDI_DEFINITIONS@" ) -set ( LIBFTDI_INCLUDE_DIR "@LIBFTDI_INCLUDE_DIR@" ) -set ( LIBFTDI_INCLUDE_DIRS "@LIBFTDI_INCLUDE_DIRS@" ) -set ( LIBFTDI_LIBRARY "@LIBFTDI_LIBRARY@" ) -set ( LIBFTDI_LIBRARIES "@LIBFTDI_LIBRARIES@" ) -set ( LIBFTDI_STATIC_LIBRARY "@LIBFTDI_STATIC_LIBRARY@" ) -set ( LIBFTDI_STATIC_LIBRARIES "@LIBFTDI_STATIC_LIBRARIES@" ) -set ( LIBFTDIPP_LIBRARY "@LIBFTDIPP_LIBRARY@" ) -set ( LIBFTDIPP_LIBRARIES "@LIBFTDIPP_LIBRARIES@" ) -set ( LIBFTDI_LIBRARY_DIRS "@LIBFTDI_LIBRARY_DIRS@" ) -set ( LIBFTDI_ROOT_DIR "@LIBFTDI_ROOT_DIR@" ) - -set ( LIBFTDI_VERSION_STRING "@LIBFTDI_VERSION_STRING@" ) -set ( LIBFTDI_VERSION_MAJOR "@LIBFTDI_VERSION_MAJOR@" ) -set ( LIBFTDI_VERSION_MINOR "@LIBFTDI_VERSION_MINOR@" ) -set ( LIBFTDI_VERSION_PATCH "@LIBFTDI_VERSION_PATCH@" ) - -set ( LIBFTDI_PYTHON_MODULE_PATH "@LIBFTDI_PYTHON_MODULE_PATH@" ) - diff --git a/third-party/libftdi/cmake/LibFTDI1ConfigVersion.cmake.in b/third-party/libftdi/cmake/LibFTDI1ConfigVersion.cmake.in deleted file mode 100644 index ed0d463..0000000 --- a/third-party/libftdi/cmake/LibFTDI1ConfigVersion.cmake.in +++ /dev/null @@ -1,31 +0,0 @@ -# This is a basic version file for the Config-mode of find_package(). -# It is used by write_basic_package_version_file() as input file for configure_file() -# to create a version-file which can be installed along a config.cmake file. -# -# The created file sets PACKAGE_VERSION_EXACT if the current version string and -# the requested version string are exactly the same and it sets -# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. -# The variable CVF_VERSION must be set before calling configure_file(). - -set(PACKAGE_VERSION "@LIBFTDI_VERSION_STRING@") - -if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() - -# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: -if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") - return() -endif() - -# check that the installed version has the same 32/64bit-ness as the one which is currently searching: -if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") - math(EXPR installedBits "8 * 8") - set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") - set(PACKAGE_VERSION_UNSUITABLE TRUE) -endif() diff --git a/third-party/libftdi/cmake/Toolchain-Crossbuild32.cmake b/third-party/libftdi/cmake/Toolchain-Crossbuild32.cmake deleted file mode 100644 index 3c80dd8..0000000 --- a/third-party/libftdi/cmake/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/third-party/libftdi/cmake/Toolchain-i686-w64-mingw32.cmake b/third-party/libftdi/cmake/Toolchain-i686-w64-mingw32.cmake deleted file mode 100644 index 1eed0cf..0000000 --- a/third-party/libftdi/cmake/Toolchain-i686-w64-mingw32.cmake +++ /dev/null @@ -1,17 +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 i686-w64-mingw32-gcc) -SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) - -# here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 ) - -# 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) -set (CMAKE_RC_COMPILER i686-w64-mingw32-windres) diff --git a/third-party/libftdi/cmake/Toolchain-mingw32.cmake b/third-party/libftdi/cmake/Toolchain-mingw32.cmake deleted file mode 100644 index bff3cba..0000000 --- a/third-party/libftdi/cmake/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/third-party/libftdi/cmake/Toolchain-x86_64-w64-mingw32.cmake b/third-party/libftdi/cmake/Toolchain-x86_64-w64-mingw32.cmake deleted file mode 100644 index 20a5b40..0000000 --- a/third-party/libftdi/cmake/Toolchain-x86_64-w64-mingw32.cmake +++ /dev/null @@ -1,17 +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 x86_64-w64-mingw32-gcc) -SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) - -# here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 ) - -# 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) -set (CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) diff --git a/third-party/libftdi/cmake/UseLibFTDI1.cmake b/third-party/libftdi/cmake/UseLibFTDI1.cmake deleted file mode 100644 index e7e43b0..0000000 --- a/third-party/libftdi/cmake/UseLibFTDI1.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# -*- cmake -*- -# -# UseLibFTDI.cmake -# -# Copyright (C) 2013 Intra2net AG and the libftdi developers -# -# This file is part of LibFTDI. -# -# LibFTDI 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; -# - - -add_definitions ( ${LIBFTDI_DEFINITIONS} ) -include_directories ( ${LIBFTDI_INCLUDE_DIRS} ) -link_directories ( ${LIBFTDI_LIBRARY_DIRS} ) - diff --git a/third-party/libftdi/doc/Doxyfile.in b/third-party/libftdi/doc/Doxyfile.in deleted file mode 100644 index 84006c8..0000000 --- a/third-party/libftdi/doc/Doxyfile.in +++ /dev/null @@ -1,2393 +0,0 @@ -# Doxyfile 1.8.10 - -# 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 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. -# 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 = @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 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 = - -# 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 = doc - -# 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 - -# 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 = 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 - -# 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. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# 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 = NO - -# 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 - -# 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, -# C#, C, C++, D, PHP, Objective-C, Python, 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), VHDL. 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. - -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 http://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 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: -# http://www.riverbankcomputing.co.uk/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 - -#--------------------------------------------------------------------------- -# 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 = YES - -# 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_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 = 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. 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 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 = 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, 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 = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) 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 - -# 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. -# 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 http://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. -# The default value is: NO. - -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) -# 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@/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. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://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. -# -# 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, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, -# *.vhdl, *.ucf, *.qsf, *.as and *.js. - -FILE_PATTERNS = - -# 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 = - -# 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 = @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. -# 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. - -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. - -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 = YES - -# 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 -# function all documented functions referencing it will be listed. -# The default value is: NO. - -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. -# The default value is: NO. - -REFERENCES_RELATION = YES - -# 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 http://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 config 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 = NO - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -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 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 = html - -# 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 -# 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. -# 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_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 = NO - -# 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: http://developer.apple.com/tools/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 http://developer.apple.com/tools/creatingdocsetswithdoxygen.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: http://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 master .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: http://qt-project.org/doc/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: http://qt-project.org/doc/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: http://qt-project.org/doc/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: http://qt-project.org/doc/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: -# http://qt-project.org/doc/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 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 - -# 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_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 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 - -# 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 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/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 http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://www.mathjax.org/mathjax - -# 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/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 -# , /