Channels

Struct Channels 

Source
pub struct Channels<M: RawMutex, const RX: usize, const TX: usize> {
    pub rx: Channel<M, RxFrame, RX>,
    pub tx: Channel<M, TxRequest, TX>,
    pub tx_done: Signal<M, Result<(), TxError<RadioError>>>,
    pub rx_waker: AtomicWaker,
}
Expand description

Shared state between LoraphyRadio and runner. Place in a static.

  • M: raw mutex type (e.g. ThreadModeRawMutex for single-core Embassy).
  • RX: depth of the receive queue.
  • TX: depth of the transmit-request queue.

Fields§

§rx: Channel<M, RxFrame, RX>§tx: Channel<M, TxRequest, TX>§tx_done: Signal<M, Result<(), TxError<RadioError>>>§rx_waker: AtomicWaker

Implementations§

Source§

impl<M: RawMutex, const RX: usize, const TX: usize> Channels<M, RX, TX>

Source

pub const fn new() -> Self

Auto Trait Implementations§

§

impl<M, const RX: usize, const TX: usize> !Freeze for Channels<M, RX, TX>

§

impl<M, const RX: usize, const TX: usize> !RefUnwindSafe for Channels<M, RX, TX>

§

impl<M, const RX: usize, const TX: usize> Send for Channels<M, RX, TX>
where M: Send,

§

impl<M, const RX: usize, const TX: usize> Sync for Channels<M, RX, TX>
where M: Sync,

§

impl<M, const RX: usize, const TX: usize> Unpin for Channels<M, RX, TX>
where M: Unpin,

§

impl<M, const RX: usize, const TX: usize> UnwindSafe for Channels<M, RX, TX>
where M: UnwindSafe,

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.

§

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.