mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-24 09:30:19 +08:00
fix(serial): only apply CRLF translation in STREAM mode for poll tx
This commit is contained in:
@@ -441,7 +441,7 @@ rt_ssize_t _serial_poll_tx(struct rt_device *dev,
|
||||
|
||||
while (size)
|
||||
{
|
||||
if (serial->parent.open_flag & RT_DEVICE_FLAG_STREAM || (dev == rt_console_get_device()))
|
||||
if (serial->parent.open_flag & RT_DEVICE_FLAG_STREAM)
|
||||
{
|
||||
/* If open_flag satisfies RT_DEVICE_FLAG_STREAM and the received character is '\n',
|
||||
* inserts '\r' character before '\n' character for the effect of carriage return newline */
|
||||
|
||||
Reference in New Issue
Block a user