diff options
| author | Andrew Leech | 2019-07-31 14:45:05 +1000 |
|---|---|---|
| committer | Damien George | 2019-09-27 13:24:01 +1000 |
| commit | 4ba0aff4727d08f91ac5b1c8172a35e937583931 (patch) | |
| tree | 7d1236ad25a58b673da9f0544dd4af0fcc79a070 | |
| parent | eb12fa38624a6bb4b71ef72f2aadc0f7ca8f27d1 (diff) | |
stm32/uart: Add RTS/CTS pin configuration support to UART4.
| -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 |
