void ALL_Init(void) { SOPT1 &= 0x3F; //disable cop MCG_Init(); //PTED_Init(); //LED_Init(); //KBI_Init(); RTC_Init(); //SPI_Init(); //ATD_Init(); //SCI_Init(); //PWM_Init(); IIC_Init(); //HCS08_EE_Init(); //初始化Flash控制寄存器 PCF8563_Init(); LCD_INIT(); }
// Función principal void main(void) { // Inicialización SYSTEM_INIT(); MCG_Init(); LCD_Init(); TPM_Init(); SCI_Init(); CLI; RealTimeClock_Init(); for(;;) { SEI; if(INT_EVENTS==0)WAIT; CLI; Process_Events(); } }
/***************************************************************************** * * @name Init_Sys * * @brief This function Initializes the system * * @param None * * @return None * **************************************************************************** * Intializes the MCU, MCG, KBI, RTC modules ***************************************************************************/ static void Init_Sys(void) { Mcu_Init(); /* initialize the MCU registers */ MCG_Init(); /* initialize the MCG to generate 24MHz bus clock */ }
/*!**************************************************************************** * * \name System_Init * * \brief This function Initializes the system * * \param None * * \return None * **************************************************************************** * Intializes the MCU, MCG, KBI, RTC modules ***************************************************************************/ void System_Init(void) { Mcu_Init(); /* initialize the MCU registers */ MCG_Init(); /* initialize the MCG to generate 24MHz bus clock */ }