Use buffered radio SPI and acknowledged RX reuse on direct-I/O boards
This commit is contained in:
1 parent
b8b7880a48
commit
3892599300
80 files changed
+846
-173
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user