This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit beadd2d9059c2a5430d1079f87e74d478746197d
Author: yangsong8 <[email protected]>
AuthorDate: Sat Nov 28 05:49:24 2026 +0800

    drivers/serial/uart_rpmsg: set up the terminal with uart_termios_init()
    
    uart_termios_init() fills in every field of struct uart_termios_s,
    including the INTR, SUSP, VMIN and VTIME settings that serial and pty
    already get from it, while uart_rpmsg set only iflag, oflag and lflag,
    and only for a console. Use it for every device.
    
    This is the uart_rpmsg part of the change that added the helper; the
    rest is in master already as commit 2f890e5b0f2 ("drivers/serial: keep
    the c_cc settings in the termios helpers").
    
    Signed-off-by: yangsong8 <[email protected]>
    Signed-off-by: Bowen Wang <[email protected]>
---
 drivers/serial/uart_rpmsg.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/uart_rpmsg.c b/drivers/serial/uart_rpmsg.c
index a4f5e772bd9..8837cf0fd0c 100644
--- a/drivers/serial/uart_rpmsg.c
+++ b/drivers/serial/uart_rpmsg.c
@@ -838,9 +838,11 @@ int uart_rpmsg_init(FAR const char *cpuname, FAR const 
char *devname,
 
   if (isconsole)
     {
-      priv->termios.iflag = ICRNL;
-      priv->termios.oflag = OPOST | ONLCR;
-      priv->termios.lflag = ECHO | ISIG;
+      uart_termios_init(&priv->termios, ICRNL, OPOST | ONLCR, ECHO | ISIG);
+    }
+  else
+    {
+      uart_termios_init(&priv->termios, 0, 0, 0);
     }
 
 #if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)

Reply via email to