#include "includes.h"


extern void delay_nms(unsigned int t);
extern void APT32F102_init(void);

volatile unsigned int Sys_RSR = 0;
volatile unsigned int Sav_Temp = 0;
/***************************************************/
//main
/**************************************************/
int main(void) 
{
//	delay_nms(20000);
	APT32F102_init();							//102 initial

	Dbg_Println(DBG_BIT_SYS_STATUS,"MCU Start! %d",g_Dip.DIP_addr);
	
    while(1)
	{
		SYSCON_IWDCNT_Reload(); 				//IWDT Clear
		
		UART1_TASK();
		
		UART2_TASK();
		
		DIP_ScanTask();
		
		TemCtrl_Pro();
		
		BUS485Send_Task();		
    }
}
