termbits_powerpc.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2. #ifndef _ASM_POWERPC_TERMBITS_H
  3. #define _ASM_POWERPC_TERMBITS_H
  4. /*
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version
  8. * 2 of the License, or (at your option) any later version.
  9. */
  10. #include <asm-generic/termbits-common.h>
  11. typedef unsigned int tcflag_t;
  12. /*
  13. * termios type and macro definitions. Be careful about adding stuff
  14. * to this file since it's used in GNU libc and there are strict rules
  15. * concerning namespace pollution.
  16. */
  17. #define NCCS 19
  18. struct termios {
  19. tcflag_t c_iflag; /* input mode flags */
  20. tcflag_t c_oflag; /* output mode flags */
  21. tcflag_t c_cflag; /* control mode flags */
  22. tcflag_t c_lflag; /* local mode flags */
  23. cc_t c_cc[NCCS]; /* control characters */
  24. cc_t c_line; /* line discipline (== c_cc[19]) */
  25. speed_t c_ispeed; /* input speed */
  26. speed_t c_ospeed; /* output speed */
  27. };
  28. /* For PowerPC the termios and ktermios are the same */
  29. struct ktermios {
  30. tcflag_t c_iflag; /* input mode flags */
  31. tcflag_t c_oflag; /* output mode flags */
  32. tcflag_t c_cflag; /* control mode flags */
  33. tcflag_t c_lflag; /* local mode flags */
  34. cc_t c_cc[NCCS]; /* control characters */
  35. cc_t c_line; /* line discipline (== c_cc[19]) */
  36. speed_t c_ispeed; /* input speed */
  37. speed_t c_ospeed; /* output speed */
  38. };
  39. /* c_cc characters */
  40. #define VINTR 0
  41. #define VQUIT 1
  42. #define VERASE 2
  43. #define VKILL 3
  44. #define VEOF 4
  45. #define VMIN 5
  46. #define VEOL 6
  47. #define VTIME 7
  48. #define VEOL2 8
  49. #define VSWTC 9
  50. #define VWERASE 10
  51. #define VREPRINT 11
  52. #define VSUSP 12
  53. #define VSTART 13
  54. #define VSTOP 14
  55. #define VLNEXT 15
  56. #define VDISCARD 16
  57. /* c_iflag bits */
  58. #define IXON 0x0200
  59. #define IXOFF 0x0400
  60. #define IUCLC 0x1000
  61. #define IMAXBEL 0x2000
  62. #define IUTF8 0x4000
  63. /* c_oflag bits */
  64. #define ONLCR 0x00002
  65. #define OLCUC 0x00004
  66. #define NLDLY 0x00300
  67. #define NL0 0x00000
  68. #define NL1 0x00100
  69. #define NL2 0x00200
  70. #define NL3 0x00300
  71. #define TABDLY 0x00c00
  72. #define TAB0 0x00000
  73. #define TAB1 0x00400
  74. #define TAB2 0x00800
  75. #define TAB3 0x00c00
  76. #define XTABS 0x00c00 /* required by POSIX to == TAB3 */
  77. #define CRDLY 0x03000
  78. #define CR0 0x00000
  79. #define CR1 0x01000
  80. #define CR2 0x02000
  81. #define CR3 0x03000
  82. #define FFDLY 0x04000
  83. #define FF0 0x00000
  84. #define FF1 0x04000
  85. #define BSDLY 0x08000
  86. #define BS0 0x00000
  87. #define BS1 0x08000
  88. #define VTDLY 0x10000
  89. #define VT0 0x00000
  90. #define VT1 0x10000
  91. /* c_cflag bit meaning */
  92. #define CBAUD 0x000000ff
  93. #define CBAUDEX 0x00000000
  94. #define BOTHER 0x0000001f
  95. #define B57600 0x00000010
  96. #define B115200 0x00000011
  97. #define B230400 0x00000012
  98. #define B460800 0x00000013
  99. #define B500000 0x00000014
  100. #define B576000 0x00000015
  101. #define B921600 0x00000016
  102. #define B1000000 0x00000017
  103. #define B1152000 0x00000018
  104. #define B1500000 0x00000019
  105. #define B2000000 0x0000001a
  106. #define B2500000 0x0000001b
  107. #define B3000000 0x0000001c
  108. #define B3500000 0x0000001d
  109. #define B4000000 0x0000001e
  110. #define CSIZE 0x00000300
  111. #define CS5 0x00000000
  112. #define CS6 0x00000100
  113. #define CS7 0x00000200
  114. #define CS8 0x00000300
  115. #define CSTOPB 0x00000400
  116. #define CREAD 0x00000800
  117. #define PARENB 0x00001000
  118. #define PARODD 0x00002000
  119. #define HUPCL 0x00004000
  120. #define CLOCAL 0x00008000
  121. #define CIBAUD 0x00ff0000
  122. /* c_lflag bits */
  123. #define ISIG 0x00000080
  124. #define ICANON 0x00000100
  125. #define XCASE 0x00004000
  126. #define ECHO 0x00000008
  127. #define ECHOE 0x00000002
  128. #define ECHOK 0x00000004
  129. #define ECHONL 0x00000010
  130. #define NOFLSH 0x80000000
  131. #define TOSTOP 0x00400000
  132. #define ECHOCTL 0x00000040
  133. #define ECHOPRT 0x00000020
  134. #define ECHOKE 0x00000001
  135. #define FLUSHO 0x00800000
  136. #define PENDIN 0x20000000
  137. #define IEXTEN 0x00000400
  138. #define EXTPROC 0x10000000
  139. /* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
  140. #define TCSANOW 0
  141. #define TCSADRAIN 1
  142. #define TCSAFLUSH 2
  143. #endif /* _ASM_POWERPC_TERMBITS_H */