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<(), Infallible>
pub fn write_u16(&mut self, word: u16) -> Result<(), Infallible>
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(&mut self, word: u8) -> Result<(), Infallible>
pub fn bwrite_all_u16(&mut self, buffer: &[u16]) -> Result<(), Infallible>
pub fn bwrite_all(&mut self, buffer: &[u8]) -> Result<(), Infallible>
pub fn flush(&mut self) -> Result<(), Infallible>
pub fn bflush(&mut self) -> Result<(), Infallible>
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§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