Skip to content

Commit c934b8d

Browse files
committed
Fix build if watchdog network feed is not available
1 parent 8d33a52 commit c934b8d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: src/utility/watchdog/Watchdog.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ static void samd_watchdog_reset()
6666
}
6767
}
6868

69+
#if defined (WIFI_HAS_FEED_WATCHDOG_FUNC)
6970
static void samd_watchdog_enable_network_feed()
7071
{
7172
WiFi.setFeedWatchdogFunc(watchdog_reset);
7273
}
74+
#endif
7375

7476
/* This function is called within the WiFiNINA library when invoking
7577
* the method 'connectBearSSL' in order to prevent a premature bite
@@ -122,6 +124,7 @@ static void mbed_watchdog_reset()
122124
}
123125
}
124126

127+
#if defined (ARDUINO_PORTENTA_H7_WIFI_HAS_FEED_WATCHDOG_FUNC)
125128
static void mbed_watchdog_enable_network_feed(const bool use_ethernet)
126129
{
127130
if(use_ethernet) {
@@ -132,6 +135,7 @@ static void mbed_watchdog_enable_network_feed(const bool use_ethernet)
132135
WiFi.setFeedWatchdogFunc(watchdog_reset);
133136
}
134137
}
138+
#endif
135139

136140
void mbed_watchdog_trigger_reset()
137141
{
@@ -174,6 +178,7 @@ void watchdog_reset()
174178
#endif
175179
}
176180

181+
#if defined (WIFI_HAS_FEED_WATCHDOG_FUNC) || defined (ARDUINO_PORTENTA_H7_WIFI_HAS_FEED_WATCHDOG_FUNC)
177182
void watchdog_enable_network_feed(const bool use_ethernet)
178183
{
179184
#ifdef ARDUINO_ARCH_SAMD
@@ -182,4 +187,5 @@ void watchdog_enable_network_feed(const bool use_ethernet)
182187
mbed_watchdog_enable_network_feed(use_ethernet);
183188
#endif
184189
}
190+
#endif
185191
#endif /* (ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_MBED) */

0 commit comments

Comments
 (0)