apps/examples/pty_test: If CONFIG_SERIAL_TERMIOS is not selected, then don't call tcgetattr or tcsetattr.

This commit is contained in:
Gregory Nutt 2016-07-19 14:28:07 -06:00
parent 7f6a21ecac
commit 1a6bb2a47c

View File

@ -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);