Trait kernel::hil::radio::RadioConfig

source ·
pub trait RadioConfig<'a> {
Show 19 methods // Required methods fn initialize( &self, spi_buf: &'static mut [u8], reg_write: &'static mut [u8], reg_read: &'static mut [u8] ) -> Result<(), ErrorCode>; fn reset(&self) -> Result<(), ErrorCode>; fn start(&self) -> Result<(), ErrorCode>; fn stop(&self) -> Result<(), ErrorCode>; fn is_on(&self) -> bool; fn busy(&self) -> bool; fn set_power_client(&self, client: &'a dyn PowerClient); fn config_commit(&self); fn set_config_client(&self, client: &'a dyn ConfigClient); fn get_address(&self) -> u16; fn get_address_long(&self) -> [u8; 8]; fn get_pan(&self) -> u16; fn get_tx_power(&self) -> i8; fn get_channel(&self) -> u8; fn set_address(&self, addr: u16); fn set_address_long(&self, addr: [u8; 8]); fn set_pan(&self, id: u16); fn set_tx_power(&self, power: i8) -> Result<(), ErrorCode>; fn set_channel(&self, chan: RadioChannel);
}
Expand description

Configure the 802.15.4 radio.

Required Methods§

source

fn initialize( &self, spi_buf: &'static mut [u8], reg_write: &'static mut [u8], reg_read: &'static mut [u8] ) -> Result<(), ErrorCode>

buf must be at least MAX_BUF_SIZE in length, and reg_read and reg_write must be 2 bytes.

source

fn reset(&self) -> Result<(), ErrorCode>

source

fn start(&self) -> Result<(), ErrorCode>

source

fn stop(&self) -> Result<(), ErrorCode>

source

fn is_on(&self) -> bool

source

fn busy(&self) -> bool

source

fn set_power_client(&self, client: &'a dyn PowerClient)

source

fn config_commit(&self)

Commit the config calls to hardware, changing the address, PAN ID, TX power, and channel to the specified values, issues a callback to the config client when done.

source

fn set_config_client(&self, client: &'a dyn ConfigClient)

source

fn get_address(&self) -> u16

source

fn get_address_long(&self) -> [u8; 8]

source

fn get_pan(&self) -> u16

source

fn get_tx_power(&self) -> i8

source

fn get_channel(&self) -> u8

source

fn set_address(&self, addr: u16)

source

fn set_address_long(&self, addr: [u8; 8])

source

fn set_pan(&self, id: u16)

source

fn set_tx_power(&self, power: i8) -> Result<(), ErrorCode>

source

fn set_channel(&self, chan: RadioChannel)

Implementors§