Both_Way_Comm_SY8833/TP3310_Demo.si4project/Backup/main(2414).c

70 lines
2.0 KiB
C
Raw Permalink 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.

/*
******************************************************************************
*
* @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(); //系统初始化
SFRADDR = P1_OE;
SFRDATA = 0x01;
#ifdef _DEBUG_MAIN
printf("\n\r\n\r---System Init1(Ver:%s)---\r\n",Ver);
#endif
while(1)
{
P10 = !P10;
#if WTG_ENABLE
Watchdog_Clear();
#endif
Sys_Tim_Handler(); //定时器
UserAPP();
// P10 = 1;
}
}