LR2021 radio on NRF_Promicro (#10401)
* LR2021 radio on NRF_Promicro Co-authored-by: Copilot <copilot@github.com> * Refactor LR2021 interface includes and conditional compilation for improved clarity Co-authored-by: Copilot <copilot@github.com> * Refactor LR20x0 interface: remove unused includes and update comments for clarity * Fix LR2021 max power definitions and add radio type detection tests * remove potato radio type detection tests * Include placeholder for DCDC - currently requires godmode * Added godmode features - not enabled by default --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
co-authored by
GitHub
Copilot
Ben Meadors
parent
4553d1e0b1
commit
5e2ca8aed4
@@ -5,6 +5,7 @@
|
||||
#include "LR1110Interface.h"
|
||||
#include "LR1120Interface.h"
|
||||
#include "LR1121Interface.h"
|
||||
#include "LR2021Interface.h"
|
||||
#include "MeshRadio.h"
|
||||
#include "MeshService.h"
|
||||
#include "NodeDB.h"
|
||||
@@ -478,6 +479,20 @@ std::unique_ptr<RadioInterface> initLoRa()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(USE_LR2021) && RADIOLIB_EXCLUDE_LR2021 != 1
|
||||
if (!rIf) {
|
||||
rIf = std::unique_ptr<LR2021Interface>(
|
||||
new LR2021Interface(loraHal, LR2021_SPI_NSS_PIN, LR2021_IRQ_PIN, LR2021_NRESET_PIN, LR2021_BUSY_PIN));
|
||||
if (!rIf->init()) {
|
||||
LOG_WARN("No LR2021 radio");
|
||||
rIf = nullptr;
|
||||
} else {
|
||||
LOG_INFO("LR2021 init success");
|
||||
radioType = LR2021_RADIO;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(USE_SX1280) && RADIOLIB_EXCLUDE_SX128X != 1
|
||||
if (!rIf) {
|
||||
rIf = std::unique_ptr<SX1280Interface>(new SX1280Interface(loraHal, SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY));
|
||||
|
||||
Reference in New Issue
Block a user