termbits.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. #ifndef _ASM_M32R_TERMBITS_H
  2. #define _ASM_M32R_TERMBITS_H
  3. #include <linux/posix_types.h>
  4. typedef unsigned char cc_t;
  5. typedef unsigned int speed_t;
  6. typedef unsigned int tcflag_t;
  7. #define NCCS 19
  8. struct termios {
  9. tcflag_t c_iflag; /* input mode flags */
  10. tcflag_t c_oflag; /* output mode flags */
  11. tcflag_t c_cflag; /* control mode flags */
  12. tcflag_t c_lflag; /* local mode flags */
  13. cc_t c_line; /* line discipline */
  14. cc_t c_cc[NCCS]; /* control characters */
  15. };
  16. struct ktermios {
  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. speed_t c_ispeed; /* input speed */
  24. speed_t c_ospeed; /* output speed */
  25. };
  26. /* c_cc characters */
  27. #define VINTR 0
  28. #define VQUIT 1
  29. #define VERASE 2
  30. #define VKILL 3
  31. #define VEOF 4
  32. #define VTIME 5
  33. #define VMIN 6
  34. #define VSWTC 7
  35. #define VSTART 8
  36. #define VSTOP 9
  37. #define VSUSP 10
  38. #define VEOL 11
  39. #define VREPRINT 12
  40. #define VDISCARD 13
  41. #define VWERASE 14
  42. #define VLNEXT 15
  43. #define VEOL2 16
  44. /* c_iflag bits */
  45. #define IGNBRK 0000001
  46. #define BRKINT 0000002
  47. #define IGNPAR 0000004
  48. #define PARMRK 0000010
  49. #define INPCK 0000020
  50. #define ISTRIP 0000040
  51. #define INLCR 0000100
  52. #define IGNCR 0000200
  53. #define ICRNL 0000400
  54. #define IUCLC 0001000
  55. #define IXON 0002000
  56. #define IXANY 0004000
  57. #define IXOFF 0010000
  58. #define IMAXBEL 0020000
  59. #define IUTF8 0040000
  60. /* c_oflag bits */
  61. #define OPOST 0000001
  62. #define OLCUC 0000002
  63. #define ONLCR 0000004
  64. #define OCRNL 0000010
  65. #define ONOCR 0000020
  66. #define ONLRET 0000040
  67. #define OFILL 0000100
  68. #define OFDEL 0000200
  69. #define NLDLY 0000400
  70. #define NL0 0000000
  71. #define NL1 0000400
  72. #define CRDLY 0003000
  73. #define CR0 0000000
  74. #define CR1 0001000
  75. #define CR2 0002000
  76. #define CR3 0003000
  77. #define TABDLY 0014000
  78. #define TAB0 0000000
  79. #define TAB1 0004000
  80. #define TAB2 0010000
  81. #define TAB3 0014000
  82. #define XTABS 0014000
  83. #define BSDLY 0020000
  84. #define BS0 0000000
  85. #define BS1 0020000
  86. #define VTDLY 0040000
  87. #define VT0 0000000
  88. #define VT1 0040000
  89. #define FFDLY 0100000
  90. #define FF0 0000000
  91. #define FF1 0100000
  92. /* c_cflag bit meaning */
  93. #define CBAUD 0010017
  94. #define B0 0000000 /* hang up */
  95. #define B50 0000001
  96. #define B75 0000002
  97. #define B110 0000003
  98. #define B134 0000004
  99. #define B150 0000005
  100. #define B200 0000006
  101. #define B300 0000007
  102. #define B600 0000010
  103. #define B1200 0000011
  104. #define B1800 0000012
  105. #define B2400 0000013
  106. #define B4800 0000014
  107. #define B9600 0000015
  108. #define B19200 0000016
  109. #define B38400 0000017
  110. #define EXTA B19200
  111. #define EXTB B38400
  112. #define CSIZE 0000060
  113. #define CS5 0000000
  114. #define CS6 0000020
  115. #define CS7 0000040
  116. #define CS8 0000060
  117. #define CSTOPB 0000100
  118. #define CREAD 0000200
  119. #define PARENB 0000400
  120. #define PARODD 0001000
  121. #define HUPCL 0002000
  122. #define CLOCAL 0004000
  123. #define CBAUDEX 0010000
  124. #define B57600 0010001
  125. #define B115200 0010002
  126. #define B230400 0010003
  127. #define B460800 0010004
  128. #define B500000 0010005
  129. #define B576000 0010006
  130. #define B921600 0010007
  131. #define B1000000 0010010
  132. #define B1152000 0010011
  133. #define B1500000 0010012
  134. #define B2000000 0010013
  135. #define B2500000 0010014
  136. #define B3000000 0010015
  137. #define B3500000 0010016
  138. #define B4000000 0010017
  139. #define CIBAUD 002003600000 /* input baud rate (not used) */
  140. #define CTVB 004000000000 /* VisioBraille Terminal flow control */
  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 /* _ASM_M32R_TERMBITS_H */