Select one of the symbols to view example projects that use it.
 
Outline
#include "hal/touch_sensor_hal.h"
#include "hal/touch_sensor_types.h"
#include "soc/soc_caps.h"
touch_hal_config(touch_pad_t)
touch_hal_set_voltage(const touch_hal_volt_t *)
touch_hal_get_voltage(touch_hal_volt_t *)
touch_hal_set_meas_mode(touch_pad_t, const touch_hal_meas_mode_t *)
touch_hal_get_meas_mode(touch_pad_t, touch_hal_meas_mode_t *)
Files
loading (4/5)...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/hal/touch_sensor_hal.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ // The HAL layer for Touch Sensor (common part) #include "hal/touch_sensor_hal.h" #include "hal/touch_sensor_types.h" #include "soc/soc_caps.h" void touch_hal_config(touch_pad_t touch_num) { touch_ll_set_threshold(touch_num, TOUCH_PAD_THRESHOLD_MAX); touch_ll_set_slope(touch_num, TOUCH_PAD_SLOPE_DEFAULT); touch_ll_set_tie_option(touch_num, TOUCH_PAD_TIE_OPT_DEFAULT); }{ ... } void touch_hal_set_voltage(const touch_hal_volt_t *volt) { touch_ll_set_voltage_high(volt->refh); touch_ll_set_voltage_low(volt->refl); touch_ll_set_voltage_attenuation(volt->atten); }{ ... } void touch_hal_get_voltage(touch_hal_volt_t *volt) { touch_ll_get_voltage_high(&volt->refh); touch_ll_get_voltage_low(&volt->refl); touch_ll_get_voltage_attenuation(&volt->atten); }{ ... } void touch_hal_set_meas_mode(touch_pad_t touch_num, const touch_hal_meas_mode_t *meas) { touch_ll_set_slope(touch_num, meas->slope); touch_ll_set_tie_option(touch_num, meas->tie_opt); }{ ... } void touch_hal_get_meas_mode(touch_pad_t touch_num, touch_hal_meas_mode_t *meas) { touch_ll_get_slope(touch_num, &meas->slope); touch_ll_get_tie_option(touch_num, &meas->tie_opt); }{ ... }
Details