Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions variants/xiao_nrf52/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build_flags = ${nrf52_base.build_flags}
-I lib/nrf52/s140_nrf52_7.3.0_API/include
-I lib/nrf52/s140_nrf52_7.3.0_API/include/nrf52
-I variants/xiao_nrf52
-UENV_INCLUDE_GPS
; -UENV_INCLUDE_GPS
-D NRF52_PLATFORM
-D NRF52_POWER_MANAGEMENT
-D XIAO_NRF52
Expand All @@ -26,8 +26,8 @@ build_flags = ${nrf52_base.build_flags}
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=1
-D PIN_WIRE_SCL=D6
-D PIN_WIRE_SDA=D7
-D PIN_WIRE_SCL=30
-D PIN_WIRE_SDA=31
-D PIN_USER_BTN=PIN_BUTTON1
-D DISPLAY_CLASS=NullDisplayDriver
build_src_filter = ${nrf52_base.build_src_filter}
Expand Down
7 changes: 6 additions & 1 deletion variants/xiao_nrf52/target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ WRAPPER_CLASS radio_driver(radio, board);
VolatileRTCClock fallback_clock;
AutoDiscoverRTCClock rtc_clock(fallback_clock);

EnvironmentSensorManager sensors;
#ifdef ENV_INCLUDE_GPS
MicroNMEALocationProvider nmea = MicroNMEALocationProvider(Serial1, &rtc_clock);
EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea);
#else
EnvironmentSensorManager sensors;
#endif

bool radio_init() {
rtc_clock.begin(Wire);
Expand Down
4 changes: 4 additions & 0 deletions variants/xiao_nrf52/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
extern MomentaryButton user_btn;
#endif

#ifdef ENV_INCLUDE_GPS
#include <helpers/sensors/MicroNMEALocationProvider.h>
#endif

extern XiaoNrf52Board board;
extern WRAPPER_CLASS radio_driver;
extern AutoDiscoverRTCClock rtc_clock;
Expand Down
7 changes: 7 additions & 0 deletions variants/xiao_nrf52/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ static const uint8_t A5 = PIN_A5;
#define PIN_PDM_CLK (20)
#define PIN_PDM_DIN (21)

// GPS L76KB
#define GPS_BAUDRATE 9600
#define PIN_GPS_TX PIN_SERIAL1_RX
#define PIN_GPS_RX PIN_SERIAL1_TX
#define PIN_GPS_STANDBY (0)
#define PIN_GPS_EN (PIN_GPS_STANDBY)

// QSPI Pins
#define PIN_QSPI_SCK (24)
#define PIN_QSPI_CS (25)
Expand Down