提交 83760455 编写于 作者: mysterywolf's avatar mysterywolf

增加unistd.c文件

上级 9b470d44
......@@ -7,3 +7,4 @@
* Date Author Notes
*/
#include "sys/unistd.h"
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-09-01 Meco Man First Version
*/
#include <termios.h>
#include <unistd.h>
#ifdef RT_USING_POSIX_TERMIOS
int isatty(int fd)
{
struct termios ts;
return(tcgetattr(fd,&ts) != -1);/*true if no error (is a tty)*/
}
#endif
char *ttyname(int fd)
{
return "/dev/tty0"; /*TODO: need to add more specific*/
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册