Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _UAPI_ASM_GENERIC_TERMIOS_H
0003 #define _UAPI_ASM_GENERIC_TERMIOS_H
0004 /*
0005  * Most architectures have straight copies of the x86 code, with
0006  * varying levels of bug fixes on top. Usually it's a good idea
0007  * to use this generic version instead, but be careful to avoid
0008  * ABI changes.
0009  * New architectures should not provide their own version.
0010  */
0011 
0012 #include <asm/termbits.h>
0013 #include <asm/ioctls.h>
0014 
0015 struct winsize {
0016     unsigned short ws_row;
0017     unsigned short ws_col;
0018     unsigned short ws_xpixel;
0019     unsigned short ws_ypixel;
0020 };
0021 
0022 #define NCC 8
0023 struct termio {
0024     unsigned short c_iflag;     /* input mode flags */
0025     unsigned short c_oflag;     /* output mode flags */
0026     unsigned short c_cflag;     /* control mode flags */
0027     unsigned short c_lflag;     /* local mode flags */
0028     unsigned char c_line;       /* line discipline */
0029     unsigned char c_cc[NCC];    /* control characters */
0030 };
0031 
0032 /* modem lines */
0033 #define TIOCM_LE    0x001
0034 #define TIOCM_DTR   0x002
0035 #define TIOCM_RTS   0x004
0036 #define TIOCM_ST    0x008
0037 #define TIOCM_SR    0x010
0038 #define TIOCM_CTS   0x020
0039 #define TIOCM_CAR   0x040
0040 #define TIOCM_RNG   0x080
0041 #define TIOCM_DSR   0x100
0042 #define TIOCM_CD    TIOCM_CAR
0043 #define TIOCM_RI    TIOCM_RNG
0044 #define TIOCM_OUT1  0x2000
0045 #define TIOCM_OUT2  0x4000
0046 #define TIOCM_LOOP  0x8000
0047 
0048 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
0049 
0050 
0051 #endif /* _UAPI_ASM_GENERIC_TERMIOS_H */