Skip to content

Commit

Permalink
Merge branch 'Seeed_Wio_Tracker_1110/staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
matsujirushi committed Sep 28, 2023
2 parents 1c4b935 + b5b79b1 commit cd3531e
Show file tree
Hide file tree
Showing 104 changed files with 7,732 additions and 2,815 deletions.
43 changes: 33 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,44 @@
[submodule "libraries/Adafruit_TinyUSB_Arduino"]
path = libraries/Adafruit_TinyUSB_Arduino
url = https://github.com/adafruit/Adafruit_TinyUSB_Arduino.git
[submodule "libraries/Sensirion_Core"]
path = libraries/Sensirion_Core
url = https://github.com/Sensirion/arduino-core
[submodule "libraries/arduino-core"]
path = libraries/arduino-core
url = https://github.com/Sensirion/arduino-core.git
[submodule "libraries/LBMX"]
path = libraries/LBMX
url = https://github.com/SeeedJP/LBMX
url = https://github.com/SeeedJP/LBMX.git
[submodule "libraries/LBM_WM1110"]
path = libraries/LBM_WM1110
url = https://github.com/SeeedJP/LBM_WM1110
[submodule "libraries/Wio_Tracker_1110_Examples"]
path = libraries/Wio_Tracker_1110_Examples
url = https://github.com/SeeedJP/Wio_Tracker_1110_Examples
url = https://github.com/SeeedJP/LBM_WM1110.git
[submodule "libraries/SdFat"]
path = libraries/SdFat
url = https://github.com/adafruit/SdFat
url = https://github.com/adafruit/SdFat.git
[submodule "libraries/Adafruit_SPIFlash"]
path = libraries/Adafruit_SPIFlash
url = https://github.com/adafruit/Adafruit_SPIFlash
url = https://github.com/adafruit/Adafruit_SPIFlash.git
[submodule "libraries/arduino-gas-index-algorithm"]
path = libraries/arduino-gas-index-algorithm
url = https://github.com/Sensirion/arduino-gas-index-algorithm.git
[submodule "libraries/arduino-i2c-sgp41"]
path = libraries/arduino-i2c-sgp41
url = https://github.com/Sensirion/arduino-i2c-sgp41.git
[submodule "libraries/arduino-i2c-sht4x"]
path = libraries/arduino-i2c-sht4x
url = https://github.com/Sensirion/arduino-i2c-sht4x.git
[submodule "libraries/Seeed_Arduino_DPS310"]
path = libraries/Seeed_Arduino_DPS310
url = https://github.com/Seeed-Studio/Seeed_Arduino_DPS310.git
branch = dps310
[submodule "libraries/Seeed_Arduino_LIS3DHTR"]
path = libraries/Seeed_Arduino_LIS3DHTR
url = https://github.com/Seeed-Studio/Seeed_Arduino_LIS3DHTR.git
[submodule "libraries/Seeed_Arduino_UltrasonicRanger"]
path = libraries/Seeed_Arduino_UltrasonicRanger
url = https://github.com/Seeed-Studio/Seeed_Arduino_UltrasonicRanger.git
[submodule "libraries/Grove_Sunlight_Sensor"]
path = libraries/Grove_Sunlight_Sensor
url = https://github.com/Seeed-Studio/Grove_Sunlight_Sensor.git
branch = Si1151
[submodule "libraries/Wio_Tracker_1110_Examples"]
path = libraries/Wio_Tracker_1110_Examples
url = https://github.com/Seeed-Studio/Wio_Tracker_1110_Examples.git
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ There are two methods that you can use to install this BSP. We highly recommend
### Optional (Core Development): Create Seeed nRF52 BSP file

```
$ git clone --depth 1 --recurse-submodules https://github.com/SeeedJP/Adafruit_nRF52_Arduino Seeed_nRF52_Boards
$ git clone --depth 1 --recurse-submodules https://github.com/Seeed-Studio/Adafruit_nRF52_Arduino Seeed_nRF52_Boards
$ cd Seeed_nRF52_Boards
$ ./extras/pack_release.sh
```
Expand Down
16 changes: 15 additions & 1 deletion boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ menu.softdevice=SoftDevice
menu.debug=Debug
menu.debug_output=Print Port
menu.usb_cdc=Serial (USB-CDC)
menu.lbm_custom=Customize LoRaWAN modem
menu.power_supply_grove=Grove power supply

# ----------------------------------
# Seeed XIAO nRF52840
Expand Down Expand Up @@ -140,7 +142,7 @@ wio_tracker_1110.build.core=nRF5
wio_tracker_1110.build.variant=Seeed_Wio_Tracker_1110
wio_tracker_1110.build.usb_manufacturer="Seeed"
wio_tracker_1110.build.usb_product="Wio Tracker 1110"
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
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
wio_tracker_1110.build.ldscript=nrf52840_s140_v6.ld
wio_tracker_1110.build.vid=0x2886
wio_tracker_1110.build.pid=0x8055
Expand All @@ -165,3 +167,15 @@ wio_tracker_1110.menu.debug_output.none.build.logger_flags=-DCFG_LOGGER=3
wio_tracker_1110.menu.usb_cdc.enable=Enable
wio_tracker_1110.menu.usb_cdc.disable=Disable
wio_tracker_1110.menu.usb_cdc.disable.build.flags.usb=

# Grove power supply
wio_tracker_1110.menu.power_supply_grove.on=On
wio_tracker_1110.menu.power_supply_grove.on.build.flags.power_supply_grove=-DPOWER_SUPPLY_GROVE=1
wio_tracker_1110.menu.power_supply_grove.off=Off
wio_tracker_1110.menu.power_supply_grove.off.build.flags.power_supply_grove=-DPOWER_SUPPLY_GROVE=0

# Customize LoRaWAN modem
wio_tracker_1110.menu.lbm_custom.standard=No
wio_tracker_1110.menu.lbm_custom.standard.build.flags.lbm_custom=-DLBM_CUSTOM=0
wio_tracker_1110.menu.lbm_custom.sensecap=SenseCAP
wio_tracker_1110.menu.lbm_custom.sensecap.build.flags.lbm_custom=-DLBM_CUSTOM=1
6 changes: 3 additions & 3 deletions cores/nRF5/WInterrupts.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void enableInterruptIRQ(uint32_t pin)

for (int ch = 0; ch < NUMBER_OF_GPIO_TE; ch++)
{
if (channelMap[ch] == pin)
if ((uint32_t)channelMap[ch] == pin)
{
nrf_gpiote_int_enable(NRF_GPIOTE, 1 << ch);
break;
Expand All @@ -199,7 +199,7 @@ void disableInterruptIRQ(uint32_t pin)

for (int ch = 0; ch < NUMBER_OF_GPIO_TE; ch++)
{
if (channelMap[ch] == pin)
if ((uint32_t)channelMap[ch] == pin)
{
nrf_gpiote_int_disable(NRF_GPIOTE, 1 << ch);
break;
Expand All @@ -214,7 +214,7 @@ void clearInterruptIRQ(uint32_t pin)

for (int ch = 0; ch < NUMBER_OF_GPIO_TE; ch++)
{
if (channelMap[ch] == pin)
if ((uint32_t)channelMap[ch] == pin)
{
nrf_gpiote_event_clear(NRF_GPIOTE, ch);
break;
Expand Down
33 changes: 24 additions & 9 deletions cores/nRF5/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,27 @@ static void loop_task(void* arg)
TinyUSB_Device_Init(0);
#endif

#if defined(ARDUINO_Seeed_XIAO_nRF52840) || defined(ARDUINO_Seeed_XIAO_nRF52840_Sense)

#if CFG_DEBUG
// If Serial is not begin(), call it to avoid hard fault
if(!Serial) Serial.begin(115200);
#endif

#elif defined(ARDUINO_WIO_TRACKER_1110)

#if CFG_LOGGER == 0
// If Serial is not begin(), call it to avoid hard fault
if(!Serial) Serial.begin(115200);
#elif CFG_LOGGER == 1
// If Serial1 is not begin(), call it to avoid hard fault
if(!Serial1) Serial1.begin(115200);
#endif

#else

#error "Unsupported board"

#endif

setup();
Expand Down Expand Up @@ -118,7 +133,7 @@ void resumeLoop(void)
}
}

#if CFG_LOGGER != 3 || defined(NRF52832_XXAA)
#if CFG_LOGGER != 3
extern "C"
{

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

size_t ret = 0;

#if CFG_LOGGER == 0 || defined(NRF52832_XXAA)
#if CFG_LOGGER == 2 || CFG_SYSVIEW

if ( Serial )
{
ret = Serial.write((const uint8_t *) buf, count);
}
SEGGER_RTT_Write(0, buf, count);
ret = count;

#elif CFG_LOGGER == 1

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

#elif CFG_LOGGER == 2
#elif CFG_LOGGER == 0

SEGGER_RTT_Write(0, buf, count);
ret = count;
if ( Serial )
{
ret = Serial.write((const uint8_t *) buf, count);
}

#endif

Expand Down
2 changes: 1 addition & 1 deletion extras/pack_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ cd -
mv ../$FOLDERNAME-$VERSION.tar.bz2 .

echo checksum ... SHA-256:`sha256sum $FOLDERNAME-$VERSION.tar.bz2 | awk '{print $1}'`
echo size ... `wc -c Seeed_nRF52_Boards-1.1.4.tar.bz2 | awk '{print $1}'`
echo size ... `wc -c $FOLDERNAME-$VERSION.tar.bz2 | awk '{print $1}'`
3 changes: 3 additions & 0 deletions libraries/Bluefruit52Lib/src/bluefruit.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
#include "services/BLEMidi.h"
#include "services/EddyStone.h"

#include "services/BLEComm.h"


#include "clients/BLEAncs.h"
#include "clients/BLEClientUart.h"
#include "clients/BLEClientDis.h"
Expand Down
Loading

0 comments on commit cd3531e

Please sign in to comment.