Debian Codegraph @

drivers/dahdi/proslic.h

raw
1 /*
2 * See http://www.asterisk.org for more information about
3 * the Asterisk project. Please do not directly contact
4 * any of the maintainers of this project for assistance;
5 * the project provides a web site, mailing lists and IRC
6 * channels for your use.
7 *
8 * This program is free software, distributed under the terms of
9 * the GNU General Public License Version 2 as published by the
10 * Free Software Foundation. See the LICENSE file included with
11 * this program for more details.
12 */
13
14 // ProSlic Header File
15
16 typedef struct {
17 unsigned char address;
18 unsigned char altaddr;
19 char *name;
20 unsigned short initial;
21 } alpha;
22
23 typedef struct {
24 unsigned char chip_number;
25 unsigned char DTMF_digit;
26 unsigned char interrupt_line;
27 unsigned char hook_status;
28 unsigned long half_pulses[20]; // Contains the time stamps of incomming half pulses.
29 unsigned char half_pulses_detected; // Contains the number of half pulses detected.
30 unsigned char Pulse_digit;
31 unsigned long On_Hook_time;
32 unsigned long Off_Hook_time;
33 } chipStruct;
34
35 // Defines
36 #define LPT 0X378
37
38 /* Proslic Linefeed options for register 64 - Linefeed Control */
39 #define SLIC_LF_OPEN 0x0
40 #define SLIC_LF_ACTIVE_FWD 0x1
41 #define SLIC_LF_OHTRAN_FWD 0x2 /* Forward On Hook Transfer */
42 #define SLIC_LF_TIP_OPEN 0x3
43 #define SLIC_LF_RINGING 0x4
44 #define SLIC_LF_ACTIVE_REV 0x5
45 #define SLIC_LF_OHTRAN_REV 0x6 /* Reverse On Hook Transfer */
46 #define SLIC_LF_RING_OPEN 0x7
47
48 #define SLIC_LF_SETMASK 0x7
49 #define SLIC_LF_OPPENDING 0x10
50
51 /* Mask used to reverse the linefeed mode between forward and
52 * reverse polarity. */
53 #define SLIC_LF_REVMASK 0x4
54
55 #define IDA_LO 28
56 #define IDA_HI 29
57
58 #define IAA 30
59 #define ID_ACCES_STATUS 31
60 #define IAS_BIT 1
61
62 #define I_STATUS 31
63
64 #define SPI_MODE 0
65 #define PCM_MODE 1
66 #define PCM_XMIT_START_COUNT_LSB 2
67 #define PCM_XMIT_START_COUNT_MSB 3
68 #define PCM_RCV_START_COUNT_LSB 4
69 #define PCM_RCV_START_COUNT_MSB 5
70 #define DIO 6
71
72 #define AUDIO_LOOPBACK 8
73 #define AUDIO_GAIN 9
74 #define LINE_IMPEDANCE 10
75 #define HYBRID 11
76 #define RESERVED12 12
77 #define RESERVED13 13
78 #define PWR_DOWN1 14
79 #define PWR_DOWN2 15
80 #define RESERVED16 16
81 #define RESERVED17 17
82 #define INTRPT_STATUS1 18
83 #define INTRPT_STATUS2 19
84 #define INTRPT_STATUS3 20
85 #define INTRPT_MASK1 21
86 #define INTRPT_MASK2 22
87 #define INTRPT_MASK3 23
88 #define DTMF_DIGIT 24
89 #define RESERVED25 25
90 #define RESERVED26 26
91 #define RESERVED27 27
92 #define I_DATA_LOW 28
93 #define I_DATA_HIGH 29
94 #define I_ADDRESS 30
95 #define I_STATUS 31
96 #define OSC1 32
97 #define OSC2 33
98 #define RING_OSC_CTL 34
99 #define PULSE_OSC 35
100 #define OSC1_ON__LO 36
101 #define OSC1_ON_HI 37
102 #define OSC1_OFF_LO 38
103 #define OSC1_OFF_HI 39
104 #define OSC2_ON__LO 40
105 #define OSC2_ON_HI 41
106 #define OSC2_OFF_LO 42
107 #define OSC2_OFF_HI 43
108 #define PULSE_ON__LO 44
109 #define PULSE_ON_HI 45
110 #define PULSE_OFF_LO 46
111 #define PULSE_OFF_HI 47
112 #define RING_ON__LO 48
113 #define RING_ON_HI 49
114 #define RING_OFF_LO 50
115 #define RING_OFF_HI 51
116 #define RESERVED52 52
117 #define RESERVED53 53
118 #define RESERVED54 54
119 #define RESERVED55 55
120 #define RESERVED56 56
121 #define RESERVED57 57
122 #define RESERVED58 58
123 #define RESERVED59 59
124 #define RESERVED60 60
125 #define RESERVED61 61
126 #define RESERVED62 62
127 #define RESERVED63 63
128 #define LINE_STATE 64
129 #define ACTIVATE_LINE 0x11
130 #define RING_LINE 0x44
131 #define BIAS_SQUELCH 65
132 #define BAT_FEED 66
133 #define AUTO_STATE 67
134 #define LOOP_STAT 68
135 #define LOOP_DEBOUCE 69
136 #define RT_DEBOUCE 70
137 #define LOOP_I_LIMIT 71
138 #define OFF_HOOK_V 72
139 #define COMMON_V 73
140 #define BAT_V_HI 74
141 #define BAT_V_LO 75
142 #define PWR_STAT_DEV 76
143 #define PWR_STAT 77
144 #define LOOP_V_SENSE 78
145 #define LOOP_I_SENSE 79
146 #define TIP_V_SENSE 80
147 #define RING_V_SENSE 81
148 #define BAT_V_HI_SENSE 82
149 #define BAT_V_LO_SENSE 83
150 #define IQ1 84
151 #define IQ2 85
152 #define IQ3 86
153 #define IQ4 87
154 #define IQ5 88
155 #define IQ6 89
156 #define RESERVED90 90
157 #define RESERVED91 91
158 #define DCDC_PWM_OFF 92
159 #define DCDC 93
160 #define DCDC_PW_OFF 94
161 #define RESERVED95 95
162 #define CALIBR1 96
163 #define CALIBRATE_LINE 0x78
164 #define NORMAL_CALIBRATION_COMPLETE 0x20
165 #define CALIBR2 97
166 #define RING_GAIN_CAL 98
167 #define TIP_GAIN_CAL 99
168 #define DIFF_I_CAL 100
169 #define COMMON_I_CAL 101
170 #define I_LIMIT_GAIN_CAL 102
171 #define ADC_OFFSET_CAL 103
172 #define DAC_ADC_OFFSET 104
173 #define DAC_OFFSET_CAL 105
174 #define COMMON_BAL_CAL 106
175 #define DC_PEAK_CAL 107
176
177 // Indirect Register (decimal)
178 #define DTMF_ROW_0_PEAK 0
179 #define DTMF_ROW_1_PEAK 1
180 #define DTMF_ROW2_PEAK 2
181 #define DTMF_ROW3_PEAK 3
182 #define DTMF_COL1_PEAK 4
183 #define DTMF_FWD_TWIST 5
184 #define DTMF_RVS_TWIST 6
185 #define DTMF_ROW_RATIO_THRESH 7
186 #define DTMF_COL_RATIO_THRESH 8
187 #define DTMF_ROW_2ND_HARM 9
188 #define DTMF_COL_2ND_HARM 10
189 #define DTMF_PWR_MIN_THRESH 11
190 #define DTMF_HOT_LIM_THRESH 12
191 #define OSC1_COEF 13
192 #define OSC1X 14
193 #define OSC1Y 15
194 #define OSC2_COEF 16
195 #define OSC2X 17
196 #define OSC2Y 18
197 #define RING_V_OFF 19
198 #define RING_OSC_COEF 20
199 #define RING_X 21
200 #define RING_Y 22
201 #define PULSE_ENVEL 23
202 #define PULSE_X 24
203 #define PULSE_Y 25
204 #define RECV_DIGITAL_GAIN 26
205 #define XMIT_DIGITAL_GAIN 27
206 #define LOOP_CLOSE_THRESH 28
207 #define RING_TRIP_THRESH 29
208 #define COMMON_MIN_THRESH 30
209 #define COMMON_MAX_THRESH 31
210 #define PWR_ALARM_Q1Q2 32
211 #define PWR_ALARM_Q3Q4 33
212 #define PWR_ALARM_Q5Q6 34
213 #define LOOP_CLOSURE_FILTER 35
214 #define RING_TRIP_FILTER 36
215 #define THERM_LP_POLE_Q1Q2 37
216 #define THERM_LP_POLE_Q3Q4 38
217 #define THERM_LP_POLE_Q5Q6 39
218 #define CM_BIAS_RINGING 40
219 #define DCDC_MIN_V 41
220 #define DCDC_XTRA 42