Merge branch 'feature/h2_gpio_hysteresis_support' into 'master'

gpio: h2 support input hysteresis filter

Closes IDF-6653

See merge request espressif/esp-idf!22263
This commit is contained in:
Wan Lei
2023-02-21 17:27:56 +08:00
14 changed files with 259 additions and 12 deletions

View File

@@ -21,6 +21,7 @@ GPIO Summary
:SOC_ULP_SUPPORTED: - The :doc:`Ultra Low Power co-processor <../../api-reference/system/ulp>` is running
- Analog functions such as ADC/DAC/etc are in use.
.. only:: SOC_GPIO_SUPPORT_PIN_GLITCH_FILTER or SOC_GPIO_FLEX_GLITCH_FILTER_NUM
GPIO Glitch Filter
@@ -50,6 +51,20 @@ GPIO Summary
The glitch filter is disabled by default, and can be enabled by calling :cpp:func:`gpio_glitch_filter_enable`. To recycle the filter, you can call :cpp:func:`gpio_del_glitch_filter`. Please note, before deleting the filter, you should disable it first by calling :cpp:func:`gpio_glitch_filter_disable`.
.. only:: SOC_GPIO_SUPPORT_PIN_HYS_FILTER
GPIO Hysteresis Filter
----------------------
{IDF_TARGET_NAME} support the hardware hysteresis of the input pin, which can reduce the GPIO interrupt shoot by accident due to unstable sampling when the input voltage is near the critical of logic 0 and 1, especially when the input logic level conversion is slow or the voltage setup time is too long.
Each pin can enable hysteresis function independently. By default, it controlled by eFuse and been closed, but it can also be enabled or disabled by software manually. You can select the hysteresis control mode by configuring :cpp:member:`gpio_config_t::hys_ctrl_mode`.
.. note::
When the hysteresis function is controlled by eFuse, this feature can still be controlled independently for each pin, you need to `burn the eFuse <https://docs.espressif.com/projects/esptool/en/latest/esp32/espefuse/index.html>`_ to enable the hysteresis function on specific GPIO additionally.
Application Example
-------------------