pub const fn eirp_code(dbm: u8) -> Option<u8>Expand description
The code for a transmit power, when the table has one for it exactly.
§Arguments
dbm- the power.
§Returns
The coded value, or None when the table holds no such power. It is not rounded,
because rounding up would put a device over a limit a region set.
§Examples
use pamoja_lorawan::mac::eirp_code;
assert_eq!(eirp_code(16), Some(5));
assert_eq!(eirp_code(17), None, "not a power the command can name");