pub const fn frequency_value(hertz: u32) -> u32Expand description
Turns a carrier into the value the transmit chain is tuned with.
This is the concentrator’s own scaling and it is not the one a front end takes: the
divisor is the same 32 MHz but the shift is eighteen rather than twenty five, so using
sx1250::frequency_value here would be wrong by a
factor of 128.
§Arguments
hertz- the carrier.
§Returns
The value, of which three bytes are written most significant first.
§Examples
use pamoja_radios::sx1302::tx::frequency_value;
// Worked from the ratio rather than from the function: 868100000 * 2^18 / 32000000.
assert_eq!(frequency_value(868_100_000), 7_111_475);