Page 1 of 1

touch_pad_config vs touch_pad_set_thresh? No difference?

Posted: Sun Sep 26, 2021 1:53 pm
by mezzynine
Hi, what's the difference between touch_pad_config() and touch_pad_set_thresh()? They take the same parameters:

Code: Select all

esp_err_t touch_pad_config(touch_pad_t touch_num, uint16_t threshold)

esp_err_t touch_pad_set_thresh(touch_pad_t touch_num, uint16_t threshold)

Re: touch_pad_config vs touch_pad_set_thresh? No difference?

Posted: Sun Sep 26, 2021 2:09 pm
by mezzynine
The answer, from o-marshmallow
(https://github.com/o-marshmallow) on the ESP32 IDF github:
About touch_pad_thresh, its goal is to modify the threshold at runtime, whereas touch_pad_config is used for initialization. It does more than setting the threshold.

https://github.com/espressif/esp-idf/is ... -927284245