File tree 12 files changed +67
-36
lines changed
12 files changed +67
-36
lines changed Original file line number Diff line number Diff line change 19
19
INCLUDE
20
20
******************************************************************************/
21
21
22
- #include " Arduino_CatM1ConnectionHandler .h"
22
+ #include " Arduino_ConnectionHandlerDefinitions .h"
23
23
24
24
#ifdef BOARD_HAS_CATM1_NBIOT /* Only compile if the board has CatM1 BN-IoT */
25
+ #include " Arduino_CatM1ConnectionHandler.h"
25
26
26
27
/* *****************************************************************************
27
28
CTOR/DTOR
@@ -96,7 +97,7 @@ NetworkConnectionState CatM1ConnectionHandler::update_handleDisconnected()
96
97
}
97
98
else
98
99
{
99
- return NetworkConnectionState::CLOSED;
100
+ return NetworkConnectionState::CLOSED;
100
101
}
101
102
}
102
103
Original file line number Diff line number Diff line change 22
22
INCLUDE
23
23
******************************************************************************/
24
24
25
- #include " Arduino_ConnectionHandler .h"
25
+ #include " Arduino_ConnectionHandlerInterface .h"
26
26
27
-
28
- #ifdef BOARD_HAS_CATM1_NBIOT /* Only compile if the board has CatM1 BN-IoT */
27
+ #if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_EDGE_CONTROL)
28
+ #include < GSM.h>
29
+ #endif
29
30
30
31
/* *****************************************************************************
31
32
CLASS DECLARATION
@@ -66,6 +67,4 @@ class CatM1ConnectionHandler : public ConnectionHandler
66
67
GSMClient _gsm_client;
67
68
};
68
69
69
- #endif /* #ifdef BOARD_HAS_CATM1_NBIOT */
70
-
71
70
#endif /* #ifndef ARDUINO_CATM1_CONNECTION_HANDLER_H_ */
Original file line number Diff line number Diff line change 16
16
INCLUDE
17
17
******************************************************************************/
18
18
19
- #include " Arduino_EthernetConnectionHandler .h"
19
+ #include " Arduino_ConnectionHandlerDefinitions .h"
20
20
21
21
#ifdef BOARD_HAS_ETHERNET /* Only compile if the board has ethernet */
22
+ #include " Arduino_EthernetConnectionHandler.h"
22
23
23
24
/* *****************************************************************************
24
25
CTOR/DTOR
Original file line number Diff line number Diff line change 19
19
INCLUDE
20
20
******************************************************************************/
21
21
22
- #include " Arduino_ConnectionHandler.h"
23
-
24
- #ifdef BOARD_HAS_ETHERNET /* Only compile if the board has ethernet */
22
+ #include " Arduino_ConnectionHandlerInterface.h"
23
+
24
+ #if defined(ARDUINO_PORTENTA_H7_M7)
25
+ #include < Ethernet.h>
26
+ #include < PortentaEthernet.h>
27
+ #elif defined(ARDUINO_PORTENTA_C33)
28
+ #include < EthernetC33.h>
29
+ #include < EthernetUdp.h>
30
+ #elif defined(ARDUINO_OPTA)
31
+ #include < Ethernet.h>
32
+ #include < PortentaEthernet.h>
33
+ #endif
25
34
26
35
/* *****************************************************************************
27
36
CLASS DECLARATION
@@ -64,6 +73,4 @@ class EthernetConnectionHandler : public ConnectionHandler
64
73
65
74
};
66
75
67
- #endif /* #ifdef BOARD_HAS_ETHERNET */
68
-
69
76
#endif /* ARDUINO_ETHERNET_CONNECTION_HANDLER_H_ */
Original file line number Diff line number Diff line change 19
19
INCLUDE
20
20
******************************************************************************/
21
21
22
- #include " Arduino_GSMConnectionHandler .h"
22
+ #include " Arduino_ConnectionHandlerDefinitions .h"
23
23
24
24
#ifdef BOARD_HAS_GSM /* Only compile if this is a board with GSM */
25
+ #include " Arduino_GSMConnectionHandler.h"
25
26
26
27
/* *****************************************************************************
27
28
CONSTANTS
Original file line number Diff line number Diff line change 22
22
INCLUDE
23
23
******************************************************************************/
24
24
25
- #include " Arduino_ConnectionHandler .h"
25
+ #include " Arduino_ConnectionHandlerInterface .h"
26
26
27
-
28
- #ifdef BOARD_HAS_GSM /* Only compile if this is a board with GSM */
27
+ #if defined(ARDUINO_SAMD_MKRGSM1400)
28
+ #include < MKRGSM.h>
29
+ #endif
29
30
30
31
/* *****************************************************************************
31
32
CLASS DECLARATION
@@ -65,6 +66,4 @@ class GSMConnectionHandler : public ConnectionHandler
65
66
GSMClient _gsm_client;
66
67
};
67
68
68
- #endif /* #ifdef BOARD_HAS_GSM */
69
-
70
69
#endif /* #ifndef GSM_CONNECTION_MANAGER_H_ */
Original file line number Diff line number Diff line change 19
19
INCLUDE
20
20
******************************************************************************/
21
21
22
- #include " Arduino_LoRaConnectionHandler .h"
22
+ #include " Arduino_ConnectionHandlerDefinitions .h"
23
23
24
24
#if defined(BOARD_HAS_LORA) /* Only compile if the board has LoRa */
25
+ #include " Arduino_LoRaConnectionHandler.h"
25
26
26
27
/* *****************************************************************************
27
28
TYPEDEF
Original file line number Diff line number Diff line change 22
22
INCLUDE
23
23
******************************************************************************/
24
24
25
- #include " Arduino_ConnectionHandler .h"
25
+ #include " Arduino_ConnectionHandlerInterface .h"
26
26
27
- #ifdef BOARD_HAS_LORA /* Only compile if the board has LoRa */
27
+ #if defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310)
28
+ #include < MKRWAN.h>
29
+ #endif
28
30
29
31
/* *****************************************************************************
30
32
CLASS DECLARATION
@@ -74,6 +76,4 @@ class LoRaConnectionHandler : public ConnectionHandler
74
76
LoRaModem _modem;
75
77
};
76
78
77
- #endif /* #ifdef BOARD_HAS_LORA */
78
-
79
79
#endif /* ARDUINO_LORA_CONNECTION_HANDLER_H_ */
Original file line number Diff line number Diff line change 19
19
INCLUDE
20
20
******************************************************************************/
21
21
22
- #include " Arduino_NBConnectionHandler .h"
22
+ #include " Arduino_ConnectionHandlerDefinitions .h"
23
23
24
24
#ifdef BOARD_HAS_NB /* Only compile if this is a board with NB */
25
+ #include " Arduino_NBConnectionHandler.h"
25
26
26
27
/* *****************************************************************************
27
28
CONSTANTS
Original file line number Diff line number Diff line change 22
22
INCLUDE
23
23
******************************************************************************/
24
24
25
- #include " Arduino_ConnectionHandler .h"
25
+ #include " Arduino_ConnectionHandlerInterface .h"
26
26
27
- #ifdef BOARD_HAS_NB /* Only compile if this is a board with NB */
27
+ #ifdef ARDUINO_SAMD_MKRNB1500
28
+ #include < MKRNB.h>
29
+ #endif
28
30
29
31
/* *****************************************************************************
30
32
CLASS DECLARATION
@@ -68,6 +70,4 @@ class NBConnectionHandler : public ConnectionHandler
68
70
NBClient _nb_client;
69
71
};
70
72
71
- #endif /* #ifdef BOARD_HAS_NB */
72
-
73
73
#endif /* #ifndef NB_CONNECTION_MANAGER_H_ */
Original file line number Diff line number Diff line change 19
19
INCLUDE
20
20
******************************************************************************/
21
21
22
- #include " Arduino_WiFiConnectionHandler .h"
22
+ #include " Arduino_ConnectionHandlerDefinitions .h"
23
23
24
24
#ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */
25
+ #include " Arduino_WiFiConnectionHandler.h"
25
26
26
27
/* *****************************************************************************
27
28
CONSTANTS
@@ -143,7 +144,7 @@ NetworkConnectionState WiFiConnectionHandler::update_handleConnected()
143
144
Debug.print (DBG_INFO, F (" Attempting reconnection" ));
144
145
#endif
145
146
}
146
-
147
+
147
148
return NetworkConnectionState::DISCONNECTED;
148
149
}
149
150
return NetworkConnectionState::CONNECTED;
Original file line number Diff line number Diff line change 22
22
INCLUDE
23
23
******************************************************************************/
24
24
25
- #include " Arduino_ConnectionHandler.h"
26
-
27
- #ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */
25
+ #include " Arduino_ConnectionHandlerInterface.h"
26
+
27
+ #ifdef ARDUINO_SAMD_MKR1000
28
+ #include < WiFi101.h>
29
+ #include < WiFiUdp.h>
30
+ #elif defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \
31
+ defined (ARDUINO_AVR_UNO_WIFI_REV2) || defined (ARDUINO_NANO_RP2040_CONNECT)
32
+ #include <WiFiNINA.h>
33
+ #include < WiFiUdp.h>
34
+ #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M7) || \
35
+ defined (ARDUINO_NICLA_VISION) || defined(ARDUINO_OPTA) || defined(ARDUINO_GIGA)
36
+ #include <WiFi.h>
37
+ #include < WiFiUdp.h>
38
+ #elif defined(ARDUINO_PORTENTA_C33)
39
+ #include < WiFiC3.h>
40
+ #include < WiFiUdp.h>
41
+ #elif defined(ARDUINO_ARCH_ESP8266)
42
+ #include < ESP8266WiFi.h>
43
+ #include < WiFiUdp.h>
44
+ #elif defined(ARDUINO_ARCH_ESP32)
45
+ #include < WiFi.h>
46
+ #include < WiFiUdp.h>
47
+ #elif defined(ARDUINO_UNOR4_WIFI)
48
+ #include < WiFiS3.h>
49
+ #endif
28
50
29
51
/* *****************************************************************************
30
52
CLASS DECLARATION
@@ -59,6 +81,4 @@ class WiFiConnectionHandler : public ConnectionHandler
59
81
WiFiClient _wifi_client;
60
82
};
61
83
62
- #endif /* #ifdef BOARD_HAS_WIFI */
63
-
64
84
#endif /* ARDUINO_WIFI_CONNECTION_HANDLER_H_ */
You can’t perform that action at this time.
0 commit comments