Skip to content

Changes to accommodate esp-idf v5 #4

@nopnop2002

Description

@nopnop2002

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions