Feature RTC support added (experimental)
This commit is contained in:
1 parent
1efaf9a04e
commit
a3414c5622
7 files changed
+159
-2
No files matched your search
@@ -11,6 +11,11 @@
|
||||
#include "bme680mems.h"
|
||||
#endif
|
||||
|
||||
// Needed for RTC time sync if RTC present on board
|
||||
#ifdef HAS_RTC
|
||||
#include "rtc.h"
|
||||
#endif
|
||||
|
||||
void doHousekeeping(void);
|
||||
void do_timesync(void);
|
||||
uint64_t uptime(void);
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
#include <Wire.h>
|
||||
#endif
|
||||
|
||||
// Needed for RTC time sync if RTC present on board
|
||||
#ifdef HAS_RTC
|
||||
#include "rtc.h"
|
||||
#endif
|
||||
|
||||
extern QueueHandle_t LoraSendQueue;
|
||||
|
||||
void onEvent(ev_t ev);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef _RTC_H
|
||||
#define _RTC_H
|
||||
|
||||
#include "globals.h"
|
||||
#include <Wire.h> // must be included here so that Arduino library object file references work
|
||||
#include <RtcDS3231.h>
|
||||
|
||||
extern RtcDS3231<TwoWire> Rtc; // Make RTCDS3231 instance globally availabe
|
||||
|
||||
int rtc_init(void);
|
||||
int set_rtc(uint32_t UTCTime);
|
||||
int set_rtc(RtcDateTime now);
|
||||
uint32_t get_rtc();
|
||||
float get_rtc_temp();
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user