Add basic clock support

This commit is contained in:
jpirnay
2026-03-26 16:46:23 +01:00
parent 5b43639f98
commit dd9c9e6def
18 changed files with 484 additions and 43 deletions
+5 -3
View File
@@ -29,9 +29,11 @@ class HalPowerManager {
// Control CPU frequency for power saving
void setPowerSaving(bool enabled);
// Setup wake up GPIO and enter deep sleep
// Should be called inside main loop() to handle the currentLockMode
void startDeepSleep(HalGPIO& gpio) const;
// Setup wake up GPIO and enter deep sleep.
// When keepClockAlive is true, GPIO13 stays HIGH so the LP timer keeps
// running during sleep (~3-4 mA extra). This allows HalClock to compute
// elapsed sleep time and restore the wall clock accurately on wake.
void startDeepSleep(HalGPIO& gpio, bool keepClockAlive = false) const;
// Get battery percentage (range 0-100)
uint16_t getBatteryPercentage() const;