pub struct Ieee802154<'a> { /* private fields */ }
Expand description
IEEE 802.15.4 driver
Implementations§
Source§impl<'a> Ieee802154<'a>
impl<'a> Ieee802154<'a>
Sourcepub fn new(_radio: IEEE802154, radio_clocks: RADIO_CLK) -> Self
pub fn new(_radio: IEEE802154, radio_clocks: RADIO_CLK) -> Self
Construct a new driver, enabling the IEEE 802.15.4 radio in the process
Sourcepub fn set_config(&mut self, cfg: Config)
pub fn set_config(&mut self, cfg: Config)
Set the configuration for the driver
Sourcepub fn start_receive(&mut self)
pub fn start_receive(&mut self)
Start receiving frames
Sourcepub fn raw_received(&mut self) -> Option<RawReceived>
pub fn raw_received(&mut self) -> Option<RawReceived>
Return the raw data of a received frame
Sourcepub fn received(&mut self) -> Option<Result<ReceivedFrame, Error>>
pub fn received(&mut self) -> Option<Result<ReceivedFrame, Error>>
Get a received frame, if available
Sourcepub fn transmit_raw(&mut self, frame: &[u8]) -> Result<(), Error>
pub fn transmit_raw(&mut self, frame: &[u8]) -> Result<(), Error>
Transmit a raw frame
Sourcepub fn set_tx_done_callback(&mut self, callback: &'a mut (dyn FnMut() + Send))
pub fn set_tx_done_callback(&mut self, callback: &'a mut (dyn FnMut() + Send))
Set the transmit done callback function.
Sourcepub fn clear_tx_done_callback(&mut self)
pub fn clear_tx_done_callback(&mut self)
Clear the transmit done callback function.
Sourcepub fn set_rx_available_callback(
&mut self,
callback: &'a mut (dyn FnMut() + Send),
)
pub fn set_rx_available_callback( &mut self, callback: &'a mut (dyn FnMut() + Send), )
Set the receive available callback function.
Sourcepub fn clear_rx_available_callback(&mut self)
pub fn clear_rx_available_callback(&mut self)
Clear the receive available callback function.
Sourcepub fn set_tx_done_callback_fn(&mut self, callback: fn())
pub fn set_tx_done_callback_fn(&mut self, callback: fn())
Set the transmit done callback function.
Sourcepub fn clear_tx_done_callback_fn(&mut self)
pub fn clear_tx_done_callback_fn(&mut self)
Clear the transmit done callback function.
Sourcepub fn set_rx_available_callback_fn(&mut self, callback: fn())
pub fn set_rx_available_callback_fn(&mut self, callback: fn())
Set the receive available callback function.
Sourcepub fn clear_rx_available_callback_fn(&mut self)
pub fn clear_rx_available_callback_fn(&mut self)
Clear the receive available callback function.