Merge branch 'bugfix/reduce_the_consumption_of_touch_sensor_during_deep_sleep' into 'master'

fix: reduce the consumption of touch sensor during deep sleep

See merge request espressif/esp-idf!12248
This commit is contained in:
Michael (XIAO Xufeng)
2021-03-22 07:10:44 +00:00
11 changed files with 183 additions and 33 deletions
@@ -239,6 +239,8 @@ void app_main(void)
/* Set sleep touch pad. */
touch_pad_sleep_channel_enable(TOUCH_PAD_NUM9, true);
touch_pad_sleep_channel_enable_proximity(TOUCH_PAD_NUM9, false);
/* Reducing the operating frequency can effectively reduce power consumption. */
touch_pad_sleep_channel_set_work_time(1000, TOUCH_PAD_MEASURE_CYCLE_DEFAULT);
/* Enable touch sensor clock. Work mode is "timer trigger". */
touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
touch_pad_fsm_start();