Code for RTC time sync added

This commit is contained in:
Klaus K Wilting committed 2019-01-21 16:16:39 +01:00
1 parent a0c5bb5086
commit 5bc2ffab09
4 files changed
+64 -63

No files matched your search

+8 -2
View File
@@ -2,9 +2,14 @@
#define _RTCTIME_H
#include "globals.h"
#include <Time.h>
#include <Wire.h> // must be included here so that Arduino library object file references work
#include <RtcDS3231.h>
#ifdef HAS_GPS
#include "gpsread.h"
#endif
typedef enum {
useless = 0, // waiting for good enough signal
dirty = 1, // time data available but inconfident
@@ -15,10 +20,11 @@ typedef enum {
int rtc_init(void);
void sync_rtctime(void);
int set_rtctime(uint32_t UTCTime, clock_state_t state);
int set_rtctime(RtcDateTime now, clock_state_t state);
int set_rtctime(uint32_t UTCTime);
int set_rtctime(RtcDateTime now);
void sync_rtctime(void);
time_t get_rtctime(void);
float get_rtctemp(void);
time_t gpsTimeSync(void);
#endif // _RTCTIME_H