71 void enterLockScreenSleep();
73 void updateCaffeinatedIcon();
79 uint32_t lockScreenEnteredMs_ = 0;
80 bool inLightSleep_ =
false;
84 uint8_t inhibitorCount_ = 0;
bool isSleepInhibited() const
void resetTimer()
Resets lock-screen sleep timer using current system tick.
void checkLockScreenSleep(uint32_t nowMs)
Evaluates whether lock-screen light sleep should be entered.
bool addSleepInhibitor(const char *reason)
Sleep inhibitor API implementation.
static SleepManager & instance()
Returns singleton sleep manager instance.
bool removeSleepInhibitor(const char *reason)
Removes a sleep inhibitor reason.
bool isInLightSleep() const
void init(hal::ISleepController *sleep, hal::IPowerManager *power, LockScreenView *lockScreen)
Initializes sleep-manager dependencies and state.
uint8_t getInhibitorCount() const
Centralized key-code constants for cdc_views.
static constexpr uint8_t MAX_SLEEP_INHIBITORS
static constexpr uint32_t LIGHT_SLEEP_TIMEOUT_MS