pub struct UsartConfig { /* private fields */ }Expand description
Configuration for Usart::new.
Default is 115200 baud, ×16 oversampling, FrameFormat::N8 — i.e. the
usual “115200 8N1”.
Implementations§
Source§impl UsartConfig
impl UsartConfig
Sourcepub const fn baud(self, baud: Bps) -> Self
pub const fn baud(self, baud: Bps) -> Self
Sets the bit rate. See the baud module for named constants.
Sourcepub const fn oversampling(self, oversampling: Oversampling) -> Self
pub const fn oversampling(self, oversampling: Oversampling) -> Self
Sets the oversampling ratio.
Sourcepub const fn frame_format(self, frame_format: FrameFormat) -> Self
pub const fn frame_format(self, frame_format: FrameFormat) -> Self
Sets the word length and parity.
Trait Implementations§
Source§impl Clone for UsartConfig
impl Clone for UsartConfig
Source§fn clone(&self) -> UsartConfig
fn clone(&self) -> UsartConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UsartConfig
Source§impl Default for UsartConfig
impl Default for UsartConfig
impl Eq for UsartConfig
Source§impl Format for UsartConfig
impl Format for UsartConfig
Source§impl PartialEq for UsartConfig
impl PartialEq for UsartConfig
impl StructuralPartialEq for UsartConfig
Auto Trait Implementations§
impl Freeze for UsartConfig
impl RefUnwindSafe for UsartConfig
impl Send for UsartConfig
impl Sync for UsartConfig
impl Unpin for UsartConfig
impl UnsafeUnpin for UsartConfig
impl UnwindSafe for UsartConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more