@@ -90,11 +90,13 @@ void ws_sdcard::calculateFileLimits() {
9090bool ws_sdcard::InitDS1307 () {
9191 _rtc_ds1307 = new RTC_DS1307 ();
9292 if (!_rtc_ds1307->begin ()) {
93+ #ifndef ARDUINO_ARCH_ESP8266
9394 if (!_rtc_ds1307->begin (&Wire1)) {
9495 WS_DEBUG_PRINTLN (" [SD] Runtime Error: Failed to initialize DS1307 RTC" );
9596 delete _rtc_ds1307;
9697 return false ;
9798 }
99+ #endif
98100 }
99101 if (!_rtc_ds1307->isrunning ())
100102 _rtc_ds1307->adjust (DateTime (F (__DATE__), F (__TIME__)));
@@ -112,11 +114,13 @@ bool ws_sdcard::InitDS3231() {
112114 WS_DEBUG_PRINTLN (" Begin DS3231 init" );
113115 _rtc_ds3231 = new RTC_DS3231 ();
114116 if (!_rtc_ds3231->begin (&Wire)) {
117+ #ifndef ARDUINO_ARCH_ESP8266
115118 if (!_rtc_ds3231->begin (&Wire1)) {
116119 WS_DEBUG_PRINTLN (" [SD] Runtime Error: Failed to initialize DS3231 RTC" );
117120 delete _rtc_ds3231;
118121 return false ;
119122 }
123+ #endif
120124 }
121125 if (_rtc_ds3231->lostPower ())
122126 _rtc_ds3231->adjust (DateTime (F (__DATE__), F (__TIME__)));
@@ -135,12 +139,14 @@ bool ws_sdcard::InitPCF8523() {
135139 if (!_rtc_pcf8523->begin (&Wire)) {
136140 WS_DEBUG_PRINTLN (
137141 " [SD] Runtime Error: Failed to initialize PCF8523 RTC on WIRE" );
142+ #ifndef ARDUINO_ARCH_ESP8266
138143 if (!_rtc_pcf8523->begin (&Wire1)) {
139144 WS_DEBUG_PRINTLN (
140145 " [SD] Runtime Error: Failed to initialize PCF8523 RTC on WIRE1" );
141146 delete _rtc_pcf8523;
142147 return false ;
143148 }
149+ #endif
144150 }
145151 if (!_rtc_pcf8523->initialized () || _rtc_pcf8523->lostPower ()) {
146152 _rtc_pcf8523->adjust (DateTime (F (__DATE__), F (__TIME__)));
0 commit comments