Function esp_idf_sys::touch_pad_set_meas_time
source ยท pub unsafe extern "C" fn touch_pad_set_meas_time(
sleep_cycle: u16,
meas_cycle: u16,
) -> esp_err_t
Expand description
@brief Set touch sensor measurement and sleep time. Excessive total time will slow down the touch response. Too small measurement time will not be sampled enough, resulting in inaccurate measurements. @note The touch sensor will count the number of charge/discharge cycles over a fixed period of time (specified as the second parameter). That means the number of cycles (raw value) will decrease as the capacity of the touch pad is increasing. @note The greater the duty cycle of the measurement time, the more system power is consumed.
@param sleep_cycle The touch sensor will sleep after each measurement. sleep_cycle decide the interval between each measurement. t_sleep = sleep_cycle / SOC_CLK_RC_SLOW_FREQ_APPROX. The approximate frequency value of RTC_SLOW_CLK can be obtained using rtc_clk_slow_freq_get_hz function. @param meas_cycle The duration of the touch sensor measurement. t_meas = meas_cycle / SOC_CLK_RC_FAST_FREQ_APPROX, the maximum measure time is 0xffff / SOC_CLK_RC_FAST_FREQ_APPROX @return - ESP_OK on success