21 lines
517 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <stdbool.h>
// 休眠超时时间(毫秒)
#define SLEEP_TIMEOUT_MS 10000
// 初始化休眠管理器需在UI、按键初始化之后调用
void sleep_mgr_init(void);
// 启用/禁用休眠模式
void sleep_mgr_set_enabled(bool enabled);
// 获取休眠模式是否启用
bool sleep_mgr_is_enabled(void);
// 通知有用户活动(按键按下、触摸屏幕时调用)
void sleep_mgr_notify_activity(void);
// 查询屏幕是否已关闭
bool sleep_mgr_is_screen_off(void);