refactor(touch): separate touch sleep example

This commit is contained in:
laokaiyao
2025-04-23 18:24:28 +08:00
parent 692512c0b3
commit 4fed6450a3
29 changed files with 246 additions and 300 deletions
@@ -476,6 +476,7 @@ Application Examples
------------------------
- :example:`peripherals/touch_sensor/touch_sens_basic` demonstrates how to register touch channels and read the data, including hardware requirements and project configuration instructions.
- :example:`peripherals/touch_sensor/touch_sens_sleep` demonstrates how to wake up the chip from the light or deep sleep by the touch sensor.
Application Notes
-----------------
@@ -432,8 +432,6 @@ Only Touch Button can be configured as a wake-up source.
Light- or Deep-sleep modes are both supported to be wakened up by a touch sensor. For the Light-sleep mode, any installed touch button can wake it up. But only the sleep button can wake up from Deep-sleep mode, and the touch sensor will do a calibration immediately, the reference value will be calibrated to a wrong value if our finger does not remove timely. Though the wrong reference value recovers after the finger removes away and has no effect on the driver logic, if you do not want to see a wrong reference value while waking up from Deep-sleep mode, you can call :cpp:func:`touch_element_sleep_enable_wakeup_calibration` to disable the wakeup calibration.
The Touch Element Wakeup example is available in `system/light_sleep` directory.
.. code-block:: c
void app_main()