embassy-mcxa

Crates

git

Versions

mcx-a256

Flavors

LpuartRx

Struct LpuartRx 

Source
pub struct LpuartRx<'a, M: Mode> { /* private fields */ }
Expand description

Lpuart Rx driver.

Implementations§

Source§

impl<'a> LpuartRx<'a, Blocking>

Source

pub fn new_blocking<T: Instance>( _inner: Peri<'a, T>, rx_pin: Peri<'a, impl RxPin<T>>, config: Config, ) -> Result<Self>

Create a new blocking LPUART Receiver instance

Source

pub fn new_blocking_with_rts<T: Instance>( _inner: Peri<'a, T>, rx_pin: Peri<'a, impl RxPin<T>>, rts_pin: Peri<'a, impl RtsPin<T>>, config: Config, ) -> Result<Self>

Create a new blocking LPUART Receiver instance with RTS flow control

Source

pub fn read(&mut self, buf: &mut [u8]) -> Result<()>

Read data from LPUART RX without blocking.

Source

pub fn blocking_read(&mut self, buf: &mut [u8]) -> Result<()>

Read data from LPUART RX blocking execution until the buffer is filled.

Trait Implementations§

Source§

impl ErrorType for LpuartRx<'_, Blocking>

Source§

type Error = Error

Error type
Source§

impl ErrorType for LpuartRx<'_, Blocking>

Source§

type Error = Error

Error type of all the IO operations on this type.
Source§

impl Read for LpuartRx<'_, Blocking>

Source§

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

Reads a single word from the serial interface
Source§

impl Read for LpuartRx<'_, Blocking>

Source§

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

Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§

fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>

Read the exact number of bytes required to fill buf. Read more
Source§

impl Read<u8> for LpuartRx<'_, Blocking>

Source§

type Error = Error

Read error
Source§

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

Reads a single word from the serial interface

Auto Trait Implementations§

§

impl<'a, M> Freeze for LpuartRx<'a, M>

§

impl<'a, M> !RefUnwindSafe for LpuartRx<'a, M>

§

impl<'a, M> !Send for LpuartRx<'a, M>

§

impl<'a, M> !Sync for LpuartRx<'a, M>

§

impl<'a, M> Unpin for LpuartRx<'a, M>
where M: Unpin,

§

impl<'a, M> !UnwindSafe for LpuartRx<'a, M>

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.