touch_pad_set_cnt_mode() function
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.
Arguments
slope
touch pad charge/discharge speed
Return value
- ESP_OK on success - ESP_ERR_INVALID_ARG if argument is wrong
Notes
The higher the charge and discharge current, the greater the immunity of the touch channel, but it will increase the system power consumption.