Skip to content

Commit 120fe75

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 9d09128 commit 120fe75

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
@@ -27,9 +27,7 @@
2727

2828
#include <Arduino_DebugUtils.h>
2929
#include <Arduino_Portenta_OTA.h>
30-
31-
#include <WiFi.h>
32-
#include <Ethernet.h>
30+
#include <Arduino_ConnectionHandler.h>
3331

3432
#include "../watchdog/Watchdog.h"
3533

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

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

0 commit comments

Comments
 (0)