pub fn setup(hertz: u32, single_input: bool) -> impl Iterator<Item = Step>Expand description
The order a front end is brought up in.
It is calibrated on its own oscillator, moved to the crystal, given the register settings the reference sets, tuned, and left listening. The last part matters for more than receiving: the concentrator takes its clock from a front end that is in receive, so a front end left idle stops the chip beside it.
§Arguments
hertz- the carrier to tune to.single_input- whether this board wires the front end single ended rather than differential.
§Returns
The steps, in the order the chip takes them.
§Examples
use pamoja_radios::sx1302::sx1250::{setup, Standby, Step};
// A differential board takes one step fewer than a single ended one.
assert_eq!(setup(868_100_000, false).count(), 21);
assert_eq!(setup(868_100_000, true).count(), 22);
// Calibration runs on the internal oscillator, before the crystal is started.
let mut order = setup(868_100_000, false);
assert_eq!(order.next(), Some(Step::Standby(Standby::Rc)));