pub const fn calibrate(hertz: u32) -> Option<Frame>Expand description
Calibrates the image rejection for the band a carrier falls in.
§Arguments
hertz- the carrier the radio will listen on.
§Returns
The command, or None for a frequency outside every band the radio is calibrated for.
The bands are the same ones the front ends use, so they are read from
sx1250::image_band rather than written out twice.
§Examples
use pamoja_radios::sx1302::sx1261::{calibrate, OP_CALIBRATE_IMAGE};
let frame = calibrate(868_100_000).expect("868 MHz is a band the radio knows");
assert_eq!(frame.opcode(), OP_CALIBRATE_IMAGE);
assert_eq!(frame.payload(), &[0xd7, 0xdb]);
assert!(calibrate(600_000_000).is_none(), "no band covers this");