18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci#ifndef _UAPI_ASM_GENERIC_TERMIOS_H 38c2ecf20Sopenharmony_ci#define _UAPI_ASM_GENERIC_TERMIOS_H 48c2ecf20Sopenharmony_ci/* 58c2ecf20Sopenharmony_ci * Most architectures have straight copies of the x86 code, with 68c2ecf20Sopenharmony_ci * varying levels of bug fixes on top. Usually it's a good idea 78c2ecf20Sopenharmony_ci * to use this generic version instead, but be careful to avoid 88c2ecf20Sopenharmony_ci * ABI changes. 98c2ecf20Sopenharmony_ci * New architectures should not provide their own version. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <asm/termbits.h> 138c2ecf20Sopenharmony_ci#include <asm/ioctls.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_cistruct winsize { 168c2ecf20Sopenharmony_ci unsigned short ws_row; 178c2ecf20Sopenharmony_ci unsigned short ws_col; 188c2ecf20Sopenharmony_ci unsigned short ws_xpixel; 198c2ecf20Sopenharmony_ci unsigned short ws_ypixel; 208c2ecf20Sopenharmony_ci}; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define NCC 8 238c2ecf20Sopenharmony_cistruct termio { 248c2ecf20Sopenharmony_ci unsigned short c_iflag; /* input mode flags */ 258c2ecf20Sopenharmony_ci unsigned short c_oflag; /* output mode flags */ 268c2ecf20Sopenharmony_ci unsigned short c_cflag; /* control mode flags */ 278c2ecf20Sopenharmony_ci unsigned short c_lflag; /* local mode flags */ 288c2ecf20Sopenharmony_ci unsigned char c_line; /* line discipline */ 298c2ecf20Sopenharmony_ci unsigned char c_cc[NCC]; /* control characters */ 308c2ecf20Sopenharmony_ci}; 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci/* modem lines */ 338c2ecf20Sopenharmony_ci#define TIOCM_LE 0x001 348c2ecf20Sopenharmony_ci#define TIOCM_DTR 0x002 358c2ecf20Sopenharmony_ci#define TIOCM_RTS 0x004 368c2ecf20Sopenharmony_ci#define TIOCM_ST 0x008 378c2ecf20Sopenharmony_ci#define TIOCM_SR 0x010 388c2ecf20Sopenharmony_ci#define TIOCM_CTS 0x020 398c2ecf20Sopenharmony_ci#define TIOCM_CAR 0x040 408c2ecf20Sopenharmony_ci#define TIOCM_RNG 0x080 418c2ecf20Sopenharmony_ci#define TIOCM_DSR 0x100 428c2ecf20Sopenharmony_ci#define TIOCM_CD TIOCM_CAR 438c2ecf20Sopenharmony_ci#define TIOCM_RI TIOCM_RNG 448c2ecf20Sopenharmony_ci#define TIOCM_OUT1 0x2000 458c2ecf20Sopenharmony_ci#define TIOCM_OUT2 0x4000 468c2ecf20Sopenharmony_ci#define TIOCM_LOOP 0x8000 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#endif /* _UAPI_ASM_GENERIC_TERMIOS_H */ 52