Files
t-embed-insecam-widget/main/power.h
T
Juli 89dfdf09a6 24 favourite slots and a Power off menu entry
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.
2026-09-17 02:20:48 +02:00

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