xiaoxiang781216 commented on code in PR #8454:
URL: https://github.com/apache/nuttx/pull/8454#discussion_r1098934188
##########
drivers/serial/serial.c:
##########
@@ -1647,21 +1653,25 @@ int uart_register(FAR const char *path, FAR uart_dev_t
*dev)
dev->pid = INVALID_PROCESS_ID;
#endif
-#ifdef CONFIG_SERIAL_TERMIOS
/* If this UART is a serial console */
if (dev->isconsole)
{
+#ifdef CONFIG_SERIAL_TERMIOS
/* Enable signals by default */
dev->tc_lflag |= ISIG;
/* Enable \n -> \r\n translation for the console */
dev->tc_oflag = OPOST | ONLCR;
- }
#endif
+ /* Convert CR to LF by default for console */
+
+ dev->tc_iflag |= ICRNL;
Review Comment:
Move into `#ifdef CONFIG_SERIAL_TERMIOS/#endif` block like tc_oflag.
let's follow how tc_oflag get processed specially for console in case of
CONFIG_SERIAL_TERMIOS isn't enable.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]