ESP32-PaxCounter/include/dcf77.h

21 lines
540 B
C
Raw Normal View History

#ifndef _DCF77_H
#define _DCF77_H
#include "globals.h"
2021-05-09 00:02:41 +02:00
#include "timekeeper.h"
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-23 20:28:11 +01:00
enum DCF77_Pulses { dcf_Z, dcf_0, dcf_1 };
2019-02-23 20:28:11 +01:00
void DCF77_Pulse(time_t t, uint8_t const *DCFpulse);
uint8_t *IRAM_ATTR DCF77_Frame(time_t const tt);
2019-02-23 20:28:11 +01:00
uint8_t IRAM_ATTR dec2bcd(uint8_t const dec, uint8_t const startpos, uint8_t const endpos,
uint8_t *DCFpulse);
uint8_t IRAM_ATTR setParityBit(uint8_t const p);
#endif