os-lib/mbed-sdk/targets/TARGET_Freescale/TARGET_K20XX/rtc_api.c
/*
 * Little check routine to see if the RTC has been enabled
 * 0 = Disabled, 1 = Enabled
 */
Little check routine to see if the RTC has been enabled
0 = Disabled, 1 = Enabled
Little check routine to see if the RTC has been enabled 0 = Disabled 1 = Enabled
int rtc_isenabled(void) {
    SIM->SCGC5 |= SIM_SCGC5_PORTC_MASK;
    SIM->SCGC6 |= SIM_SCGC6_RTC_MASK;
    if ((RTC->SR & RTC_SR_TCE_MASK) == 0)
        return 0;
    init();
    return 1;
}
int rtc_isenabled ( void ) { SIM -> SCGC5 |= SIM_SCGC5_PORTC_MASK ; SIM -> SCGC6 |= SIM_SCGC6_RTC_MASK ; if ( ( RTC -> SR & RTC_SR_TCE_MASK ) == 0 ) return 0 ; init ( ) ; return 1 ; }
Little check routine to see if the RTC has been enabled
 0 = Disabled, 1 = Enabled
Little check routine to see if the RTC has been enabled 0 = Disabled 1 = Enabled
// even if the RTC module is enabled, // as we use RTC_CLKIN and an external clock, // we need to reconfigure the pins. That is why we // call init() if the rtc is enabled // if RTC not enabled return 0