ioctl-types.h
上传用户:szlgq88
上传日期:2009-04-28
资源大小:48287k
文件大小:2k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /* Structure types for pre-termios terminal ioctls.  Linux version.
  2.    Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
  3.    This file is part of the GNU C Library.
  4.    The GNU C Library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Lesser General Public
  6.    License as published by the Free Software Foundation; either
  7.    version 2.1 of the License, or (at your option) any later version.
  8.    The GNU C Library is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11.    Lesser General Public License for more details.
  12.    You should have received a copy of the GNU Lesser General Public
  13.    License along with the GNU C Library; if not, write to the Free
  14.    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  15.    02111-1307 USA.  */
  16. #ifndef _SYS_IOCTL_H
  17. # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
  18. #endif
  19. /* Get definition of constants for use with `ioctl'.  */
  20. #include <asm/ioctls.h>
  21. struct winsize
  22.   {
  23.     unsigned short int ws_row;
  24.     unsigned short int ws_col;
  25.     unsigned short int ws_xpixel;
  26.     unsigned short int ws_ypixel;
  27.   };
  28. #define NCC 8
  29. struct termio
  30.   {
  31.     unsigned short int c_iflag; /* input mode flags */
  32.     unsigned short int c_oflag; /* output mode flags */
  33.     unsigned short int c_cflag; /* control mode flags */
  34.     unsigned short int c_lflag; /* local mode flags */
  35.     unsigned char c_line; /* line discipline */
  36.     unsigned char c_cc[NCC]; /* control characters */
  37. };
  38. /* modem lines */
  39. #define TIOCM_LE 0x001
  40. #define TIOCM_DTR 0x002
  41. #define TIOCM_RTS 0x004
  42. #define TIOCM_ST 0x008
  43. #define TIOCM_SR 0x010
  44. #define TIOCM_CTS 0x020
  45. #define TIOCM_CAR 0x040
  46. #define TIOCM_RNG 0x080
  47. #define TIOCM_DSR 0x100
  48. #define TIOCM_CD TIOCM_CAR
  49. #define TIOCM_RI TIOCM_RNG
  50. /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
  51. /* line disciplines */
  52. #define N_TTY 0
  53. #define N_SLIP 1
  54. #define N_MOUSE 2
  55. #define N_PPP 3
  56. #define N_STRIP 4
  57. #define N_AX25 5
  58. #define N_X25 6 /* X.25 async  */
  59. #define N_6PACK 7
  60. #define N_MASC 8 /* Mobitex module  */
  61. #define N_R3964 9 /* Simatic R3964 module  */
  62. #define N_PROFIBUS_FDL 10 /* Profibus  */
  63. #define N_IRDA 11 /* Linux IR  */
  64. #define N_SMSBLOCK 12 /* SMS block mode  */
  65. #define N_HDLC 13 /* synchronous HDLC  */
  66. #define N_SYNC_PPP 14 /* synchronous PPP  */
  67. #define N_HCI 15 /* Bluetooth HCI UART  */