69 lines
2.0 KiB
C
69 lines
2.0 KiB
C
/*
|
||
******************************************************************************
|
||
*
|
||
* @file main.c
|
||
* @brief main module
|
||
*
|
||
*
|
||
* @version 1.0
|
||
* @date 2022/07/12 17:35:40
|
||
* @author Alex Xu
|
||
*
|
||
* Copyright (c) 2013-2099,Tkplusemi Technology Co.,Ltd.
|
||
* All Rights Reserved
|
||
*
|
||
* History:
|
||
* Revision Date Author Desc
|
||
* 1.0.0 2022/07/12 Alex build this file
|
||
******************************************************************************
|
||
*/
|
||
/*_____ I N C L U D E S ____________________________________________________*/
|
||
#include "define.h"
|
||
#include "userapp.h"
|
||
#include "watchdog.h"
|
||
#include "sys_tim.h"
|
||
#include "system.h"
|
||
#include "led.h"
|
||
#include "charger_module.h"
|
||
|
||
|
||
/******************************************************************************\
|
||
Macro definitions
|
||
\******************************************************************************/
|
||
|
||
/******************************************************************************\
|
||
Variables definitions
|
||
\******************************************************************************/
|
||
|
||
#ifdef _DEBUG_MAIN
|
||
const uint8_t Ver[] = "V100";
|
||
/*程序版本,第一个数代表在硬件存在改动不能兼容之前版本时加1,
|
||
第二个数在功能存在改动时加1,第三个数在软件调试出现不同的
|
||
测试版本时改动;高位数字变动时,低位数字清零。*/
|
||
#endif
|
||
|
||
/******************************************************************************\
|
||
Functions definitions
|
||
\******************************************************************************/
|
||
|
||
void main(void )
|
||
{
|
||
System_Init(); //系统初始化
|
||
|
||
#ifdef _DEBUG_MAIN
|
||
printf("\n\r\n\r---System Init1(Ver:%s)---\r\n",Ver);
|
||
#endif
|
||
|
||
while(1)
|
||
{
|
||
// P02 = !P02;
|
||
#if WTG_ENABLE
|
||
Watchdog_Clear();
|
||
#endif
|
||
Sys_Tim_Handler(); //定时器
|
||
|
||
UserAPP();
|
||
// printf("\n\r\n\r---System Init1---\r\n");
|
||
}
|
||
}
|