Skip to content

Commit cd3531e

Browse files
committed
Merge branch 'Seeed_Wio_Tracker_1110/staging'
2 parents 1c4b935 + b5b79b1 commit cd3531e

File tree

104 files changed

+7732
-2815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+7732
-2815
lines changed

.gitmodules

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,44 @@
44
[submodule "libraries/Adafruit_TinyUSB_Arduino"]
55
path = libraries/Adafruit_TinyUSB_Arduino
66
url = https://github.com/adafruit/Adafruit_TinyUSB_Arduino.git
7-
[submodule "libraries/Sensirion_Core"]
8-
path = libraries/Sensirion_Core
9-
url = https://github.com/Sensirion/arduino-core
7+
[submodule "libraries/arduino-core"]
8+
path = libraries/arduino-core
9+
url = https://github.com/Sensirion/arduino-core.git
1010
[submodule "libraries/LBMX"]
1111
path = libraries/LBMX
12-
url = https://github.com/SeeedJP/LBMX
12+
url = https://github.com/SeeedJP/LBMX.git
1313
[submodule "libraries/LBM_WM1110"]
1414
path = libraries/LBM_WM1110
15-
url = https://github.com/SeeedJP/LBM_WM1110
16-
[submodule "libraries/Wio_Tracker_1110_Examples"]
17-
path = libraries/Wio_Tracker_1110_Examples
18-
url = https://github.com/SeeedJP/Wio_Tracker_1110_Examples
15+
url = https://github.com/SeeedJP/LBM_WM1110.git
1916
[submodule "libraries/SdFat"]
2017
path = libraries/SdFat
21-
url = https://github.com/adafruit/SdFat
18+
url = https://github.com/adafruit/SdFat.git
2219
[submodule "libraries/Adafruit_SPIFlash"]
2320
path = libraries/Adafruit_SPIFlash
24-
url = https://github.com/adafruit/Adafruit_SPIFlash
21+
url = https://github.com/adafruit/Adafruit_SPIFlash.git
22+
[submodule "libraries/arduino-gas-index-algorithm"]
23+
path = libraries/arduino-gas-index-algorithm
24+
url = https://github.com/Sensirion/arduino-gas-index-algorithm.git
25+
[submodule "libraries/arduino-i2c-sgp41"]
26+
path = libraries/arduino-i2c-sgp41
27+
url = https://github.com/Sensirion/arduino-i2c-sgp41.git
28+
[submodule "libraries/arduino-i2c-sht4x"]
29+
path = libraries/arduino-i2c-sht4x
30+
url = https://github.com/Sensirion/arduino-i2c-sht4x.git
31+
[submodule "libraries/Seeed_Arduino_DPS310"]
32+
path = libraries/Seeed_Arduino_DPS310
33+
url = https://github.com/Seeed-Studio/Seeed_Arduino_DPS310.git
34+
branch = dps310
35+
[submodule "libraries/Seeed_Arduino_LIS3DHTR"]
36+
path = libraries/Seeed_Arduino_LIS3DHTR
37+
url = https://github.com/Seeed-Studio/Seeed_Arduino_LIS3DHTR.git
38+
[submodule "libraries/Seeed_Arduino_UltrasonicRanger"]
39+
path = libraries/Seeed_Arduino_UltrasonicRanger
40+
url = https://github.com/Seeed-Studio/Seeed_Arduino_UltrasonicRanger.git
41+
[submodule "libraries/Grove_Sunlight_Sensor"]
42+
path = libraries/Grove_Sunlight_Sensor
43+
url = https://github.com/Seeed-Studio/Grove_Sunlight_Sensor.git
44+
branch = Si1151
45+
[submodule "libraries/Wio_Tracker_1110_Examples"]
46+
path = libraries/Wio_Tracker_1110_Examples
47+
url = https://github.com/Seeed-Studio/Wio_Tracker_1110_Examples.git

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ There are two methods that you can use to install this BSP. We highly recommend
4646
### Optional (Core Development): Create Seeed nRF52 BSP file
4747

4848
```
49-
$ git clone --depth 1 --recurse-submodules https://github.com/SeeedJP/Adafruit_nRF52_Arduino Seeed_nRF52_Boards
49+
$ git clone --depth 1 --recurse-submodules https://github.com/Seeed-Studio/Adafruit_nRF52_Arduino Seeed_nRF52_Boards
5050
$ cd Seeed_nRF52_Boards
5151
$ ./extras/pack_release.sh
5252
```

boards.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ menu.softdevice=SoftDevice
22
menu.debug=Debug
33
menu.debug_output=Print Port
44
menu.usb_cdc=Serial (USB-CDC)
5+
menu.lbm_custom=Customize LoRaWAN modem
6+
menu.power_supply_grove=Grove power supply
57

68
# ----------------------------------
79
# Seeed XIAO nRF52840
@@ -140,7 +142,7 @@ wio_tracker_1110.build.core=nRF5
140142
wio_tracker_1110.build.variant=Seeed_Wio_Tracker_1110
141143
wio_tracker_1110.build.usb_manufacturer="Seeed"
142144
wio_tracker_1110.build.usb_product="Wio Tracker 1110"
143-
wio_tracker_1110.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} -DSEGGER_RTT_MAX_NUM_UP_BUFFERS=2 -DSEGGER_RTT_MAX_NUM_DOWN_BUFFERS=2 -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_NO_BLOCK_SKIP -DBUFFER_SIZE_UP=2048 -DBUFFER_SIZE_DOWN=4 -DNRFX_NVMC_ENABLED=1 -DNRFX_RNG_ENABLED=1 -DNRFX_RTC_ENABLED=1 -DNRFX_RTC2_ENABLED=1 -DNRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY=6 -DNRFX_TIMER_ENABLED=1 -DNRFX_TIMER2_ENABLED=1 -DNRFX_WDT_ENABLED=1 -DNRFX_WDT0_ENABLED=1 -DLR11XX -DLR11XX_TRANSCEIVER -DUSE_LR11XX_CE -DENABLE_MODEM_GNSS_FEATURE -DRP2_103 -DREGION_AS_923 -DREGION_AU_915 -DREGION_CN_470 -DREGION_CN_470_RP_1_0 -DREGION_EU_868 -DREGION_IN_865 -DREGION_KR_920 -DREGION_RU_864 -DREGION_US_915 -DREGION_WW2G4 -DWW2G4_SINGLE_DATARATE -DSMTC_MULTICAST -DADD_SMTC_STREAM -DADD_SMTC_FILE_UPLOAD -DADD_SMTC_ALC_SYNC -DMODEM_HAL_DBG_TRACE=1 -DMODEM_HAL_DEEP_DBG_TRACE=0 -DMODEM_HAL_DBG_TRACE_RP=0 -DMODEM_HAL_DBG_TRACE_COLOR=0 -DTASK_EXTENDED_1 -DTASK_EXTENDED_2 -DLR11XX_DISABLE_WARNINGS -DMW_DBG_TRACE=1 -DMW_DBG_TRACE_COLOR=0 -DWM1110_TRACE_MAX_LENGTH=256
145+
wio_tracker_1110.build.extra_flags=-DNRF52840_XXAA {build.flags.usb} {build.flags.power_supply_grove} {build.flags.lbm_custom} -DSEGGER_RTT_MAX_NUM_UP_BUFFERS=2 -DSEGGER_RTT_MAX_NUM_DOWN_BUFFERS=2 -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_NO_BLOCK_SKIP -DBUFFER_SIZE_UP=2048 -DBUFFER_SIZE_DOWN=4 -DNRFX_NVMC_ENABLED=1 -DNRFX_RNG_ENABLED=1 -DNRFX_RTC_ENABLED=1 -DNRFX_RTC2_ENABLED=1 -DNRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY=6 -DNRFX_TIMER_ENABLED=1 -DNRFX_TIMER2_ENABLED=1 -DNRFX_WDT_ENABLED=1 -DNRFX_WDT0_ENABLED=1 -DLR11XX -DLR11XX_TRANSCEIVER -DUSE_LR11XX_CE -DENABLE_MODEM_GNSS_FEATURE -DRP2_103 -DREGION_AS_923 -DREGION_AU_915 -DREGION_CN_470 -DREGION_CN_470_RP_1_0 -DREGION_EU_868 -DREGION_IN_865 -DREGION_KR_920 -DREGION_RU_864 -DREGION_US_915 -DREGION_WW2G4 -DWW2G4_SINGLE_DATARATE -DSMTC_MULTICAST -DADD_SMTC_STREAM -DADD_SMTC_FILE_UPLOAD -DADD_SMTC_ALC_SYNC -DMODEM_HAL_DBG_TRACE=1 -DMODEM_HAL_DEEP_DBG_TRACE=0 -DMODEM_HAL_DBG_TRACE_RP=0 -DMODEM_HAL_DBG_TRACE_COLOR=0 -DTASK_EXTENDED_1 -DTASK_EXTENDED_2 -DLR11XX_DISABLE_WARNINGS -DMW_DBG_TRACE=1 -DMW_DBG_TRACE_COLOR=0 -DWM1110_TRACE_MAX_LENGTH=256
144146
wio_tracker_1110.build.ldscript=nrf52840_s140_v6.ld
145147
wio_tracker_1110.build.vid=0x2886
146148
wio_tracker_1110.build.pid=0x8055
@@ -165,3 +167,15 @@ wio_tracker_1110.menu.debug_output.none.build.logger_flags=-DCFG_LOGGER=3
165167
wio_tracker_1110.menu.usb_cdc.enable=Enable
166168
wio_tracker_1110.menu.usb_cdc.disable=Disable
167169
wio_tracker_1110.menu.usb_cdc.disable.build.flags.usb=
170+
171+
# Grove power supply
172+
wio_tracker_1110.menu.power_supply_grove.on=On
173+
wio_tracker_1110.menu.power_supply_grove.on.build.flags.power_supply_grove=-DPOWER_SUPPLY_GROVE=1
174+
wio_tracker_1110.menu.power_supply_grove.off=Off
175+
wio_tracker_1110.menu.power_supply_grove.off.build.flags.power_supply_grove=-DPOWER_SUPPLY_GROVE=0
176+
177+
# Customize LoRaWAN modem
178+
wio_tracker_1110.menu.lbm_custom.standard=No
179+
wio_tracker_1110.menu.lbm_custom.standard.build.flags.lbm_custom=-DLBM_CUSTOM=0
180+
wio_tracker_1110.menu.lbm_custom.sensecap=SenseCAP
181+
wio_tracker_1110.menu.lbm_custom.sensecap.build.flags.lbm_custom=-DLBM_CUSTOM=1

cores/nRF5/WInterrupts.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ void enableInterruptIRQ(uint32_t pin)
184184

185185
for (int ch = 0; ch < NUMBER_OF_GPIO_TE; ch++)
186186
{
187-
if (channelMap[ch] == pin)
187+
if ((uint32_t)channelMap[ch] == pin)
188188
{
189189
nrf_gpiote_int_enable(NRF_GPIOTE, 1 << ch);
190190
break;
@@ -199,7 +199,7 @@ void disableInterruptIRQ(uint32_t pin)
199199

200200
for (int ch = 0; ch < NUMBER_OF_GPIO_TE; ch++)
201201
{
202-
if (channelMap[ch] == pin)
202+
if ((uint32_t)channelMap[ch] == pin)
203203
{
204204
nrf_gpiote_int_disable(NRF_GPIOTE, 1 << ch);
205205
break;
@@ -214,7 +214,7 @@ void clearInterruptIRQ(uint32_t pin)
214214

215215
for (int ch = 0; ch < NUMBER_OF_GPIO_TE; ch++)
216216
{
217-
if (channelMap[ch] == pin)
217+
if ((uint32_t)channelMap[ch] == pin)
218218
{
219219
nrf_gpiote_event_clear(NRF_GPIOTE, ch);
220220
break;

cores/nRF5/main.cpp

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,27 @@ static void loop_task(void* arg)
5252
TinyUSB_Device_Init(0);
5353
#endif
5454

55+
#if defined(ARDUINO_Seeed_XIAO_nRF52840) || defined(ARDUINO_Seeed_XIAO_nRF52840_Sense)
56+
57+
#if CFG_DEBUG
58+
// If Serial is not begin(), call it to avoid hard fault
59+
if(!Serial) Serial.begin(115200);
60+
#endif
61+
62+
#elif defined(ARDUINO_WIO_TRACKER_1110)
63+
5564
#if CFG_LOGGER == 0
5665
// If Serial is not begin(), call it to avoid hard fault
5766
if(!Serial) Serial.begin(115200);
5867
#elif CFG_LOGGER == 1
5968
// If Serial1 is not begin(), call it to avoid hard fault
6069
if(!Serial1) Serial1.begin(115200);
70+
#endif
71+
72+
#else
73+
74+
#error "Unsupported board"
75+
6176
#endif
6277

6378
setup();
@@ -118,7 +133,7 @@ void resumeLoop(void)
118133
}
119134
}
120135

121-
#if CFG_LOGGER != 3 || defined(NRF52832_XXAA)
136+
#if CFG_LOGGER != 3
122137
extern "C"
123138
{
124139

@@ -130,12 +145,10 @@ int _write (int fd, const void *buf, size_t count)
130145

131146
size_t ret = 0;
132147

133-
#if CFG_LOGGER == 0 || defined(NRF52832_XXAA)
148+
#if CFG_LOGGER == 2 || CFG_SYSVIEW
134149

135-
if ( Serial )
136-
{
137-
ret = Serial.write((const uint8_t *) buf, count);
138-
}
150+
SEGGER_RTT_Write(0, buf, count);
151+
ret = count;
139152

140153
#elif CFG_LOGGER == 1
141154

@@ -144,10 +157,12 @@ int _write (int fd, const void *buf, size_t count)
144157
ret = Serial1.write((const uint8_t *) buf, count);
145158
}
146159

147-
#elif CFG_LOGGER == 2
160+
#elif CFG_LOGGER == 0
148161

149-
SEGGER_RTT_Write(0, buf, count);
150-
ret = count;
162+
if ( Serial )
163+
{
164+
ret = Serial.write((const uint8_t *) buf, count);
165+
}
151166

152167
#endif
153168

extras/pack_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ cd -
3232
mv ../$FOLDERNAME-$VERSION.tar.bz2 .
3333

3434
echo checksum ... SHA-256:`sha256sum $FOLDERNAME-$VERSION.tar.bz2 | awk '{print $1}'`
35-
echo size ... `wc -c Seeed_nRF52_Boards-1.1.4.tar.bz2 | awk '{print $1}'`
35+
echo size ... `wc -c $FOLDERNAME-$VERSION.tar.bz2 | awk '{print $1}'`

libraries/Bluefruit52Lib/src/bluefruit.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
#include "services/BLEMidi.h"
7070
#include "services/EddyStone.h"
7171

72+
#include "services/BLEComm.h"
73+
74+
7275
#include "clients/BLEAncs.h"
7376
#include "clients/BLEClientUart.h"
7477
#include "clients/BLEClientDis.h"

0 commit comments

Comments
 (0)