feat(esp32h21): refactor gpio_ll to use io_mux_struct

This commit is contained in:
gaoxu
2025-02-17 15:53:13 +08:00
parent 760f134d84
commit d3acbe15aa
6 changed files with 187 additions and 67 deletions

View File

@@ -259,7 +259,7 @@ static inline void gpio_ll_pin_filter_disable(gpio_dev_t *hw, uint32_t gpio_num)
static inline void gpio_ll_pin_input_hysteresis_enable(gpio_dev_t *hw, uint32_t gpio_num)
{
// On ESP32C5, there is an efuse bit that controls the hysteresis enable or not for all IOs.
// We are not going to use the hardware control in IDF for C5.
// We are not going to use the hardware control for C5.
// Therefore, we need to always switch to use software control first.
// i.e. Swt hys_sel to 1, so that hys_en determines whether hysteresis is enabled or not
IO_MUX.gpio[gpio_num].hys_sel = 1;