Open Garden  0.10.1-21
Functions | Variables
rtc.h File Reference

low lever real time clock handler. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void rtc_setup (void)
 
void rtc_start (void)
 
void rtc_stop (void)
 

Variables

volatile unsigned long rtc_seconds
 

Detailed Description

low lever real time clock handler.

Function Documentation

◆ rtc_setup()

void rtc_setup ( void  )

setup timer/counter on 32Khz external clock.

enable interrupt on timer 2 overflow

◆ rtc_start()

void rtc_start ( void  )

setup prescaler to scale to 1 sec counter and start counter.

counter prescaler 1024

counter prescaler 128

◆ rtc_stop()

void rtc_stop ( void  )

stop the counter.

Variable Documentation

◆ rtc_seconds

volatile unsigned long rtc_seconds

Global used in interrupt. Global Wall clock.