Skip to content

Commit d766bb3

Browse files
committed
Provide strong implementation in order to override 'wifi_nina_feed_watchdog' defined weak within WiFiNINA.
1 parent fd0bb72 commit d766bb3

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/utility/watchdog/Watchdog.cpp

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
This file is part of ArduinoIoTCloud.
3+
4+
Copyright 2020 ARDUINO SA (http://www.arduino.cc/)
5+
6+
This software is released under the GNU General Public License version 3,
7+
which covers the main part of arduino-cli.
8+
The terms of this license can be found at:
9+
https://www.gnu.org/licenses/gpl-3.0.en.html
10+
11+
You can be released from the requirements of the above licenses by purchasing
12+
a commercial license. Buying such a license is mandatory if you want to modify or
13+
otherwise use the software for commercial activities involving the Arduino
14+
software without disclosing the source code of your own applications. To purchase
15+
a commercial license, send an email to [email protected].
16+
*/
17+
18+
/******************************************************************************
19+
* INCLUDE
20+
******************************************************************************/
21+
22+
#include "Watchdog.h"
23+
24+
/******************************************************************************
25+
* FUNCTION DEFINITION
26+
******************************************************************************/
27+
28+
#ifdef ARDUINO_ARCH_SAMD
29+
/* This function is called within the WiFiNINA library when invoking
30+
* the method 'connectBearSSL' in order to prevent a premature bite
31+
* of the watchdog (max timeout on SAMD is 16 s). wifi_nina_feed...
32+
* is defined a weak function there and overwritten by this "strong"
33+
* function here.
34+
*/
35+
void wifi_nina_feed_watchdog()
36+
{
37+
Watchdog.reset();
38+
}
39+
#endif /* ARDUINO_ARCH_SAMD */

0 commit comments

Comments
 (0)