Struct lpc82x_hal::usart::BaudRate[][src]

pub struct BaudRate<'frg> { /* fields omitted */ }

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]

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

impl<'frg> !Send for BaudRate<'frg>

impl<'frg> !Sync for BaudRate<'frg>