FrameReader

Struct FrameReader 

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

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

Implementations§

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

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

Source

pub fn transfer_complete_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the transfer complete interrupt of the corresponding DMA channel.

Returns the full buffer received by the USART.

Source

pub fn character_match_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the character match interrupt of the corresponding USART

Returns the buffer received by the USART, including the matching character.

Source

pub fn receiver_timeout_interrupt(&mut self, next_frame: BUFFER) -> BUFFER

This function should be called from the receiver timeout interrupt of the corresponding USART

Returns the buffer received by the USART.

Source§

impl<BUFFER, PAYLOAD, CHANNEL, const N: usize> FrameReader<BUFFER, RxDma<PAYLOAD, CHANNEL>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, PAYLOAD: CharacterMatch,

Source

pub fn check_character_match(&mut self, clear: bool) -> bool

Checks to see if the peripheral has detected a character match and clears the flag

Source§

impl<BUFFER, PAYLOAD, CHANNEL, const N: usize> FrameReader<BUFFER, RxDma<PAYLOAD, CHANNEL>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static, PAYLOAD: ReceiverTimeout,

Source

pub fn check_receiver_timeout(&mut self, clear: bool) -> bool

Source§

impl<BUFFER, PAYLOAD, CHANNEL, const N: usize> FrameReader<BUFFER, RxDma<PAYLOAD, CHANNEL>, N>
where BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static,

Source

pub fn check_operation_error<O, E>(&mut self) -> Result<O, E>
where PAYLOAD: OperationError<O, E>,

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<BUFFER, PAYLOAD, const N: usize> UnwindSafe for FrameReader<BUFFER, PAYLOAD, N>
where BUFFER: UnwindSafe, PAYLOAD: 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.