57 lines
1.7 KiB
C
57 lines
1.7 KiB
C
/*
|
|
******************************************************************************
|
|
*
|
|
* @file sleep.h
|
|
* @brief sleep module
|
|
* @ic sy8835
|
|
*
|
|
* @version 1.0
|
|
* @date 2024/11/01 09:59:40
|
|
* @author Alex Xu
|
|
*
|
|
* Copyright (c) 2013-2099,Tkplusemi Technology Co.,Ltd.
|
|
* All Rights Reserved
|
|
*
|
|
* History:
|
|
* Revision Date Author Desc
|
|
* 1.0.0 2024/11/01 Alex build this file
|
|
******************************************************************************
|
|
*/
|
|
#ifndef __SLEEP_H__
|
|
#define __SLEEP_H__
|
|
|
|
/*_____ I N C L U D E S ____________________________________________________*/
|
|
|
|
#include "define.h"
|
|
|
|
/******************************************************************************\
|
|
Macro definitions
|
|
\******************************************************************************/
|
|
/*Sleep Module Setting*/
|
|
/*Enter Sleep Time Debounce*/
|
|
#define ENTER_STANDBYMODE_CNT 15 //进入Standby Mode 延迟时间,单位:秒
|
|
#define ENTER_SHIPMODE_CNT 5 //进入ShipMode 延迟时间,单位:秒
|
|
|
|
/******************************************************************************\
|
|
Variables definitions
|
|
\******************************************************************************/
|
|
#if SLEEP_ENABLE
|
|
|
|
extern uint8_t Decnt_SleepDelay;
|
|
extern bit Enter_Sleep_Cnt_Restart_Flag;
|
|
|
|
extern uint8_t Enter_ShipMode_Debounce;
|
|
extern bit Enter_Ship_Mode_Flag;
|
|
|
|
/******************************************************************************\
|
|
Functions definitions
|
|
\******************************************************************************/
|
|
|
|
extern bit Check_Require_Sleep(void);
|
|
extern void Enter_Sleep(void);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|