Skip to content

Commit 21c15bb

Browse files
committed
remove function casts and align defines with Arduino_Portenta_OTA and ArduinoCore-mbed
1 parent 2802b54 commit 21c15bb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ArduinoIoTCloudTCP.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ int ArduinoIoTCloudTCP::begin(bool const enable_watchdog, String brokerAddress,
285285
#if defined (ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_MBED)
286286
if (enable_watchdog) {
287287
watchdog_enable();
288-
#ifdef WIFI_HAS_FEED_WATCHDOG_FUNC
289-
WiFi.setFeedWatchdogFunc((voidPrtFuncPtr)watchdog_reset);
290-
#endif /* WIFI_HAS_FEED_WATCHDOG_FUNC */
288+
#if defined (WIFI_HAS_FEED_WATCHDOG_FUNC) || defined (ARDUINO_PORTENTA_H7_WIFI_HAS_FEED_WATCHDOG_FUNC)
289+
WiFi.setFeedWatchdogFunc(watchdog_reset);
290+
#endif
291291
}
292292
#endif
293293

src/utility/ota/OTA-portenta-h7.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ int portenta_h7_onOTARequest(char const * ota_url)
4040
/* Use 2nd partition of QSPI (1st partition contains WiFi firmware) */
4141
Arduino_Portenta_OTA_QSPI ota_portenta_qspi(QSPI_FLASH_FATFS_MBR, 2);
4242

43-
#if defined (PORTENTA_OTA_HAS_WATCHDOG_FEED)
44-
ota_portenta_qspi.setFeedWatchdogFunc((voidPrtFuncPtr)watchdog_reset);
43+
#if defined (ARDUINO_PORTENTA_OTA_HAS_WATCHDOG_FEED)
44+
ota_portenta_qspi.setFeedWatchdogFunc(watchdog_reset);
4545
#endif
4646

4747
watchdog_reset();

0 commit comments

Comments
 (0)