mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 08:52:01 +08:00
apps/examples/pty_test: If CONFIG_SERIAL_TERMIOS is not selected, then don't call tcgetattr or tcsetattr.
This commit is contained in:
@@ -324,6 +324,7 @@ int pty_test_main(int argc, char *argv[])
|
||||
goto error_serial;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_TERMIOS
|
||||
/* Enable \n -> \r\n conversion during write */
|
||||
|
||||
ret = tcgetattr(termpair.fd_uart, &tio);
|
||||
@@ -340,6 +341,7 @@ int pty_test_main(int argc, char *argv[])
|
||||
fprintf(stderr, "ERROR: tcsetattr() failed: %d\n", errno);
|
||||
goto error_serial;
|
||||
}
|
||||
#endif
|
||||
|
||||
printf("Starting a new NSH Session using %s\n", buffer);
|
||||
|
||||
|
Reference in New Issue
Block a user