#[repr(C)]pub struct UART_InitTypeDef {
pub BaudRate: u32,
pub WordLength: u32,
pub StopBits: u32,
pub Parity: u32,
pub Mode: u32,
pub HwFlowCtl: u32,
pub OverSampling: u32,
}Expand description
@brief UART Init Structure definition
Fields§
§BaudRate: u32< This member configures the UART communication baud rate. The baud rate is computed using the following formula:
- IntegerDivider = ((PCLKx) / (16 * (huart->Init.BaudRate)))
- FractionalDivider = ((IntegerDivider - ((uint32_t) IntegerDivider)) * 16) + 0.5
WordLength: u32< Specifies the number of data bits transmitted or received in a frame. This parameter can be a value of @ref UART_Word_Length
StopBits: u32< Specifies the number of stop bits transmitted. This parameter can be a value of @ref UART_Stop_Bits
Parity: u32< Specifies the parity mode. This parameter can be a value of @ref UART_Parity @note When parity is enabled, the computed parity is inserted at the MSB position of the transmitted data (9th bit when the word length is set to 9 data bits; 8th bit when the word length is set to 8 data bits).
Mode: u32< Specifies whether the Receive or Transmit mode is enabled or disabled. This parameter can be a value of @ref UART_Mode
HwFlowCtl: u32< Specifies whether the hardware flow control mode is enabled or disabled. This parameter can be a value of @ref UART_Hardware_Flow_Control
OverSampling: u32< Specifies whether the Over sampling 8 or Over sampling 16. This parameter can be a value of @ref UART_Over_Sampling.
Trait Implementations§
Source§impl Clone for UART_InitTypeDef
impl Clone for UART_InitTypeDef
Source§fn clone(&self) -> UART_InitTypeDef
fn clone(&self) -> UART_InitTypeDef
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more