mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Add sensor support to Xiao Nrf
This commit is contained in:
parent
0defa837d8
commit
f8b45ec01e
4 changed files with 17 additions and 5 deletions
|
|
@ -16,6 +16,11 @@ lib_ignore =
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52_base.lib_deps}
|
${nrf52_base.lib_deps}
|
||||||
rweather/Crypto @ ^0.4.0
|
rweather/Crypto @ ^0.4.0
|
||||||
|
adafruit/Adafruit INA3221 Library @ ^1.0.1
|
||||||
|
adafruit/Adafruit INA219 @ ^1.2.3
|
||||||
|
adafruit/Adafruit AHTX0 @ ^2.0.5
|
||||||
|
adafruit/Adafruit BME280 Library @ ^2.3.0
|
||||||
|
|
||||||
|
|
||||||
[Xiao_nrf52]
|
[Xiao_nrf52]
|
||||||
extends = nrf52840_xiao
|
extends = nrf52840_xiao
|
||||||
|
|
@ -35,8 +40,15 @@ build_flags = ${nrf52840_xiao.build_flags}
|
||||||
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
||||||
-D SX126X_CURRENT_LIMIT=140
|
-D SX126X_CURRENT_LIMIT=140
|
||||||
-D SX126X_RX_BOOSTED_GAIN=1
|
-D SX126X_RX_BOOSTED_GAIN=1
|
||||||
|
-D PIN_WIRE_SCL=6
|
||||||
|
-D PIN_WIRE_SDA=7
|
||||||
|
-D ENV_INCLUDE_AHTX0=1
|
||||||
|
-D ENV_INCLUDE_BME280=1
|
||||||
|
-D ENV_INCLUDE_INA3221=1
|
||||||
|
-D ENV_INCLUDE_INA219=1
|
||||||
build_src_filter = ${nrf52840_xiao.build_src_filter}
|
build_src_filter = ${nrf52840_xiao.build_src_filter}
|
||||||
+<helpers/*.cpp>
|
+<helpers/*.cpp>
|
||||||
|
+<helpers/sensors>
|
||||||
+<helpers/nrf52/XiaoNrf52Board.cpp>
|
+<helpers/nrf52/XiaoNrf52Board.cpp>
|
||||||
+<../variants/xiao_nrf52>
|
+<../variants/xiao_nrf52>
|
||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BU
|
||||||
WRAPPER_CLASS radio_driver(radio, board);
|
WRAPPER_CLASS radio_driver(radio, board);
|
||||||
|
|
||||||
VolatileRTCClock rtc_clock;
|
VolatileRTCClock rtc_clock;
|
||||||
SensorManager sensors;
|
EnvironmentSensorManager sensors;
|
||||||
|
|
||||||
#ifndef LORA_CR
|
#ifndef LORA_CR
|
||||||
#define LORA_CR 5
|
#define LORA_CR 5
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@
|
||||||
#include <helpers/nrf52/XiaoNrf52Board.h>
|
#include <helpers/nrf52/XiaoNrf52Board.h>
|
||||||
#include <helpers/CustomSX1262Wrapper.h>
|
#include <helpers/CustomSX1262Wrapper.h>
|
||||||
#include <helpers/ArduinoHelpers.h>
|
#include <helpers/ArduinoHelpers.h>
|
||||||
#include <helpers/SensorManager.h>
|
#include <helpers/sensors/EnvironmentSensorManager.h>
|
||||||
|
|
||||||
extern XiaoNrf52Board board;
|
extern XiaoNrf52Board board;
|
||||||
extern WRAPPER_CLASS radio_driver;
|
extern WRAPPER_CLASS radio_driver;
|
||||||
extern VolatileRTCClock rtc_clock;
|
extern VolatileRTCClock rtc_clock;
|
||||||
extern SensorManager sensors;
|
extern EnvironmentSensorManager sensors;
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
uint32_t radio_get_rng_seed();
|
uint32_t radio_get_rng_seed();
|
||||||
|
|
|
||||||
|
|
@ -110,8 +110,8 @@ static const uint8_t A5 = PIN_A5;
|
||||||
// Wire Interfaces
|
// Wire Interfaces
|
||||||
#define WIRE_INTERFACES_COUNT (1)
|
#define WIRE_INTERFACES_COUNT (1)
|
||||||
|
|
||||||
#define PIN_WIRE_SDA (17) // 4 and 5 are used for the sx1262 !
|
// #define PIN_WIRE_SDA (17) // 4 and 5 are used for the sx1262 !
|
||||||
#define PIN_WIRE_SCL (16) // use WIRE1_SDA
|
// #define PIN_WIRE_SCL (16) // use WIRE1_SDA
|
||||||
|
|
||||||
static const uint8_t SDA = PIN_WIRE_SDA;
|
static const uint8_t SDA = PIN_WIRE_SDA;
|
||||||
static const uint8_t SCL = PIN_WIRE_SCL;
|
static const uint8_t SCL = PIN_WIRE_SCL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue