#include "boole.h"
Include dependency graph for dcftime.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | dcf_time_struct |
format of the dcf_time More... | |
struct | dcf_date_struct |
format of the dcf_date More... | |
struct | dcf_datetime_struct |
format of the dcf_datetime More... | |
Defines | |
#define | DCF_RATE 244 |
number of samples per second. | |
Typedefs | |
typedef unsigned int | dcf_second |
seconds (0-59) | |
typedef unsigned int | dcf_minute |
minutes (0-59) | |
typedef unsigned int | dcf_hour |
hours (0-24) | |
typedef unsigned int | dcf_dayofmonth |
day of month (1-31) | |
typedef unsigned int | dcf_year |
year (0-99) | |
typedef boolean | dcf_is_dst |
daylight saving: True: MESZ, False: MEZ | |
typedef enum dcf_dayofweek_enum | dcf_dayofweek |
definition of weekdays | |
typedef enum dcf_month_enum | dcf_month |
definition of months | |
typedef dcf_time_struct | dcf_time |
definition of dcf_time | |
typedef dcf_date_struct | dcf_date |
definition of dcf_date | |
typedef dcf_datetime_struct | dcf_datetime |
definition of dcf_datetime | |
Enumerations | |
enum | dcf_dayofweek_enum { dcf_monday = 1, dcf_tuesday, dcf_wednesday, dcf_thursday, dcf_friday, dcf_saturday, dcf_sunday } |
definition of weekdays More... | |
enum | dcf_month_enum { dcf_january = 1, dcf_february, dcf_march, dcf_april, dcf_may, dcf_june, dcf_july, dcf_august, dcf_september, dcf_october, dcf_november, dcf_december } |
definition of months More... | |
Functions | |
void | dcf_init (void) |
Initialize the DCF-module. | |
void | dcf_signal (boolean signal) |
Tell the DCF-module if the signal is high or low. | |
dcf_datetime | dcf_current_datetime (void) |
Fetch the current date and time. | |
const char * | dcf_dayofweek_name (dcf_dayofweek dow) |
Get the name of the current weekday. | |
const char * | dcf_is_dst_name (dcf_is_dst dst) |
Get the name of the current daylight saving time (summertime, wintertime). |
Definition in file dcftime.h.
#define DCF_RATE 244 |
number of samples per second.
dcf_signal() should be called this often
typedef struct dcf_date_struct dcf_date |
typedef struct dcf_datetime_struct dcf_datetime |
typedef unsigned int dcf_dayofmonth |
typedef enum dcf_dayofweek_enum dcf_dayofweek |
typedef boolean dcf_is_dst |
typedef unsigned int dcf_minute |
typedef enum dcf_month_enum dcf_month |
typedef unsigned int dcf_second |
typedef struct dcf_time_struct dcf_time |
enum dcf_dayofweek_enum |
enum dcf_month_enum |
dcf_datetime dcf_current_datetime | ( | void | ) |
Fetch the current date and time.
Definition at line 407 of file dcftime.c.
References dcf_data_struct::current_datetime, dcf_datetime_struct::has_signal, dcf_receiving_data_struct::is_valid, dcf_data_struct::receiving_data, and dcf_data_struct::use_first_current_datetime.
Referenced by timerInterrupt().
const char* dcf_dayofweek_name | ( | dcf_dayofweek | dow | ) |
void dcf_init | ( | void | ) |
Initialize the DCF-module.
Call dcf_init before any other DCF function.
Definition at line 350 of file dcftime.c.
References dcf_data_struct::current_datetime, dcf_data_struct::current_datetime_sample, dcf_data_struct::receiving_data, True, and dcf_data_struct::use_first_current_datetime.
Referenced by main().
const char* dcf_is_dst_name | ( | dcf_is_dst | dst | ) |
void dcf_signal | ( | boolean | signal | ) |
Tell the DCF-module if the signal is high or low.
This function decides if the received bit is a long or a short one, and if it is usable at all. It should be called regularly, the number of calls per second is defined in DCF_RATE.
signal | True if the input signal is high, False if it is low. |
Definition at line 358 of file dcftime.c.
References dcf_data_struct::current_datetime_sample, dcf_receiving_data_struct::current_signal, dcf_logic_false_max, dcf_logic_false_min, dcf_logic_true_max, dcf_logic_true_min, dcf_second_samples, dcf_signal_false, dcf_signal_invalid, dcf_signal_true, False, dcf_receiving_data_struct::high_samples, dcf_receiving_data_struct::is_valid, dcf_receiving_data_struct::low_samples, dcf_data_struct::receiving_data, dcf_time_struct::second, dcf_receiving_data_struct::time, and True.
Referenced by timerInterrupt().