Struct stm32_hal2::serial::Rx[][src]

pub struct Rx<USART> { /* fields omitted */ }

Serial receiver

Implementations

impl Rx<USART1>[src]

pub fn circ_read<B, H>(&self, chan: C5, buffer: B) -> CircBuffer<B, C5> where
    B: StableDeref<Target = [H; 2]> + DerefMut + 'static,
    H: AsMutSlice<Element = u8>, 
[src]

pub fn frame_read<BUFFER, N>(
    &self,
    channel: C5,
    buffer: BUFFER
) -> FrameReader<BUFFER, C5, N> where
    BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static,
    N: ArrayLength<MaybeUninit<u8>>, 
[src]

Create a frame reader that can either react on the Character match interrupt or Transfer Complete from the DMA.

pub fn is_idle(&mut self, clear: bool) -> bool[src]

Checks to see if the USART peripheral has detected an idle line and clears the flag

pub fn is_character_match(&mut self, clear: bool) -> bool[src]

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

pub fn is_receiver_timeout(&mut self, clear: bool) -> bool[src]

Checks to see if the USART peripheral has detected an receiver timeout and clears the flag

pub fn check_for_error(&mut self) -> Result<(), Error>[src]

Check for, and return, any errors

The read methods can only return one error at a time, but there might actually be multiple errors. This method will return and clear a currently active error. Once it returns Ok(()), it should be possible to proceed with the next read call unimpeded.

impl Rx<USART2>[src]

pub fn circ_read<B, H>(&self, chan: C6, buffer: B) -> CircBuffer<B, C6> where
    B: StableDeref<Target = [H; 2]> + DerefMut + 'static,
    H: AsMutSlice<Element = u8>, 
[src]

pub fn frame_read<BUFFER, N>(
    &self,
    channel: C6,
    buffer: BUFFER
) -> FrameReader<BUFFER, C6, N> where
    BUFFER: Sized + StableDeref<Target = DMAFrame<N>> + DerefMut + 'static,
    N: ArrayLength<MaybeUninit<u8>>, 
[src]

Create a frame reader that can either react on the Character match interrupt or Transfer Complete from the DMA.

pub fn is_idle(&mut self, clear: bool) -> bool[src]

Checks to see if the USART peripheral has detected an idle line and clears the flag

pub fn is_character_match(&mut self, clear: bool) -> bool[src]

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

pub fn is_receiver_timeout(&mut self, clear: bool) -> bool[src]

Checks to see if the USART peripheral has detected an receiver timeout and clears the flag

pub fn check_for_error(&mut self) -> Result<(), Error>[src]

Check for, and return, any errors

The read methods can only return one error at a time, but there might actually be multiple errors. This method will return and clear a currently active error. Once it returns Ok(()), it should be possible to proceed with the next read call unimpeded.

Trait Implementations

impl Read<u8> for Rx<USART1>[src]

type Error = Error

Read error

impl Read<u8> for Rx<USART2>[src]

type Error = Error

Read error

Auto Trait Implementations

impl<USART> Send for Rx<USART> where
    USART: Send

impl<USART> Sync for Rx<USART> where
    USART: Sync

impl<USART> Unpin for Rx<USART> where
    USART: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.