Skip to content

Commit

Permalink
driver/serial: Echo only determined by ECHO flag with termios enabled
Browse files Browse the repository at this point in the history
Fix a bug that can not disable echo even if termios is enabled.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
  • Loading branch information
no1wudi authored and pkarashchenko committed Mar 3, 2023
1 parent 392eebf commit 44857ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/serial/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,11 @@ static ssize_t uart_read(FAR struct file *filep,
*buffer++ = ch;
recvd++;

if (dev->isconsole
if (
#ifdef CONFIG_SERIAL_TERMIOS
|| (dev->tc_iflag & ECHO)
dev->tc_iflag & ECHO
#else
dev->isconsole
#endif
)
{
Expand Down

0 comments on commit 44857ab

Please sign in to comment.