1 /* $Id: isar.h,v 1.5 1999/08/25 16:59:59 keil Exp $
2 * isar.h ISAR (Siemens PSB 7110) specific defines
4 * Author Karsten Keil (keil@isdn4linux.de)
8 * Revision 1.5 1999/08/25 16:59:59 keil
9 * Make ISAR V32bis modem running
10 * Make LL->HL interface open for additional commands
12 * Revision 1.4 1999/08/05 20:43:20 keil
13 * ISAR analog modem support
15 * Revision 1.3 1999/07/01 08:11:46 keil
16 * Common HiSax version for 2.0, 2.1, 2.2 and 2.3 kernel
18 * Revision 1.2 1998/11/15 23:54:54 keil
21 * Revision 1.1 1998/08/13 23:33:48 keil
22 * First version, only init
27 #define ISAR_IRQMSK 0x04
28 #define ISAR_IRQSTA 0x04
29 #define ISAR_IRQBIT 0x75
30 #define ISAR_CTRL_H 0x61
31 #define ISAR_CTRL_L 0x60
36 #define ISAR_MBOX 0x4c
37 #define ISAR_WADR 0x4a
38 #define ISAR_RADR 0x48
40 #define ISAR_HIS_VNR 0x14
41 #define ISAR_HIS_DKEY 0x02
42 #define ISAR_HIS_FIRM 0x1e
43 #define ISAR_HIS_STDSP 0x08
44 #define ISAR_HIS_DIAG 0x05
45 #define ISAR_HIS_P0CFG 0x3c
46 #define ISAR_HIS_P12CFG 0x24
47 #define ISAR_HIS_SARTCFG 0x25
48 #define ISAR_HIS_PUMPCFG 0x26
49 #define ISAR_HIS_PUMPCTRL 0x2a
50 #define ISAR_HIS_IOM2CFG 0x27
51 #define ISAR_HIS_IOM2REQ 0x07
52 #define ISAR_HIS_IOM2CTRL 0x2b
53 #define ISAR_HIS_BSTREQ 0x0c
54 #define ISAR_HIS_PSTREQ 0x0e
55 #define ISAR_HIS_SDATA 0x20
56 #define ISAR_HIS_DPS1 0x40
57 #define ISAR_HIS_DPS2 0x80
58 #define SET_DPS(x) ((x<<6) & 0xc0)
60 #define ISAR_IIS_MSCMSD 0x3f
61 #define ISAR_IIS_VNR 0x15
62 #define ISAR_IIS_DKEY 0x03
63 #define ISAR_IIS_FIRM 0x1f
64 #define ISAR_IIS_STDSP 0x09
65 #define ISAR_IIS_DIAG 0x25
66 #define ISAR_IIS_GSTEV 0x00
67 #define ISAR_IIS_BSTEV 0x28
68 #define ISAR_IIS_BSTRSP 0x2c
69 #define ISAR_IIS_PSTRSP 0x2e
70 #define ISAR_IIS_PSTEV 0x2a
71 #define ISAR_IIS_IOM2RSP 0x27
72 #define ISAR_IIS_RDATA 0x20
73 #define ISAR_IIS_INVMSG 0x3f
75 #define ISAR_CTRL_SWVER 0x10
76 #define ISAR_CTRL_STST 0x40
78 #define ISAR_MSG_HWVER {0x20, 0, 1}
80 #define ISAR_DP1_USE 1
81 #define ISAR_DP2_USE 2
82 #define ISAR_RATE_REQ 3
84 #define PMOD_DISABLE 0
86 #define PMOD_DATAMODEM 2
87 #define PMOD_HALFDUPLEX 3
90 #define PMOD_DTMF_TRANS 6
93 #define PCTRL_ORIG 0x80
94 #define PV32P2_V23R 0x40
95 #define PV32P2_V22A 0x20
96 #define PV32P2_V22B 0x10
97 #define PV32P2_V22C 0x08
98 #define PV32P2_V21 0x02
99 #define PV32P2_BEL 0x01
101 // LSB MSB in ISAR doc wrong !!! Arghhh
102 #define PV32P3_AMOD 0x80
103 #define PV32P3_V32B 0x02
104 #define PV32P3_V23B 0x01
105 #define PV32P4_48 0x11
106 #define PV32P5_48 0x05
107 #define PV32P4_UT48 0x11
108 #define PV32P5_UT48 0x0d
109 #define PV32P4_96 0x11
110 #define PV32P5_96 0x03
111 #define PV32P4_UT96 0x11
112 #define PV32P5_UT96 0x0f
113 #define PV32P4_B96 0x91
114 #define PV32P5_B96 0x0b
115 #define PV32P4_UTB96 0xd1
116 #define PV32P5_UTB96 0x0f
117 #define PV32P4_120 0xb1
118 #define PV32P5_120 0x09
119 #define PV32P4_UT120 0xf1
120 #define PV32P5_UT120 0x0f
121 #define PV32P4_144 0x99
122 #define PV32P5_144 0x09
123 #define PV32P4_UT144 0xf9
124 #define PV32P5_UT144 0x0f
125 #define PV32P6_CTN 0x01
126 #define PV32P6_ATN 0x02
128 #define PFAXP2_CTN 0x01
129 #define PFAXP2_ATN 0x04
131 #define PSEV_10MS_TIMER 0x02
132 #define PSEV_CON_ON 0x18
133 #define PSEV_CON_OFF 0x19
134 #define PSEV_V24_OFF 0x20
135 #define PSEV_CTS_ON 0x21
136 #define PSEV_CTS_OFF 0x22
137 #define PSEV_DCD_ON 0x23
138 #define PSEV_DCD_OFF 0x24
139 #define PSEV_DSR_ON 0x25
140 #define PSEV_DSR_OFF 0x26
141 #define PSEV_REM_RET 0xcc
142 #define PSEV_REM_REN 0xcd
143 #define PSEV_GSTN_CLR 0xd4
145 #define PCTRL_LOC_RET 0xcf
146 #define PCTRL_LOC_REN 0xce
148 #define SMODE_DISABLE 0
151 #define SMODE_BINARY 4
152 #define SMODE_FSK_V14 5
154 #define SCTRL_HDMC_BOTH 0x00
155 #define SCTRL_HDMC_DTX 0x80
156 #define SCTRL_HDMC_DRX 0x40
157 #define S_P1_OVSP 0x40
158 #define S_P1_SNP 0x20
159 #define S_P1_EOP 0x10
160 #define S_P1_EDP 0x08
161 #define S_P1_NSB 0x04
162 #define S_P1_CHS_8 0x03
163 #define S_P1_CHS_7 0x02
164 #define S_P1_CHS_6 0x01
165 #define S_P1_CHS_5 0x00
167 #define S_P2_BFT_DEF 0x10
169 #define IOM_CTRL_ENA 0x80
170 #define IOM_CTRL_NOPCM 0x00
171 #define IOM_CTRL_ALAW 0x02
172 #define IOM_CTRL_ULAW 0x04
173 #define IOM_CTRL_RCV 0x01
175 #define IOM_P1_TXD 0x10
177 #define HDLC_FED 0x40
178 #define HDLC_FSD 0x20
179 #define HDLC_FST 0x20
180 #define HDLC_ERROR 0x1c
181 #define SART_NMD 0x01
183 #define BSTAT_RDM0 0x1
184 #define BSTAT_RDM1 0x2
185 #define BSTAT_RDM2 0x4
186 #define BSTAT_RDM3 0x8
188 extern int ISARVersion(struct IsdnCardState
*cs
, char *s
);
189 extern void isar_int_main(struct IsdnCardState
*cs
);
190 extern void initisar(struct IsdnCardState
*cs
);
191 extern void isar_fill_fifo(struct BCState
*bcs
);
192 extern int isar_auxcmd(struct IsdnCardState
*cs
, isdn_ctrl
*ic
);