Use buffered radio SPI and acknowledged RX reuse on direct-I/O boards

This commit is contained in:
mikecarper committed 2026-10-23 01:55:23 -07:00
1 parent b8b7880a48
commit 3892599300
80 files changed
+846 -173

No files matched your search

+5 -2
View File
@@ -1,13 +1,16 @@
#include <Arduino.h>
#include "target.h"
#include <helpers/radiolib/SX126xBufferedRadioHal.h>
ThinknodeM2Board board;
#if defined(P_LORA_SCLK)
static SPIClass spi;
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
static SX126xBufferedRadioHal radio_hal(spi);
RADIO_CLASS radio = new Module(&radio_hal, 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);
static SX126xBufferedRadioHal radio_hal(SPI, MC_SX1262_SPI_HZ, true);
RADIO_CLASS radio = new Module(&radio_hal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
#endif
WRAPPER_CLASS radio_driver(radio, board);