Skip to main content

channel_sync_offset

Function channel_sync_offset 

Source
pub const fn channel_sync_offset(channel: u8) -> Register
Expand description

How far one channel is offset when the arbiter lines its receivers up.

Two channels share a byte, a nibble each, the even one low.

§Arguments

  • channel - which of the eight, counting from zero. Higher is clamped to seven.

§Returns

The register.

§Examples

use pamoja_radios::sx1302::register::channel_sync_offset;

assert_eq!(channel_sync_offset(0).offset, 0);
assert_eq!(channel_sync_offset(1).offset, 4);
assert_eq!(
    channel_sync_offset(2).address,
    channel_sync_offset(0).address + 1
);