File tree 3 files changed +23
-14
lines changed
3 files changed +23
-14
lines changed Original file line number Diff line number Diff line change 44
44
#endif
45
45
46
46
#if defined(ARDUINO_PORTENTA_H7_M7)
47
- #include < WiFi.h>
48
- #include < WiFiUdp.h>
49
- #include < Ethernet.h>
50
- #include < PortentaEthernet.h>
51
-
52
- #define BOARD_HAS_WIFI
53
- #define BOARD_HAS_ETHERNET
54
- #define BOARD_HAS_PORTENTA_VISION_SHIELD_ETHERNET
55
- #define NETWORK_HARDWARE_ERROR WL_NO_SHIELD
56
- #define NETWORK_IDLE_STATUS WL_IDLE_STATUS
57
- #define NETWORK_CONNECTED WL_CONNECTED
47
+ #if __has_include("Arduino_LoRaConnectionHandler.h")
48
+ #include < MKRWAN.h>
49
+ #define BOARD_HAS_LORA
50
+ #else
51
+ #include < WiFi.h>
52
+ #include < WiFiUdp.h>
53
+ #include < Ethernet.h>
54
+ #include < PortentaEthernet.h>
55
+
56
+ #define BOARD_HAS_WIFI
57
+ #define BOARD_HAS_ETHERNET
58
+ #define BOARD_HAS_PORTENTA_VISION_SHIELD_ETHERNET
59
+ #define NETWORK_HARDWARE_ERROR WL_NO_SHIELD
60
+ #define NETWORK_IDLE_STATUS WL_IDLE_STATUS
61
+ #define NETWORK_CONNECTED WL_CONNECTED
62
+ #endif
58
63
#endif
59
64
60
65
#if defined(ARDUINO_NICLA_VISION)
Original file line number Diff line number Diff line change 19
19
INCLUDE
20
20
******************************************************************************/
21
21
22
- #if defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) /* Only compile if the board has LoRa */
23
-
24
22
#include " Arduino_LoRaConnectionHandler.h"
25
23
24
+ #ifdef BOARD_HAS_LORA
25
+
26
26
/* *****************************************************************************
27
27
TYPEDEF
28
28
******************************************************************************/
@@ -171,4 +171,4 @@ NetworkConnectionState LoRaConnectionHandler::update_handleDisconnected()
171
171
}
172
172
}
173
173
174
- #endif
174
+ #endif /* #ifdef BOARD_HAS_LORA */
Original file line number Diff line number Diff line change 24
24
25
25
#include " Arduino_ConnectionHandler.h"
26
26
27
+ #ifdef BOARD_HAS_LORA /* Only compile if this is a board with LoRa */
28
+
27
29
/* *****************************************************************************
28
30
CLASS DECLARATION
29
31
******************************************************************************/
@@ -72,4 +74,6 @@ class LoRaConnectionHandler : public ConnectionHandler
72
74
LoRaModem _modem;
73
75
};
74
76
77
+ #endif /* #ifdef BOARD_HAS_LORA */
78
+
75
79
#endif /* ARDUINO_LORA_CONNECTION_HANDLER_H_ */
You can’t perform that action at this time.
0 commit comments