diff --git a/CMakeLists.txt b/CMakeLists.txt index a421f12..bc019fa 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1 +1,7 @@ -idf_component_register(SRCS "zh_tachometer.c" INCLUDE_DIRS "include" REQUIRES driver esp_timer) \ No newline at end of file +if(${IDF_VERSION_MAJOR} STREQUAL 6) + set(requires esp_driver_gpio esp_driver_pcnt esp_timer) +else() + set(requires driver esp_timer) +endif() + +idf_component_register(SRCS "zh_tachometer.c" INCLUDE_DIRS "include" REQUIRES ${requires}) \ No newline at end of file diff --git a/version.txt b/version.txt index afaf360..1cc5f65 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.0 \ No newline at end of file +1.1.0 \ No newline at end of file