Skip to main content

agc_mailbox_write

Function agc_mailbox_write 

Source
pub const fn agc_mailbox_write(mailbox: u8) -> Register
Expand description

One of the four mailboxes the host writes settings into.

The four count downward: mailbox zero sits at the highest address and mailbox three, the one that says which group was just written, at the lowest. Reading them in address order would number them backward.

§Arguments

  • mailbox - which of the four, from zero. Higher is clamped to three.

§Returns

The register.

§Examples

use pamoja_radios::sx1302::register::agc_mailbox_write;

// Mailbox three is the one the host announces a group with, and it is the lowest.
assert!(agc_mailbox_write(3).address < agc_mailbox_write(0).address);
assert_eq!(agc_mailbox_write(0).address - agc_mailbox_write(3).address, 3);