Struct nrf52840::ieee802154_radio::Radio
source · pub struct Radio<'a> { /* private fields */ }
Implementations§
source§impl<'a> Radio<'a>
impl<'a> Radio<'a>
pub fn new(ack_buf: &'static mut [u8; 6]) -> Self
pub fn set_timer_ref(&self, timer: &'a TimerAlarm<'a>)
pub fn is_enabled(&self) -> bool
pub fn handle_interrupt(&self)
pub fn enable_interrupts(&self)
pub fn enable_interrupt(&self, intr: u32)
pub fn clear_interrupt(&self, intr: u32)
pub fn disable_all_interrupts(&self)
pub fn set_ack_buffer(&self, buffer: &'static mut [u8])
pub fn startup(&self) -> Result<(), ErrorCode>
Trait Implementations§
source§impl<'a> AlarmClient for Radio<'a>
impl<'a> AlarmClient for Radio<'a>
source§impl<'a> RadioConfig<'a> for Radio<'a>
impl<'a> RadioConfig<'a> for Radio<'a>
source§fn config_commit(&self)
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
fn get_address(&self) -> u16
Accessors
source§fn get_tx_power(&self) -> i8
fn get_tx_power(&self) -> i8
The transmit power, in dBm
source§fn get_channel(&self) -> u8
fn get_channel(&self) -> u8
The 802.15.4 channel
source§fn set_address(&self, addr: u16)
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>
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.
fn set_power_client(&self, _client: &'a dyn PowerClient)
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_config_client(&self, _client: &'a dyn ConfigClient)
fn get_address_long(&self) -> [u8; 8]
fn set_address_long(&self, addr: [u8; 8])
fn set_pan(&self, id: u16)
fn set_channel(&self, chan: RadioChannel)
fn set_tx_power(&self, tx_power: i8) -> Result<(), ErrorCode>
source§impl<'a> RadioData<'a> for Radio<'a>
impl<'a> RadioData<'a> for Radio<'a>
fn set_receive_client( &self, client: &'a dyn RxClient, buffer: &'static mut [u8] )
fn set_receive_buffer(&self, buffer: &'static mut [u8])
fn set_transmit_client(&self, client: &'a dyn TxClient)
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more