cpu/esp_common/periph_uart: fix call to _uart_set_mode#18720
cpu/esp_common/periph_uart: fix call to _uart_set_mode#18720gschorcht merged 1 commit intoRIOT-OS:masterfrom
Conversation
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.
Murdock results✔️ PASSED 6d874c2 cpu/esp_common/periph_uart: fix call to _uart_set_mode
ArtifactsThis only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now. |
|
OK, stdio still works. The line that is changed is only triggered in The test application in It may be worth looking into what caused the crash there. |
|
👍 good catch. |
I can't reproduce this problem, I just get |
What board and what configuration did you use for |
|
Note that you need to "short" the RX to the TX pin or |
I did it, but I tried it with following configuration: I still get Using GPIO9 and GPIO10 for |
|
Thx :) |
Contribution description
The parameters for parity and stop bits was confused, resulting in the following compilation error with GCC 12.2.0:
This swaps the parameters.
Testing procedure
The output of e.g.
examples/hello_worldon ESP boards connected via UART should still be readable after this change.I am not sure why UART works correctly. Maybe there is a second parameter order confusion somewhere that negates the bug?
BEWARE: This is untested
Issues/PRs references
None