pub struct Usart<'d, M: Mode> { /* private fields */ }
Expand description
§Type parameters
’d: the lifetime marker ensuring correct borrow checking for peripherals used at compile time T: the peripheral instance type allowing usage of peripheral specific registers M: the operating mode of USART peripheral
Implementations§
Source§impl<'d, M: Mode> Usart<'d, M>
impl<'d, M: Mode> Usart<'d, M>
Sourcepub fn blocking_write(&mut self, buffer: &[u8]) -> Result<(), Error>
pub fn blocking_write(&mut self, buffer: &[u8]) -> Result<(), Error>
Transmit the provided buffer blocking execution until done.
Sourcepub fn blocking_flush(&mut self) -> Result<(), Error>
pub fn blocking_flush(&mut self) -> Result<(), Error>
Flush USART TX blocking execution until done.
Sourcepub fn blocking_read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
pub fn blocking_read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
Read from USART RX blocking execution until done.
Trait Implementations§
Source§impl<'d> Read for Usart<'d, Blocking>
impl<'d> Read for Usart<'d, Blocking>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
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>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moreSource§impl<'d> Write for Usart<'d, Blocking>
impl<'d> Write for Usart<'d, Blocking>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
Auto Trait Implementations§
impl<'d, M> Freeze for Usart<'d, M>
impl<'d, M> RefUnwindSafe for Usart<'d, M>where
M: RefUnwindSafe,
impl<'d, M> Send for Usart<'d, M>where
M: Send,
impl<'d, M> Sync for Usart<'d, M>where
M: Sync,
impl<'d, M> Unpin for Usart<'d, M>where
M: Unpin,
impl<'d, M> UnwindSafe for Usart<'d, M>where
M: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more