SY8835_For_Demo_Ourself/UsrInc/userapp/userapp.h

71 lines
1.7 KiB
C

/*
******************************************************************************
*
* @file userapp.h
* @brief userapp 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 __USERAPP_H__
#define __USERAPP_H__
#include "define.h"
/******************************************************************************\
Macro definitions
\******************************************************************************/
#define BAT_LEVEL_LOW 20 //电池电量低报警值
/******************************************************************************\
Typedef definitions
\******************************************************************************/
typedef enum{
POWER_ON_STATE = 1,
AWAKE_STATE,
NORMAL_STATE,
SLEEP_STATE,
}SYS_STATE;
typedef struct {
uint8_t Next_State;
uint8_t Current_State;
uint8_t Pre_State;
}s_sys_state;
extern xdata s_sys_state Systerm_State;
extern bit Wkup_Earphone_Flag; //保护消失后,需要升压唤醒耳机标志位
/******************************************************************************\
Global variables and functions
\******************************************************************************/
extern uint8_t LED_On_Timer; //led亮时间计时
extern bit LED_On_Flag;
extern void UserAPP(void);
#endif