mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-11 04:51:31 +11:00
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:
parent
31285fe002
commit
24a417f01a
|
@ -145,10 +145,14 @@ pub enum Parity {
|
||||||
|
|
||||||
/// A struct holding the configuration for an UART device.
|
/// A struct holding the configuration for an UART device.
|
||||||
pub struct UartConfig {
|
pub struct UartConfig {
|
||||||
baudrate: Baud,
|
/// The desired baud rate for the peripheral
|
||||||
data_bits: DataBits,
|
pub baudrate: Baud,
|
||||||
stop_bits: StopBits,
|
/// Number of data bits per character (5, 6, 7 or 8)
|
||||||
parity: Option<Parity>,
|
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.
|
/// Common configurations for UART.
|
||||||
|
|
Loading…
Reference in a new issue