FrameSender

Struct FrameSender 

Source
pub struct FrameSender<BUFFER, PAYLOAD, const N: usize>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static,
{ /* private fields */ }
Expand description

Frame sender “worker”, access and handling of frame transmissions is made through this structure.

Implementations§

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C1>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C1>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C2>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C2>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C3>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C3>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C4>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C4>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C5>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C5>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C6>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C6>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C7>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C7>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C1>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C1>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C2>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C2>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C3>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C3>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C4>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C4>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C5>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C5>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C6>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C6>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Source§

impl<BUFFER, PAYLOAD, const N: usize> FrameSender<BUFFER, TxDma<PAYLOAD, C7>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, TxDma<PAYLOAD, C7>: TransferPayload,

Source

pub fn transfer_complete_interrupt(&mut self) -> Option<BUFFER>

This method should be called in the transfer complete interrupt of the DMA, will return the sent frame if the transfer was truly completed.

Source

pub fn ongoing_transfer(&self) -> bool

Returns true if there is an ongoing transfer.

Source

pub fn send(&mut self, frame: BUFFER) -> Result<(), BUFFER>

Send a frame. Will return Err(frame) if there was already an ongoing transaction or if the buffer has not been read out.

Auto Trait Implementations§

§

impl<BUFFER, PAYLOAD, const N: usize> Freeze for FrameSender<BUFFER, PAYLOAD, N>
where PAYLOAD: Freeze, BUFFER: Freeze,

§

impl<BUFFER, PAYLOAD, const N: usize> RefUnwindSafe for FrameSender<BUFFER, PAYLOAD, N>
where PAYLOAD: RefUnwindSafe, BUFFER: RefUnwindSafe,

§

impl<BUFFER, PAYLOAD, const N: usize> Send for FrameSender<BUFFER, PAYLOAD, N>
where PAYLOAD: Send, BUFFER: Send,

§

impl<BUFFER, PAYLOAD, const N: usize> Sync for FrameSender<BUFFER, PAYLOAD, N>
where PAYLOAD: Sync, BUFFER: Sync,

§

impl<BUFFER, PAYLOAD, const N: usize> Unpin for FrameSender<BUFFER, PAYLOAD, N>
where PAYLOAD: Unpin, BUFFER: Unpin,

§

impl<BUFFER, PAYLOAD, const N: usize> UnwindSafe for FrameSender<BUFFER, PAYLOAD, N>
where PAYLOAD: UnwindSafe, BUFFER: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

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

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

Performs the conversion.