Tue, 26 Sep 2023 14:59:06 +0200
Migrated to isp-idf v5.1
components/esp32-rotary-encoder/CMakeLists.txt | file | annotate | diff | comparison | revisions | |
components/esp32-rotary-encoder/rotary_encoder.c | file | annotate | diff | comparison | revisions |
--- a/components/esp32-rotary-encoder/CMakeLists.txt Tue Sep 26 14:57:18 2023 +0200 +++ b/components/esp32-rotary-encoder/CMakeLists.txt Tue Sep 26 14:59:06 2023 +0200 @@ -1,5 +1,5 @@ -#idf_component_register(SRCS "rotary_encoder.c" INCLUDE_DIRS include) set(COMPONENT_ADD_INCLUDEDIRS include) set(COMPONENT_SRCS "rotary_encoder.c") +set(COMPONENT_REQUIRES "driver") register_component()
--- a/components/esp32-rotary-encoder/rotary_encoder.c Tue Sep 26 14:57:18 2023 +0200 +++ b/components/esp32-rotary-encoder/rotary_encoder.c Tue Sep 26 14:59:06 2023 +0200 @@ -220,12 +220,12 @@ info->state.direction = ROTARY_ENCODER_DIRECTION_NOT_SET; // configure GPIOs - gpio_pad_select_gpio(info->pin_a); + gpio_reset_pin(info->pin_a); gpio_set_pull_mode(info->pin_a, GPIO_PULLUP_ONLY); gpio_set_direction(info->pin_a, GPIO_MODE_INPUT); gpio_set_intr_type(info->pin_a, GPIO_INTR_ANYEDGE); - gpio_pad_select_gpio(info->pin_b); + gpio_reset_pin(info->pin_b); gpio_set_pull_mode(info->pin_b, GPIO_PULLUP_ONLY); gpio_set_direction(info->pin_b, GPIO_MODE_INPUT); gpio_set_intr_type(info->pin_b, GPIO_INTR_ANYEDGE);