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