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> PartialOrd for Baudrate<CLOCK>
impl<CLOCK: Clock> PartialOrd for Baudrate<CLOCK>
impl<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