Struct Ieee802154

Source
pub struct Ieee802154<'a> { /* private fields */ }
Expand description

IEEE 802.15.4 driver

Implementations§

Source§

impl<'a> Ieee802154<'a>

Source

pub fn new(_radio: IEEE802154, radio_clocks: RADIO_CLK) -> Self

Construct a new driver, enabling the IEEE 802.15.4 radio in the process

Source

pub fn set_config(&mut self, cfg: Config)

Set the configuration for the driver

Source

pub fn start_receive(&mut self)

Start receiving frames

Source

pub fn raw_received(&mut self) -> Option<RawReceived>

Return the raw data of a received frame

Source

pub fn received(&mut self) -> Option<Result<ReceivedFrame, Error>>

Get a received frame, if available

Source

pub fn transmit(&mut self, frame: &Frame) -> Result<(), Error>

Transmit a frame

Source

pub fn transmit_raw(&mut self, frame: &[u8]) -> Result<(), Error>

Transmit a raw frame

Source

pub fn set_tx_done_callback(&mut self, callback: &'a mut (dyn FnMut() + Send))

Set the transmit done callback function.

Source

pub fn clear_tx_done_callback(&mut self)

Clear the transmit done callback function.

Source

pub fn set_rx_available_callback( &mut self, callback: &'a mut (dyn FnMut() + Send), )

Set the receive available callback function.

Source

pub fn clear_rx_available_callback(&mut self)

Clear the receive available callback function.

Source

pub fn set_tx_done_callback_fn(&mut self, callback: fn())

Set the transmit done callback function.

Source

pub fn clear_tx_done_callback_fn(&mut self)

Clear the transmit done callback function.

Source

pub fn set_rx_available_callback_fn(&mut self, callback: fn())

Set the receive available callback function.

Source

pub fn clear_rx_available_callback_fn(&mut self)

Clear the receive available callback function.

Trait Implementations§

Source§

impl<'a> Debug for Ieee802154<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Ieee802154<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Ieee802154<'a>

§

impl<'a> RefUnwindSafe for Ieee802154<'a>

§

impl<'a> Send for Ieee802154<'a>

§

impl<'a> Sync for Ieee802154<'a>

§

impl<'a> Unpin for Ieee802154<'a>

§

impl<'a> UnwindSafe for Ieee802154<'a>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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.
§

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

Performs the conversion.