termbits.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. /*
  2. * include/asm-s390/termbits.h
  3. *
  4. * S390 version
  5. *
  6. * Derived from "include/asm-i386/termbits.h"
  7. */
  8. #ifndef __ARCH_S390_TERMBITS_H__
  9. #define __ARCH_S390_TERMBITS_H__
  10. #include <linux/posix_types.h>
  11. typedef unsigned char cc_t;
  12. typedef unsigned int speed_t;
  13. typedef unsigned int tcflag_t;
  14. #define NCCS 19
  15. struct termios {
  16. tcflag_t c_iflag; /* input mode flags */
  17. tcflag_t c_oflag; /* output mode flags */
  18. tcflag_t c_cflag; /* control mode flags */
  19. tcflag_t c_lflag; /* local mode flags */
  20. cc_t c_line; /* line discipline */
  21. cc_t c_cc[NCCS]; /* control characters */
  22. };
  23. struct termios2 {
  24. tcflag_t c_iflag; /* input mode flags */
  25. tcflag_t c_oflag; /* output mode flags */
  26. tcflag_t c_cflag; /* control mode flags */
  27. tcflag_t c_lflag; /* local mode flags */
  28. cc_t c_line; /* line discipline */
  29. cc_t c_cc[NCCS]; /* control characters */
  30. speed_t c_ispeed; /* input speed */
  31. speed_t c_ospeed; /* output speed */
  32. };
  33. struct ktermios {
  34. tcflag_t c_iflag; /* input mode flags */
  35. tcflag_t c_oflag; /* output mode flags */
  36. tcflag_t c_cflag; /* control mode flags */
  37. tcflag_t c_lflag; /* local mode flags */
  38. cc_t c_line; /* line discipline */
  39. cc_t c_cc[NCCS]; /* control characters */
  40. speed_t c_ispeed; /* input speed */
  41. speed_t c_ospeed; /* output speed */
  42. };
  43. /* c_cc characters */
  44. #define VINTR 0
  45. #define VQUIT 1
  46. #define VERASE 2
  47. #define VKILL 3
  48. #define VEOF 4
  49. #define VTIME 5
  50. #define VMIN 6
  51. #define VSWTC 7
  52. #define VSTART 8
  53. #define VSTOP 9
  54. #define VSUSP 10
  55. #define VEOL 11
  56. #define VREPRINT 12
  57. #define VDISCARD 13
  58. #define VWERASE 14
  59. #define VLNEXT 15
  60. #define VEOL2 16
  61. /* c_iflag bits */
  62. #define IGNBRK 0000001
  63. #define BRKINT 0000002
  64. #define IGNPAR 0000004
  65. #define PARMRK 0000010
  66. #define INPCK 0000020
  67. #define ISTRIP 0000040
  68. #define INLCR 0000100
  69. #define IGNCR 0000200
  70. #define ICRNL 0000400
  71. #define IUCLC 0001000
  72. #define IXON 0002000
  73. #define IXANY 0004000
  74. #define IXOFF 0010000
  75. #define IMAXBEL 0020000
  76. #define IUTF8 0040000
  77. /* c_oflag bits */
  78. #define OPOST 0000001
  79. #define OLCUC 0000002
  80. #define ONLCR 0000004
  81. #define OCRNL 0000010
  82. #define ONOCR 0000020
  83. #define ONLRET 0000040
  84. #define OFILL 0000100
  85. #define OFDEL 0000200
  86. #define NLDLY 0000400
  87. #define NL0 0000000
  88. #define NL1 0000400
  89. #define CRDLY 0003000
  90. #define CR0 0000000
  91. #define CR1 0001000
  92. #define CR2 0002000
  93. #define CR3 0003000
  94. #define TABDLY 0014000
  95. #define TAB0 0000000
  96. #define TAB1 0004000
  97. #define TAB2 0010000
  98. #define TAB3 0014000
  99. #define XTABS 0014000
  100. #define BSDLY 0020000
  101. #define BS0 0000000
  102. #define BS1 0020000
  103. #define VTDLY 0040000
  104. #define VT0 0000000
  105. #define VT1 0040000
  106. #define FFDLY 0100000
  107. #define FF0 0000000
  108. #define FF1 0100000
  109. /* c_cflag bit meaning */
  110. #define CBAUD 0010017
  111. #define B0 0000000 /* hang up */
  112. #define B50 0000001
  113. #define B75 0000002
  114. #define B110 0000003
  115. #define B134 0000004
  116. #define B150 0000005
  117. #define B200 0000006
  118. #define B300 0000007
  119. #define B600 0000010
  120. #define B1200 0000011
  121. #define B1800 0000012
  122. #define B2400 0000013
  123. #define B4800 0000014
  124. #define B9600 0000015
  125. #define B19200 0000016
  126. #define B38400 0000017
  127. #define EXTA B19200
  128. #define EXTB B38400
  129. #define CSIZE 0000060
  130. #define CS5 0000000
  131. #define CS6 0000020
  132. #define CS7 0000040
  133. #define CS8 0000060
  134. #define CSTOPB 0000100
  135. #define CREAD 0000200
  136. #define PARENB 0000400
  137. #define PARODD 0001000
  138. #define HUPCL 0002000
  139. #define CLOCAL 0004000
  140. #define CBAUDEX 0010000
  141. #define BOTHER 0010000
  142. #define B57600 0010001
  143. #define B115200 0010002
  144. #define B230400 0010003
  145. #define B460800 0010004
  146. #define B500000 0010005
  147. #define B576000 0010006
  148. #define B921600 0010007
  149. #define B1000000 0010010
  150. #define B1152000 0010011
  151. #define B1500000 0010012
  152. #define B2000000 0010013
  153. #define B2500000 0010014
  154. #define B3000000 0010015
  155. #define B3500000 0010016
  156. #define B4000000 0010017
  157. #define CIBAUD 002003600000 /* input baud rate */
  158. #define CMSPAR 010000000000 /* mark or space (stick) parity */
  159. #define CRTSCTS 020000000000 /* flow control */
  160. #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
  161. /* c_lflag bits */
  162. #define ISIG 0000001
  163. #define ICANON 0000002
  164. #define XCASE 0000004
  165. #define ECHO 0000010
  166. #define ECHOE 0000020
  167. #define ECHOK 0000040
  168. #define ECHONL 0000100
  169. #define NOFLSH 0000200
  170. #define TOSTOP 0000400
  171. #define ECHOCTL 0001000
  172. #define ECHOPRT 0002000
  173. #define ECHOKE 0004000
  174. #define FLUSHO 0010000
  175. #define PENDIN 0040000
  176. #define IEXTEN 0100000
  177. /* tcflow() and TCXONC use these */
  178. #define TCOOFF 0
  179. #define TCOON 1
  180. #define TCIOFF 2
  181. #define TCION 3
  182. /* tcflush() and TCFLSH use these */
  183. #define TCIFLUSH 0
  184. #define TCOFLUSH 1
  185. #define TCIOFLUSH 2
  186. /* tcsetattr uses these */
  187. #define TCSANOW 0
  188. #define TCSADRAIN 1
  189. #define TCSAFLUSH 2
  190. #endif