Skip to content

Commit c6b44bc

Browse files
author
noah-jonathan rosa
committed
Added sam architechture compatibility
1 parent 5008bbc commit c6b44bc

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

examples/X_NUCLEO_GNSS1A1_HelloWorld_I2C/X_NUCLEO_GNSS1A1_HelloWorld_I2C.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ int waitType = 0;
5858
#define waitForRequest 0
5959
#define waitForAnswer 1
6060

61+
#ifdef ARDUINO_SAM_DUE
62+
#define Wire Wire1
63+
#endif
64+
6165
void setup()
6266
{
6367
//Initialize serial port for user communication

examples/X_NUCLEO_GNSS1A1_HelloWorld_UART/X_NUCLEO_GNSS1A1_HelloWorld_UART.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
******************************************************************************
3939
*/
4040

41+
//NOTE: for compatibility with the Arduino Due some additional cabling needs to be performed:
42+
// pin D8 should be connected to pin D18 and pin D2 should be connected to pin D19
43+
4144
#include "teseo_liv3f_class.h"
4245

4346
TeseoLIV3F *gps;
@@ -52,7 +55,10 @@ GPGGA_Info_t stored_positions[64];
5255
int status = 0;
5356
int stime = 0;
5457
int waitType = 0;
58+
59+
#ifdef ARDUINO_ARCH_STM32
5560
HardwareSerial Serial1(PA10, PA9);
61+
#endif
5662

5763
#define MSG_SZ 256
5864
#define waitForRequest 0

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ sentence=Allows controlling the X-NUCLEO-GNSS1A1 (GNSS expansion board based on
66
paragraph=This library provides a command line interface to communicate with the GNSS module via UART or I2C.
77
category=Device Control
88
url=https://github.com/stm32duino/X-NUCLEO-GNSS1A1
9-
architectures=stm32
9+
architectures=stm32, sam

0 commit comments

Comments
 (0)