diff --git a/.astylerc.old-style b/.astylerc.old-style deleted file mode 100644 index 30389ce..0000000 --- a/.astylerc.old-style +++ /dev/null @@ -1,17 +0,0 @@ ---align-reference=name ---attach-classes ---attach-classes ---attach-namespaces ---convert-tabs ---exclude=build ---exclude=common ---exclude=managed_components ---ignore-exclude-errors ---indent-switches ---indent=spaces=4 ---keep-one-line-statements ---max-continuation-indent=120 ---pad-header ---pad-oper ---style=allman ---unpad-paren diff --git a/.eil.yml b/.eil.yml index 39c7daa..7ef6832 100644 --- a/.eil.yml +++ b/.eil.yml @@ -1,7 +1,7 @@ --- name: shiftregister description: Generic shift register driver -version: 1.0.0 +version: 1.0.1 groups: - common code_owners: diff --git a/.gitmodules b/.gitmodules index a9554a2..928766e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "common"] - path = common - url = https://github.com/esp-idf-lib/common.git +[submodule "eil-cmake-utils"] + path = eil-cmake-utils + url = git@github.com:esp-idf-lib/eil-cmake-utils.git diff --git a/CMakeLists.txt b/CMakeLists.txt index f1a03b5..8acef73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,20 @@ -if(${IDF_VERSION_MAJOR} STREQUAL 5 AND ${IDF_VERSION_MINOR} STRLESS 3) - set(priv_requires driver) -else() - set(priv_requires esp_driver_gpio) -endif() +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/eil-cmake-utils/cmake) +include(eil_check_idf_features) +eil_check_idf_has_esp_drivers() -idf_component_register(SRCS "shiftregister_gpio.c" - PRIV_REQUIRES ${priv_requires} - INCLUDE_DIRS "include") +# List of common ESP-IDF components required by this component +set(REQUIRED_COMPONENTS log) -# include common cmake file for components -set(ESP_IDF_LIB_CMAKE ${CMAKE_CURRENT_LIST_DIR}/common/cmake/esp-idf-lib.cmake) -if(EXISTS ${ESP_IDF_LIB_CMAKE}) - include(${ESP_IDF_LIB_CMAKE}) +if(EIL_IDF_HAS_ESP_DRIVERS) + list(APPEND REQUIRED_COMPONENTS esp_driver_gpio) else() - message(WARNING "${ESP_IDF_LIB_CMAKE} not found") + list(APPEND REQUIRED_COMPONENTS driver) endif() + +idf_component_register( + SRCS shiftregister_gpio.c + INCLUDE_DIRS "include" + REQUIRES ${REQUIRED_COMPONENTS} +) + +include(eil_ci) diff --git a/Kconfig.i2c b/Kconfig.i2c deleted file mode 100644 index 29d0ac2..0000000 --- a/Kconfig.i2c +++ /dev/null @@ -1,19 +0,0 @@ -config EXAMPLE_I2C_MASTER_SCL - int "SCL GPIO Number" - default 5 if IDF_TARGET_ESP8266 - default 6 if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C5 || IDF_TARGET_ESP32C6 || IDF_TARGET_ESP32C61 - default 19 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 - default 4 if IDF_TARGET_ESP32H2 - default 4 if IDF_TARGET_ESP32P4 - help - GPIO number for I2C Master clock line. - -config EXAMPLE_I2C_MASTER_SDA - int "SDA GPIO Number" - default 4 if IDF_TARGET_ESP8266 - default 5 if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C5 || IDF_TARGET_ESP32C6 || IDF_TARGET_ESP32C61 - default 18 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 - default 3 if IDF_TARGET_ESP32H2 - default 3 if IDF_TARGET_ESP32P4 - help - GPIO number for I2C Master data line. diff --git a/common b/common deleted file mode 160000 index 12347bc..0000000 --- a/common +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 12347bc4f4f897838b9bab78a6c24e5fe46aae02 diff --git a/eil-cmake-utils b/eil-cmake-utils new file mode 160000 index 0000000..c91055e --- /dev/null +++ b/eil-cmake-utils @@ -0,0 +1 @@ +Subproject commit c91055e05b68b6f0cdbd73969e725d0b91aa25fa diff --git a/idf_component.yml b/idf_component.yml index 62375eb..3ebe32f 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,6 +1,6 @@ --- -version: 1.0.0 -description: "This is a template component" +version: 1.0.1 +description: "Generic shift register driver" license: "MIT" targets: - esp32