[][src]Trait kernel::hil::radio::RadioConfig

pub trait RadioConfig {
    fn initialize(
        &self,
        spi_buf: &'static mut [u8],
        reg_write: &'static mut [u8],
        reg_read: &'static mut [u8]
    ) -> ReturnCode;
fn reset(&self) -> ReturnCode;
fn start(&self) -> ReturnCode;
fn stop(&self) -> ReturnCode;
fn is_on(&self) -> bool;
fn busy(&self) -> bool;
fn set_power_client(&self, client: &'static dyn PowerClient);
fn config_commit(&self);
fn set_config_client(&self, client: &'static 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) -> ReturnCode;
fn set_channel(&self, chan: u8) -> ReturnCode; }

Configure the 802.15.4 radio.

Required methods

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

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

fn reset(&self) -> ReturnCode

fn start(&self) -> ReturnCode

fn stop(&self) -> ReturnCode

fn is_on(&self) -> bool

fn busy(&self) -> bool

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

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.

fn set_config_client(&self, client: &'static 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) -> ReturnCode

fn set_channel(&self, chan: u8) -> ReturnCode

Loading content...

Implementors

Loading content...