You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "hartmannathan (via GitHub)" <gi...@apache.org> on 2023/02/01 23:31:22 UTC

[GitHub] [nuttx] hartmannathan commented on a diff in pull request #8406: tiva/serial: Allow changing CTS/RTS with termios

hartmannathan commented on code in PR #8406:
URL: https://github.com/apache/nuttx/pull/8406#discussion_r1093849272


##########
arch/arm/src/tiva/common/tiva_serial.c:
##########
@@ -871,12 +871,36 @@ static void up_set_format(struct uart_dev_s *dev)
 
   up_serialout(priv, TIVA_UART_LCRH_OFFSET, lcrh);
 
+  /* Enable or disable CTS/RTS, if applicable */
+
+#if defined(CONFIG_SERIAL_IFLOWCONTROL)
+  if (priv->iflow)
+    {
+      ctl |= UART_CTL_RTSEN;
+    }
+  else
+    {
+      ctl &= ~(UART_CTL_RTSEN);
+    }
+#endif
+
+#if defined(CONFIG_SERIAL_OFLOWCONTROL)
+  if (priv->oflow)
+    {
+      ctl |= UART_CTL_CTSEN;
+    }
+  else
+    {
+      ctl &= ~(UART_CTL_CTSEN);

Review Comment:
   Applied fix. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org