Skip to content

Add ethernet interface support (OTA and Watchdog) for Portenta H7 #328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Portenta OTA: include Arduino_ConnectionHandler.h instead of Wifi/Eth…
…ernet.h

  In this way we can also use the more meaningful define BOARD_HAS_ETHERNET
  • Loading branch information
pennam committed Nov 7, 2022
commit f39194793cb197756a594d0b37c57ecf48e32451
6 changes: 2 additions & 4 deletions src/utility/ota/OTA-portenta-h7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@

#include <Arduino_DebugUtils.h>
#include <Arduino_Portenta_OTA.h>

#include <WiFi.h>
#include <Ethernet.h>
#include <Arduino_ConnectionHandler.h>

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

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

/* Download the OTA file from the web storage location. */
MbedSocketClass * download_socket = static_cast<MbedSocketClass*>(&WiFi);
#if defined (ARDUINO_PORTENTA_H7_M7)
#if defined (BOARD_HAS_ETHERNET)
if(use_ethernet) {
download_socket = static_cast<MbedSocketClass*>(&Ethernet);
}
Expand Down