FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/ms/src/aci/aci_em.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : Handles all instances for the Engineering mode (EM). | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 | |
21 #ifndef ACI_EM_H | |
22 #define ACI_EM_H | |
23 | |
24 /* | |
25 * Return Values | |
26 */ | |
27 #define EM_INVALID_CLASS 10 | |
28 #define EM_INVALID_SUBCLASS 11 | |
29 #define EM_INVALID_TYPE 12 | |
30 #define EM_INVALID_ACCESS 13 | |
31 #define EM_NO_MORE_DATA 14 | |
32 #define EM_DATA_NOT_AVAIL 15 | |
33 | |
34 #define MAX_EM_LENGTH 80 | |
35 | |
36 /* | |
37 * EM classes | |
38 */ | |
39 #define EM_CLASS_EVENT_TRACING 1 | |
40 #define EM_CLASS_INFRA_DATA 3 | |
41 #define EM_CLASS_MOBILE_DATA 4 | |
42 | |
43 /* | |
44 * EM Subclasses Event Tracing / Counter | |
45 */ | |
46 #define EM_SUBCLASS_LAYER_1 1 | |
47 #define EM_SUBCLASS_DL 2 | |
48 #define EM_SUBCLASS_RR 3 | |
49 #define EM_SUBCLASS_MM 4 | |
50 #define EM_SUBCLASS_CC 5 | |
51 #define EM_SUBCLASS_SS 6 | |
52 #define EM_SUBCLASS_SMS 7 | |
53 #define EM_SUBCLASS_SIM 8 | |
54 | |
55 /* | |
56 * EM Subclasses Infrastructure data | |
57 */ | |
58 #define EM_SUBCLASS_SC 9 | |
59 #define EM_SUBCLASS_SC_GPRS 10 | |
60 #define EM_SUBCLASS_NC 11 | |
61 #define EM_SUBCLASS_LOC_PAG 12 | |
62 #define EM_SUBCLASS_PLMN 13 | |
63 #define EM_SUBCLASS_CIPH_HOP_DTX 14 | |
64 #define EM_SUBCLASS_GMM 15 | |
65 #define EM_SUBCLASS_GRLC 16 | |
66 #define EM_SUBCLASS_AMR 20 | |
67 #define EM_SUBCLASS_PDP 21 | |
68 | |
69 | |
70 /* | |
71 * EM Subclasses Mobile Data | |
72 */ | |
73 #define EM_SUBCLASS_POWER 17 | |
74 #define EM_SUBCLASS_ID 18 | |
75 #define EM_SUBCLASS_SW_VERSION 19 | |
76 | |
77 /* | |
78 * EM bitmask check | |
79 */ | |
80 | |
81 #define EM_BITMASK_L1_H 0x007F /* 39 events */ | |
82 #define EM_BITMASK_L1_L 0xFFFFFFFFL | |
83 #define EM_BITMASK_DL 0x001F /* 5 events */ | |
84 #define EM_BITMASK_RR_H 0x001F /* 37 events */ | |
85 #define EM_BITMASK_RR_L 0xFFFFFFFFL | |
86 #define EM_BITMASK_MM 0x0003FFFFL /* 18 events */ | |
87 #define EM_BITMASK_CC_H 0x0001FFFFL /* 49 events */ | |
88 #define EM_BITMASK_CC_L 0xFFFFFFFFL | |
89 #define EM_BITMASK_SS 0x03FF /* 10 events */ | |
90 #define EM_BITMASK_SMS_H 0x00000001L /* 33 events */ | |
91 #define EM_BITMASK_SMS_L 0xFFFFFFFFL | |
92 #define EM_BITMASK_SIM 0x01FFFFFFL /* 25 events */ | |
93 | |
94 /* | |
95 #define EM_STARTED 1 | |
96 #define EM_ESTABLISHED 2 | |
97 #define EM_FAILED 3 | |
98 #define EM_SEND 4 | |
99 #define EM_RECEIVED 5 | |
100 #define EM_ABORTED 6 | |
101 #define EM_RELEASED 7 | |
102 */ | |
103 | |
104 #define EM_DATA_IND_OPC 32267 | |
105 | |
106 #define EM_MM_BUFFER_SIZE 168 | |
107 #define EM_CC_BUFFER_SIZE 185 | |
108 #define EM_SS_BUFFER_SIZE 31 | |
109 #define EM_SMS_BUFFER_SIZE 110 | |
110 #define EM_SIM_BUFFER_SIZE 67 | |
111 #define EM_MAX_MA_CHANNELS 64 | |
112 | |
113 #define MAX_VER 50 | |
114 | |
115 #ifdef TRACE_PRIM | |
116 #define TRACE_PRIM_FROM(s) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Pdir: " s) | |
117 #define TRACE_PRIM_TO(s) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Pdir: " s) | |
118 #else | |
119 #define TRACE_PRIM_FROM(s) | |
120 #define TRACE_PRIM_TO(s) | |
121 #endif | |
122 | |
123 | |
124 #define TRACE_EVENT_EM_P1(s,a1) TRACE_USER_CLASS_P1(TC_USER8,s,a1) | |
125 #define TRACE_EVENT_EM_P4(s,a1,a2,a3,a4) TRACE_USER_CLASS_P4(TC_USER8,s,a1,a2,a3,a4) | |
126 | |
127 /* | |
128 / ************************************************************************************* | |
129 * | |
130 * Structures according to EM Functional interface description (8443.601.01.002) | |
131 * | |
132 ************************************************************************************* | |
133 */ | |
134 | |
135 /* | |
136 * Unit ID | |
137 */ | |
138 typedef enum | |
139 { | |
140 EM_UNIT_INVALID = -1, | |
141 EM_UNIT_L1 = 1, | |
142 EM_UNIT_DL, | |
143 EM_UNIT_RR, | |
144 EM_UNIT_MM, | |
145 EM_UNIT_CC, | |
146 EM_UNIT_SS, | |
147 EM_UNIT_SMS, | |
148 EM_UNIT_SIM | |
149 } T_EM_UNIT_ID; | |
150 | |
151 typedef struct | |
152 { | |
153 UBYTE index; | |
154 UBYTE length; | |
155 } T_EVENT_PTR; | |
156 | |
157 typedef struct | |
158 { | |
159 T_EVENT_PTR alr; | |
160 T_EVENT_PTR dl; | |
161 T_EVENT_PTR rr; | |
162 T_EVENT_PTR mm; | |
163 T_EVENT_PTR cc; | |
164 T_EVENT_PTR ss; | |
165 T_EVENT_PTR sms; | |
166 T_EVENT_PTR sim; | |
167 } T_EM_EVENT_BUF; | |
168 | |
169 typedef struct | |
170 { | |
171 CHAR alr[MAX_VER]; | |
172 CHAR dl[MAX_VER]; | |
173 CHAR rr[MAX_VER]; | |
174 CHAR mm[MAX_VER]; | |
175 CHAR cc[MAX_VER]; | |
176 CHAR ss[MAX_VER]; | |
177 CHAR sms[MAX_VER]; | |
178 CHAR sim[MAX_VER]; | |
179 } T_EM_SW_VER; | |
180 | |
181 | |
182 /*------------------------------------------------------------------------ | |
183 drv_SignalID_Type - driver signal identification | |
184 | |
185 The type defines the signal information data used to identify a signal. | |
186 This data type is used to define and to report a signal. A signal is | |
187 defined by a process calling the driver function drv_SetSignal. An | |
188 event is signalled by driver by calling the pre-defined signal call- | |
189 back function. | |
190 -------------------------------------------------------------------------*/ | |
191 typedef struct | |
192 { | |
193 UBYTE SignalType; | |
194 USHORT DataLength; | |
195 union | |
196 { | |
197 T_EM_SC_INFO_CNF sc; | |
198 T_EM_SC_GPRS_INFO_CNF sc_gprs; | |
199 T_EM_NC_INFO_CNF nc; | |
200 T_EM_LOC_PAG_INFO_CNF log_pag; | |
201 T_EM_PLMN_INFO_CNF plmn; | |
202 T_EM_CIP_HOP_DTX_INFO_CNF cip; | |
203 T_EM_POWER_INFO_CNF power; | |
204 T_EM_IDENTITY_INFO_CNF id; | |
205 T_EM_SW_VER version; | |
206 T_EM_GMM_INFO_CNF gmm; | |
207 T_EM_GRLC_INFO_CNF grlc; | |
208 T_EM_AMR_INFO_CNF amr; | |
209 UBYTE defaulT; | |
210 } UserData; | |
211 } T_DRV_SIGNAL_EM; | |
212 | |
213 typedef struct | |
214 { | |
215 UBYTE * Pointer; | |
216 USHORT DataLength; | |
217 T_EM_EVENT_BUF Data; | |
218 } T_DRV_SIGNAL_EM_EVENT; | |
219 | |
220 | |
221 /*------------------------------------------------------------------------ | |
222 drv_SignalCB_Type - driver signal device control block | |
223 | |
224 This type defines a call-back function used to signal driver events, | |
225 e.g. driver is ready to accept data. The driver calls the signal | |
226 call-back function when a specific event occurs and the driver has | |
227 been instructed to signal the event to a specific process. A process | |
228 can set or reset event signalling by calling one of the driver | |
229 functions drv_SetSignal or drv_ResetSignal. Event signalling can only | |
230 be performed when a call-back function has been installed at driver | |
231 initialization. | |
232 -------------------------------------------------------------------------*/ | |
233 typedef void (*T_DRV_CB_FUNC_EM ) (T_DRV_SIGNAL_EM * Signal); | |
234 typedef void (*T_DRV_CB_FUNC_EM_EVENT) (T_DRV_SIGNAL_EM_EVENT * Event); | |
235 | |
236 /* | |
237 * callback functionality for em_Read_Data_Parameter | |
238 */ | |
239 #define drv_SignalCB_Type_EM T_DRV_CB_FUNC_EM | |
240 #define drv_SignalID_Type_EM T_DRV_SIGNAL_EM | |
241 | |
242 /* | |
243 * callback functionality for em_Read_Event_Parameter | |
244 */ | |
245 #define drv_SignalCB_Type_EM_EVENT T_DRV_CB_FUNC_EM_EVENT | |
246 #define drv_SignalID_Type_EM_EVENT T_DRV_SIGNAL_EM_EVENT | |
247 | |
248 #define T_VSI_THANDLE USHORT | |
249 | |
250 /* | |
251 * Prototypes | |
252 */ | |
253 EXTERN UBYTE em_Read_Data_Parameter (UBYTE em_class, UBYTE em_subclass, UBYTE em_type, | |
254 void (*cbfunc)(T_DRV_SIGNAL_EM * Signal)); | |
255 EXTERN UBYTE em_Read_Event_Parameter (UBYTE entity, | |
256 void (*cbfunc)(T_DRV_SIGNAL_EM_EVENT * Signal)); | |
257 EXTERN void em_Received_Data (void *data, UBYTE subclass); | |
258 EXTERN UBYTE em_Set_EventTrace (UBYTE em_subclass, ULONG bitmask_h, ULONG bitmask_l); | |
259 | |
260 EXTERN UBYTE em_Init (drv_SignalCB_Type_EM in_SignalCBPtr, | |
261 drv_SignalCB_Type_EM_EVENT in_SignalEventCBPtr); | |
262 EXTERN void em_Exit (void); | |
263 | |
264 EXTERN void em_aci_sem_clear (void); | |
265 EXTERN void em_aci_sem_init (void); | |
266 EXTERN void em_aci_sem_exit (void); | |
267 | |
268 EXTERN UBYTE em_subclass_pco_bitmap (U32 em_pco_bitmap); /* en- or disable PCO-trace*/ | |
269 | |
270 /* | |
271 EXTERN UBYTE em_SetSignal (drv_SignalID_Type * in_SignalIDPtr); | |
272 EXTERN UBYTE em_ResetSignal (drv_SignalID_Type * in_SignalIDPtr); | |
273 EXTERN UBYTE em_SetConfig (pwr_DCB_Type * in_DCBPtr); | |
274 EXTERN UBYTE em_GetConfig (pwr_DCB_Type * out_DCBPtr); | |
275 EXTERN UBYTE em_GetStatus (pwr_Status_Type * out_StatusPtr); | |
276 */ | |
277 | |
278 | |
279 | |
280 #endif /* ACI_EM_H */ | |
281 | |
282 /*+++++++++++++++++++++++++++++++++++++++++ E O F +++++++++++++++++++++++++++++++++++++++++*/ |