diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f773ae..5d2a64a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,14 @@ add_prefix(priv_include_dirs "${CMAKE_CURRENT_LIST_DIR}/freemodbus/" ${priv_incl message(STATUS "DEBUG: Use esp-modbus component folder: ${CMAKE_CURRENT_LIST_DIR}.") +set(requires driver lwip) + +# esp_timer component was introduced in v4.2 +if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "4.1") + list(APPEND requires esp_timer) +endif() + idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "${include_dirs}" PRIV_INCLUDE_DIRS "${priv_include_dirs}" - REQUIRES driver lwip) + REQUIRES ${requires}) diff --git a/docs/_static/modbus_docs_versions.js b/docs/_static/modbus_docs_versions.js index 14ce998..2827286 100644 --- a/docs/_static/modbus_docs_versions.js +++ b/docs/_static/modbus_docs_versions.js @@ -1,10 +1,11 @@ var DOCUMENTATION_VERSIONS = { - DEFAULTS: { has_targets: false, - supported_targets: [ "esp32" ] + DEFAULTS: { has_targets: true, + supported_targets: [ "esp32", "esp32s2", "esp32s3", "esp32c3" ] }, VERSIONS: [ - { name: "latest", has_targets: false, supported_targets: [ "esp32", "esp32s2", "esp32s3", "esp32c3" ] }, - { name: "v1.0.0", old:false, has_targets:true, supported_targets: [ "esp32", "esp32s2", "esp32s3", "esp32c3" ]} + { name: "latest" }, + { name: "v1.0.1", old:false }, + { name: "v1.0.0", old:true } ], IDF_TARGETS: [ { text: "ESP32", value: "esp32"}, diff --git a/idf_component.yml b/idf_component.yml index 57cb047..479ed1b 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.0.0" +version: "1.0.1" description: ESP-MODBUS is the official Modbus library for Espressif SoCs. url: https://github.com/espressif/esp-modbus dependencies: