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.
|
||||
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.
|
||||
|
|
Loading…
Reference in a new issue