SY8835_For_Demo_Ourself/UsrInc/userapp/userapp.h
Alex xu 30111f86c1 更改内容:1、优化代码,全局变量在定义时不赋初值,减小ROM占用;
2、将显示UI模块化,单独成文件displayui.c和display_ui.h;
3、将部分功能模块的状态位、标志位变量和配置参数置于congfig.h;
4、将工程程序中的TP3315字符更改SY8835。
2025-01-21 18:00:07 +08:00

70 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 void UserAPP(void);
#endif