Struct nrf52840::ieee802154_radio::Radio

source ·
pub struct Radio<'a> { /* private fields */ }

Implementations§

source§

impl<'a> Radio<'a>

source

pub fn new(ack_buf: &'static mut [u8; 6]) -> Self

source

pub fn set_timer_ref(&self, timer: &'a TimerAlarm<'a>)

source

pub fn is_enabled(&self) -> bool

source

pub fn handle_interrupt(&self)

source

pub fn enable_interrupts(&self)

source

pub fn enable_interrupt(&self, intr: u32)

source

pub fn clear_interrupt(&self, intr: u32)

source

pub fn disable_all_interrupts(&self)

source

pub fn set_ack_buffer(&self, buffer: &'static mut [u8])

source

pub fn startup(&self) -> Result<(), ErrorCode>

Trait Implementations§

source§

impl<'a> AlarmClient for Radio<'a>

source§

fn alarm(&self)

Callback indicating the alarm time has been reached. The alarm MUST be disabled when this is called. If a new alarm is needed, the client can call Alarm::set_alarm.
source§

impl<'a> RadioConfig<'a> for Radio<'a>

source§

fn config_commit(&self)

These methods are holdovers from when the radio HIL was mostly to an external module over an interface 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 get_address(&self) -> u16

Accessors

source§

fn get_pan(&self) -> u16

The 16-bit PAN ID

source§

fn get_tx_power(&self) -> i8

The transmit power, in dBm

source§

fn get_channel(&self) -> u8

The 802.15.4 channel

source§

fn set_address(&self, addr: u16)

Mutators

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 set_power_client(&self, _client: &'a dyn PowerClient)

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_config_client(&self, _client: &'a dyn ConfigClient)

source§

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

source§

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

source§

fn set_pan(&self, id: u16)

source§

fn set_channel(&self, chan: RadioChannel)

source§

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

source§

impl<'a> RadioData<'a> for Radio<'a>

source§

fn set_receive_client( &self, client: &'a dyn RxClient, buffer: &'static mut [u8] )

source§

fn set_receive_buffer(&self, buffer: &'static mut [u8])

source§

fn set_transmit_client(&self, client: &'a dyn TxClient)

source§

fn transmit( &self, buf: &'static mut [u8], frame_len: usize ) -> Result<(), (ErrorCode, &'static mut [u8])>

Auto Trait Implementations§

§

impl<'a> !Freeze for Radio<'a>

§

impl<'a> !RefUnwindSafe for Radio<'a>

§

impl<'a> !Send for Radio<'a>

§

impl<'a> !Sync for Radio<'a>

§

impl<'a> Unpin for Radio<'a>

§

impl<'a> !UnwindSafe for Radio<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> SizedTypeProperties for T

source§

#[doc(hidden)] const IS_ZST: bool = _

🔬This is a nightly-only experimental API. (sized_type_properties)
true if this type requires no storage. false if its size is greater than zero. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<'a, T> Radio<'a> for T
where T: RadioConfig<'a> + RadioData<'a>,