pub const fn trigger_value(at_us: u32, start_delay: u16) -> u32Expand description
The counter value a timed send is programmed at.
The counter runs in the chip’s own ticks rather than microseconds, and the send is moved earlier by the start delay so the packet is on the air at the moment asked for.
§Arguments
at_us- when the packet should be heard, in microseconds of the counter.start_delay- whatstart_delayworked out.
§Returns
The value to write across the four trigger bytes.
§Examples
use pamoja_radios::sx1302::tx::trigger_value;
// A send a whole second out, brought forward by the delay.
assert_eq!(trigger_value(1_000_000, 48_000), 1_000_000 * 32 - 48_000);