#[repr(C)]pub struct IoMode {
pub control_mask: ControlBits,
pub timeout: u32,
pub baud_rate: u64,
pub receive_fifo_depth: u32,
pub data_bits: u32,
pub parity: Parity,
pub stop_bits: StopBits,
}
Expand description
Structure representing the device’s current parameters.
The default values for all UART-like devices is:
- 115,200 baud
- 1 byte receive FIFO
- 1’000’000 microsecond timeout
- no parity
- 8 data bits
- 1 stop bit
The software is responsible for flow control.
Fields
control_mask: ControlBits
Bitmask of the control bits that this device supports.
timeout: u32
If applicable, the number of microseconds to wait before assuming an operation timed out.
baud_rate: u64
Device’s baud rate, or 0 if unknown.
receive_fifo_depth: u32
Size in character’s of the device’s buffer.
data_bits: u32
Number of data bits in each character.
parity: Parity
If applicable, the parity that is computed or checked for each character.
stop_bits: StopBits
If applicable, the number of stop bits per character.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for IoMode
impl Send for IoMode
impl Sync for IoMode
impl Unpin for IoMode
impl UnwindSafe for IoMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more