Skip to main content

trigger_bytes

Function trigger_bytes 

Source
pub const fn trigger_bytes(value: u32) -> [u8; 4]
Expand description

Splits a trigger value into the four bytes the chip takes.

§Arguments

§Returns

The bytes, least significant first, which is the order the four registers are written in.

§Examples

use pamoja_radios::sx1302::tx::trigger_bytes;

assert_eq!(trigger_bytes(0x1234_5678), [0x78, 0x56, 0x34, 0x12]);