termbits.h 4.7 KB

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