Struct avr_hal_generic::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
sourceimpl<CLOCK: Clock> Ord for Baudrate<CLOCK>
impl<CLOCK: Clock> Ord for Baudrate<CLOCK>
sourceimpl<CLOCK: Clock> PartialOrd<Baudrate<CLOCK>> for Baudrate<CLOCK>
impl<CLOCK: Clock> PartialOrd<Baudrate<CLOCK>> for Baudrate<CLOCK>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl<CLOCK: Copy> Copy for Baudrate<CLOCK>
impl<CLOCK: Clock> Eq for Baudrate<CLOCK>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more