2019-02-03 21:19:08 +01:00
|
|
|
#ifndef _DCF77_H
|
|
|
|
#define _DCF77_H
|
|
|
|
|
|
|
|
#include "globals.h"
|
|
|
|
|
2019-02-17 19:21:08 +01:00
|
|
|
#define DCF77_FRAME_SIZE (60)
|
|
|
|
#define DCF77_PULSE_LENGTH (100)
|
|
|
|
|
2019-02-23 18:12:43 +01:00
|
|
|
#ifdef DCF77_ACTIVE_LOW
|
|
|
|
enum dcf_pinstate { dcf_high, dcf_low };
|
|
|
|
#else
|
|
|
|
enum dcf_pinstate { dcf_low, dcf_high };
|
|
|
|
#endif
|
2019-02-17 19:21:08 +01:00
|
|
|
|
2019-02-03 21:19:08 +01:00
|
|
|
enum dcf_pulses { dcf_off, dcf_zero, dcf_one };
|
2019-02-23 18:31:47 +01:00
|
|
|
extern uint8_t DCFpulse[];
|
2019-02-03 21:19:08 +01:00
|
|
|
|
2019-02-17 19:21:08 +01:00
|
|
|
void DCF_Pulse(time_t t);
|
2019-02-23 18:31:47 +01:00
|
|
|
void IRAM_ATTR DCF77_Frame(time_t t);
|
2019-02-23 18:12:43 +01:00
|
|
|
uint8_t IRAM_ATTR dec2bcd(uint8_t dec, uint8_t startpos, uint8_t endpos,
|
|
|
|
uint8_t pArray[]);
|
|
|
|
uint8_t IRAM_ATTR setParityBit(uint8_t p);
|
2019-02-03 21:19:08 +01:00
|
|
|
|
|
|
|
#endif
|