Skip to content

Commit 71fd98e

Browse files
wdfk-progRbb666
authored andcommitted
fix(serial): only apply CRLF translation in STREAM mode for poll tx
1 parent 643581b commit 71fd98e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/drivers/serial/dev_serial_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ rt_ssize_t _serial_poll_tx(struct rt_device *dev,
441441

442442
while (size)
443443
{
444-
if (serial->parent.open_flag & RT_DEVICE_FLAG_STREAM || (dev == rt_console_get_device()))
444+
if (serial->parent.open_flag & RT_DEVICE_FLAG_STREAM)
445445
{
446446
/* If open_flag satisfies RT_DEVICE_FLAG_STREAM and the received character is '\n',
447447
* inserts '\r' character before '\n' character for the effect of carriage return newline */

0 commit comments

Comments
 (0)