[−][src]Struct lpc82x_hal::usart::BaudRate
Represents a UART baud rate
Can be passed to USART::enable
to configure the baud rate for a USART
peripheral.
Methods
impl<'frg> BaudRate<'frg>
[src]
pub fn new(uartfrg: &'frg UARTFRG, brgval: u16) -> Self
[src]
Create a BaudRate
instance
Creates a BaudRate
instance from two components: A reference to the
UARTFRG
and the BRGVAL.
The UARTFRG
controls U_PCLK, the clock that is shared by all USART
peripherals. Please configure it before attempting to create a
BaudRate
. By keeping a reference to it, BaudRate
ensures that U_PCLK
cannot be changes as long as the BaudRate
instance exists.
BRGVAL is an additional divider value that divides the shared baud rate
to allow individual USART peripherals to use different baud rates. A
value of 0
means that U_PCLK is used directly, 1
means that U_PCLK
is divided by 2 before using it, 2
means it's divided by 3, and so on.
Please refer to the user manual, section 13.3.1, for further details.
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,