[][src]Function esp_idf_sys::touch_pad_read

pub unsafe extern "C" fn touch_pad_read(
    touch_num: touch_pad_t,
    touch_value: *mut u16
) -> esp_err_t

@brief get touch sensor counter value. Each touch sensor has a counter to count the number of charge/discharge cycles. When the pad is not 'touched', we can get a number of the counter. When the pad is 'touched', the value in counter will get smaller because of the larger equivalent capacitance.

@note This API requests hardware measurement once. If IIR filter mode is enabled, please use 'touch_pad_read_raw_data' interface instead.

@param touch_num touch pad index @param touch_value pointer to accept touch sensor value

@return - ESP_OK Success - ESP_ERR_INVALID_ARG Touch pad parameter error - ESP_ERR_INVALID_STATE This touch pad hardware connection is error, the value of "touch_value" is 0. - ESP_FAIL Touch pad not initialized