Skip to content

Commit f39958c

Browse files
readapting implementations to the new include structure
1 parent f2b100a commit f39958c

15 files changed

+76
-38
lines changed

src/Arduino_CatM1ConnectionHandler.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
INCLUDE
2020
******************************************************************************/
2121

22-
#include "Arduino_CatM1ConnectionHandler.h"
22+
#include "Arduino_ConnectionHandlerDefinitions.h"
2323

2424
#ifdef BOARD_HAS_CATM1_NBIOT /* Only compile if the board has CatM1 BN-IoT */
25+
#include "Arduino_CatM1ConnectionHandler.h"
2526

2627
/******************************************************************************
2728
CTOR/DTOR
@@ -96,7 +97,7 @@ NetworkConnectionState CatM1ConnectionHandler::update_handleDisconnected()
9697
}
9798
else
9899
{
99-
return NetworkConnectionState::CLOSED;
100+
return NetworkConnectionState::CLOSED;
100101
}
101102
}
102103

src/Arduino_CatM1ConnectionHandler.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
INCLUDE
2323
******************************************************************************/
2424

25-
#include "Arduino_ConnectionHandler.h"
25+
#include "Arduino_ConnectionHandlerInterface.h"
2626

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
2930

3031
/******************************************************************************
3132
CLASS DECLARATION
@@ -66,6 +67,4 @@ class CatM1ConnectionHandler : public ConnectionHandler
6667
GSMClient _gsm_client;
6768
};
6869

69-
#endif /* #ifdef BOARD_HAS_CATM1_NBIOT */
70-
7170
#endif /* #ifndef ARDUINO_CATM1_CONNECTION_HANDLER_H_ */

src/Arduino_CellularConnectionHandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
INCLUDE
1414
******************************************************************************/
1515

16-
#include "Arduino_CellularConnectionHandler.h"
16+
#include "Arduino_ConnectionHandlerDefinitions.h"
1717

1818
#ifdef BOARD_HAS_CELLULAR /* Only compile if the board has Cellular */
19+
#include "Arduino_CellularConnectionHandler.h"
1920

2021
/******************************************************************************
2122
CTOR/DTOR

src/Arduino_CellularConnectionHandler.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818

1919
#include "Arduino_ConnectionHandler.h"
2020

21-
#ifdef BOARD_HAS_CELLULAR /* Only compile if the board has Cellular */
2221

2322
/******************************************************************************
2423
CLASS DECLARATION
2524
******************************************************************************/
2625

26+
#if defined(ARDUINO_PORTENTA_C33) || defined(ARDUINO_PORTENTA_H7_M7)
27+
#include <Arduino_Cellular.h>
28+
#endif
29+
2730
class CellularConnectionHandler : public ConnectionHandler
2831
{
2932
public:
@@ -56,6 +59,4 @@ class CellularConnectionHandler : public ConnectionHandler
5659
TinyGsmClient _gsm_client = _cellular.getNetworkClient();
5760
};
5861

59-
#endif /* #ifdef BOARD_HAS_CELLULAR */
60-
6162
#endif /* #ifndef ARDUINO_CELLULAR_CONNECTION_HANDLER_H_ */

src/Arduino_ConnectionHandlerDefinitions.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ enum class NetworkAdapter {
162162
NB,
163163
GSM,
164164
LORA,
165-
CATM1
165+
CATM1,
166+
CELL
166167
};
167168

168169
/******************************************************************************

src/Arduino_EthernetConnectionHandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
INCLUDE
1717
******************************************************************************/
1818

19-
#include "Arduino_EthernetConnectionHandler.h"
19+
#include "Arduino_ConnectionHandlerDefinitions.h"
2020

2121
#ifdef BOARD_HAS_ETHERNET /* Only compile if the board has ethernet */
22+
#include "Arduino_EthernetConnectionHandler.h"
2223

2324
/******************************************************************************
2425
CTOR/DTOR

src/Arduino_EthernetConnectionHandler.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,18 @@
1919
INCLUDE
2020
******************************************************************************/
2121

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
2534

2635
/******************************************************************************
2736
CLASS DECLARATION
@@ -64,6 +73,4 @@ class EthernetConnectionHandler : public ConnectionHandler
6473

6574
};
6675

67-
#endif /* #ifdef BOARD_HAS_ETHERNET */
68-
6976
#endif /* ARDUINO_ETHERNET_CONNECTION_HANDLER_H_ */

src/Arduino_GSMConnectionHandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
INCLUDE
2020
******************************************************************************/
2121

22-
#include "Arduino_GSMConnectionHandler.h"
22+
#include "Arduino_ConnectionHandlerDefinitions.h"
2323

2424
#ifdef BOARD_HAS_GSM /* Only compile if this is a board with GSM */
25+
#include "Arduino_GSMConnectionHandler.h"
2526

2627
/******************************************************************************
2728
CONSTANTS

src/Arduino_GSMConnectionHandler.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
INCLUDE
2323
******************************************************************************/
2424

25-
#include "Arduino_ConnectionHandler.h"
25+
#include "Arduino_ConnectionHandlerInterface.h"
2626

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
2930

3031
/******************************************************************************
3132
CLASS DECLARATION
@@ -65,6 +66,4 @@ class GSMConnectionHandler : public ConnectionHandler
6566
GSMClient _gsm_client;
6667
};
6768

68-
#endif /* #ifdef BOARD_HAS_GSM */
69-
7069
#endif /* #ifndef GSM_CONNECTION_MANAGER_H_ */

src/Arduino_LoRaConnectionHandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
INCLUDE
2020
******************************************************************************/
2121

22-
#include "Arduino_LoRaConnectionHandler.h"
22+
#include "Arduino_ConnectionHandlerDefinitions.h"
2323

2424
#if defined(BOARD_HAS_LORA) /* Only compile if the board has LoRa */
25+
#include "Arduino_LoRaConnectionHandler.h"
2526

2627
/******************************************************************************
2728
TYPEDEF

0 commit comments

Comments
 (0)