From 033adeced432514636f5224caf25de4effecf2fc Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Mon, 19 Dec 2022 06:34:07 -0800 Subject: [PATCH] imxrt:serial:Fix selection of RTS to iflow --- arch/arm/src/imxrt/imxrt_serial.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/imxrt/imxrt_serial.c b/arch/arm/src/imxrt/imxrt_serial.c index 301e647a44d..e95ae4f4a22 100644 --- a/arch/arm/src/imxrt/imxrt_serial.c +++ b/arch/arm/src/imxrt/imxrt_serial.c @@ -1578,15 +1578,15 @@ static int imxrt_setup(struct uart_dev_s *dev) config.parity = priv->parity; /* 0=none, 1=odd, 2=even */ config.bits = priv->bits; /* Number of bits (5-9) */ config.stopbits2 = priv->stopbits2; /* true: Configure with 2 stop bits instead of 1 */ -#ifdef CONFIG_SERIAL_IFLOWCONTROL - config.usects = priv->iflow; /* Flow control on inbound side */ -#endif #ifdef CONFIG_SERIAL_OFLOWCONTROL - /* Flow control on outbound side if not GPIO based */ + config.usects = priv->oflow; /* Flow control on outbound side */ +#endif +#ifdef CONFIG_SERIAL_IFLOWCONTROL + /* Flow control on inbound side if not GPIO based */ if ((priv->rts_gpio & GPIO_MODE_MASK) == GPIO_PERIPH) { - config.userts = priv->oflow; + config.userts = priv->iflow; } #endif