mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-16 07:20:07 +00:00
radio: one LoRaRadio adapter over per-family ops tables; lr20xx cleanup
- LoRaRadioBase -> LoRaRadio (final); SX126x/SX127x/LR1110/LR2021Radio replaced by const LoRaRadioOps tables (radio_ops_<family>.cpp), one linked per build; mains construct the radio in one line - lr20xx: vendored Semtech SDK + HAL moved beside the driver (no app-tree sources), DIO1 handler split (CCN 52 -> 10), zc_lora_timing.h adopted, dead exports removed, header rewritten, comment diet (image-identical) - semtech,lr2021 uses the lr1110 property names (irq-gpios, tcxo-voltage, rfsw-*), compiled config byte-identical - correct the stale "LR2021 is not CAD-probed" claim
This commit is contained in:
@@ -374,23 +374,8 @@ static uint16_t get_battery_mv(void)
|
||||
/* Radio is constructed with no prefs pointer; main() binds it to
|
||||
* room_mesh._prefs via setPrefs() before room_mesh.begin(). */
|
||||
|
||||
#if IS_ENABLED(CONFIG_ZEPHCORE_RADIO_LR1110)
|
||||
/* LR1110 via Zephyr LoRa driver */
|
||||
static const struct device *const lora_dev = DEVICE_DT_GET(DT_ALIAS(lora0));
|
||||
static mesh::LR1110Radio lora_radio(lora_dev, zephyr_board);
|
||||
#elif IS_ENABLED(CONFIG_ZEPHCORE_RADIO_LR2021)
|
||||
/* LR2021 via Zephyr LoRa driver */
|
||||
static const struct device *const lora_dev = DEVICE_DT_GET(DT_ALIAS(lora0));
|
||||
static mesh::LR2021Radio lora_radio(lora_dev, zephyr_board);
|
||||
#elif IS_ENABLED(CONFIG_ZEPHCORE_RADIO_SX127X)
|
||||
/* SX127x via Zephyr loramac-node driver */
|
||||
static const struct device *const lora_dev = DEVICE_DT_GET(DT_ALIAS(lora0));
|
||||
static mesh::SX127xRadio lora_radio(lora_dev, zephyr_board);
|
||||
#else
|
||||
/* SX126x via Zephyr LoRa driver */
|
||||
static const struct device *const lora_dev = DEVICE_DT_GET(DT_ALIAS(lora0));
|
||||
static mesh::SX126xRadio lora_radio(lora_dev, zephyr_board);
|
||||
#endif
|
||||
static mesh::LoRaRadio lora_radio(lora_dev, zephyr_board);
|
||||
|
||||
static mesh::ZephyrMillisecondClock ms_clock;
|
||||
static mesh::ZephyrRNG zephyr_rng;
|
||||
|
||||
Reference in New Issue
Block a user