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§
source§impl<CLOCK: Clock> Ord for Baudrate<CLOCK>
impl<CLOCK: Clock> Ord for Baudrate<CLOCK>
source§impl<CLOCK: Clock> PartialEq for Baudrate<CLOCK>
impl<CLOCK: Clock> PartialEq for Baudrate<CLOCK>
source§impl<CLOCK: Clock> PartialOrd for Baudrate<CLOCK>
impl<CLOCK: Clock> PartialOrd for Baudrate<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> Copy for Baudrate<CLOCK>
impl<CLOCK: Clock> Eq for Baudrate<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