162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef _UAPI_ASM_GENERIC_TERMIOS_H 362306a36Sopenharmony_ci#define _UAPI_ASM_GENERIC_TERMIOS_H 462306a36Sopenharmony_ci/* 562306a36Sopenharmony_ci * Most architectures have straight copies of the x86 code, with 662306a36Sopenharmony_ci * varying levels of bug fixes on top. Usually it's a good idea 762306a36Sopenharmony_ci * to use this generic version instead, but be careful to avoid 862306a36Sopenharmony_ci * ABI changes. 962306a36Sopenharmony_ci * New architectures should not provide their own version. 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#include <asm/termbits.h> 1362306a36Sopenharmony_ci#include <asm/ioctls.h> 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_cistruct winsize { 1662306a36Sopenharmony_ci unsigned short ws_row; 1762306a36Sopenharmony_ci unsigned short ws_col; 1862306a36Sopenharmony_ci unsigned short ws_xpixel; 1962306a36Sopenharmony_ci unsigned short ws_ypixel; 2062306a36Sopenharmony_ci}; 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci#define NCC 8 2362306a36Sopenharmony_cistruct termio { 2462306a36Sopenharmony_ci unsigned short c_iflag; /* input mode flags */ 2562306a36Sopenharmony_ci unsigned short c_oflag; /* output mode flags */ 2662306a36Sopenharmony_ci unsigned short c_cflag; /* control mode flags */ 2762306a36Sopenharmony_ci unsigned short c_lflag; /* local mode flags */ 2862306a36Sopenharmony_ci unsigned char c_line; /* line discipline */ 2962306a36Sopenharmony_ci unsigned char c_cc[NCC]; /* control characters */ 3062306a36Sopenharmony_ci}; 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci/* modem lines */ 3362306a36Sopenharmony_ci#define TIOCM_LE 0x001 3462306a36Sopenharmony_ci#define TIOCM_DTR 0x002 3562306a36Sopenharmony_ci#define TIOCM_RTS 0x004 3662306a36Sopenharmony_ci#define TIOCM_ST 0x008 3762306a36Sopenharmony_ci#define TIOCM_SR 0x010 3862306a36Sopenharmony_ci#define TIOCM_CTS 0x020 3962306a36Sopenharmony_ci#define TIOCM_CAR 0x040 4062306a36Sopenharmony_ci#define TIOCM_RNG 0x080 4162306a36Sopenharmony_ci#define TIOCM_DSR 0x100 4262306a36Sopenharmony_ci#define TIOCM_CD TIOCM_CAR 4362306a36Sopenharmony_ci#define TIOCM_RI TIOCM_RNG 4462306a36Sopenharmony_ci#define TIOCM_OUT1 0x2000 4562306a36Sopenharmony_ci#define TIOCM_OUT2 0x4000 4662306a36Sopenharmony_ci#define TIOCM_LOOP 0x8000 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#endif /* _UAPI_ASM_GENERIC_TERMIOS_H */ 52