mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #11205 from yegorich/pr/uart/stm32/fix-data-bits
cpu/stm32_common: use correct data bits macro
This commit is contained in:
commit
005275a1e9
@ -181,7 +181,11 @@ int uart_mode(uart_t uart, uart_data_bits_t data_bits, uart_parity_t parity,
|
||||
isr_ctx[uart].data_mask = 0x7F;
|
||||
break;
|
||||
case UART_DATA_BITS_8:
|
||||
#ifdef USART_CR1_M0
|
||||
data_bits = USART_CR1_M0;
|
||||
#else
|
||||
data_bits = USART_CR1_M;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
return UART_NOMODE;
|
||||
@ -196,7 +200,6 @@ int uart_mode(uart_t uart, uart_data_bits_t data_bits, uart_parity_t parity,
|
||||
return UART_INTERR;
|
||||
}
|
||||
dev(uart)->CR1 &= ~(USART_CR1_UE | USART_CR1_TE);
|
||||
dev(uart)->CR1 &= ~USART_CR1_M1;
|
||||
#endif
|
||||
|
||||
dev(uart)->CR2 &= ~USART_CR2_STOP;
|
||||
|
Loading…
Reference in New Issue
Block a user