File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 25
25
26
26
#include " NTPUtils.h"
27
27
28
+ #ifdef ARDUINO_ARCH_ESP8266
29
+ #include " RTCMillis.h"
30
+ #endif
31
+
28
32
/* *************************************************************************************
29
33
* GLOBAL VARIABLES
30
34
**************************************************************************************/
33
37
RTCZero rtc;
34
38
#endif
35
39
40
+ #ifdef ARDUINO_ARCH_ESP8266
41
+ RTCMillis rtc;
42
+ #endif
43
+
36
44
/* *************************************************************************************
37
45
* INTERNAL FUNCTION DECLARATION
38
46
**************************************************************************************/
@@ -476,17 +484,17 @@ unsigned long esp32_getRTC()
476
484
#ifdef ARDUINO_ARCH_ESP8266
477
485
void esp8266_initRTC ()
478
486
{
479
- /* Nothing to do */
487
+ rtc. begin ();
480
488
}
481
489
482
490
void esp8266_setRTC (unsigned long time)
483
491
{
484
- /* TODO */
492
+ rtc. set (time);
485
493
}
486
494
487
495
unsigned long esp8266_getRTC ()
488
496
{
489
- /* TODO */
497
+ return rtc. get ();
490
498
}
491
499
#endif
492
500
You can’t perform that action at this time.
0 commit comments