Skip to content

Commit 5766962

Browse files
authored
Merge pull request #105 from pennam/edge_control
Add support to Arduino Edge Control + Portenta CAT.M1/NB IoT GNSS Shield
2 parents 63872a1 + e02e085 commit 5766962

5 files changed

+15
-2
lines changed

.github/workflows/compile-examples.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ jobs:
7676
platform-name: arduino:renesas_uno
7777
- fqbn: arduino:esp32:nano_nora
7878
platform-name: arduino:esp32
79+
- fqbn: arduino:mbed_edge:edge_control
80+
platform-name: arduino:mbed_edge
7981

8082
# Make board type-specific customizations to the matrix jobs
8183
include:

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ sentence=Arduino Library for network connection management (WiFi, GSM, NB, [Ethe
66
paragraph=Originally part of ArduinoIoTCloud
77
category=Communication
88
url=https://github.com/arduino-libraries/Arduino_ConnectionHandler
9-
architectures=samd,esp32,esp8266,mbed,megaavr,mbed_nano,mbed_portenta,mbed_nicla,mbed_opta,mbed_giga,renesas_portenta,renesas_uno
9+
architectures=samd,esp32,esp8266,mbed,megaavr,mbed_nano,mbed_portenta,mbed_nicla,mbed_opta,mbed_giga,renesas_portenta,renesas_uno,mbed_edge
1010
depends=Arduino_DebugUtils, WiFi101, WiFiNINA, MKRGSM, MKRNB, MKRWAN

src/Arduino_CatM1ConnectionHandler.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ unsigned long CatM1ConnectionHandler::getTime()
5454

5555
NetworkConnectionState CatM1ConnectionHandler::update_handleInit()
5656
{
57+
#if defined (ARDUINO_EDGE_CONTROL)
58+
pinMode(ON_MKR2, OUTPUT);
59+
digitalWrite(ON_MKR2, HIGH);
60+
#endif
5761
return NetworkConnectionState::CONNECTING;
5862
}
5963

src/Arduino_ConnectionHandler.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@
168168
#define WIFI_FIRMWARE_VERSION_REQUIRED WIFI_FIRMWARE_LATEST_VERSION
169169
#endif
170170

171+
#ifdef ARDUINO_EDGE_CONTROL
172+
#include <GSM.h>
173+
#define BOARD_HAS_CATM1_NBIOT
174+
#define BOARD_HAS_PORTENTA_CATM1_NBIOT_SHIELD
175+
#define NETWORK_HARDWARE_ERROR
176+
#endif
177+
171178
/******************************************************************************
172179
TYPEDEFS
173180
******************************************************************************/

src/Arduino_WiFiConnectionHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class WiFiConnectionHandler : public ConnectionHandler
3838

3939

4040
virtual unsigned long getTime() override;
41-
virtual Client & getClient() override{ return _wifi_client; }
41+
virtual Client & getClient() override { return _wifi_client; }
4242
virtual UDP & getUDP() override { return _wifi_udp; }
4343

4444

0 commit comments

Comments
 (0)