deep sleep example: Extend test coverage to ESP32-S2
* Modify the example on ESP32-S2 to print same output pattern as ESP32 * Add example test verification that "fast booting" (skipping of verification) is working
This commit is contained in:
@@ -245,11 +245,13 @@ void app_main(void)
|
||||
touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
|
||||
touch_pad_fsm_start();
|
||||
vTaskDelay(100 / portTICK_RATE_MS);
|
||||
/* read sleep touch pad value */
|
||||
uint32_t touch_value;
|
||||
|
||||
/* set touchpad wakeup threshold */
|
||||
uint32_t touch_value, wake_threshold;
|
||||
touch_pad_sleep_channel_read_smooth(TOUCH_PAD_NUM9, &touch_value);
|
||||
touch_pad_sleep_set_threshold(TOUCH_PAD_NUM9, touch_value * 0.1); //10%
|
||||
printf("test init: touch pad [%d] slp %d, thresh %d\n",
|
||||
wake_threshold = touch_value * 0.1; // wakeup when touch sensor crosses 10% of background level
|
||||
touch_pad_sleep_set_threshold(TOUCH_PAD_NUM9, wake_threshold);
|
||||
printf("Touch pad #%d average: %d, wakeup threshold set to %d\n",
|
||||
TOUCH_PAD_NUM9, touch_value, (uint32_t)(touch_value * 0.1));
|
||||
#endif
|
||||
printf("Enabling touch pad wakeup\n");
|
||||
|
||||
Reference in New Issue
Block a user