pub async fn runner<RK, DLY, M, const RX: usize, const TX: usize>(
lora: LoRa<RK, DLY>,
ch: &'static Channels<M, RX, TX>,
mdltn: ModulationParams,
rx_pkt: PacketParams,
tx_pkt: PacketParams,
power_dbm: i32,
) -> !Expand description
Background loop: owns the lora_phy::LoRa instance, switches between
continuous RX and TX as requests arrive. Never returns.
Wrap this in a #[embassy_executor::task] in the binary crate so the
concrete monomorphisation is visible to the linker.
§Cancellation safety
wait_for_irq is the only await point that may be cancelled (it just
awaits a DIO edge and is safe to drop). process_irq_event,
prepare_for_tx, and tx all run to completion outside any select
branch — cancelling those leaves the radio in a wedged state from which
prepare_for_tx will hang forever (lora-phy explicitly warns against
dropping process_irq_event futures). The convenience lora.rx()
helper internally calls complete_rx/process_irq_event, so it is
not safe inside a select either; we hand-roll the IRQ loop here
to keep cancellation pinned to wait_for_irq.