arch/arm/nrf5x/rtc/rtc.c
/*
 * rtc_interrupt - RTC interrupt callback
 *
 * Initialize the RTC module from LF clock
 */
RTC interrupt callback
Initialize the RTC module from LF clock
RTC interrupt callback Initialize the RTC module from LF clock
static void rtc_interrupt(void)
{
  if (EVENTS_TICK_CFG == 1)
  {
    ++g_rtc_ticks_ms;
    if (g_rtc_ticks_ms % 8 == 0) {
      g_rtc_ticks_ms = 0;
      g_seconds++;
      if (g_seconds % 60 == 0) {
        g_seconds = 0;
        g_minutes++;
        if (g_minutes % 60 == 0) {
          g_minutes = 0;
          g_hours++;
          if (g_hours % 24 == 0) {
            g_hours = 0;
            g_days++;
          }
        }
      }
    }
    EVENTS_TICK_CFG = 0;
  }
}
static void rtc_interrupt ( void ) { if ( EVENTS_TICK_CFG == 1 ) { ++ g_rtc_ticks_ms ; if ( g_rtc_ticks_ms % 8 == 0 ) { g_rtc_ticks_ms = 0 ; g_seconds ++ ; if ( g_seconds % 60 == 0 ) { g_seconds = 0 ; g_minutes ++ ; if ( g_minutes % 60 == 0 ) { g_minutes = 0 ; g_hours ++ ; if ( g_hours % 24 == 0 ) { g_hours = 0 ; g_days ++ ; } } } } EVENTS_TICK_CFG = 0 ; } }
rtc_interrupt - RTC interrupt callback
 Initialize the RTC module from LF clock
rtc_interrupt - RTC interrupt callback Initialize the RTC module from LF clock