Skip to content

Commit c0214de

Browse files
committed
Run library source through formatter
Clang formatter in VS Code set to Microsoft style
1 parent 3445bdf commit c0214de

8 files changed

+6725
-6687
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
#include "sfe_lara_r6.h"
2+
#include "sfe_sara_r5.h"
13
#include "sfe_ublox_cellular.h"
24
#include "sfe_ublox_cellular_voice.h"
3-
#include "sfe_sara_r5.h"
4-
#include "sfe_lara_r6.h"

src/SparkFun_u-blox_SARA-R5_Arduino_Library.h

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// RegEx Replace: \#define\sSARA\_R5\_([A-Z0-9_]+).* \#define SARA\_R5\_$+ UBLOX\_AT\_$+
33

44
/*
5-
Arduino library for the u-blox SARA-R5 LTE-M / NB-IoT modules with secure cloud, as used on the SparkFun MicroMod Asset Tracker
6-
By: Paul Clark
7-
October 19th 2020
5+
Arduino library for the u-blox SARA-R5 LTE-M / NB-IoT modules with secure cloud, as used on the SparkFun MicroMod
6+
Asset Tracker By: Paul Clark October 19th 2020
87
98
Based extensively on the:
109
Arduino Library for the SparkFun LTE CAT M1/NB-IoT Shield - SARA-R4
@@ -34,8 +33,9 @@
3433
#define SARA_R5_3_MIN_TIMEOUT 180000
3534
#define SARA_R5_SET_BAUD_TIMEOUT 500
3635
#define SARA_R5_POWER_OFF_PULSE_PERIOD 3200 // Hold PWR_ON low for this long to power the module off
37-
#define SARA_R5_POWER_ON_PULSE_PERIOD 100 // Hold PWR_ON low for this long to power the module on (SARA-R510M8S)
38-
#define SARA_R5_RESET_PULSE_PERIOD 23000 // Used to perform an abrupt emergency hardware shutdown. 23 seconds... (Yes, really!)
36+
#define SARA_R5_POWER_ON_PULSE_PERIOD 100 // Hold PWR_ON low for this long to power the module on (SARA-R510M8S)
37+
#define SARA_R5_RESET_PULSE_PERIOD \
38+
23000 // Used to perform an abrupt emergency hardware shutdown. 23 seconds... (Yes, really!)
3939
#define SARA_R5_POWER_OFF_TIMEOUT 40000 // Datasheet says 40 seconds...
4040
#define SARA_R5_IP_CONNECT_TIMEOUT 130000
4141
#define SARA_R5_POLL_DELAY 1
@@ -141,7 +141,6 @@
141141
#define SARA_R5_SEC_PROFILE UBX_CELL_SEC_PROFILE
142142
#define SARA_R5_SEC_MANAGER UBX_CELL_SEC_MANAGER
143143

144-
145144
// ### URC strings
146145
#define SARA_R5_READ_SOCKET_URC UBX_CELL_READ_SOCKET_URC
147146
#define SARA_R5_READ_UDP_SOCKET_URC UBX_CELL_READ_UDP_SOCKET_URC
@@ -167,14 +166,7 @@
167166
#define SARA_R5_NUM_SOCKETS 6
168167

169168
#define SARA_R5_NUM_SUPPORTED_BAUD 6
170-
const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] =
171-
{
172-
115200,
173-
9600,
174-
19200,
175-
38400,
176-
57600,
177-
230400};
169+
const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] = {115200, 9600, 19200, 38400, 57600, 230400};
178170
#define SARA_R5_DEFAULT_BAUD_RATE 115200
179171

180172
// Flow control definitions for AT&K
@@ -244,13 +236,13 @@ const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] =
244236
#define SARA_R5_SIM_NOT_OPERATIONAL UBX_CELL_SIM_NOT_OPERATIONAL
245237
#define SARA_R5_SIM_RESTRICTED UBX_CELL_SIM_RESTRICTED
246238
#define SARA_R5_SIM_OPERATIONAL UBX_CELL_SIM_OPERATIONAL
247-
//SARA_R5_SIM_PHONEBOOK_READY, // Not reported by SARA-R5
248-
//SARA_R5_SIM_USIM_PHONEBOOK_READY, // Not reported by SARA-R5
249-
//SARA_R5_SIM_TOOLKIT_REFRESH_SUCCESSFUL, // Not reported by SARA-R5
250-
//SARA_R5_SIM_TOOLKIT_REFRESH_UNSUCCESSFUL, // Not reported by SARA-R5
251-
//SARA_R5_SIM_PPP_CONNECTION_ACTIVE, // Not reported by SARA-R5
252-
//SARA_R5_SIM_VOICE_CALL_ACTIVE, // Not reported by SARA-R5
253-
//SARA_R5_SIM_CSD_CALL_ACTIVE // Not reported by SARA-R5
239+
// SARA_R5_SIM_PHONEBOOK_READY, // Not reported by SARA-R5
240+
// SARA_R5_SIM_USIM_PHONEBOOK_READY, // Not reported by SARA-R5
241+
// SARA_R5_SIM_TOOLKIT_REFRESH_SUCCESSFUL, // Not reported by SARA-R5
242+
// SARA_R5_SIM_TOOLKIT_REFRESH_UNSUCCESSFUL, // Not reported by SARA-R5
243+
// SARA_R5_SIM_PPP_CONNECTION_ACTIVE, // Not reported by SARA-R5
244+
// SARA_R5_SIM_VOICE_CALL_ACTIVE, // Not reported by SARA-R5
245+
// SARA_R5_SIM_CSD_CALL_ACTIVE // Not reported by SARA-R5
254246

255247
#define SARA_R5_NUM_PSD_PROFILES 6 // Number of supported PSD profiles
256248
#define SARA_R5_NUM_PDP_CONTEXT_IDENTIFIERS 11 // Number of supported PDP context identifiers
@@ -335,14 +327,14 @@ const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] =
335327

336328
#define SARA_R5_PSD_CONFIG_PARAM_PROTOCOL UBX_CELL_PSD_CONFIG_PARAM_PROTOCOL
337329
#define SARA_R5_PSD_CONFIG_PARAM_APN UBX_CELL_PSD_CONFIG_PARAM_APN
338-
//SARA_R5_PSD_CONFIG_PARAM_USERNAME, // Not allowed on SARA-R5
339-
//SARA_R5_PSD_CONFIG_PARAM_PASSWORD, // Not allowed on SARA-R5
330+
// SARA_R5_PSD_CONFIG_PARAM_USERNAME, // Not allowed on SARA-R5
331+
// SARA_R5_PSD_CONFIG_PARAM_PASSWORD, // Not allowed on SARA-R5
340332
#define SARA_R5_PSD_CONFIG_PARAM_DNS1 UBX_CELL_PSD_CONFIG_PARAM_DNS1
341333
#define SARA_R5_PSD_CONFIG_PARAM_DNS2 UBX_CELL_PSD_CONFIG_PARAM_DNS2
342-
//SARA_R5_PSD_CONFIG_PARAM_AUTHENTICATION, // Not allowed on SARA-R5
343-
//SARA_R5_PSD_CONFIG_PARAM_IP_ADDRESS, // Not allowed on SARA-R5
344-
//SARA_R5_PSD_CONFIG_PARAM_DATA_COMPRESSION, // Not allowed on SARA-R5
345-
//SARA_R5_PSD_CONFIG_PARAM_HEADER_COMPRESSION, // Not allowed on SARA-R5
334+
// SARA_R5_PSD_CONFIG_PARAM_AUTHENTICATION, // Not allowed on SARA-R5
335+
// SARA_R5_PSD_CONFIG_PARAM_IP_ADDRESS, // Not allowed on SARA-R5
336+
// SARA_R5_PSD_CONFIG_PARAM_DATA_COMPRESSION, // Not allowed on SARA-R5
337+
// SARA_R5_PSD_CONFIG_PARAM_HEADER_COMPRESSION, // Not allowed on SARA-R5
346338
#define SARA_R5_PSD_CONFIG_PARAM_MAP_TO_CID UBX_CELL_PSD_CONFIG_PARAM_MAP_TO_CID
347339

348340
#define SARA_R5_PSD_PROTOCOL_IPV4 UBX_CELL_PSD_PROTOCOL_IPV4
@@ -388,4 +380,4 @@ const unsigned long SARA_R5_SUPPORTED_BAUD[SARA_R5_NUM_SUPPORTED_BAUD] =
388380
#define SARA_R5_SEC_MANAGER_CLIENT_KEY UBX_CELL_SEC_MANAGER_CLIENT_KEY
389381
#define SARA_R5_SEC_MANAGER_SERVER_CERT UBX_CELL_SEC_MANAGER_SERVER_CERT
390382

391-
#endif //SPARKFUN_SARA_R5_ARDUINO_LIBRARY_H
383+
#endif // SPARKFUN_SARA_R5_ARDUINO_LIBRARY_H

src/sfe_lara_r6.h

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,32 @@
55
#include "sfe_ublox_cellular_voice.h"
66

77
// Base LARA-R6 class
8-
class LARA_R6: public UBX_CELL
8+
class LARA_R6 : public UBX_CELL
99
{
10-
1110
};
1211

13-
class LARA_R6001: public LARA_R6, public UBX_CELL_VOICE<LARA_R6001>
12+
class LARA_R6001 : public LARA_R6, public UBX_CELL_VOICE<LARA_R6001>
1413
{
15-
1614
};
1715

18-
class LARA_R6001D: public LARA_R6
16+
class LARA_R6001D : public LARA_R6
1917
{
20-
2118
};
2219

23-
class LARA_R6401: public LARA_R6, public UBX_CELL_VOICE<LARA_R6401>
20+
class LARA_R6401 : public LARA_R6, public UBX_CELL_VOICE<LARA_R6401>
2421
{
25-
2622
};
2723

28-
class LARA_R6401D: public LARA_R6
24+
class LARA_R6401D : public LARA_R6
2925
{
30-
3126
};
3227

33-
class LARA_R6801_00B: public LARA_R6, public UBX_CELL_VOICE<LARA_R6801_00B>
28+
class LARA_R6801_00B : public LARA_R6, public UBX_CELL_VOICE<LARA_R6801_00B>
3429
{
35-
3630
};
3731

38-
class LARA_R6801D: public LARA_R6
32+
class LARA_R6801D : public LARA_R6
3933
{
40-
4134
};
4235

4336
#endif

0 commit comments

Comments
 (0)