File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 29
29
30
30
#ifdef ARDUINO_ARCH_SAMD
31
31
# include < Adafruit_SleepyDog.h>
32
- # include < WiFi.h>
33
32
# define SAMD_WATCHDOG_MAX_TIME_ms (16 * 1000 )
34
33
#endif /* ARDUINO_ARCH_SAMD */
35
34
36
35
#ifdef ARDUINO_ARCH_MBED
37
36
# include < watchdog_api.h>
38
- # include < WiFi.h>
39
- # include < Ethernet.h>
40
37
# define PORTENTA_H7_WATCHDOG_MAX_TIMEOUT_ms (32760 )
41
38
# define NANO_RP2040_WATCHDOG_MAX_TIMEOUT_ms (8389 )
42
39
#endif /* ARDUINO_ARCH_MBED */
43
40
41
+ #include < Arduino_ConnectionHandler.h>
42
+
44
43
/* *****************************************************************************
45
44
* GLOBAL VARIABLES
46
45
******************************************************************************/
@@ -127,13 +126,13 @@ static void mbed_watchdog_reset()
127
126
#if defined (ARDUINO_PORTENTA_H7_WIFI_HAS_FEED_WATCHDOG_FUNC)
128
127
static void mbed_watchdog_enable_network_feed (const bool use_ethernet)
129
128
{
129
+ #if defined(BOARD_HAS_ETHERNET)
130
130
if (use_ethernet) {
131
- #if defined(ARDUINO_PORTENTA_H7_M7)
132
131
Ethernet.setFeedWatchdogFunc (watchdog_reset);
132
+ } else
133
133
#endif
134
- } else {
135
134
WiFi.setFeedWatchdogFunc (watchdog_reset);
136
- }
135
+
137
136
}
138
137
#endif
139
138
You can’t perform that action at this time.
0 commit comments