Skip to content

Commit 6070dd8

Browse files
aentingerfacchinm
andauthored
Add PortentaH7 target (#37)
Co-authored-by: Martino Facchin <[email protected]>
1 parent 78f21bb commit 6070dd8

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/Arduino_ConnectionHandler.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@
4040
#define WIFI_FIRMWARE_VERSION_REQUIRED WIFI_FIRMWARE_LATEST_VERSION
4141
#endif
4242

43+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
44+
#include <WiFi.h>
45+
#include <WiFiUdp.h>
46+
47+
#define BOARD_HAS_WIFI
48+
#define NETWORK_HARDWARE_ERROR WL_NO_SHIELD
49+
#define NETWORK_IDLE_STATUS WL_IDLE_STATUS
50+
#define NETWORK_CONNECTED WL_CONNECTED
51+
#endif
52+
4353
#ifdef ARDUINO_SAMD_MKRGSM1400
4454
#include <MKRGSM.h>
4555
#define BOARD_HAS_GSM

src/Arduino_WiFiConnectionHandler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,15 @@ NetworkConnectionState WiFiConnectionHandler::update_handleInit()
6565

6666
Debug.print(DBG_ERROR, "Current WiFi Firmware: %s", WiFi.firmwareVersion());
6767

68+
#if defined(WIFI_FIRMWARE_VERSION_REQUIRED)
6869
if (WiFi.firmwareVersion() < WIFI_FIRMWARE_VERSION_REQUIRED)
6970
{
7071
Debug.print(DBG_ERROR, "Latest WiFi Firmware: %s", WIFI_FIRMWARE_VERSION_REQUIRED);
7172
Debug.print(DBG_ERROR, "Please update to the latest version for best performance.");
7273
delay(5000);
7374
}
75+
#endif
76+
7477
#else
7578
Debug.print(DBG_ERROR, "WiFi status ESP: %d", WiFi.status());
7679
WiFi.disconnect();

0 commit comments

Comments
 (0)