void switchesInit(void) { SW1_Init(); SW2_Init(); }
/* ** =================================================================== ** Method : PE_low_level_init (component MKL46Z256MC4) ** ** Description : ** Initializes beans and provides common register initialization. ** The method is called automatically as a part of the ** application initialization code. ** This method is internal. It is used by Processor Expert only. ** =================================================================== */ void PE_low_level_init(void) { #ifdef PEX_RTOS_INIT PEX_RTOS_INIT(); /* Initialization of the selected RTOS. Macro is defined by the RTOS component. */ #endif /* Initialization of the SIM module */ /* Initialization of the RCM module */ /* RCM_RPFW: RSTFLTSEL=0 */ RCM_RPFW &= (uint8_t)~(uint8_t)(RCM_RPFW_RSTFLTSEL(0x1F)); /* RCM_RPFC: RSTFLTSS=0,RSTFLTSRW=0 */ RCM_RPFC &= (uint8_t)~(uint8_t)( RCM_RPFC_RSTFLTSS_MASK | RCM_RPFC_RSTFLTSRW(0x03) ); /* Initialization of the FTFL_FlashConfig module */ /* Initialization of the PMC module */ /* PMC_LVDSC1: LVDACK=1,LVDIE=0,LVDRE=1,LVDV=0 */ PMC_LVDSC1 = (uint8_t)((PMC_LVDSC1 & (uint8_t)~(uint8_t)( PMC_LVDSC1_LVDIE_MASK | PMC_LVDSC1_LVDV(0x03) )) | (uint8_t)( PMC_LVDSC1_LVDACK_MASK | PMC_LVDSC1_LVDRE_MASK )); /* PMC_LVDSC2: LVWACK=1,LVWIE=0,LVWV=0 */ PMC_LVDSC2 = (uint8_t)((PMC_LVDSC2 & (uint8_t)~(uint8_t)( PMC_LVDSC2_LVWIE_MASK | PMC_LVDSC2_LVWV(0x03) )) | (uint8_t)( PMC_LVDSC2_LVWACK_MASK )); /* PMC_REGSC: BGEN=0,ACKISO=0,BGBE=0 */ PMC_REGSC &= (uint8_t)~(uint8_t)( PMC_REGSC_BGEN_MASK | PMC_REGSC_ACKISO_MASK | PMC_REGSC_BGBE_MASK ); /* SMC_PMPROT: ??=0,??=0,AVLP=0,??=0,ALLS=0,??=0,AVLLS=0,??=0 */ SMC_PMPROT = 0x00U; /* Setup Power mode protection register */ /* Common initialization of the CPU registers */ /* PORTC_PCR3: ISF=0,PE=1,PS=1 */ PORTC_PCR3 = (uint32_t)((PORTC_PCR3 & (uint32_t)~(uint32_t)( PORT_PCR_ISF_MASK )) | (uint32_t)( PORT_PCR_PE_MASK | PORT_PCR_PS_MASK )); /* PORTA_PCR20: ISF=0,MUX=7 */ PORTA_PCR20 = (uint32_t)((PORTA_PCR20 & (uint32_t)~(uint32_t)( PORT_PCR_ISF_MASK )) | (uint32_t)( PORT_PCR_MUX(0x07) )); /* NVIC_IPR1: PRI_6=0 */ NVIC_IPR1 &= (uint32_t)~(uint32_t)(NVIC_IP_PRI_6(0xFF)); /* ### Serial_LDD "IO1" component auto initialization. Auto initialization feature can be disabled by component property "Auto initialization". */ (void)IO1_Init(NULL); /* ### BitIO_LDD "LED_OR" component auto initialization. Auto initialization feature can be disabled by component property "Auto initialization". */ (void)LED_OR_Init(NULL); /* ### BitIO_LDD "LED_YEL" component auto initialization. Auto initialization feature can be disabled by component property "Auto initialization". */ (void)LED_YEL_Init(NULL); /* ### BitIO_LDD "LED_RED" component auto initialization. Auto initialization feature can be disabled by component property "Auto initialization". */ (void)LED_RED_Init(NULL); /* ### BitIO_LDD "LED_GRE" component auto initialization. Auto initialization feature can be disabled by component property "Auto initialization". */ (void)LED_GRE_Init(NULL); /* ### BitIO_LDD "SW4" component auto initialization. Auto initialization feature can be disabled by component property "Auto initialization". */ (void)SW4_Init(NULL); /* ### BitIO_LDD "SW2" component auto initialization. Auto initialization feature can be disabled by component property "Auto initialization". */ (void)SW2_Init(NULL); /* ### Init_GPIO "PTC" init code ... */ PTC_Init(); }