You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/02/07 16:54:43 UTC
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8454: driver/serial: Convert CR to LF in driver
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:
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org