Skip to content

Commit 7e3ca68

Browse files
committed
feat: switched to ArduinoCore-API usage
ref: Arduino_Core_STM32#2879 Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
1 parent 17920e0 commit 7e3ca68

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

examples/X_NUCLEO_GNSS1A1_HelloWorld_UART/X_NUCLEO_GNSS1A1_HelloWorld_UART.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ uint32_t stime = 0;
5757
int waitType = 0;
5858

5959
#ifdef ARDUINO_ARCH_STM32
60-
HardwareSerial Serial1(PA10, PA9);
60+
Uart Serial1(PA10, PA9);
6161
#endif
6262

6363
#define MSG_SZ 256

examples/X_NUCLEO_GNSS1A1_MicroNMEA_I2C/X_NUCLEO_GNSS1A1_MicroNMEA_I2C.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#endif
6262

6363
// Refer to Stream devices by use
64-
HardwareSerial& console = Serial;
64+
Uart& console = Serial;
6565
TwoWire& gps = DEV_I2C;
6666

6767
//I2C read data structures

examples/X_NUCLEO_GNSS1A1_MicroNMEA_UART/X_NUCLEO_GNSS1A1_MicroNMEA_UART.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343

4444
//Define Serial1 for STM32 Nucleo boards
4545
#ifdef ARDUINO_ARCH_STM32
46-
HardwareSerial Serial1(PA10, PA9);
46+
Uart Serial1(PA10, PA9);
4747
#endif
4848

4949
#define RESET_PIN 7
5050

5151
// Refer to serial devices by use
52-
HardwareSerial& console = Serial;
53-
HardwareSerial& gps = Serial1;
52+
Uart& console = Serial;
53+
Uart& gps = Serial1;
5454

5555
//MicroNMEA library structures
5656
char nmeaBuffer[100];

examples/X_NUCLEO_GNSS1A1_VirtualCOMPort/X_NUCLEO_GNSS1A1_VirtualCOMPort.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ volatile unsigned long idxPC = 0;
4848
volatile unsigned long idxGNSS = 0;
4949

5050
#ifdef ARDUINO_ARCH_STM32
51-
HardwareSerial Serial1(PA10, PA9);
51+
Uart Serial1(PA10, PA9);
5252
#endif
5353

5454
void setup() {

src/NMEA_parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ typedef struct
272272
typedef struct
273273
{
274274
UTC_Info_t utc; /**< UTC Time */
275-
uint8_t status; /**< “A” = valid, “V” = Warning */
275+
uint8_t status; /**< A = valid, V = Warning */
276276
Coords_t xyz; /**< Coords data member */
277277
float32_t speed; /**< Speed over ground in knots */
278278
float32_t trackgood; /**< Course made good */

src/teseo_liv3f_class.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class TeseoLIV3F
9393

9494
public:
9595

96-
TeseoLIV3F(TwoWire *i2c, int resetPin, int enablePin) : dev_i2c(i2c), pinRes(resetPin), pinEn(enablePin)
96+
TeseoLIV3F(TwoWire *i2c, pin_size_t resetPin, pin_size_t enablePin) : dev_i2c(i2c), pinRes(resetPin), pinEn(enablePin)
9797
{
9898
pinMode(pinRes, OUTPUT);
9999
pinMode(pinEn, OUTPUT);
@@ -104,7 +104,7 @@ class TeseoLIV3F
104104
commandDone = 1;
105105
}
106106

107-
TeseoLIV3F(HardwareSerial *uart, int resetPin, int enablePin) : dev_uart(uart), pinRes(resetPin), pinEn(enablePin)
107+
TeseoLIV3F(Uart *uart, pin_size_t resetPin, pin_size_t enablePin) : dev_uart(uart), pinRes(resetPin), pinEn(enablePin)
108108
{
109109
pinMode(pinRes, OUTPUT);
110110
pinMode(pinEn, OUTPUT);
@@ -578,9 +578,9 @@ class TeseoLIV3F
578578

579579
int useI2C = DEFAULT_BUS;
580580
TwoWire *dev_i2c = DEFAULT_I2C;
581-
HardwareSerial *dev_uart = DEFAULT_UART;
582-
int pinRes;
583-
int pinEn;
581+
Uart *dev_uart = DEFAULT_UART;
582+
pin_size_t pinRes;
583+
pin_size_t pinEn;
584584
int commandDone;
585585
char compareMessage[MAX_RESPONSE_LENGTH];
586586
I2CHandler i2ch;

0 commit comments

Comments
 (0)