isdn_tty.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:4k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /* $Id: isdn_tty.h,v 1.1.4.1 2001/11/20 14:19:34 kai Exp $
  2.  *
  3.  * header for Linux ISDN subsystem, tty related functions (linklevel).
  4.  *
  5.  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  6.  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  7.  *
  8.  * This software may be used and distributed according to the terms
  9.  * of the GNU General Public License, incorporated herein by reference.
  10.  *
  11.  */
  12. #include <linux/config.h>
  13. #define DLE 0x10
  14. #define ETX 0x03
  15. #define DC4 0x14
  16. /*
  17.  * Definition of some special Registers of AT-Emulator
  18.  */
  19. #define REG_RINGATA   0
  20. #define REG_RINGCNT   1  /* ring counter register */
  21. #define REG_ESC       2
  22. #define REG_CR        3
  23. #define REG_LF        4
  24. #define REG_BS        5
  25. #define REG_WAITC     7
  26. #define REG_RESP     12  /* show response messages register */
  27. #define BIT_RESP      1  /* show response messages bit      */
  28. #define REG_RESPNUM  12  /* show numeric responses register */
  29. #define BIT_RESPNUM   2  /* show numeric responses bit      */
  30. #define REG_ECHO     12
  31. #define BIT_ECHO      4
  32. #define REG_DCD      12
  33. #define BIT_DCD       8
  34. #define REG_CTS      12
  35. #define BIT_CTS      16
  36. #define REG_DTRR     12
  37. #define BIT_DTRR     32
  38. #define REG_DSR      12
  39. #define BIT_DSR      64
  40. #define REG_CPPP     12
  41. #define BIT_CPPP    128
  42. #define REG_DXMT     13
  43. #define BIT_DXMT      1
  44. #define REG_T70      13
  45. #define BIT_T70       2
  46. #define BIT_T70_EXT  32
  47. #define REG_DTRHUP   13
  48. #define BIT_DTRHUP    4
  49. #define REG_RESPXT   13
  50. #define BIT_RESPXT    8
  51. #define REG_CIDONCE  13
  52. #define BIT_CIDONCE  16
  53. #define REG_RUNG     13  /* show RUNG message register      */
  54. #define BIT_RUNG     64  /* show RUNG message bit           */
  55. #define REG_DISPLAY  13
  56. #define BIT_DISPLAY 128
  57. #define REG_L2PROT   14
  58. #define REG_L3PROT   15
  59. #define REG_PSIZE    16
  60. #define REG_WSIZE    17
  61. #define REG_SI1      18
  62. #define REG_SI2      19
  63. #define REG_SI1I     20
  64. #define REG_PLAN     21
  65. #define REG_SCREEN   22
  66. #define REG_CPN      23
  67. #define BIT_CPN       1
  68. #define REG_CPNFCON  23
  69. #define BIT_CPNFCON   2
  70. #define REG_CDN      23
  71. #define BIT_CDN       4
  72. /* defines for result codes */
  73. #define RESULT_OK 0
  74. #define RESULT_CONNECT 1
  75. #define RESULT_RING 2
  76. #define RESULT_NO_CARRIER 3
  77. #define RESULT_ERROR 4
  78. #define RESULT_CONNECT64000 5
  79. #define RESULT_NO_DIALTONE 6
  80. #define RESULT_BUSY 7
  81. #define RESULT_NO_ANSWER 8
  82. #define RESULT_RINGING 9
  83. #define RESULT_NO_MSN_EAZ 10
  84. #define RESULT_VCON 11
  85. #define RESULT_RUNG 12
  86. #define TTY_IS_FCLASS1(info) 
  87. ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && 
  88.  (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS1))
  89. #define TTY_IS_FCLASS2(info) 
  90. ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && 
  91.  (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS2))
  92. extern void isdn_tty_modem_escape(void);
  93. extern void isdn_tty_modem_ring(void);
  94. extern void isdn_tty_carrier_timeout(void);
  95. extern void isdn_tty_modem_xmit(void);
  96. extern int isdn_tty_modem_init(void);
  97. extern void isdn_tty_readmodem(void);
  98. extern int isdn_tty_find_icall(int, int, setup_parm *);
  99. extern void isdn_tty_cleanup_xmit(modem_info *);
  100. extern int isdn_tty_stat_callback(int, isdn_ctrl *);
  101. extern int isdn_tty_rcv_skb(int, int, int, struct sk_buff *);
  102. extern int isdn_tty_capi_facility(capi_msg *cm); 
  103. extern void isdn_tty_at_cout(char *, modem_info *);
  104. extern void isdn_tty_modem_hup(modem_info *, int);
  105. #ifdef CONFIG_ISDN_TTY_FAX
  106. extern int isdn_tty_cmd_PLUSF_FAX(char **, modem_info *);
  107. extern int isdn_tty_fax_command(modem_info *, isdn_ctrl *);
  108. extern void isdn_tty_fax_bitorder(modem_info *, struct sk_buff *);
  109. #endif