diff --git a/arch/arm/src/stm32f0/stm32f0_serial.c b/arch/arm/src/stm32f0/stm32f0_serial.c index 3a188917ee..824d8a7361 100644 --- a/arch/arm/src/stm32f0/stm32f0_serial.c +++ b/arch/arm/src/stm32f0/stm32f0_serial.c @@ -1665,7 +1665,7 @@ static int stm32f0serial_ioctl(FAR struct file *filep, int cmd, /* Perform some sanity checks before accepting any changes */ if (((termiosp->c_cflag & CSIZE) != CS8) -#ifdef CONFIG_SERIAL_IFLOWCONTROL +#ifdef CONFIG_SERIAL_OFLOWCONTROL || ((termiosp->c_cflag & CCTS_OFLOW) && (priv->cts_gpio == 0)) #endif #ifdef CONFIG_SERIAL_IFLOWCONTROL diff --git a/arch/arm/src/stm32f7/stm32_serial.c b/arch/arm/src/stm32f7/stm32_serial.c index b20227489a..d9e037a08e 100644 --- a/arch/arm/src/stm32f7/stm32_serial.c +++ b/arch/arm/src/stm32f7/stm32_serial.c @@ -2196,7 +2196,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg) /* Perform some sanity checks before accepting any changes */ if (((termiosp->c_cflag & CSIZE) != CS8) -#ifdef CONFIG_SERIAL_IFLOWCONTROL +#ifdef CONFIG_SERIAL_OFLOWCONTROL || ((termiosp->c_cflag & CCTS_OFLOW) && (priv->cts_gpio == 0)) #endif #ifdef CONFIG_SERIAL_IFLOWCONTROL diff --git a/arch/arm/src/stm32h7/stm32_serial.c b/arch/arm/src/stm32h7/stm32_serial.c index 897114de66..8254b55505 100644 --- a/arch/arm/src/stm32h7/stm32_serial.c +++ b/arch/arm/src/stm32h7/stm32_serial.c @@ -1603,7 +1603,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg) /* Perform some sanity checks before accepting any changes */ if (((termiosp->c_cflag & CSIZE) != CS8) -#ifdef CONFIG_SERIAL_IFLOWCONTROL +#ifdef CONFIG_SERIAL_OFLOWCONTROL || ((termiosp->c_cflag & CCTS_OFLOW) && (priv->cts_gpio == 0)) #endif #ifdef CONFIG_SERIAL_IFLOWCONTROL diff --git a/arch/arm/src/stm32l4/stm32l4_serial.c b/arch/arm/src/stm32l4/stm32l4_serial.c index fcb3414c54..e9b5548e22 100644 --- a/arch/arm/src/stm32l4/stm32l4_serial.c +++ b/arch/arm/src/stm32l4/stm32l4_serial.c @@ -1857,7 +1857,7 @@ static int stm32l4serial_ioctl(FAR struct file *filep, int cmd, /* Perform some sanity checks before accepting any changes */ if (((termiosp->c_cflag & CSIZE) != CS8) -#ifdef CONFIG_SERIAL_IFLOWCONTROL +#ifdef CONFIG_SERIAL_OFLOWCONTROL || ((termiosp->c_cflag & CCTS_OFLOW) && (priv->cts_gpio == 0)) #endif #ifdef CONFIG_SERIAL_IFLOWCONTROL