mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-07 17:08:49 +00:00
refactor(touch): refactor touch low-level for s2 & s3
This commit is contained in:
committed by
Kevin (Lao Kaiyao)
parent
e4c92855ee
commit
1cd9dd5001
@@ -278,14 +278,10 @@ void touch_hal_filter_get_config(touch_filter_config_t *filter_info);
|
||||
/**
|
||||
* Enable touch sensor filter and detection algorithm.
|
||||
* For more details on the detection algorithm, please refer to the application documentation.
|
||||
*
|
||||
* @param enable set true to enable the filter
|
||||
*/
|
||||
#define touch_hal_filter_enable() touch_ll_filter_enable()
|
||||
|
||||
/**
|
||||
* Disable touch sensor filter and detection algorithm.
|
||||
* For more details on the detection algorithm, please refer to the application documentation.
|
||||
*/
|
||||
#define touch_hal_filter_disable() touch_ll_filter_disable()
|
||||
#define touch_hal_filter_enable(enable) touch_ll_filter_enable(enable)
|
||||
|
||||
/************************ Denoise register setting ************************/
|
||||
|
||||
@@ -326,7 +322,7 @@ void touch_hal_denoise_enable(void);
|
||||
* This denoise function filters out interference introduced on all channels,
|
||||
* such as noise introduced by the power supply and external EMI.
|
||||
*/
|
||||
#define touch_hal_denoise_disable() touch_ll_denoise_disable()
|
||||
#define touch_hal_denoise_disable() touch_ll_denoise_enable(false)
|
||||
|
||||
/**
|
||||
* Set internal reference capacitance of denoise channel.
|
||||
@@ -391,7 +387,7 @@ void touch_hal_denoise_enable(void);
|
||||
*
|
||||
* @param pad_num Touch sensor channel number.
|
||||
*/
|
||||
#define touch_hal_waterproof_set_sheild_driver(driver_level) touch_ll_waterproof_set_sheild_driver(driver_level)
|
||||
#define touch_hal_waterproof_set_sheild_driver(driver_level) touch_ll_waterproof_set_shield_driver(driver_level)
|
||||
|
||||
/**
|
||||
* Get max equivalent capacitance for shield channel.
|
||||
@@ -400,7 +396,7 @@ void touch_hal_denoise_enable(void);
|
||||
*
|
||||
* @param pad_num Touch sensor channel number.
|
||||
*/
|
||||
#define touch_hal_waterproof_get_sheild_driver(driver_level) touch_ll_waterproof_get_sheild_driver(driver_level)
|
||||
#define touch_hal_waterproof_get_sheild_driver(driver_level) touch_ll_waterproof_get_shield_driver(driver_level)
|
||||
|
||||
/**
|
||||
* Set parameter of waterproof function.
|
||||
@@ -430,7 +426,7 @@ void touch_hal_waterproof_enable(void);
|
||||
/**
|
||||
* Disable parameter of waterproof function.
|
||||
*/
|
||||
#define touch_hal_waterproof_disable() touch_ll_waterproof_disable()
|
||||
#define touch_hal_waterproof_disable() touch_ll_waterproof_enable(false)
|
||||
|
||||
/************************ Proximity register setting ************************/
|
||||
|
||||
@@ -550,13 +546,9 @@ void touch_hal_sleep_channel_enable(touch_pad_t pad_num, bool enable);
|
||||
|
||||
/**
|
||||
* Enable proximity function for sleep pad.
|
||||
* @param enable the proximity sensing
|
||||
*/
|
||||
#define touch_hal_sleep_enable_approach() touch_ll_sleep_enable_proximity_sensing()
|
||||
|
||||
/**
|
||||
* Disable proximity function for sleep pad.
|
||||
*/
|
||||
#define touch_hal_sleep_disable_approach() touch_ll_sleep_disable_proximity_sensing()
|
||||
#define touch_hal_sleep_enable_approach(enable) touch_ll_sleep_enable_proximity_sensing(enable)
|
||||
|
||||
/**
|
||||
* Read benchmark of touch sensor for sleep pad.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user