|
Open Garden
0.10.1-21
|
Counters handler and IRQ routine. More...
#include <stdint.h>#include <stdlib.h>#include <avr/io.h>#include <avr/interrupt.h>#include "rtc.h"
Functions | |
| ISR (TIMER2_OVF_vect) | |
| void | rtc_setup (void) |
| void | rtc_start (void) |
| void | rtc_stop (void) |
Counters handler and IRQ routine.
| ISR | ( | TIMER2_OVF_vect | ) |
IRQ wakes up on the timer oveflow and increment the global seconds.
| void rtc_setup | ( | void | ) |
setup timer/counter on 32Khz external clock.
enable interrupt on timer 2 overflow
| void rtc_start | ( | void | ) |
setup prescaler to scale to 1 sec counter and start counter.
counter prescaler 1024
counter prescaler 128
| void rtc_stop | ( | void | ) |
stop the counter.
1.8.13