ESP32-PaxCounter/include/rtctime.h

28 lines
659 B
C
Raw Normal View History

2019-01-20 22:38:53 +01:00
#ifndef _RTCTIME_H
#define _RTCTIME_H
#include "globals.h"
#include <Wire.h> // must be included here so that Arduino library object file references work
#include <RtcDS3231.h>
2019-01-21 16:16:39 +01:00
#ifdef HAS_GPS
#include "gpsread.h"
#endif
extern RtcDS3231<TwoWire> Rtc; // make RTC instance globally available
int rtc_init(void);
2019-01-29 22:54:16 +01:00
int set_rtctime(uint32_t t);
2019-02-02 09:15:31 +01:00
int set_rtctime(time_t t);
2019-01-20 22:38:53 +01:00
void sync_rtctime(void);
time_t get_rtctime(void);
float get_rtctemp(void);
void IRAM_ATTR CLOCKIRQ(void);
2019-02-15 14:08:27 +01:00
int timepulse_init(void);
void timepulse_start(void);
2019-02-16 15:02:07 +01:00
int sync_TimePulse(void);
int sync_SysTime(time_t);
int sync_SysTime(uint32_t t);
2019-02-17 22:12:14 +01:00
time_t best_time(void);
2019-01-20 22:38:53 +01:00
#endif // _RTCTIME_H