#[non_exhaustive]pub struct Config { /* private fields */ }Expand description
UART Configuration
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_baudrate(self, baudrate: u32) -> Self
pub fn with_baudrate(self, baudrate: u32) -> Self
Assign the given value to the baudrate field.
Sourcepub fn baudrate(&self) -> u32
pub fn baudrate(&self) -> u32
The baud rate (speed) of the UART communication in bits per second (bps).
Sourcepub fn with_baudrate_tolerance(
self,
baudrate_tolerance: BaudrateTolerance,
) -> Self
Available on crate feature unstable only.
pub fn with_baudrate_tolerance( self, baudrate_tolerance: BaudrateTolerance, ) -> Self
unstable only.Assign the given value to the baudrate_tolerance field.
Sourcepub fn baudrate_tolerance(&self) -> BaudrateTolerance
Available on crate feature unstable only.
pub fn baudrate_tolerance(&self) -> BaudrateTolerance
unstable only.Determines how close to the desired baud rate value the driver should set the baud rate.
Sourcepub fn with_data_bits(self, data_bits: DataBits) -> Self
pub fn with_data_bits(self, data_bits: DataBits) -> Self
Assign the given value to the data_bits field.
Sourcepub fn with_parity(self, parity: Parity) -> Self
pub fn with_parity(self, parity: Parity) -> Self
Assign the given value to the parity field.
Sourcepub fn with_stop_bits(self, stop_bits: StopBits) -> Self
pub fn with_stop_bits(self, stop_bits: StopBits) -> Self
Assign the given value to the stop_bits field.
Sourcepub fn with_sw_flow_ctrl(self, sw_flow_ctrl: SwFlowControl) -> Self
Available on crate feature unstable only.
pub fn with_sw_flow_ctrl(self, sw_flow_ctrl: SwFlowControl) -> Self
unstable only.Assign the given value to the sw_flow_ctrl field.
Sourcepub fn sw_flow_ctrl(&self) -> SwFlowControl
Available on crate feature unstable only.
pub fn sw_flow_ctrl(&self) -> SwFlowControl
unstable only.Software flow control.
Sourcepub fn with_hw_flow_ctrl(self, hw_flow_ctrl: HwFlowControl) -> Self
Available on crate feature unstable only.
pub fn with_hw_flow_ctrl(self, hw_flow_ctrl: HwFlowControl) -> Self
unstable only.Assign the given value to the hw_flow_ctrl field.
Sourcepub fn hw_flow_ctrl(&self) -> HwFlowControl
Available on crate feature unstable only.
pub fn hw_flow_ctrl(&self) -> HwFlowControl
unstable only.Hardware flow control.
Sourcepub fn with_clock_source(self, clock_source: ClockSource) -> Self
Available on crate feature unstable only.
pub fn with_clock_source(self, clock_source: ClockSource) -> Self
unstable only.Assign the given value to the clock_source field.
Sourcepub fn clock_source(&self) -> ClockSource
Available on crate feature unstable only.
pub fn clock_source(&self) -> ClockSource
unstable only.Clock source used by the UART peripheral.
Trait Implementations§
impl Copy for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)