EasyManua.ls Logo

Espressif ESP32-S2 - Page 417

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
Return
ESP_OK: Configured correctly.
ESP_ERR_INVALID_ARG: Touch channel number error.
Parameters
touch_num: Touch pad index. In this version, pass the parameter TOUCH_PAD_MAX.
count: The cumulative times of measurements for proximity pad. Range: 0 ~ 255.
esp_err_t touch_pad_proximity_get_data(touch_pad_t touch_num, uint32_t *measure_out)
Get the accumulated measurement of the proximity sensor. The proximity sensor measurement is the accu-
mulation of touch channel measurements.
Return
ESP_OK Success
ESP_ERR_INVALID_ARG Touch num is not proximity
Parameters
touch_num: touch pad index
measure_out: If the accumulation process does not end, the measure_out is the process
value.
esp_err_t touch_pad_sleep_channel_get_info(touch_pad_sleep_channel_t *slp_config)
Get parameter of touch sensor sleep channel. The touch sensor can works in sleep mode to wake up sleep.
Note After the sleep channel is configured, Please use special functions for sleep channel. e.g. The user should
uses touch_pad_sleep_channel_read_data instead of touch_pad_read_raw_data to
obtain the sleep channel reading.
Return
ESP_OK Success
Parameters
slp_config: touch sleep pad config.
esp_err_t touch_pad_sleep_channel_enable(touch_pad_t pad_num, bool enable)
Enable/Disable sleep channel function for touch sensor. The touch sensor can works in sleep mode to wake up
sleep.
Note ESP32S2 only support one sleep channel.
Note After the sleep channel is configured, Please use special functions for sleep channel. e.g. The user should
uses touch_pad_sleep_channel_read_data instead of touch_pad_read_raw_data to
obtain the sleep channel reading.
Return
ESP_OK Success
Parameters
pad_num: Set touch channel number for sleep pad. Only one touch sensor channel is supported in
deep sleep mode.
enable: true: enable sleep pad for touch sensor; false: disable sleep pad for touch sensor;
esp_err_t touch_pad_sleep_channel_enable_proximity(touch_pad_t pad_num, bool enable)
Enable/Disable proximity function for sleep channel. The touch sensor can works in sleep mode to wake up
sleep.
Note ESP32S2 only support one sleep channel.
Return
ESP_OK Success
Parameters
pad_num: Set touch channel number for sleep pad. Only one touch sensor channel is supported in
deep sleep mode.
enable: true: enable proximity for sleep channel; false: disable proximity for sleep channel;
esp_err_t touch_pad_sleep_set_threshold(touch_pad_t pad_num, uint32_t touch_thres)
Set the trigger threshold of touch sensor in deep sleep. The threshold determines the sensitivity of the touch
sensor.
Note In general, the touch threshold during sleep can use the threshold parameter parameters before sleep.
Return
Espressif Systems 406
Submit Document Feedback
Release v4.4

Table of Contents