EasyManua.ls Logo

Espressif ESP32-S2 - Page 420

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
refh: the value of DREFH
refl: the value of DREFL
atten: the attenuation on DREFH
esp_err_t touch_pad_get_voltage(touch_high_volt_t *refh, touch_low_volt_t *re,
touch_volt_atten_t *atten)
Get touch sensor reference voltage,.
Return
ESP_OK on success
Parameters
refh: pointer to accept DREFH value
refl: pointer to accept DREFL value
atten: pointer to accept the attenuation on DREFH
esp_err_t touch_pad_set_cnt_mode(touch_pad_t touch_num, touch_cnt_slope_t slope,
touch_tie_opt_t opt)
Set touch sensor charge/discharge speed for each pad. If the slope is 0, the counter would always be zero.
If the slope is 1, the charging and discharging would be slow, accordingly. If the slope is set 7, which is the
maximum value, the charging and discharging would be fast.
Note The higher the charge and discharge current, the greater the immunity of the touch channel, but it will
increase the system power consumption.
Return
ESP_OK on success
ESP_ERR_INVALID_ARG if argument is wrong
Parameters
touch_num: touch pad index
slope: touch pad charge/discharge speed
opt: the initial voltage
esp_err_t touch_pad_get_cnt_mode(touch_pad_t touch_num, touch_cnt_slope_t *slope,
touch_tie_opt_t *opt)
Get touch sensor charge/discharge speed for each pad.
Return
ESP_OK on success
ESP_ERR_INVALID_ARG if argument is wrong
Parameters
touch_num: touch pad index
slope: pointer to accept touch pad charge/discharge slope
opt: pointer to accept the initial voltage
esp_err_t touch_pad_isr_deregister(void (*fn))void *
, void *argDeregister the handler previously registered using touch_pad_isr_handler_register.
Return
ESP_OK on success
ESP_ERR_INVALID_STATE if a handler matching both fn and arg isnt registered
Parameters
fn: handler function to call (as passed to touch_pad_isr_handler_register)
arg: argument of the handler (as passed to touch_pad_isr_handler_register)
esp_err_t touch_pad_get_wakeup_status(touch_pad_t *pad_num)
Get the touch pad which caused wakeup from deep sleep.
Return
ESP_OK Success
ESP_ERR_INVALID_ARG parameter is NULL
Parameters
pad_num: pointer to touch pad which caused wakeup
esp_err_t touch_pad_set_fsm_mode(touch_fsm_mode_t mode)
Set touch sensor FSM mode, the test action can be triggered by the timer, as well as by the software.
Espressif Systems 409
Submit Document Feedback
Release v4.4

Table of Contents