Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

dcf77.c File Reference

DCF77 decoder and network object. More...

#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.


Detailed Description

DCF77 decoder and network object.

Definition in file dcf77.c.


Function Documentation

void dcf_get_time struct snt_time_stamp *  time  ) 
 

Get current time.

Parameters:
time Structure receiving the current time and date.

Definition at line 321 of file dcf77.c.

void dcf_init void   ) 
 

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().

void dcf_process void   ) 
 

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().


Generated on Thu Oct 16 13:13:41 2003 for OpenHomeMainPanel by doxygen 1.3.3