# HG changeset patch # User Michiel Broek # Date 1695733146 -7200 # Node ID c18d2951e8d7e3ffca3b5e28f7e9e164479fa9aa # Parent acc1904cd70d913e52351b35f77ce11b12b03f59 Migrated to isp-idf v5.1 diff -r acc1904cd70d -r c18d2951e8d7 components/esp32-rotary-encoder/CMakeLists.txt --- 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() diff -r acc1904cd70d -r c18d2951e8d7 components/esp32-rotary-encoder/rotary_encoder.c --- 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);