mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
driver(touch): fix touch sensor false trigger in sleep mode
This commit is contained in:
@@ -289,6 +289,17 @@ static inline void touch_ll_stop_fsm(void)
|
||||
RTCCNTL.touch_ctrl2.touch_timer_force_done = TOUCH_LL_TIMER_DONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get touch sensor FSM timer state.
|
||||
* @return
|
||||
* - true: FSM enabled
|
||||
* - false: FSM disabled
|
||||
*/
|
||||
static inline bool touch_ll_get_fsm_state(void)
|
||||
{
|
||||
return (bool)RTCCNTL.touch_ctrl2.touch_slp_timer_en;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger a touch sensor measurement, only support in SW mode of FSM.
|
||||
*/
|
||||
@@ -298,18 +309,12 @@ static inline void touch_ll_start_sw_meas(void)
|
||||
RTCCNTL.touch_ctrl2.touch_start_en = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set touch sensor interrupt threshold.
|
||||
*
|
||||
* @param touch_num touch pad index.
|
||||
* @param threshold threshold of touchpad count.
|
||||
*/
|
||||
/**
|
||||
* Set the trigger threshold of touch sensor.
|
||||
* The threshold determines the sensitivity of the touch sensor.
|
||||
* The threshold is the original value of the trigger state minus the benchmark value.
|
||||
*
|
||||
* @note If set "TOUCH_PAD_THRESHOLD_MAX", the touch is never be trigered.
|
||||
* @note If set "TOUCH_PAD_THRESHOLD_MAX", the touch is never be triggered.
|
||||
* @param touch_num touch pad index
|
||||
* @param threshold threshold of touch sensor.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user