pub struct Tx<USART> { /* private fields */ }
Expand description
Serial transmitter
Implementations§
Source§impl<USART: Instance> Tx<USART>
impl<USART: Instance> Tx<USART>
Sourcepub fn write_u16(&mut self, word: u16) -> Result<(), Error>
pub fn write_u16(&mut self, word: u16) -> Result<(), Error>
Writes 9-bit words to the UART/USART
If the UART/USART was configured with WordLength::Bits9
, the 9 least significant bits will
be transmitted and the other 7 bits will be ignored. Otherwise, the 8 least significant bits
will be transmitted and the other 8 bits will be ignored.
pub fn write_u8(&mut self, word: u8) -> Result<(), Error>
pub fn bwrite_all_u16(&mut self, buffer: &[u16]) -> Result<(), Error>
pub fn bwrite_all_u8(&mut self, buffer: &[u8]) -> Result<(), Error>
pub fn flush(&mut self) -> Result<(), Error>
pub fn bflush(&mut self) -> Result<(), Error>
Sourcepub fn is_tx_empty(&self) -> bool
pub fn is_tx_empty(&self) -> bool
Returns true if the tx register is empty (and can accept data)
pub fn is_tx_complete(&self) -> bool
Trait Implementations§
Source§impl<USART: Instance> Write for Tx<USART>
impl<USART: Instance> Write for Tx<USART>
Source§fn write(&mut self, bytes: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, bytes: &[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.
Source§impl<USART: Instance> Write for Tx<USART>
impl<USART: Instance> Write for Tx<USART>
Source§impl<USART: Instance> Write<u16> for Tx<USART>
impl<USART: Instance> Write<u16> for Tx<USART>
Source§impl<USART: Instance> Write<u8> for Tx<USART>
impl<USART: Instance> Write<u8> for Tx<USART>
Auto Trait Implementations§
impl<USART> Freeze for Tx<USART>
impl<USART> RefUnwindSafe for Tx<USART>where
USART: RefUnwindSafe,
impl<USART> Send for Tx<USART>where
USART: Send,
impl<USART> Sync for Tx<USART>where
USART: Sync,
impl<USART> Unpin for Tx<USART>where
USART: Unpin,
impl<USART> UnwindSafe for Tx<USART>where
USART: 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