docs(pcnt): add pullup and pulldown documentation

Closes https://github.com/espressif/esp-idf/issues/14277
This commit is contained in:
Chen Jichang 2024-11-18 15:17:02 +08:00
parent daf465c038
commit 9b112e2a70
2 changed files with 8 additions and 0 deletions

View File

@ -104,6 +104,10 @@ If a previously created PCNT channel is no longer needed, it is recommended to r
pcnt_channel_handle_t pcnt_chan = NULL;
ESP_ERROR_CHECK(pcnt_new_channel(pcnt_unit, &chan_config, &pcnt_chan));
.. note::
In PCNT, the GPIOs involved can be reconfigured for pull-up or pull-down after initializing PCNT using functions such as :cpp:func:`gpio_pullup_en` and :cpp:func:`gpio_pullup_dis`.
.. _pcnt-setup-channel-actions:
Set Up Channel Actions

View File

@ -104,6 +104,10 @@ PCNT 单元和通道分别用 :cpp:type:`pcnt_unit_handle_t` 与 :cpp:type:`pcnt
pcnt_channel_handle_t pcnt_chan = NULL;
ESP_ERROR_CHECK(pcnt_new_channel(pcnt_unit, &chan_config, &pcnt_chan));
.. note::
PCNT 中涉及到的 GPIO 都可以在初始化完 PCNT 后, 通过 :cpp:func:`gpio_pullup_en`:cpp:func:`gpio_pullup_dis` 等函数,重新进行上下拉等配置。
.. _pcnt-setup-channel-actions:
设置通道操作