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
8 changes: 7 additions & 1 deletion examples/companion_radio/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ MultiSerialInterface interface_manager;
#if defined(SERIAL_RX)
#include <helpers/ArduinoSerialInterface.h>
ArduinoSerialInterface hardware_serial_interface;
HardwareSerial companion_serial(1);
#if defined(NRF52_PLATFORM)
// nRF52 has no numbered-constructor HardwareSerial; Serial1 is the concrete UARTE0
// instance the core always defines. setPins() below moves it to the requested pads.
Uart& companion_serial = Serial1;
#else
HardwareSerial companion_serial(1);
#endif
#endif

// platform file system
Expand Down
25 changes: 25 additions & 0 deletions variants/xiao_nrf52/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,28 @@ build_src_filter = ${Xiao_nrf52.build_src_filter}
+<../examples/kiss_modem/*.cpp>
lib_deps =
${Xiao_nrf52.lib_deps}

[env:Xiao_nrf52_companion_radio_serial]
extends = Xiao_nrf52
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
board_upload.maximum_size = 708608
build_flags =
${Xiao_nrf52.build_flags}
-I examples/companion_radio/ui-orig
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D OFFLINE_QUEUE_SIZE=256
-D QSPIFLASH=1
-D SERIAL_TX=D6
-D SERIAL_RX=D7
-D PIN_WIRE_SCL=16
-D PIN_WIRE_SDA=17
build_unflags =
-D PIN_WIRE_SCL=D6
-D PIN_WIRE_SDA=D7
build_src_filter = ${Xiao_nrf52.build_src_filter}
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-orig/*.cpp>
lib_deps =
${Xiao_nrf52.lib_deps}
densaugeo/base64 @ ~1.4.0