Skip to content

Commit 93ec0f4

Browse files
committed
Fix if defined preprocessor directive for watchdog handling
1 parent ca57249 commit 93ec0f4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/ArduinoIoTCloudTCP.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ int ArduinoIoTCloudTCP::begin(bool const enable_watchdog, String brokerAddress,
283283
* call to ArduinoIoTCloudTCP::update() it is wise to
284284
* set a rather large timeout at first.
285285
*/
286-
#if defined (ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_MBED)
286+
#if defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_MBED)
287287
if (enable_watchdog) {
288288
watchdog_enable();
289289
#if defined (WIFI_HAS_FEED_WATCHDOG_FUNC) || defined (ARDUINO_PORTENTA_H7_WIFI_HAS_FEED_WATCHDOG_FUNC)
@@ -300,7 +300,7 @@ void ArduinoIoTCloudTCP::update()
300300
/* Feed the watchdog. If any of the functions called below
301301
* get stuck than we can at least reset and recover.
302302
*/
303-
#if defined (ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_MBED)
303+
#if defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_MBED)
304304
watchdog_reset();
305305
#endif
306306

@@ -322,7 +322,7 @@ void ArduinoIoTCloudTCP::update()
322322
* maximum watchdog window is 8389ms; despite this we feed it for all
323323
* supported ARCH to keep code aligned.
324324
*/
325-
#if defined (ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_MBED)
325+
#if defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_MBED)
326326
watchdog_reset();
327327
#endif
328328

src/utility/watchdog/Watchdog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void mbed_watchdog_trigger_reset()
135135
}
136136
#endif /* ARDUINO_ARCH_MBED */
137137

138-
#if defined (ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_MBED)
138+
#if defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_MBED)
139139
void watchdog_enable()
140140
{
141141
#ifdef ARDUINO_ARCH_SAMD

src/utility/watchdog/Watchdog.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* FUNCTION DECLARATION
2323
******************************************************************************/
2424

25-
#if defined (ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_MBED)
25+
#if defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_MBED)
2626
void watchdog_enable();
2727
void watchdog_reset();
2828
#endif /* (ARDUINO_ARCH_SAMD) || (ARDUINO_ARCH_MBED) */

0 commit comments

Comments
 (0)