summaryrefslogtreecommitdiff
path: root/ports/stm32/main.c
diff options
context:
space:
mode:
authorennyKey <ennyKey@fn.de>2024-12-04 17:52:42 +0100
committerDamien George <damien@micropython.org>2025-10-30 12:30:26 +1100
commit4efc5e12b94082af16520e73ecdd53a67ceddfcf (patch)
tree7757c5bfe4887d3c4cacf3dba6b0335434bd0d38 /ports/stm32/main.c
parente58425a5133399215e3a70bae2add40d78555ef9 (diff)
stm32/machine_uart: Implement TX/RX inversion parameter for UART on H7.
Implemented the keyword-only parameter `invert` for the `UART.init` method in accordance with the docs: - added constants `UART.INV_TX` and `UART.INV_RX` - added the new `invert` keyword parameter to the `uart_init` function - adapted the `uart_init` call - added invert setting to `uart_print` output The feature applies only to STM32H7. Signed-off-by: ennyKey <ennyKey@fn.de>
Diffstat (limited to 'ports/stm32/main.c')
-rw-r--r--ports/stm32/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/stm32/main.c b/ports/stm32/main.c
index 9ac2b4490..1c59b6479 100644
--- a/ports/stm32/main.c
+++ b/ports/stm32/main.c
@@ -502,7 +502,7 @@ void stm32_main(uint32_t reset_mode) {
pyb_uart_repl_obj.is_static = true;
pyb_uart_repl_obj.timeout = 0;
pyb_uart_repl_obj.timeout_char = 2;
- uart_init(&pyb_uart_repl_obj, MICROPY_HW_UART_REPL_BAUD, UART_WORDLENGTH_8B, UART_PARITY_NONE, UART_STOPBITS_1, 0);
+ uart_init(&pyb_uart_repl_obj, MICROPY_HW_UART_REPL_BAUD, UART_WORDLENGTH_8B, UART_PARITY_NONE, UART_STOPBITS_1, 0, 0);
uart_set_rxbuf(&pyb_uart_repl_obj, sizeof(pyb_uart_repl_rxbuf), pyb_uart_repl_rxbuf);
uart_attach_to_repl(&pyb_uart_repl_obj, true);
MP_STATE_PORT(machine_uart_obj_all)[MICROPY_HW_UART_REPL - 1] = &pyb_uart_repl_obj;