mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/esp_common/periph_uart: fix call to _uart_set_mode
The parameters for parity and stop bits was confused, resulting in the following compilation error with GCC 12.2.0: /home/maribu/Repos/software/RIOT/cpu/esp_common/periph/uart.c: In function '_uart_config': /home/maribu/Repos/software/RIOT/cpu/esp_common/periph/uart.c:394:61: error: implicit conversion from 'uart_stop_bits_t' to 'uart_parity_t' -Werror=enum-conversion] 394 | if (_uart_set_mode(uart, _uarts[uart].data, _uarts[uart].stop, | ~~~~~~~~~~~~^~~~~ /home/maribu/Repos/software/RIOT/cpu/esp_common/periph/uart.c:395:42: error: implicit conversion from 'uart_parity_t' to 'uart_stop_bits_t' -Werror=enum-conversion] 395 | _uarts[uart].parity) != UART_OK) { | ~~~~~~~~~~~~^~~~~~~ cc1: all warnings being treated as errors This swaps the parameters.
This commit is contained in:
parent
abf0883e44
commit
6d874c2882
@ -391,8 +391,8 @@ static void _uart_config(uart_t uart)
|
||||
}
|
||||
|
||||
/* set number of data bits, stop bits and parity mode */
|
||||
if (_uart_set_mode(uart, _uarts[uart].data, _uarts[uart].stop,
|
||||
_uarts[uart].parity) != UART_OK) {
|
||||
if (_uart_set_mode(uart, _uarts[uart].data, _uarts[uart].parity,
|
||||
_uarts[uart].stop) != UART_OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user