File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,14 @@ static bool inverted_reset = false;
6363
6464bool SpiDrv::initialized = false ;
6565
66+ __attribute__ ((weak)) void wifi_nina_feed_watchdog()
67+ {
68+ /* This function can be overwritten by a "strong" implementation
69+ * in a higher level application, such as the ArduinoIoTCloud
70+ * firmware stack.
71+ */
72+ }
73+
6674void SpiDrv::begin ()
6775{
6876#ifdef ARDUINO_SAMD_MKRVIDOR4000
@@ -207,29 +215,16 @@ void SpiDrv::waitForSlaveSign()
207215 while (!waitSlaveSign ());
208216}
209217
210- #if defined __has_include
211- # if __has_include (<Adafruit_SleepyDog.h>)
212- # include < Adafruit_SleepyDog.h>
213- # define HAS_WATCHDOG 1
214- # endif
215- #else
216- # define HAS_WATCHDOG 0
217- #endif
218-
219218void SpiDrv::waitForSlaveReady (bool const feed_watchdog)
220219{
221- #if HAS_WATCHDOG
222220 unsigned long const start = millis ();
223- #endif /* HAS_WATCHDOG */
224221 while (!waitSlaveReady ())
225222 {
226- #if HAS_WATCHDOG
227223 if (feed_watchdog) {
228224 if ((millis () - start) < 10000 ) {
229- Watchdog. reset ();
225+ wifi_nina_feed_watchdog ();
230226 }
231227 }
232- #endif /* HAS_WATCHDOG */
233228 }
234229}
235230
You can’t perform that action at this time.
0 commit comments