Skip to content

Commit d47a687

Browse files
committed
Enable Ethernet support for Portenta H7. Needs Vision shield
1 parent 7ab21ac commit d47a687

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Arduino_ConnectionHandler.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,18 @@
4343
#define WIFI_FIRMWARE_VERSION_REQUIRED WIFI_FIRMWARE_LATEST_VERSION
4444
#endif
4545

46-
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
46+
#if defined(ARDUINO_PORTENTA_H7_M7)
47+
#include <WiFi.h>
48+
#include <WiFiUdp.h>
49+
50+
#define BOARD_HAS_WIFI
51+
#define BOARD_HAS_PORTENTA_VISION_SHIELD
52+
#define NETWORK_HARDWARE_ERROR WL_NO_SHIELD
53+
#define NETWORK_IDLE_STATUS WL_IDLE_STATUS
54+
#define NETWORK_CONNECTED WL_CONNECTED
55+
#endif
56+
57+
#if defined(ARDUINO_NICLA_VISION)
4758
#include <WiFi.h>
4859
#include <WiFiUdp.h>
4960

@@ -96,6 +107,12 @@
96107
#define WIFI_FIRMWARE_VERSION_REQUIRED WIFI_FIRMWARE_REQUIRED
97108
#endif
98109

110+
#if defined(BOARD_HAS_PORTENTA_VISION_SHIELD)
111+
#define BOARD_HAS_ETHERNET
112+
113+
#include <Ethernet.h>
114+
#endif
115+
99116
/******************************************************************************
100117
INCLUDES
101118
******************************************************************************/

0 commit comments

Comments
 (0)