pub struct Radio<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Radio<'a>
impl<'a> Radio<'a>
pub fn new(ack_buf: &'static mut [u8; 7]) -> 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 AlarmClient for Radio<'_>
impl AlarmClient for Radio<'_>
Source§impl DeferredCallClient for Radio<'_>
impl DeferredCallClient for Radio<'_>
Source§impl<'a> RadioConfig<'a> for Radio<'a>
impl<'a> RadioConfig<'a> for Radio<'a>
Source§fn config_commit(&self)
fn config_commit(&self)
Commit the config calls to hardware, changing (in theory):
- the RX address
- PAN ID
- TX power
- channel
to the specified values. However, the nRF52840 IEEE 802.15.4 radio does not support hardware-level address filtering (see here). So setting the addresses and PAN ID have no meaning for this chip and any filtering must be done in higher layers in software.
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 set_power_client(&self, client: &'a dyn PowerClient)
fn set_power_client(&self, client: &'a dyn PowerClient)
Set the client that is called when the radio changes power states.
Source§fn busy(&self) -> bool
fn busy(&self) -> bool
Check if the radio is currently busy transmitting or receiving a packet. Read more
Source§fn set_config_client(&self, client: &'a dyn ConfigClient)
fn set_config_client(&self, client: &'a dyn ConfigClient)
Set the client that is called when configuration finishes.
Source§fn get_address_long(&self) -> [u8; 8]
fn get_address_long(&self) -> [u8; 8]
Get the 802.15.4 extended (64-bit) address for the radio. Read more
Source§fn set_address_long(&self, addr: [u8; 8])
fn set_address_long(&self, addr: [u8; 8])
Set the 802.15.4 extended (64-bit) address for the radio. Read more
Source§fn set_channel(&self, chan: RadioChannel)
fn set_channel(&self, chan: RadioChannel)
Set the 802.15.4 channel for the radio. Read more
Source§impl<'a> RadioData<'a> for Radio<'a>
impl<'a> RadioData<'a> for Radio<'a>
Source§fn set_receive_client(&self, client: &'a dyn RxClient)
fn set_receive_client(&self, client: &'a dyn RxClient)
Set the client that will be called when packets are received.
Source§fn set_receive_buffer(&self, buffer: &'static mut [u8])
fn set_receive_buffer(&self, buffer: &'static mut [u8])
Set the buffer to receive packets into. Read more
Source§fn set_transmit_client(&self, client: &'a dyn TxClient)
fn set_transmit_client(&self, client: &'a dyn TxClient)
Set the client that will be called when packets are transmitted.
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