You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2021/01/14 07:34:57 UTC
[incubator-nuttx-apps] branch master updated: examples/pty_test:
Fix the hardcode uart device path
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 95a0684 examples/pty_test: Fix the hardcode uart device path
95a0684 is described below
commit 95a06846bca33fd8778044eeb2ef46e35c038361
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Wed Jan 13 17:03:57 2021 +0800
examples/pty_test: Fix the hardcode uart device path
should be CONFIG_EXAMPLES_PTYTEST_SERIALDEV, regression in commit:
commit 6ddbffd2000fb62c71914c6f57c93f2e7d1f50e8
Author: Xiang Xiao <xi...@xiaomi.com>
Date: Sun Jan 3 23:50:50 2021 -0800
examples/pty_test: Remove O_NONBLOCK from open
to avoid the log storm:
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
...
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
examples/pty_test/pty_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/pty_test/pty_test.c b/examples/pty_test/pty_test.c
index ffa09ee..dcd5db3 100644
--- a/examples/pty_test/pty_test.c
+++ b/examples/pty_test/pty_test.c
@@ -311,7 +311,7 @@ int main(int argc, FAR char *argv[])
/* Open the second serial port to create a new console there */
- termpair.fd_uart = open("/dev/console", O_RDWR);
+ termpair.fd_uart = open(CONFIG_EXAMPLES_PTYTEST_SERIALDEV, O_RDWR);
if (termpair.fd_uart < 0)
{
#ifdef CONFIG_EXAMPLES_PTYTEST_WAIT_CONNECTED