docs: Update the application examples in touch_pad.rst

This commit is contained in:
shenmengjing 2024-07-09 16:39:43 +08:00
parent ea5a48836d
commit 0b420f4baa
2 changed files with 21 additions and 5 deletions

View File

@ -293,8 +293,16 @@ When interrupts are operational, you can obtain the information from which parti
Application Examples
--------------------
- Touch sensor read example: :example:`peripherals/touch_sensor/touch_sensor_{IDF_TARGET_TOUCH_SENSOR_VERSION}/touch_pad_read`.
- Touch sensor interrupt example: :example:`peripherals/touch_sensor/touch_sensor_{IDF_TARGET_TOUCH_SENSOR_VERSION}/touch_pad_interrupt`.
.. only:: esp32
- :example:`peripherals/touch_sensor/touch_sensor_v1/touch_pad_read` demonstrates how to read and print raw or IIR filtered values from capacitive touch sensors on {IDF_TARGET_NAME}, and how to calibrate the sensors.
- :example:`peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt` demonstrates how to set up the {IDF_TARGET_NAME}'s capacitive touch pad to trigger an interrupt when touched, and how to use software detection for greater sensitivity, comparing the performance of hardware interrupt mode and software polling mode.
.. only:: esp32s2 or esp32s3
- :example:`peripherals/touch_sensor/touch_sensor_v2/touch_pad_read` demonstrates how to read and display raw values from capacitive touch pad sensors on {IDF_TARGET_NAME}, including how to calibrate the sensors and detect touch actions.
- :example:`peripherals/touch_sensor/touch_sensor_v2/touch_pad_interrupt` demonstrates how to set up {IDF_TARGET_NAME}'s capacitive touch pad peripheral to trigger an interrupt when a pad is touched, and how to detect the touch event by the software for sensor designs when greater touch detection sensitivity is required.
.. _touch_pad-api-reference:

View File

@ -291,10 +291,18 @@
.. _touch_pad-api-examples:
应用示例
--------------------
--------
.. only:: esp32
- :example:`peripherals/touch_sensor/touch_sensor_v1/touch_pad_read` 演示了如何在 {IDF_TARGET_NAME} 上读取并打印电容触摸传感器的原始值或 IIR 滤波后的值,以及如何校准传感器。
- :example:`peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt` 演示了如何设置 {IDF_TARGET_NAME} 的电容触摸板,使其在被触摸时触发中断,以及如何使用软件监测来提高灵敏度,并比较硬件中断模式和软件轮询模式的性能。
.. only:: esp32s2 or esp32s3
- :example:`peripherals/touch_sensor/touch_sensor_v2/touch_pad_read` 演示了如何在 {IDF_TARGET_NAME} 上读取并显示电容触摸传感器的原始值,包括如何校准传感器以及监测触摸动作。
- :example:`peripherals/touch_sensor/touch_sensor_v2/touch_pad_interrupt` 演示了如何设置 {IDF_TARGET_NAME} 的电容触摸板外设,使其在被触摸时触发中断,以及在需要更高触摸监测灵敏度的传感器设计中,如何通过软件来监测触摸事件。
- 触摸传感器读值示例::example:`peripherals/touch_sensor/touch_sensor_{IDF_TARGET_TOUCH_SENSOR_VERSION}/touch_pad_read`
- 触摸传感器中断示例::example:`peripherals/touch_sensor/touch_sensor_{IDF_TARGET_TOUCH_SENSOR_VERSION}/touch_pad_interrupt`
.. _touch_pad-api-reference: