pub const fn image_band(hertz: u32) -> Option<[u8; 2]>Expand description
The pair of bytes image calibration takes for the band a carrier is in.
The chip calibrates a band rather than a frequency, and it knows five of them. A carrier outside all five has no answer, which is a configuration mistake rather than a bus one.
§Arguments
hertz- the carrier.
§Returns
The band, or None for a carrier outside every band the chip calibrates.
§Examples
use pamoja_radios::sx1302::sx1250::image_band;
// The two bands a LoRaWAN gateway runs in.
assert_eq!(image_band(868_100_000), Some([0xd7, 0xdb]));
assert_eq!(image_band(915_000_000), Some([0xe1, 0xe9]));
// A carrier between the bands has none.
assert_eq!(image_band(880_000_000), None);