Skip to main content

timeout_steps

Function timeout_steps 

Source
pub const fn timeout_steps(micros: u64) -> u32
Expand description

Returns the 24-bit timeout word for a duration.

SetTx, SetRx, and SetDIO3AsTCXOCtrl count time in steps of 15.625 us. A nonzero duration never becomes a zero word, which would disable the timeout, and a duration past the longest the chip counts, about 262 seconds, stops one step short of RX_CONTINUOUS.

§Arguments

  • micros - the duration in microseconds.

§Returns

The number of steps, from 0 to 0xFFFFFE.

§Examples

use pamoja_radios::sx126x::config::timeout_steps;

assert_eq!(timeout_steps(1_000_000), 64_000);
assert_eq!(timeout_steps(0), 0);