stm32/uart: Add RTS/CTS pin configuration support to UART4.

This commit is contained in:
Andrew Leech 2019-07-31 14:45:05 +10:00 committed by Damien George
parent eb12fa3862
commit 4ba0aff472
1 changed files with 10 additions and 0 deletions

View File

@ -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