fix: reduce the consumption of touch sensor during deep sleep

This commit is contained in:
fuzhibo
2021-02-03 12:29:31 +08:00
parent bda9e1fda7
commit e310fb1393
11 changed files with 181 additions and 31 deletions

View File

@@ -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();