fix(gpio): add esp_gpio_reserve check to gpio_config

This commit is contained in:
Song Ruo Jing
2026-02-26 16:26:58 +08:00
parent e5ff2747aa
commit 476004e4b8
28 changed files with 278 additions and 44 deletions
@@ -218,6 +218,19 @@ static inline void gpio_ll_input_enable(gpio_dev_t *hw, uint32_t gpio_num)
PIN_INPUT_ENABLE(IO_MUX_GPIO0_REG + (gpio_num * 4));
}
/**
* @brief Check if input mode is enabled on GPIO.
*
* @param hw Peripheral GPIO hardware instance address.
* @param gpio_num GPIO number
* @return true if input mode is enabled, false otherwise
*/
__attribute__((always_inline))
static inline bool gpio_ll_input_is_enabled(gpio_dev_t *hw, uint32_t gpio_num)
{
return GET_PERI_REG_MASK(IO_MUX_GPIO0_REG + (gpio_num * 4), FUN_IE) ? true : false;
}
/**
* @brief Enable GPIO pin filter
*