Committer: Michael Beasley <mike@snafu.setup>
[mikesnafu-overlay.git] / drivers / isdn / i4l / isdn_tty.h
blob692c74d6b74964fb4a9f35464f2795411bb50a42
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.
14 #define DLE 0x10
15 #define ETX 0x03
16 #define DC4 0x14
20 * Definition of some special Registers of AT-Emulator
22 #define REG_RINGATA 0
23 #define REG_RINGCNT 1 /* ring counter register */
24 #define REG_ESC 2
25 #define REG_CR 3
26 #define REG_LF 4
27 #define REG_BS 5
29 #define REG_WAITC 7
31 #define REG_RESP 12 /* show response messages register */
32 #define BIT_RESP 1 /* show response messages bit */
33 #define REG_RESPNUM 12 /* show numeric responses register */
34 #define BIT_RESPNUM 2 /* show numeric responses bit */
35 #define REG_ECHO 12
36 #define BIT_ECHO 4
37 #define REG_DCD 12
38 #define BIT_DCD 8
39 #define REG_CTS 12
40 #define BIT_CTS 16
41 #define REG_DTRR 12
42 #define BIT_DTRR 32
43 #define REG_DSR 12
44 #define BIT_DSR 64
45 #define REG_CPPP 12
46 #define BIT_CPPP 128
48 #define REG_DXMT 13
49 #define BIT_DXMT 1
50 #define REG_T70 13
51 #define BIT_T70 2
52 #define BIT_T70_EXT 32
53 #define REG_DTRHUP 13
54 #define BIT_DTRHUP 4
55 #define REG_RESPXT 13
56 #define BIT_RESPXT 8
57 #define REG_CIDONCE 13
58 #define BIT_CIDONCE 16
59 #define REG_RUNG 13 /* show RUNG message register */
60 #define BIT_RUNG 64 /* show RUNG message bit */
61 #define REG_DISPLAY 13
62 #define BIT_DISPLAY 128
64 #define REG_L2PROT 14
65 #define REG_L3PROT 15
66 #define REG_PSIZE 16
67 #define REG_WSIZE 17
68 #define REG_SI1 18
69 #define REG_SI2 19
70 #define REG_SI1I 20
71 #define REG_PLAN 21
72 #define REG_SCREEN 22
74 #define REG_CPN 23
75 #define BIT_CPN 1
76 #define REG_CPNFCON 23
77 #define BIT_CPNFCON 2
78 #define REG_CDN 23
79 #define BIT_CDN 4
81 /* defines for result codes */
82 #define RESULT_OK 0
83 #define RESULT_CONNECT 1
84 #define RESULT_RING 2
85 #define RESULT_NO_CARRIER 3
86 #define RESULT_ERROR 4
87 #define RESULT_CONNECT64000 5
88 #define RESULT_NO_DIALTONE 6
89 #define RESULT_BUSY 7
90 #define RESULT_NO_ANSWER 8
91 #define RESULT_RINGING 9
92 #define RESULT_NO_MSN_EAZ 10
93 #define RESULT_VCON 11
94 #define RESULT_RUNG 12
96 #define TTY_IS_FCLASS1(info) \
97 ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
98 (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS1))
99 #define TTY_IS_FCLASS2(info) \
100 ((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
101 (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS2))
103 extern void isdn_tty_modem_escape(void);
104 extern void isdn_tty_modem_ring(void);
105 extern void isdn_tty_carrier_timeout(void);
106 extern void isdn_tty_modem_xmit(void);
107 extern int isdn_tty_modem_init(void);
108 extern void isdn_tty_exit(void);
109 extern void isdn_tty_readmodem(void);
110 extern int isdn_tty_find_icall(int, int, setup_parm *);
111 extern int isdn_tty_stat_callback(int, isdn_ctrl *);
112 extern int isdn_tty_rcv_skb(int, int, int, struct sk_buff *);
113 extern int isdn_tty_capi_facility(capi_msg *cm);
114 extern void isdn_tty_at_cout(char *, modem_info *);
115 extern void isdn_tty_modem_hup(modem_info *, int);
116 #ifdef CONFIG_ISDN_TTY_FAX
117 extern int isdn_tty_cmd_PLUSF_FAX(char **, modem_info *);
118 extern int isdn_tty_fax_command(modem_info *, isdn_ctrl *);
119 extern void isdn_tty_fax_bitorder(modem_info *, struct sk_buff *);
120 #endif