#[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
pub fn with_baudrate_tolerance( self, baudrate_tolerance: BaudrateTolerance, ) -> Self
Assign the given value to the baudrate_tolerance
field.
Sourcepub fn baudrate_tolerance(&self) -> BaudrateTolerance
pub fn baudrate_tolerance(&self) -> BaudrateTolerance
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_clock_source(self, clock_source: ClockSource) -> Self
pub fn with_clock_source(self, clock_source: ClockSource) -> Self
Assign the given value to the clock_source
field.
Sourcepub fn clock_source(&self) -> ClockSource
pub fn clock_source(&self) -> ClockSource
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, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)