Trait Configure

Source
pub trait Configure {
    // Required method
    fn configure(&self, params: Parameters) -> Result<(), ErrorCode>;
}
Expand description

Trait for configuring a UART.

Required Methods§

Source

fn configure(&self, params: Parameters) -> Result<(), ErrorCode>

Set the configuration parameters for the UART bus.

§Return values
  • Ok(()): The bus was configured correctly.
  • Err(OFF): The underlying hardware is currently not available, perhaps because it has not been initialized or in the case of a shared hardware USART controller because it is set up for SPI.
  • Err(INVAL): Impossible parameters (e.g. a Parameters::baud_rate of 0).
  • Err(ENOSUPPORT): The underlying UART cannot satisfy this configuration.

Implementors§

impl Configure for Uart<'_>

impl<'a, U: UsbController<'a>, A: 'a + Alarm<'a>> Configure for CdcAcm<'a, U, A>

impl Configure for Uart<'_>

impl Configure for Lpuart<'_>

impl Configure for Uart<'_>

impl Configure for Uart<'_>

impl Configure for Uarte<'_>

impl Configure for Scb<'_>

impl Configure for Uart16550<'_>

impl Configure for Uart<'_>

impl Configure for USART<'_>

impl<'a, A: Alarm<'a>> Configure for SeggerRtt<'a, A>

impl Configure for Uart<'_>

impl Configure for Usart<'_>

impl<'a, DMA: StreamServer<'a>> Configure for Usart<'a, DMA>

impl Configure for SemihostUart<'_>