pub struct UartTx<'d, T: Instance, M: Mode> { /* private fields */ }Expand description
Tx-only UART Driver.
Implementations§
Source§impl<'d, T: Instance, M: Mode> UartTx<'d, T, M>
impl<'d, T: Instance, M: Mode> UartTx<'d, T, M>
Sourcepub fn set_config(&mut self, config: &Config) -> Result<(), ConfigError>
pub fn set_config(&mut self, config: &Config) -> Result<(), ConfigError>
Reconfigure the driver
Sourcepub fn blocking_write(&mut self, buffer: &[u8]) -> Result<(), Error>
pub fn blocking_write(&mut self, buffer: &[u8]) -> Result<(), Error>
Perform a blocking UART write
Sourcepub fn blocking_flush(&mut self) -> Result<(), Error>
pub fn blocking_flush(&mut self) -> Result<(), Error>
Block until transmission complete
Source§impl<'d, T: Instance> UartTx<'d, T, Async>
impl<'d, T: Instance> UartTx<'d, T, Async>
Sourcepub fn new<const REMAP: u8>(
peri: Peri<'d, T>,
tx: Peri<'d, impl TxPin<T, REMAP>>,
tx_dma: Peri<'d, impl TxDma<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new<const REMAP: u8>( peri: Peri<'d, T>, tx: Peri<'d, impl TxPin<T, REMAP>>, tx_dma: Peri<'d, impl TxDma<T>>, config: Config, ) -> Result<Self, ConfigError>
Useful if you only want Uart Tx. It saves 1 pin and consumes a little less power.
Sourcepub fn new_with_cts<const REMAP: u8>(
peri: Peri<'d, T>,
tx: Peri<'d, impl TxPin<T, REMAP>>,
cts: Peri<'d, impl CtsPin<T, REMAP>>,
tx_dma: Peri<'d, impl TxDma<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_with_cts<const REMAP: u8>( peri: Peri<'d, T>, tx: Peri<'d, impl TxPin<T, REMAP>>, cts: Peri<'d, impl CtsPin<T, REMAP>>, tx_dma: Peri<'d, impl TxDma<T>>, config: Config, ) -> Result<Self, ConfigError>
Create a new tx-only UART with a clear-to-send pin
Source§impl<'d, T: Instance> UartTx<'d, T, Blocking>
impl<'d, T: Instance> UartTx<'d, T, Blocking>
Sourcepub fn new_blocking<const REMAP: u8>(
peri: Peri<'d, T>,
tx: Peri<'d, impl TxPin<T, REMAP>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking<const REMAP: u8>( peri: Peri<'d, T>, tx: Peri<'d, impl TxPin<T, REMAP>>, config: Config, ) -> Result<Self, ConfigError>
Create a new blocking tx-only UART with no hardware flow control.
Useful if you only want Uart Tx. It saves 1 pin and consumes a little less power.
Sourcepub fn new_blocking_with_cts<const REMAP: u8>(
peri: Peri<'d, T>,
tx: Peri<'d, impl TxPin<T, REMAP>>,
cts: Peri<'d, impl CtsPin<T, REMAP>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking_with_cts<const REMAP: u8>( peri: Peri<'d, T>, tx: Peri<'d, impl TxPin<T, REMAP>>, cts: Peri<'d, impl CtsPin<T, REMAP>>, config: Config, ) -> Result<Self, ConfigError>
Create a new blocking tx-only UART with a clear-to-send pin