EBO-77/Sources/main.c
2024-12-23 11:04:44 +08:00

34 lines
730 B
C

#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
#include "DMK-BC316-77.h"
#include "diagnostic_service_slave.h"
l_bool FLAG_GO_TO_Sleep=0;//进入睡眠模式标志
l_bool M_ASK_S_Sleep=0;//主机叫子机进入休眠
l_bool NO_DATA_Sleep=0;//超时睡眠
extern unsigned char Toggle_start;
extern unsigned char Toggle_1s;
/*
* Internal Clock 64MHz
* Bus Clock 32MHz
*
*/
void main(void)
{
CLK_CONFIG();
Peripheral_Init();
l_sys_init();
l_ifc_init(LI0);
ld_init();
LIN_STANDBY_Mode_wakeup_enable();
V_12_Ctrl=1;
Toggle_start=2;
Toggle_1s=0;
while(1)
{
Apply_Task();
Lin_Task();
slave_diagnostic_task();
WDog1_Clear();
}
}