Power off drops the peripheral rail (PWR_ON low), sleeps the panel and puts the chip into deep sleep with ext1 wake armed on the encoder pins, choosing any-low or any-high from the knob's resting state so a single detent wakes it. The button (GPIO0) is not a wake source on purpose.
6 lines
236 B
C
6 lines
236 B
C
#pragma once
|
|
// Cuts the peripheral rail and puts the ESP32 into deep sleep; a turn of the knob wakes it.
|
|
void power_off(void) __attribute__((noreturn));
|
|
// Logs how we came up (cold boot vs. knob wake).
|
|
void power_report_wakeup(void);
|