extract shutdown to it's own helper

This commit is contained in:
liquidraver committed 2026-05-27 12:31:58 +02:00
1 parent 57b971fc2c
commit 1b47987057
4 files changed
+117 -78

No files matched your search

+11
View File
@@ -182,6 +182,17 @@ void ui_set_battery_provider(uint16_t (*provider)(void));
*/
void ui_refresh_battery(void);
/**
* Prepare the device for sys_poweroff(): stop heartbeat LED, blank the
* display, power off GPS + sensor regulators, hold LoRa in HW reset,
* configure SENSE on sw0 (nRF only) for button wakeup.
*
* Caller is responsible for any shutdown chime BEFORE this call and the
* final sys_poweroff() AFTER. Both UI variants share this so the System
* OFF state is consistent regardless of which UI design is compiled in.
*/
void ui_prepare_for_system_off(void);
/**
* Drop the battery-refresh freshness timestamp. The next
* ui_refresh_battery() call is guaranteed to sample the ADC.