termios.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1995, 1996, 2000, 2001 by Ralf Baechle
  7. * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
  8. */
  9. #ifndef _ASM_TERMIOS_H
  10. #define _ASM_TERMIOS_H
  11. #include <linux/errno.h>
  12. #include <asm/termbits.h>
  13. #include <asm/ioctls.h>
  14. struct sgttyb {
  15. char sg_ispeed;
  16. char sg_ospeed;
  17. char sg_erase;
  18. char sg_kill;
  19. int sg_flags; /* SGI special - int, not short */
  20. };
  21. struct tchars {
  22. char t_intrc;
  23. char t_quitc;
  24. char t_startc;
  25. char t_stopc;
  26. char t_eofc;
  27. char t_brkc;
  28. };
  29. struct ltchars {
  30. char t_suspc; /* stop process signal */
  31. char t_dsuspc; /* delayed stop process signal */
  32. char t_rprntc; /* reprint line */
  33. char t_flushc; /* flush output (toggles) */
  34. char t_werasc; /* word erase */
  35. char t_lnextc; /* literal next character */
  36. };
  37. /* TIOCGSIZE, TIOCSSIZE not defined yet. Only needed for SunOS source
  38. compatibility anyway ... */
  39. struct winsize {
  40. unsigned short ws_row;
  41. unsigned short ws_col;
  42. unsigned short ws_xpixel;
  43. unsigned short ws_ypixel;
  44. };
  45. #define NCC 8
  46. struct termio {
  47. unsigned short c_iflag; /* input mode flags */
  48. unsigned short c_oflag; /* output mode flags */
  49. unsigned short c_cflag; /* control mode flags */
  50. unsigned short c_lflag; /* local mode flags */
  51. char c_line; /* line discipline */
  52. unsigned char c_cc[NCCS]; /* control characters */
  53. };
  54. /* modem lines */
  55. #define TIOCM_LE 0x001 /* line enable */
  56. #define TIOCM_DTR 0x002 /* data terminal ready */
  57. #define TIOCM_RTS 0x004 /* request to send */
  58. #define TIOCM_ST 0x010 /* secondary transmit */
  59. #define TIOCM_SR 0x020 /* secondary receive */
  60. #define TIOCM_CTS 0x040 /* clear to send */
  61. #define TIOCM_CAR 0x100 /* carrier detect */
  62. #define TIOCM_CD TIOCM_CAR
  63. #define TIOCM_RNG 0x200 /* ring */
  64. #define TIOCM_RI TIOCM_RNG
  65. #define TIOCM_DSR 0x400 /* data set ready */
  66. #define TIOCM_OUT1 0x2000
  67. #define TIOCM_OUT2 0x4000
  68. #define TIOCM_LOOP 0x8000
  69. #endif /* _ASM_TERMIOS_H */