termbits.h 4.0 KB

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