Hold unqualified nRF SPIM3 batching at prior release defaults
This commit is contained in:
1 parent
bb9431973a
commit
4e513b19d5
34 files changed
+115
-133
No files matched your search
@@ -1,4 +1,4 @@
|
||||
"""Compile real nRF52/RP2040 target constructors and preserve bus ownership."""
|
||||
"""Compile actual conservative nRF52 and buffered RP2040 radio constructors."""
|
||||
from pathlib import Path
|
||||
import os
|
||||
import re
|
||||
@@ -13,6 +13,7 @@ from test_sx126x_buffered_radio_hal import MOCK, RADIO, ROOT
|
||||
PREFIX = r'''
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
constexpr unsigned P_LORA_NSS=1,P_LORA_DIO_1=2,P_LORA_RESET=3,P_LORA_BUSY=4;
|
||||
SPIClass* testDefaultBus=nullptr;
|
||||
struct Module {
|
||||
ArduinoHal* hal; bool owned=false;
|
||||
Module(ArduinoHal* adapter,unsigned cs,unsigned irq,unsigned reset,unsigned busy)
|
||||
@@ -21,6 +22,8 @@ struct Module {
|
||||
: hal(new ArduinoHal(bus,SPISettings(2000000,MSBFIRST,SPI_MODE0))),owned(true) {
|
||||
assert(cs==1 && irq==2 && reset==3 && busy==4);
|
||||
}
|
||||
Module(unsigned cs,unsigned irq,unsigned reset,unsigned busy)
|
||||
: Module(cs,irq,reset,busy,*testDefaultBus) { hal->initInterface=true; }
|
||||
~Module() { if (owned) delete hal; }
|
||||
};
|
||||
struct Radio {
|
||||
@@ -68,9 +71,8 @@ class SX126xTargetConstructors(unittest.TestCase):
|
||||
ran=subprocess.run([str(executable)],capture_output=True,text=True,timeout=10)
|
||||
self.assertEqual(ran.returncode,0,ran.stdout+ran.stderr)
|
||||
|
||||
def test_all_actual_nrf52_and_rp2040_constructions_keep_selected_bus(self):
|
||||
for arch,bases in (("NRF52_PLATFORM",{"nrf52_base","rak4631_hw"}),
|
||||
("RP2040_PLATFORM",{"rp2040_base"})):
|
||||
def test_actual_rp2040_constructions_keep_buffered_selected_bus(self):
|
||||
for arch,bases in (("RP2040_PLATFORM",{"rp2040_base"}),):
|
||||
with self.subTest(architecture=arch):
|
||||
cases=[]
|
||||
sources=target_sources(bases)
|
||||
@@ -84,11 +86,8 @@ class SX126xTargetConstructors(unittest.TestCase):
|
||||
r"(RADIO_CLASS radio = new Module\(&radioHal,[^;]+;)",
|
||||
text,re.MULTILINE)
|
||||
self.assertTrue(constructions,str(source))
|
||||
# Every direct Module construction is now buffered except
|
||||
# the deliberately unchanged Muzi Duo LR1121 selection.
|
||||
legacy=re.findall(r"new Module\(P_LORA_NSS[^;]+;",text)
|
||||
self.assertEqual(len(legacy),1 if source.parent.name=="muzi_base" else 0,
|
||||
str(source))
|
||||
self.assertEqual(len(legacy),0,str(source))
|
||||
for ordinal,(arguments,module) in enumerate(constructions):
|
||||
bus=arguments.split(",")[0]
|
||||
expected_bus="SPI1" if source.parent.name in {
|
||||
@@ -119,47 +118,103 @@ void check() {{
|
||||
fixture+="\nint main() {"+"".join(f"{name}::check();" for name,_ in cases)+"}\n"
|
||||
self.compile_run(arch,fixture)
|
||||
|
||||
def test_muzi_uno_selection_does_not_change_the_lr1121_duo_constructor(self):
|
||||
def test_all_new_nrf52_spim3_defaults_keep_prior_2mhz_byte_path(self):
|
||||
cases=[]
|
||||
sources=target_sources({"nrf52_base","rak4631_hw"})
|
||||
self.assertEqual(len(sources),32)
|
||||
for source in sources:
|
||||
text=source.read_text()
|
||||
self.assertNotIn("BufferedRadioHal",text,str(source))
|
||||
constructions=re.findall(r"^RADIO_CLASS radio = new Module\(P_LORA_NSS[^;]+;",text,re.MULTILINE)
|
||||
fallback=source.parent.name in {"heltec_t096","heltec_t1","heltec_t114"}
|
||||
self.assertEqual(len(constructions),2 if fallback else 1,str(source))
|
||||
for ordinal,construction in enumerate(constructions):
|
||||
owns=fallback and ordinal==1
|
||||
self.assertEqual(construction.endswith(", SPI);"),not owns,str(source))
|
||||
name=f"case_{len(cases)}"
|
||||
cases.append((name,f'''
|
||||
namespace {name} {{
|
||||
SPIClass SPI;
|
||||
struct BindDefaultBus {{ BindDefaultBus() {{testDefaultBus=&SPI;}} }} bindDefaultBus;
|
||||
{construction}
|
||||
void check() {{
|
||||
assert(radio.mod->owned && radio.mod->hal->spi==&SPI);
|
||||
assert(radio.mod->hal->spiSettings.hz==2000000);
|
||||
assert(radio.mod->hal->initInterface=={str(owns).lower()});
|
||||
radio.mod->hal->init();radio.mod->hal->term();
|
||||
assert(SPI.begins=={int(owns)} && SPI.ends=={int(owns)});
|
||||
uint8_t tx[]={{1,0x7f,0xff}},rx[3]={{}};
|
||||
radio.mod->hal->spiTransfer(tx,3,rx);
|
||||
assert(SPI.bytes==3 && SPI.bursts==0 && rx[0]==(1^0xa5) && rx[2]==(0xff^0xa5));
|
||||
}}
|
||||
}}
|
||||
'''))
|
||||
self.assertEqual(len(cases),35)
|
||||
fixture=PREFIX+"\n".join(code for _,code in cases)
|
||||
fixture+="\nint main() {"+"".join(f"{name}::check();" for name,_ in cases)+"}\n"
|
||||
self.compile_run("NRF52_PLATFORM",fixture)
|
||||
|
||||
def test_muzi_uno_and_lr1121_duo_keep_prior_constructor(self):
|
||||
text=(ROOT/"variants/muzi_base/target.cpp").read_text()
|
||||
block=re.search(r"^#if defined\(USE_SX1262\)\nstatic SX126xBufferedRadioHal "
|
||||
r"radioHal\([^#]+#else\n[^#]+#endif",text,re.MULTILINE)
|
||||
self.assertIsNotNone(block)
|
||||
fixture=PREFIX+"\nSPIClass SPI;\n"+block.group(0)+r'''
|
||||
constructor=re.search(r"^RADIO_CLASS radio = new Module\(P_LORA_NSS[^;]+;",text,re.MULTILINE)
|
||||
self.assertIsNotNone(constructor)
|
||||
self.assertNotIn("BufferedRadioHal",text)
|
||||
fixture=PREFIX+"\nSPIClass SPI;\n"+constructor.group(0)+r'''
|
||||
int main() {
|
||||
assert(radio.mod->hal->spi==&SPI);
|
||||
#ifdef USE_SX1262
|
||||
assert(!radio.mod->owned && radio.mod->hal==&radioHal);
|
||||
assert(radio.mod->hal->spiSettings.hz==8000000);
|
||||
#else
|
||||
assert(radio.mod->owned && radio.mod->hal->spiSettings.hz==2000000);
|
||||
#endif
|
||||
}
|
||||
'''
|
||||
for definitions in ((),("USE_SX1262",)):
|
||||
with self.subTest(defines=definitions):
|
||||
self.compile_run("NRF52_PLATFORM",fixture,defines=definitions)
|
||||
|
||||
def test_lr1110_m4_keeps_manual_spi_start_and_uses_buffered_8mhz_bus(self):
|
||||
def test_lr1110_m4_keeps_manual_spi_start_and_prior_2mhz_byte_path(self):
|
||||
text=(ROOT/"variants/thinknode_m4/target.cpp").read_text()
|
||||
construction=re.search(r"^static Nrf52BufferedRadioHal radioHal\([^;]+;\n"
|
||||
r"RADIO_CLASS radio = new Module\([^;]+;",text,re.MULTILINE)
|
||||
construction=re.search(r"^RADIO_CLASS radio = new Module\(P_LORA_NSS[^;]+;",text,re.MULTILINE)
|
||||
self.assertIsNotNone(construction)
|
||||
self.assertNotIn("BufferedRadioHal",text)
|
||||
self.assertIn("SPI.setPins(P_LORA_MISO, P_LORA_SCLK, P_LORA_MOSI);",text)
|
||||
self.assertIn("SPI.begin();",text)
|
||||
self.assertIn("int status = radio.begin(",text)
|
||||
fixture=PREFIX+"\nSPIClass SPI;\n"+construction.group(0)+r'''
|
||||
int main() {
|
||||
assert(radio.mod->hal==&radioHal && radioHal.spi==&SPI);
|
||||
assert(radioHal.spiSettings.hz==8000000 && !radioHal.initInterface);
|
||||
assert(radio.mod->owned && radio.mod->hal->spi==&SPI);
|
||||
assert(radio.mod->hal->spiSettings.hz==2000000 && !radio.mod->hal->initInterface);
|
||||
radio.mod->hal->init();radio.mod->hal->term();
|
||||
assert(SPI.begins==0 && SPI.ends==0);
|
||||
uint8_t tx[]={1,0x7f,0xff},rx[3]={};
|
||||
radio.mod->hal->spiTransfer(tx,3,rx);
|
||||
assert(SPI.bursts==1 && SPI.bytes==0 && rx[0]==(1^0xa5));
|
||||
assert(SPI.bursts==0 && SPI.bytes==3 && rx[0]==(1^0xa5));
|
||||
}
|
||||
'''
|
||||
self.compile_run("NRF52_PLATFORM",fixture)
|
||||
|
||||
def test_existing_lr1110_buffered_constructors_remain_unchanged(self):
|
||||
cases=[]
|
||||
for name in ("minewsemi_me25ls01","t1000-e","thinknode_m3","wio_wm1110"):
|
||||
text=(ROOT/"variants"/name/"target.cpp").read_text()
|
||||
construction=re.search(r"^Nrf52BufferedRadioHal radioHal\(SPI\);\n"
|
||||
r"RADIO_CLASS radio = new Module\([^;]+;",text,re.MULTILINE)
|
||||
self.assertIsNotNone(construction,name)
|
||||
namespace=f"case_{len(cases)}"
|
||||
cases.append((namespace,f'''
|
||||
namespace {namespace} {{
|
||||
SPIClass SPI;
|
||||
{construction.group(0)}
|
||||
void check() {{
|
||||
assert(radio.mod->hal==&radioHal && radioHal.spi==&SPI);
|
||||
assert(radioHal.spiSettings.hz==16000000 && !radioHal.initInterface);
|
||||
uint8_t tx[]={{0x86,0,1}},rx[3]={{}};
|
||||
radio.mod->hal->spiTransfer(tx,3,rx);
|
||||
assert(SPI.bursts==1 && SPI.bytes==0 && rx[0]==(0x86^0xa5));
|
||||
}}
|
||||
}}
|
||||
'''))
|
||||
fixture=PREFIX+"\n".join(code for _,code in cases)
|
||||
fixture+="\nint main() {"+"".join(f"{name}::check();" for name,_ in cases)+"}\n"
|
||||
self.compile_run("NRF52_PLATFORM",fixture)
|
||||
|
||||
|
||||
if __name__=="__main__":
|
||||
unittest.main()
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
GAT56230SMeshKitBoard board;
|
||||
@@ -19,8 +18,7 @@ GAT56230SMeshKitBoard board;
|
||||
#endif
|
||||
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
GAT562EVBProBoard board;
|
||||
@@ -18,8 +17,7 @@ GAT562EVBProBoard board;
|
||||
#endif
|
||||
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
GAT562MeshTrackerProBoard board;
|
||||
@@ -19,8 +18,7 @@ GAT562MeshTrackerProBoard board;
|
||||
#endif
|
||||
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
GAT56MeshWatch13Board board;
|
||||
@@ -16,8 +15,7 @@ GAT56MeshWatch13Board board;
|
||||
#endif
|
||||
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
MeshSolarBoard board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
@@ -11,11 +10,9 @@
|
||||
T096Board board;
|
||||
|
||||
#if defined(P_LORA_SCLK)
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
#else
|
||||
static SX126xBufferedRadioHal radioHal(SPI, MC_SX1262_SPI_HZ, true);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
#endif
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
@@ -11,11 +10,9 @@
|
||||
T1Board board;
|
||||
|
||||
#if defined(P_LORA_SCLK)
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
#else
|
||||
static SX126xBufferedRadioHal radioHal(SPI, MC_SX1262_SPI_HZ, true);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
#endif
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
@@ -11,11 +10,9 @@
|
||||
T114Board board;
|
||||
|
||||
#if defined(P_LORA_SCLK)
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
#else
|
||||
static SX126xBufferedRadioHal radioHal(SPI, MC_SX1262_SPI_HZ, true);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
#endif
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
@@ -7,8 +6,7 @@
|
||||
|
||||
HeltecTowerV2Board board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
IkokaNrf52Board board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
IkokaNanoNRFBoard board;
|
||||
@@ -10,8 +9,7 @@ IkokaNanoNRFBoard board;
|
||||
// MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||
#endif
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
IkokaStickNRFBoard board;
|
||||
@@ -10,8 +9,7 @@ IkokaStickNRFBoard board;
|
||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||
#endif
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
KeepteenLT1Board board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
TImpulsePlusBoard board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
TechoBoard board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
TechoCardBoard board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
TechoBoard board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
HeltecMeshPocket board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
MeshtinyBoard board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include <nrf_gpio.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include "variant.h"
|
||||
|
||||
MuziBaseBoard board;
|
||||
|
||||
#if defined(USE_SX1262)
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
#else
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
#endif
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
R1NeoBoard board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
@@ -7,8 +6,7 @@
|
||||
|
||||
NanoG2Ultra board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
PromicroBoard board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
RAK4631Board board;
|
||||
@@ -18,8 +17,7 @@ RAK4631Board board;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
RAKWismeshTagBoard board;
|
||||
@@ -14,8 +13,7 @@ RAKWismeshTagBoard board;
|
||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true);
|
||||
#endif
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
#if ENV_INCLUDE_GPS
|
||||
@@ -9,8 +8,7 @@
|
||||
|
||||
SenseCapSolarBoard board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
ThinkNodeM1Board board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/Nrf52BufferedRadioHal.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
ThinkNodeM4Board board;
|
||||
|
||||
static Nrf52BufferedRadioHal radioHal(SPI, 8000000);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
@@ -83,4 +81,4 @@ bool radio_init() {
|
||||
mesh::LocalIdentity radio_new_identity() {
|
||||
RadioNoiseListener rng(radio);
|
||||
return mesh::LocalIdentity(&rng); // create new random identity
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
ThinkNodeM6Board board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
#include <Wire.h>
|
||||
|
||||
ThinkNodeM8Board board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
|
||||
WioTrackerL1Board board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
#ifdef ENV_INCLUDE_GPS
|
||||
@@ -9,8 +8,7 @@
|
||||
|
||||
WioTrackerL1Board board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "target.h"
|
||||
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#ifdef USE_CC310_HW_CRYPTO
|
||||
#include <helpers/NRF52Crypto.h>
|
||||
@@ -15,8 +14,7 @@ static bool target_radio_available = false;
|
||||
|
||||
XiaoNrf52Board board;
|
||||
|
||||
static SX126xBufferedRadioHal radioHal(SPI);
|
||||
RADIO_CLASS radio = new Module(&radioHal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
||||
WRAPPER_CLASS radio_driver(radio, board);
|
||||
|
||||
|
||||
Reference in new issue
Block a user