mcu_ab568x/userboot240328/app/projects/AB5681G_320/functions/func_lowpwr.h
2025-05-30 18:03:10 +08:00

22 lines
1.0 KiB
C
Raw 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.

#ifndef __FUNC_LOWPWR_H
#define __FUNC_LOWPWR_H
typedef bool (*is_sleep_func)(void);
#define GUI_OFF_DELAY_TIME sys_cb.sleep_time //和配置的休眠时间一样
#define en_auto_pwroff() sys_cb.pwroff_delay = sys_cb.pwroff_time;
#define dis_auto_pwroff() sys_cb.pwroff_delay = -1L;
#define reset_pwroff_delay() if(sys_cb.pwroff_delay != -1L) {sys_cb.pwroff_delay = sys_cb.pwroff_time;}
#define reset_sleep_delay() sys_cb.sleep_delay = sys_cb.sleep_time;
#define reset_guioff_delay() sys_cb.guioff_delay = sys_cb.sleep_time;
#define reset_sleep_delay_all() {sys_cb.sleep_delay = sys_cb.sleep_time; sys_cb.guioff_delay = sys_cb.sleep_time;}
bool sleep_process(is_sleep_func is_sleep);
void lowpwr_tout_ticks(void);
void sfunc_pwrdown(u8 vusb_wakeup_en); //软开关方案POWER键/低电时,进入关机状态
void func_pwroff(int pwroff_tone_en); //进入低电或者关机状态
void sys_enter_sleep(u8 lpclk_type);
#endif // __FUNC_LOWPWR_H