2019-02-24 01:44:55 +01:00
|
|
|
#ifndef _timekeeper_H
|
|
|
|
#define _timekeeper_H
|
2019-02-21 23:17:01 +01:00
|
|
|
|
|
|
|
#include "globals.h"
|
|
|
|
#include "rtctime.h"
|
2019-03-02 13:32:02 +01:00
|
|
|
#include "TimeLib.h"
|
2019-03-03 00:30:57 +01:00
|
|
|
#include "irqhandler.h"
|
2020-03-04 21:54:26 +01:00
|
|
|
#include "timesync.h"
|
2019-02-21 23:17:01 +01:00
|
|
|
|
2019-04-14 22:47:48 +02:00
|
|
|
#if (HAS_GPS)
|
2019-02-21 23:17:01 +01:00
|
|
|
#include "gpsread.h"
|
|
|
|
#endif
|
2019-03-23 15:12:11 +01:00
|
|
|
|
2019-02-21 23:17:01 +01:00
|
|
|
#ifdef HAS_IF482
|
|
|
|
#include "if482.h"
|
|
|
|
#elif defined HAS_DCF77
|
|
|
|
#include "dcf77.h"
|
|
|
|
#endif
|
|
|
|
|
2019-02-24 15:08:41 +01:00
|
|
|
extern const char timeSetSymbols[];
|
2019-03-03 00:30:57 +01:00
|
|
|
extern Ticker timesyncer;
|
2019-02-23 21:51:24 +01:00
|
|
|
|
2019-02-24 01:44:55 +01:00
|
|
|
void IRAM_ATTR CLOCKIRQ(void);
|
2019-02-21 23:17:01 +01:00
|
|
|
void clock_init(void);
|
|
|
|
void clock_loop(void *pvParameters);
|
|
|
|
void timepulse_start(void);
|
2019-03-03 00:30:57 +01:00
|
|
|
void timeSync(void);
|
2019-02-24 01:44:55 +01:00
|
|
|
uint8_t timepulse_init(void);
|
2019-03-02 13:32:02 +01:00
|
|
|
time_t timeIsValid(time_t const t);
|
2019-08-03 12:27:24 +02:00
|
|
|
void calibrateTime(void);
|
2019-08-13 22:40:33 +02:00
|
|
|
void IRAM_ATTR setMyTime(uint32_t t_sec, uint16_t t_msec, timesource_t mytimesource);
|
2019-02-22 22:28:35 +01:00
|
|
|
time_t compiledUTC(void);
|
2019-02-25 20:22:03 +01:00
|
|
|
TickType_t tx_Ticks(uint32_t framesize, unsigned long baud, uint32_t config,
|
|
|
|
int8_t rxPin, int8_t txPins);
|
2019-02-21 23:17:01 +01:00
|
|
|
|
2019-02-24 01:44:55 +01:00
|
|
|
#endif // _timekeeper_H
|