tmedicci commented on PR #8691:
URL: https://github.com/apache/nuttx/pull/8691#issuecomment-1454749739
> @tmedicci @lucasssvaz Thanks for your information,I'll take a look soon.
>
> Could you share which config used in your report?
Apparently, any configuration throws the same behavior. I used
`esp32-devkitc:nsh`.
Maybe we should add the CR when `\n` is detected.
```
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index ddaeb20112..a3f1d41a66 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -918,9 +918,11 @@ static ssize_t uart_read(FAR struct file *filep,
if ((!iscntrl(ch & 0xff) || (ch == '\n')) && dev->escape == 0)
{
+ if (ch == '\n')
{
- uart_putxmitchar(dev, ch, true);
+ uart_putxmitchar(dev, '\r', true);
}
+ uart_putxmitchar(dev, ch, true);
}
/* Skipping character count down */
```
--
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]