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 2525
2626#include " NTPUtils.h"
2727
28+ #ifdef ARDUINO_ARCH_ESP8266
29+ #include " RTCMillis.h"
30+ #endif
31+
2832/* *************************************************************************************
2933 * GLOBAL VARIABLES
3034 **************************************************************************************/
3337RTCZero rtc;
3438#endif
3539
40+ #ifdef ARDUINO_ARCH_ESP8266
41+ RTCMillis rtc;
42+ #endif
43+
3644/* *************************************************************************************
3745 * INTERNAL FUNCTION DECLARATION
3846 **************************************************************************************/
@@ -476,17 +484,17 @@ unsigned long esp32_getRTC()
476484#ifdef ARDUINO_ARCH_ESP8266
477485void esp8266_initRTC ()
478486{
479- /* Nothing to do */
487+ rtc. begin ();
480488}
481489
482490void esp8266_setRTC (unsigned long time)
483491{
484- /* TODO */
492+ rtc. set (time);
485493}
486494
487495unsigned long esp8266_getRTC ()
488496{
489- /* TODO */
497+ return rtc. get ();
490498}
491499#endif
492500
You can’t perform that action at this time.
0 commit comments