From 4ace614ef3d625d9ed95db9c0387ef27025f4443 Mon Sep 17 00:00:00 2001 From: Chen Jichang Date: Mon, 18 Nov 2024 15:17:02 +0800 Subject: [PATCH] docs(pcnt): add pullup and pulldown documentation Closes https://github.com/espressif/esp-idf/issues/14277 --- docs/en/api-reference/peripherals/pcnt.rst | 4 ++++ docs/zh_CN/api-reference/peripherals/pcnt.rst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/en/api-reference/peripherals/pcnt.rst b/docs/en/api-reference/peripherals/pcnt.rst index 3f7d9a12c08..315de62501a 100644 --- a/docs/en/api-reference/peripherals/pcnt.rst +++ b/docs/en/api-reference/peripherals/pcnt.rst @@ -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 diff --git a/docs/zh_CN/api-reference/peripherals/pcnt.rst b/docs/zh_CN/api-reference/peripherals/pcnt.rst index acd8ed55054..8f67a551cc1 100644 --- a/docs/zh_CN/api-reference/peripherals/pcnt.rst +++ b/docs/zh_CN/api-reference/peripherals/pcnt.rst @@ -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: 设置通道操作