#[repr(C)]pub struct SerialIoMode {
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: ControlBitsBitmask of the control bits that this device supports.
timeout: u32If applicable, the number of microseconds to wait before assuming an operation timed out.
baud_rate: u64Device’s baud rate, or 0 if unknown.
receive_fifo_depth: u32Size in character’s of the device’s buffer.
data_bits: u32Number of data bits in each character.
parity: ParityIf applicable, the parity that is computed or checked for each character.
stop_bits: StopBitsIf applicable, the number of stop bits per character.
Trait Implementations§
Source§impl Clone for SerialIoMode
impl Clone for SerialIoMode
Source§fn clone(&self) -> SerialIoMode
fn clone(&self) -> SerialIoMode
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SerialIoMode
impl Debug for SerialIoMode
Source§impl Ord for SerialIoMode
impl Ord for SerialIoMode
Source§impl PartialEq for SerialIoMode
impl PartialEq for SerialIoMode
Source§impl PartialOrd for SerialIoMode
impl PartialOrd for SerialIoMode
Source§fn partial_cmp(&self, other: &SerialIoMode) -> Option<Ordering>
fn partial_cmp(&self, other: &SerialIoMode) -> Option<Ordering>
impl Copy for SerialIoMode
impl Eq for SerialIoMode
impl StructuralPartialEq for SerialIoMode
Auto Trait Implementations§
impl Freeze for SerialIoMode
impl RefUnwindSafe for SerialIoMode
impl Send for SerialIoMode
impl Sync for SerialIoMode
impl Unpin for SerialIoMode
impl UnwindSafe for SerialIoMode
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)