Struct stm32f4xx_hal::serial::Tx
source · [−]pub struct Tx<USART, WORD = u8> { /* private fields */ }
Expand description
Serial transmitter
Implementations
sourceimpl<USART, WORD> Tx<USART, WORD> where
USART: Instance,
impl<USART, WORD> Tx<USART, WORD> where
USART: Instance,
sourcepub fn listen(&mut self)
pub fn listen(&mut self)
Start listening for a tx empty interrupt event
Note, you will also have to enable the corresponding interrupt in the NVIC to start receiving events.
sourcepub fn is_tx_empty(&self) -> bool
pub fn is_tx_empty(&self) -> bool
Return true if the tx register is empty (and can accept data)
Trait Implementations
sourceimpl<USART> PeriAddress for Tx<USART, u8> where
USART: Instance,
impl<USART> PeriAddress for Tx<USART, u8> where
USART: Instance,
sourceimpl<USART: Instance> Write for Tx<USART>
impl<USART: Instance> Write for Tx<USART>
sourceimpl<USART: Instance> Write<u16> for Tx<USART, u16>
impl<USART: Instance> Write<u16> for Tx<USART, u16>
Writes 9-bit words to the UART/USART
If the UART/USART was configured with WordLength::DataBits9
, 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.
sourceimpl<USART: Instance> Write<u16> for Tx<USART, u16>
impl<USART: Instance> Write<u16> for Tx<USART, u16>
sourceimpl<USART: Instance> Write<u16> for Tx<USART, u16>
impl<USART: Instance> Write<u16> for Tx<USART, u16>
Writes 9-bit words to the UART/USART
If the UART/USART was configured with WordLength::DataBits9
, 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.
sourceimpl<USART: Instance> Write<u8> for Tx<USART, u8>
impl<USART: Instance> Write<u8> for Tx<USART, u8>
impl DMASet<StreamX<DMA1, 3_u8>, MemoryToPeripheral, 4_u8> for Tx<USART3>
impl DMASet<StreamX<DMA1, 4_u8>, MemoryToPeripheral, 7_u8> for Tx<USART3>
impl DMASet<StreamX<DMA1, 6_u8>, MemoryToPeripheral, 4_u8> for Tx<USART2>
impl DMASet<StreamX<DMA2, 6_u8>, MemoryToPeripheral, 5_u8> for Tx<USART6>
impl DMASet<StreamX<DMA2, 7_u8>, MemoryToPeripheral, 4_u8> for Tx<USART1>
impl DMASet<StreamX<DMA2, 7_u8>, MemoryToPeripheral, 5_u8> for Tx<USART6>
Auto Trait Implementations
impl<USART, WORD> RefUnwindSafe for Tx<USART, WORD> where
USART: RefUnwindSafe,
WORD: RefUnwindSafe,
impl<USART, WORD> Send for Tx<USART, WORD> where
USART: Send,
WORD: Send,
impl<USART, WORD> Sync for Tx<USART, WORD> where
USART: Sync,
WORD: Sync,
impl<USART, WORD> Unpin for Tx<USART, WORD> where
USART: Unpin,
WORD: Unpin,
impl<USART, WORD> UnwindSafe for Tx<USART, WORD> where
USART: UnwindSafe,
WORD: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more