File tree 3 files changed +20
-0
lines changed
3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,18 @@ unsigned long arduino::WiFiClass::getTime() {
314
314
return 0 ;
315
315
}
316
316
317
+ void arduino::WiFiClass::setFeedWatchdogFunc (ArduinoPortentaH7WiFiFeedWatchdogFuncPtr func)
318
+ {
319
+ _feed_watchdog_func = func;
320
+ }
321
+
322
+ void arduino::WiFiClass::feedWatchdog ()
323
+ {
324
+ if (_feed_watchdog_func)
325
+ _feed_watchdog_func ();
326
+ }
327
+
328
+
317
329
#if defined(COMPONENT_4343W)
318
330
319
331
#include " QSPIFBlockDevice.h"
Original file line number Diff line number Diff line change @@ -49,9 +49,12 @@ extern "C" {
49
49
#define DEFAULT_AP_CHANNEL 6
50
50
#endif
51
51
52
+ #define ARDUINO_PORTENTA_H7_WIFI_HAS_FEED_WATCHDOG_FUNC
53
+
52
54
namespace arduino {
53
55
54
56
typedef void * (*voidPrtFuncPtr)(void );
57
+ typedef void (*ArduinoPortentaH7WiFiFeedWatchdogFuncPtr)(void );
55
58
56
59
class WiFiClass
57
60
{
@@ -296,6 +299,9 @@ class WiFiClass
296
299
297
300
NetworkInterface *getNetwork ();
298
301
302
+ void setFeedWatchdogFunc (ArduinoPortentaH7WiFiFeedWatchdogFuncPtr func);
303
+ void feedWatchdog ();
304
+
299
305
private:
300
306
301
307
EMACInterface* _softAP = nullptr ;
@@ -316,6 +322,7 @@ class WiFiClass
316
322
bool isVisible (const char * ssid);
317
323
arduino::IPAddress ipAddressFromSocketAddress (SocketAddress socketAddress);
318
324
SocketAddress socketAddressFromIpAddress (arduino::IPAddress ip, uint16_t port);
325
+ ArduinoPortentaH7WiFiFeedWatchdogFuncPtr _feed_watchdog_func = 0 ;
319
326
};
320
327
321
328
}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ static FILE* target;
23
23
24
24
void body_callback (const char * data, uint32_t data_len)
25
25
{
26
+ WiFi.feedWatchdog ();
26
27
fwrite (data, 1 , data_len, target);
27
28
}
28
29
You can’t perform that action at this time.
0 commit comments