Struct stm32f4xx_hal::serial::Rx

source ·
pub struct Rx<USART: CommonPins, WORD = u8> { /* private fields */ }
Expand description

Serial receiver containing RX pin

Implementations§

source§

impl<UART: CommonPins, WORD> Rx<UART, WORD>

source

pub fn join(self, tx: Tx<UART, WORD>) -> Serial<UART, WORD>

Trait Implementations§

source§

impl<UART: Instance, WORD> AsMut<Rx<UART, WORD>> for Serial<UART, WORD>

source§

fn as_mut(&mut self) -> &mut Rx<UART, WORD>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<UART: Instance, WORD> AsRef<Rx<UART, WORD>> for Serial<UART, WORD>

source§

fn as_ref(&self) -> &Rx<UART, WORD>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<USART: Instance, WORD> ErrorType for Rx<USART, WORD>

§

type Error = Error

Error type
source§

impl<UART: Instance> PeriAddress for Rx<UART, u8>
where <UART as Instance>::RegisterBlock: RegisterBlockImpl,

source§

fn address(&self) -> u32

Returns the address to be used by the DMA stream.
§

type MemSize = u8

Memory size of the peripheral.
source§

impl<USART: Instance> Read<u16> for Rx<USART, u16>
where <USART as Instance>::RegisterBlock: RegisterBlockImpl,

Reads 9-bit words from the UART/USART

If the UART/USART was configured with WordLength::DataBits9, the returned value will contain 9 received data bits and all other bits set to zero. Otherwise, the returned value will contain 8 received data bits and all other bits set to zero.

source§

fn read(&mut self) -> Result<u16, Self::Error>

Reads a single word from the serial interface
source§

impl<USART: Instance> Read for Rx<USART, u8>
where <USART as Instance>::RegisterBlock: RegisterBlockImpl,

source§

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

Reads a single word from the serial interface
source§

impl<UART: Instance, WORD> RxISR for Rx<UART, WORD>
where <UART as Instance>::RegisterBlock: RegisterBlockImpl,

source§

fn clear_idle_interrupt(&self)

This clears Idle, Overrun, Noise, FrameError and ParityError flags

source§

fn is_idle(&self) -> bool

Return true if the line idle status is set
source§

fn is_rx_not_empty(&self) -> bool

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

impl<UART: Instance, WORD> RxListen for Rx<UART, WORD>
where <UART as Instance>::RegisterBlock: RegisterBlockImpl,

source§

fn listen(&mut self)

Start listening for an rx not empty interrupt event Read more
source§

fn unlisten(&mut self)

Stop listening for the rx not empty interrupt event
source§

fn listen_idle(&mut self)

Start listening for a line idle interrupt event Read more
source§

fn unlisten_idle(&mut self)

Stop listening for the line idle interrupt event
source§

impl<USART: Instance> Read<u16> for Rx<USART, u16>
where <USART as Instance>::RegisterBlock: RegisterBlockImpl,

Reads 9-bit words from the UART/USART

If the UART/USART was configured with WordLength::DataBits9, the returned value will contain 9 received data bits and all other bits set to zero. Otherwise, the returned value will contain 8 received data bits and all other bits set to zero.

§

type Error = Error

Read error
source§

fn read(&mut self) -> Result<u16, Self::Error>

Reads a single word from the serial interface
source§

impl<USART: Instance> Read<u8> for Rx<USART, u8>
where <USART as Instance>::RegisterBlock: RegisterBlockImpl,

§

type Error = Error

Read error
source§

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

Reads a single word from the serial interface
source§

impl<UART, STREAM, const CHANNEL: u8> DMASet<STREAM, CHANNEL, PeripheralToMemory> for Rx<UART>
where UART: DMASet<STREAM, CHANNEL, PeripheralToMemory> + CommonPins,

Auto Trait Implementations§

§

impl<USART, WORD> RefUnwindSafe for Rx<USART, WORD>
where USART: RefUnwindSafe, WORD: RefUnwindSafe, <USART as SerialAsync>::Rx<PushPull>: RefUnwindSafe,

§

impl<USART, WORD> Send for Rx<USART, WORD>
where USART: Send, WORD: Send, <USART as SerialAsync>::Rx<PushPull>: Send,

§

impl<USART, WORD> Sync for Rx<USART, WORD>
where USART: Sync, WORD: Sync, <USART as SerialAsync>::Rx<PushPull>: Sync,

§

impl<USART, WORD> Unpin for Rx<USART, WORD>
where USART: Unpin, WORD: Unpin, <USART as SerialAsync>::Rx<PushPull>: Unpin,

§

impl<USART, WORD> UnwindSafe for Rx<USART, WORD>
where USART: UnwindSafe, WORD: UnwindSafe, <USART as SerialAsync>::Rx<PushPull>: 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>,

§

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>,

§

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.