mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
libc: Implement terminal api regardless of CONFIG_SERIAL_TERMIOS setting
since many functions aren't related to termios directly Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Gustavo Henrique Nihei
parent
228442ee23
commit
4262b09cbf
@@ -21,8 +21,6 @@
|
||||
# termios.h support requires file descriptors and that CONFIG_SERIAL_TERMIOS
|
||||
# is defined
|
||||
|
||||
ifeq ($(CONFIG_SERIAL_TERMIOS),y)
|
||||
|
||||
# Add the termios C files to the build
|
||||
|
||||
CSRCS += lib_cfspeed.c lib_cfmakeraw.c lib_isatty.c lib_tcflush.c
|
||||
@@ -33,5 +31,3 @@ CSRCS += lib_ttyname.c lib_ttynamer.c
|
||||
|
||||
DEPPATH += --dep-path termios
|
||||
VPATH += termios
|
||||
|
||||
endif
|
||||
|
||||
@@ -60,5 +60,5 @@
|
||||
|
||||
int tcgetattr(int fd, FAR struct termios *termiosp)
|
||||
{
|
||||
return ioctl(fd, TCGETS, (unsigned long)termiosp);
|
||||
return ioctl(fd, TCGETS, (unsigned long)(uintptr_t)termiosp);
|
||||
}
|
||||
|
||||
@@ -93,5 +93,5 @@ int tcsetattr(int fd, int options, FAR const struct termios *termiosp)
|
||||
tcflush(fd, TCIFLUSH);
|
||||
}
|
||||
|
||||
return ioctl(fd, TCSETS, (unsigned long)termiosp);
|
||||
return ioctl(fd, TCSETS, (unsigned long)(uintptr_t)termiosp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user