pub struct Uart<'d, M: PeriMode> { /* private fields */ }Expand description
Bidirectional UART Driver, which acts as a combination of UartTx and UartRx.
§Notes on embedded_io::Read
embedded_io::Read requires guarantees that the base UartRx cannot provide.
See UartRx for more details, and see BufferedUart and RingBufferedUartRx
as alternatives that do provide the necessary guarantees for embedded_io::Read.
Implementations§
Source§impl<'d> Uart<'d, Async>
impl<'d> Uart<'d, Async>
Sourcepub fn new<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
) -> Result<Self, ConfigError>
pub fn new<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional UART
Sourcepub fn new_with_rtscts<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
rts: Peri<'d, impl RtsPin<T>>,
cts: Peri<'d, impl CtsPin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_with_rtscts<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, rts: Peri<'d, impl RtsPin<T>>, cts: Peri<'d, impl CtsPin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional UART with request-to-send and clear-to-send pins
Sourcepub fn new_with_de<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
de: Peri<'d, impl DePin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_with_de<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, de: Peri<'d, impl DePin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional UART with a driver-enable pin
Sourcepub fn new_half_duplex<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
tx: Peri<'d, impl TxPin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
readback: HalfDuplexReadback,
) -> Result<Self, ConfigError>
pub fn new_half_duplex<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, tx: Peri<'d, impl TxPin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, readback: HalfDuplexReadback, ) -> Result<Self, ConfigError>
Create a single-wire half-duplex Uart transceiver on a single Tx pin.
See new_half_duplex_on_rx if you would prefer to use an Rx pin
(when it is available for your chip). There is no functional difference between these methods, as both
allow bidirectional communication.
The TX pin is always released when no data is transmitted. Thus, it acts as a standard I/O in idle or in reception. It means that the I/O must be configured so that TX is configured as alternate function open-drain with an external pull-up Apart from this, the communication protocol is similar to normal USART mode. Any conflict on the line must be managed by software (for instance by using a centralized arbiter).
Sourcepub fn new_half_duplex_on_rx<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
rx: Peri<'d, impl RxPin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
readback: HalfDuplexReadback,
) -> Result<Self, ConfigError>
pub fn new_half_duplex_on_rx<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, rx: Peri<'d, impl RxPin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, readback: HalfDuplexReadback, ) -> Result<Self, ConfigError>
Create a single-wire half-duplex Uart transceiver on a single Rx pin.
See new_half_duplex if you would prefer to use an Tx pin.
There is no functional difference between these methods, as both allow bidirectional communication.
The pin is always released when no data is transmitted. Thus, it acts as a standard I/O in idle or in reception. Apart from this, the communication protocol is similar to normal USART mode. Any conflict on the line must be managed by software (for instance by using a centralized arbiter).
Sourcepub fn new_master<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_master<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional USART in synchronous master mode
Sourcepub fn new_master_with_rtscts<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
rts: Peri<'d, impl RtsPin<T>>,
cts: Peri<'d, impl CtsPin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_master_with_rtscts<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, rts: Peri<'d, impl RtsPin<T>>, cts: Peri<'d, impl CtsPin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional USART with request-to-send and clear-to-send pins in synchronous master mode
Sourcepub fn new_master_with_de<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
de: Peri<'d, impl DePin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_master_with_de<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, de: Peri<'d, impl DePin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional USART with a driver-enable pin in synchronous master mode
Sourcepub fn new_slave<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_slave<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional USART in synchronous slave mode
Sourcepub fn new_slave_with_rtscts<T: Instance, D1: TxDma<T>, D2: RxDma<T>>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
rts: Peri<'d, impl RtsPin<T>>,
cts: Peri<'d, impl CtsPin<T>>,
tx_dma: Peri<'d, D1>,
rx_dma: Peri<'d, D2>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_slave_with_rtscts<T: Instance, D1: TxDma<T>, D2: RxDma<T>>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, rts: Peri<'d, impl RtsPin<T>>, cts: Peri<'d, impl CtsPin<T>>, tx_dma: Peri<'d, D1>, rx_dma: Peri<'d, D2>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + Binding<D1::Interrupt, InterruptHandler<D1>> + Binding<D2::Interrupt, InterruptHandler<D2>> + 'd, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional USART with request-to-send and clear-to-send pins in synchronous slave mode
Sourcepub async fn write(&mut self, buffer: &[u8]) -> Result<(), Error>
pub async fn write(&mut self, buffer: &[u8]) -> Result<(), Error>
Perform an asynchronous write
Sourcepub async fn read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
pub async fn read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
Perform an asynchronous read into buffer
Sourcepub async fn read_until_idle(
&mut self,
buffer: &mut [u8],
) -> Result<usize, Error>
pub async fn read_until_idle( &mut self, buffer: &mut [u8], ) -> Result<usize, Error>
Perform an an asynchronous read with idle line detection enabled.
WARNING: In synchronous mode, idle detection does not work, and this behaves
as if you had called read(buffer) instead!
Source§impl<'d> Uart<'d, Blocking>
impl<'d> Uart<'d, Blocking>
Sourcepub fn new_blocking<T: Instance>(
peri: Peri<'d, T>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking<T: Instance>( peri: Peri<'d, T>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, config: Config, ) -> Result<Self, ConfigError>
Create a new blocking bidirectional UART.
Sourcepub fn new_blocking_with_rtscts<T: Instance>(
peri: Peri<'d, T>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
rts: Peri<'d, impl RtsPin<T>>,
cts: Peri<'d, impl CtsPin<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking_with_rtscts<T: Instance>( peri: Peri<'d, T>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, rts: Peri<'d, impl RtsPin<T>>, cts: Peri<'d, impl CtsPin<T>>, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional UART with request-to-send and clear-to-send pins
Sourcepub fn new_blocking_with_de<T: Instance>(
peri: Peri<'d, T>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
de: Peri<'d, impl DePin<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking_with_de<T: Instance>( peri: Peri<'d, T>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, de: Peri<'d, impl DePin<T>>, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional UART with a driver-enable pin
Sourcepub fn new_blocking_half_duplex<T: Instance>(
peri: Peri<'d, T>,
tx: Peri<'d, impl TxPin<T>>,
config: Config,
readback: HalfDuplexReadback,
) -> Result<Self, ConfigError>
pub fn new_blocking_half_duplex<T: Instance>( peri: Peri<'d, T>, tx: Peri<'d, impl TxPin<T>>, config: Config, readback: HalfDuplexReadback, ) -> Result<Self, ConfigError>
Create a single-wire half-duplex Uart transceiver on a single Tx pin.
See new_half_duplex_on_rx if you would prefer to use an Rx pin
(when it is available for your chip). There is no functional difference between these methods, as both
allow bidirectional communication.
The pin is always released when no data is transmitted. Thus, it acts as a standard I/O in idle or in reception. Apart from this, the communication protocol is similar to normal USART mode. Any conflict on the line must be managed by software (for instance by using a centralized arbiter).
Sourcepub fn new_blocking_half_duplex_on_rx<T: Instance>(
peri: Peri<'d, T>,
rx: Peri<'d, impl RxPin<T>>,
config: Config,
readback: HalfDuplexReadback,
) -> Result<Self, ConfigError>
pub fn new_blocking_half_duplex_on_rx<T: Instance>( peri: Peri<'d, T>, rx: Peri<'d, impl RxPin<T>>, config: Config, readback: HalfDuplexReadback, ) -> Result<Self, ConfigError>
Create a single-wire half-duplex Uart transceiver on a single Rx pin.
See new_half_duplex if you would prefer to use an Tx pin.
There is no functional difference between these methods, as both allow bidirectional communication.
The pin is always released when no data is transmitted. Thus, it acts as a standard I/O in idle or in reception. Apart from this, the communication protocol is similar to normal USART mode. Any conflict on the line must be managed by software (for instance by using a centralized arbiter).
Sourcepub fn new_blocking_master<T: Instance>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking_master<T: Instance>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, config: Config, ) -> Result<Self, ConfigError>
Create a new blocking bidirectional USART in synchronous master mode
Sourcepub fn new_blocking_master_with_rtscts<T: Instance>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
rts: Peri<'d, impl RtsPin<T>>,
cts: Peri<'d, impl CtsPin<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking_master_with_rtscts<T: Instance>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, rts: Peri<'d, impl RtsPin<T>>, cts: Peri<'d, impl CtsPin<T>>, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional USART with request-to-send and clear-to-send pins in synchronous master mode
Sourcepub fn new_blocking_master_with_de<T: Instance>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
de: Peri<'d, impl DePin<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking_master_with_de<T: Instance>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, de: Peri<'d, impl DePin<T>>, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional USART with a driver-enable pin in synchronous master mode
Sourcepub fn new_blocking_slave<T: Instance>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking_slave<T: Instance>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, config: Config, ) -> Result<Self, ConfigError>
Create a new blocking bidirectional USART in synchronous slave mode
Sourcepub fn new_blocking_slave_with_rtscts<T: Instance>(
peri: Peri<'d, T>,
ck: Peri<'d, impl CkPin<T>>,
rx: Peri<'d, impl RxPin<T>>,
tx: Peri<'d, impl TxPin<T>>,
rts: Peri<'d, impl RtsPin<T>>,
cts: Peri<'d, impl CtsPin<T>>,
config: Config,
) -> Result<Self, ConfigError>
pub fn new_blocking_slave_with_rtscts<T: Instance>( peri: Peri<'d, T>, ck: Peri<'d, impl CkPin<T>>, rx: Peri<'d, impl RxPin<T>>, tx: Peri<'d, impl TxPin<T>>, rts: Peri<'d, impl RtsPin<T>>, cts: Peri<'d, impl CtsPin<T>>, config: Config, ) -> Result<Self, ConfigError>
Create a new bidirectional USART with request-to-send and clear-to-send pins in synchronous slave mode
Source§impl<'d, M: PeriMode> Uart<'d, M>
impl<'d, M: PeriMode> Uart<'d, M>
Sourcepub fn blocking_flush(&mut self) -> Result<(), Error>
pub fn blocking_flush(&mut self) -> Result<(), Error>
Block until transmission complete
Sourcepub fn blocking_read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
pub fn blocking_read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
Perform a blocking read into buffer
Sourcepub fn split(self) -> (UartTx<'d, M>, UartRx<'d, M>)
pub fn split(self) -> (UartTx<'d, M>, UartRx<'d, M>)
Split the Uart into a transmitter and receiver, which is particularly useful when having two tasks correlating to transmitting and receiving.
Sourcepub fn split_ref(&mut self) -> (&mut UartTx<'d, M>, &mut UartRx<'d, M>)
pub fn split_ref(&mut self) -> (&mut UartTx<'d, M>, &mut UartRx<'d, M>)
Split the Uart into a transmitter and receiver by mutable reference, which is particularly useful when having two tasks correlating to transmitting and receiving.
Sourcepub fn send_break(&self)
pub fn send_break(&self)
Send break character
Sourcepub fn set_baudrate(&self, baudrate: u32) -> Result<(), ConfigError>
pub fn set_baudrate(&self, baudrate: u32) -> Result<(), ConfigError>
Set baudrate
Trait Implementations§
Source§impl<'d, M: PeriMode> SetConfig for Uart<'d, M>
impl<'d, M: PeriMode> SetConfig for Uart<'d, M>
Source§type ConfigError = ConfigError
type ConfigError = ConfigError
set_config fails.