Lines Matching defs:init
107 const struct stm32_uart_init_s *init)
121 int_div = clockfreq / init->baud_rate;
124 init->baud_rate,
125 init->prescaler);
132 init->baud_rate,
133 init->prescaler) &
143 * - set the M bits according to init->word_length value,
144 * - set PCE and PS bits according to init->parity value,
145 * - set TE and RE bits according to init->mode value,
148 tmpreg = init->word_length |
149 init->parity |
150 init->mode |
152 init->fifo_mode;
158 * to init->stop_bits value.
161 init->stop_bits);
167 * to init->hw_flow_control value,
169 * according to init->one_bit_sampling (not applicable to
171 * - set TXFTCFG bit according to init->tx_fifo_threshold value,
172 * - set RXFTCFG bit according to init->rx_fifo_threshold value.
174 tmpreg = init->hw_flow_control | init->one_bit_sampling;
176 if (init->fifo_mode == USART_CR1_FIFOEN) {
177 tmpreg |= init->tx_fifo_threshold |
178 init->rx_fifo_threshold;
186 * init->prescaler value.
188 assert(init->prescaler < STM32_UART_PRESCALER_NB);
190 init->prescaler);
247 static unsigned int stm32_uart_rdr_mask(const struct stm32_uart_init_s *init)
251 switch (init->word_length) {
265 if (init->parity != STM32_UART_PARITY_NONE) {
302 * @param init: UART initialization parameter.
307 const struct stm32_uart_init_s *init)
314 if (huart == NULL || init == NULL || base_addr == 0U) {
350 huart->rdr_mask = stm32_uart_rdr_mask(init);
353 ret = uart_set_config(huart, init);