Make fields in UartConfig public (#233)

Otherwise it's impossible to have a configuration which differs from the provided default options.
This commit is contained in:
Pedro Ferreira 2021-12-13 23:47:35 +00:00 committed by GitHub
parent 31285fe002
commit 24a417f01a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,10 +145,14 @@ pub enum Parity {
/// A struct holding the configuration for an UART device.
pub struct UartConfig {
baudrate: Baud,
data_bits: DataBits,
stop_bits: StopBits,
parity: Option<Parity>,
/// The desired baud rate for the peripheral
pub baudrate: Baud,
/// Number of data bits per character (5, 6, 7 or 8)
pub data_bits: DataBits,
/// Number of stop bits after each character
pub stop_bits: StopBits,
/// Parity Bit: None, Some(Even), Some(Odd)
pub parity: Option<Parity>,
}
/// Common configurations for UART.