Struct Rx

Source
pub struct Rx<USART, Config> { /* private fields */ }
Expand description

Serial receiver

Implementations§

Source§

impl<Config> Rx<USART1, Config>

Source

pub fn listen(&mut self)

Listen for a data interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for a data interrupt event

Source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

Source

pub fn listen_idle(&mut self)

Listen for an idle interrupt event

Source

pub fn unlisten_idle(&mut self)

Stop listening for an idle interrupt event

Source

pub fn is_idle(&self) -> bool

Return true if the idle event occured

Source

pub fn clear_idle(&mut self)

Clear the idle event flag

Source§

impl<Config> Rx<USART2, Config>

Source

pub fn listen(&mut self)

Listen for a data interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for a data interrupt event

Source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

Source

pub fn listen_idle(&mut self)

Listen for an idle interrupt event

Source

pub fn unlisten_idle(&mut self)

Stop listening for an idle interrupt event

Source

pub fn is_idle(&self) -> bool

Return true if the idle event occured

Source

pub fn clear_idle(&mut self)

Clear the idle event flag

Source§

impl<Config> Rx<USART3, Config>

Source

pub fn listen(&mut self)

Listen for a data interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for a data interrupt event

Source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

Source

pub fn listen_idle(&mut self)

Listen for an idle interrupt event

Source

pub fn unlisten_idle(&mut self)

Stop listening for an idle interrupt event

Source

pub fn is_idle(&self) -> bool

Return true if the idle event occured

Source

pub fn clear_idle(&mut self)

Clear the idle event flag

Source§

impl<Config> Rx<USART4, Config>

Source

pub fn listen(&mut self)

Listen for a data interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for a data interrupt event

Source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

Source

pub fn listen_idle(&mut self)

Listen for an idle interrupt event

Source

pub fn unlisten_idle(&mut self)

Stop listening for an idle interrupt event

Source

pub fn is_idle(&self) -> bool

Return true if the idle event occured

Source

pub fn clear_idle(&mut self)

Clear the idle event flag

Source§

impl<Config> Rx<LPUART, Config>

Source

pub fn listen(&mut self)

Listen for a data interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for a data interrupt event

Source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

Source

pub fn listen_idle(&mut self)

Listen for an idle interrupt event

Source

pub fn unlisten_idle(&mut self)

Stop listening for an idle interrupt event

Source

pub fn is_idle(&self) -> bool

Return true if the idle event occured

Source

pub fn clear_idle(&mut self)

Clear the idle event flag

Source§

impl Rx<USART1, FullConfig>

Source

pub fn timeout_lapsed(&self) -> bool

Check if receiver timeout has lapsed Returns the current state of the ISR RTOF bit

Source

pub fn clear_timeout(&mut self)

Clear pending receiver timeout interrupt

Source

pub fn fifo_threshold_reached(&self) -> bool

Returns true if the rx fifo threshold has been reached.

Source§

impl Rx<USART2, FullConfig>

Source

pub fn timeout_lapsed(&self) -> bool

Check if receiver timeout has lapsed Returns the current state of the ISR RTOF bit

Source

pub fn clear_timeout(&mut self)

Clear pending receiver timeout interrupt

Source

pub fn fifo_threshold_reached(&self) -> bool

Returns true if the rx fifo threshold has been reached.

Trait Implementations§

Source§

impl<Config> Target for Rx<LPUART, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<Config> Target for Rx<USART1, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<Config> Target for Rx<USART2, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<Config> Target for Rx<USART3, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<Config> Target for Rx<USART4, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<Config> Read<u8> for Rx<LPUART, Config>

Source§

type Error = Error

Read error
Source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
Source§

impl<Config> Read<u8> for Rx<USART1, Config>

Source§

type Error = Error

Read error
Source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
Source§

impl<Config> Read<u8> for Rx<USART2, Config>

Source§

type Error = Error

Read error
Source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
Source§

impl<Config> Read<u8> for Rx<USART3, Config>

Source§

type Error = Error

Read error
Source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
Source§

impl<Config> Read<u8> for Rx<USART4, Config>

Source§

type Error = Error

Read error
Source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface

Auto Trait Implementations§

§

impl<USART, Config> Freeze for Rx<USART, Config>

§

impl<USART, Config> RefUnwindSafe for Rx<USART, Config>
where USART: RefUnwindSafe, Config: RefUnwindSafe,

§

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

§

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

§

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

§

impl<USART, Config> UnwindSafe for Rx<USART, Config>
where USART: UnwindSafe, Config: 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.