Struct arduino_hal::usart::Baudrate
source · pub struct Baudrate<CLOCK> {
pub ubrr: u16,
pub u2x: bool,
pub _clock: PhantomData<CLOCK>,
}
Expand description
Representation of a USART baudrate
Precalculated parameters for configuring a certain USART baudrate.
Fields§
§ubrr: u16
Value of the UBRR#
register
u2x: bool
Value of the U2X#
bit
_clock: PhantomData<CLOCK>
The baudrate calculation depends on the configured clock rate, thus a CLOCK
generic
parameter is needed.
Implementations§
Trait Implementations§
source§impl<CLOCK> Ord for Baudrate<CLOCK>where
CLOCK: Clock,
impl<CLOCK> Ord for Baudrate<CLOCK>where
CLOCK: Clock,
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<CLOCK> PartialEq for Baudrate<CLOCK>where
CLOCK: Clock,
impl<CLOCK> PartialEq for Baudrate<CLOCK>where
CLOCK: Clock,
source§impl<CLOCK> PartialOrd for Baudrate<CLOCK>where
CLOCK: Clock,
impl<CLOCK> PartialOrd for Baudrate<CLOCK>where
CLOCK: Clock,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<CLOCK> Copy for Baudrate<CLOCK>where
CLOCK: Copy,
impl<CLOCK> Eq for Baudrate<CLOCK>where
CLOCK: Clock,
Auto Trait Implementations§
impl<CLOCK> Freeze for Baudrate<CLOCK>
impl<CLOCK> RefUnwindSafe for Baudrate<CLOCK>where
CLOCK: RefUnwindSafe,
impl<CLOCK> Send for Baudrate<CLOCK>where
CLOCK: Send,
impl<CLOCK> Sync for Baudrate<CLOCK>where
CLOCK: Sync,
impl<CLOCK> Unpin for Baudrate<CLOCK>where
CLOCK: Unpin,
impl<CLOCK> UnwindSafe for Baudrate<CLOCK>where
CLOCK: UnwindSafe,
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