pub trait Configure {
// Required method
fn configure(&self, params: Parameters) -> Result<(), ErrorCode>;
}
Expand description
Trait for configuring a UART.
Required Methods§
sourcefn configure(&self, params: Parameters) -> Result<(), ErrorCode>
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. aParameters::baud_rate
of 0).Err(ENOSUPPORT)
: The underlying UART cannot satisfy this configuration.