Skip to content

Commit a1d34c8

Browse files
committed
Portenta OTA: include Arduino_ConnectionHandler.h instead of Wifi/Ethernet.h
In this way we can also use the more meaningful define BOARD_HAS_ETHERNET
1 parent 3ecb771 commit a1d34c8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Diff for: src/utility/ota/OTA-portenta-h7.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525

2626
#include <Arduino_DebugUtils.h>
2727
#include <Arduino_Portenta_OTA.h>
28-
29-
#include <WiFi.h>
30-
#include <Ethernet.h>
28+
#include <Arduino_ConnectionHandler.h>
3129

3230
#include "../watchdog/Watchdog.h"
3331

@@ -65,7 +63,7 @@ int portenta_h7_onOTARequest(char const * ota_url, const bool use_ethernet)
6563

6664
/* Download the OTA file from the web storage location. */
6765
MbedSocketClass * download_socket = static_cast<MbedSocketClass*>(&WiFi);
68-
#if defined (ARDUINO_PORTENTA_H7_M7)
66+
#if defined (BOARD_HAS_ETHERNET)
6967
if(use_ethernet) {
7068
download_socket = static_cast<MbedSocketClass*>(&Ethernet);
7169
}

0 commit comments

Comments
 (0)