diff options
-rw-r--r-- | ports/stm32/uart.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ports/stm32/uart.c b/ports/stm32/uart.c index f577eb787..72bb53f80 100644 --- a/ports/stm32/uart.c +++ b/ports/stm32/uart.c @@ -254,6 +254,16 @@ bool uart_init(pyb_uart_obj_t *uart_obj, #endif pins[0] = MICROPY_HW_UART4_TX; pins[1] = MICROPY_HW_UART4_RX; + #if defined(MICROPY_HW_UART4_RTS) + if (flow & UART_HWCONTROL_RTS) { + pins[2] = MICROPY_HW_UART4_RTS; + } + #endif + #if defined(MICROPY_HW_UART4_CTS) + if (flow & UART_HWCONTROL_CTS) { + pins[3] = MICROPY_HW_UART4_CTS; + } + #endif break; #endif |