2019-01-20 22:38:53 +01:00
|
|
|
#ifndef _RTCTIME_H
|
|
|
|
#define _RTCTIME_H
|
2019-01-19 17:53:21 +01:00
|
|
|
|
2022-02-22 13:11:46 +01:00
|
|
|
#ifdef HAS_RTC
|
|
|
|
|
2019-01-19 17:53:21 +01:00
|
|
|
#include <Wire.h> // must be included here so that Arduino library object file references work
|
|
|
|
#include <RtcDS3231.h>
|
|
|
|
|
2020-03-29 18:08:52 +02:00
|
|
|
#include "globals.h"
|
|
|
|
#include "timekeeper.h"
|
|
|
|
|
2019-01-25 22:49:26 +01:00
|
|
|
extern RtcDS3231<TwoWire> Rtc; // make RTC instance globally available
|
|
|
|
|
2019-02-24 13:47:18 +01:00
|
|
|
uint8_t rtc_init(void);
|
2019-07-29 14:43:37 +02:00
|
|
|
uint8_t set_rtctime(time_t t);
|
2019-01-20 22:38:53 +01:00
|
|
|
void sync_rtctime(void);
|
2022-01-26 16:21:44 +01:00
|
|
|
time_t get_rtctime(uint16_t *msec);
|
2019-01-20 22:38:53 +01:00
|
|
|
float get_rtctemp(void);
|
2019-01-19 17:53:21 +01:00
|
|
|
|
2022-02-22 13:11:46 +01:00
|
|
|
#endif
|
|
|
|
|
2019-01-20 22:38:53 +01:00
|
|
|
#endif // _RTCTIME_H
|