-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
This component does not support ESP-IDF V5.
We need to modify CMakeLists.txt:
idf_component_register(SRCS "rotary_encoder.c" INCLUDE_DIRS include PRIV_REQUIRES driver)
#set(COMPONENT_ADD_INCLUDEDIRS include)
#set(COMPONENT_SRCS "rotary_encoder.c")
#register_component()
Additionally, we need to change gpio_pad_select_gpio to gpio_reset_pin in rotary_encoder.c.
// 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);
Metadata
Metadata
Assignees
Labels
No labels