#include <avr/io.h>
#include <avr/signal.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include <inttypes.h>
#include "net/application.h"
#include "main/dcf77.h"
#include "utils.h"
Go to the source code of this file.
Defines | |
#define | __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) |
#define | TK_SET_TIME 0 |
#define | TK_GET_TIME 1 |
#define | TK_SET_UPDATE_INTERVAL 2 |
#define | TK_GET_UPDATE_INTERVAL 3 |
#define | TK_ON_UPDATE 0 |
Functions | |
SIGNAL (SIG_OUTPUT_COMPARE1A) | |
SIGNAL (SIG_INTERRUPT7) | |
void | dcf_init (void) |
Initialize dcf77 receiver harware and timer. | |
void | dcf_process (void) |
Process received time telegrams. | |
void | dcf_get_time (struct snt_time_stamp *time) |
Get current time. |
Definition in file dcf77.c.
|
Get current time.
|
|
Initialize dcf77 receiver harware and timer. Also registers TimeKeeper object. After calling this function the clock starts running from 01.01.2000 00:00:00. When a valid time telegrams is received the clock is adjusted according to these telegram. Definition at line 242 of file dcf77.c. Referenced by main(). |
|
Process received time telegrams. Should be called periodically from the main loop but not from a timer ISR since the implementation is not thread save. Definition at line 269 of file dcf77.c. Referenced by main(). |