FreeCalypso > hg > fc-magnetite
comparison src/condat3/com/include/custom.h @ 18:c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 27 Sep 2016 21:25:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
17:6323e661f2ed | 18:c8bd5a927942 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : CUSTOM | |
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 : Custom dependent definitions | |
18 | | |
19 | Use this header for definitions to integrate the | |
20 | protocol stack in your target system ! | |
21 +----------------------------------------------------------------------------- | |
22 */ | |
23 | |
24 #ifndef CUSTOM_H | |
25 #define CUSTOM_H | |
26 | |
27 /* | |
28 * OPTION_MULTITHREAD | |
29 * | |
30 * Description : For Operationg systems where the entire protocol | |
31 * stack is linked as an process and the entitys are | |
32 * started as threads, this option must be set. In | |
33 * this case all the pei_ functions of one entity | |
34 * were prefixed by the entity name like cc_pei... | |
35 * | |
36 * Options: #define OPTION_MULTITHREAD | |
37 * Multithread application | |
38 * #undef OPTION_MULTITHREAD | |
39 * No multithread application. | |
40 * Each entity is linked seperatly. | |
41 * | |
42 */ | |
43 /* | |
44 #undef OPTION_MULTITHREAD must be passed as compile switch | |
45 */ | |
46 /*==== ENTITY DEPENDENT CONFIGURATION PARAMETER ===================*/ | |
47 | |
48 #ifndef __PFRAME_C__ /* do not include the entity specific custom | |
49 header if we compile the frame */ | |
50 | |
51 #ifdef ENTITY_CST | |
52 #include "cst/cus_cst.h" | |
53 #endif | |
54 | |
55 #if defined (ENTITY_SMI) || defined (ENTITY_MFW) || defined (ENTITY_ACI) || defined (ENTITY_MMI) | |
56 #include "cus_aci.h" | |
57 #endif | |
58 | |
59 #ifdef ENTITY_PAN | |
60 #endif | |
61 | |
62 #ifdef ENTITY_DL | |
63 #include "cus_dl.h" | |
64 #endif | |
65 | |
66 #ifdef ENTITY_RR | |
67 #include "cus_rr.h" | |
68 #endif | |
69 | |
70 #ifdef ENTITY_MM | |
71 #include "cus_mm.h" | |
72 #endif | |
73 | |
74 #ifdef ENTITY_CC | |
75 #include "cus_cc.h" | |
76 #endif | |
77 | |
78 #ifdef ENTITY_SS | |
79 #include "cus_ss.h" | |
80 #endif | |
81 | |
82 #ifdef ENTITY_ESIM | |
83 #include "cus_esim.h" | |
84 #endif | |
85 | |
86 #ifdef ENTITY_SMS | |
87 #include "cus_sms.h" | |
88 #endif | |
89 | |
90 #ifdef ENTITY_PL | |
91 #ifdef ALR | |
92 #include "cus_alr.h" | |
93 #else | |
94 #include "cus_til.h" | |
95 #endif | |
96 #endif | |
97 | |
98 #ifdef ENTITY_L1 | |
99 #include "cus_l1.h" | |
100 #endif | |
101 | |
102 #ifdef ENTITY_SIM | |
103 #include "cus_sim.h" | |
104 #endif | |
105 | |
106 #ifdef ENTITY_L2R | |
107 #include "cus_l2r.h" | |
108 #endif | |
109 | |
110 #ifdef ENTITY_RLP | |
111 #include "cus_rlp.h" | |
112 #endif | |
113 | |
114 #ifdef ENTITY_T30 | |
115 #include "cus_t30.h" | |
116 #endif | |
117 | |
118 #ifdef ENTITY_FAD | |
119 #include "cus_fad.h" | |
120 #endif | |
121 | |
122 #ifdef ENTITY_RA | |
123 #include "cus_ra.h" | |
124 #endif | |
125 | |
126 #ifdef ENTITY_WAP | |
127 #ifdef FF_GPF_TCPIP | |
128 #include "cus_wapmic.h" | |
129 #endif | |
130 #ifdef CO_UDP_IP | |
131 #include "cus_wap.h" | |
132 #endif | |
133 #endif | |
134 | |
135 #ifdef ENTITY_UDP | |
136 #include "cus_udp.h" | |
137 #endif | |
138 | |
139 #ifdef ENTITY_IP | |
140 #include "cus_ip.h" | |
141 #endif | |
142 | |
143 #ifdef ENTITY_TCP | |
144 #include "cus_tcp.h" | |
145 #endif | |
146 | |
147 #endif | |
148 | |
149 /*==== ENTITY NAMES ===============================================*/ | |
150 /* | |
151 * The names are used as identifier for the communication resource | |
152 */ | |
153 | |
154 #define NULL_NAME "NULL" | |
155 #define L1_NAME "L1" | |
156 #define PL_NAME "PL" | |
157 #define DL_NAME "DL" | |
158 #define RR_NAME "RR" | |
159 #define MM_NAME "MM" | |
160 #define CC_NAME "CC" | |
161 #define SS_NAME "SS" | |
162 #define ESIM_NAME "ESIM" | |
163 #define SMS_NAME "SMS" | |
164 #define SIM_NAME "SIM" | |
165 #define PAN_NAME "PAN" | |
166 #define DMYA_NAME "DMYA" | |
167 #define DMYB_NAME "DMYB" | |
168 #define CST_NAME "CST" | |
169 #define GRR_NAME "GRR" | |
170 | |
171 #define ACI_NAME "MMI" | |
172 #define AAA_NAME "AAA" | |
173 #define RIV_NAME "RIV" | |
174 | |
175 #define L2R_NAME "L2R" | |
176 #define TRA_NAME L2R_NAME /* TRA running in L2R task */ | |
177 #define RLP_NAME "RLP" | |
178 #define T30_NAME "T30" | |
179 #define FAD_NAME "FAD" | |
180 #define RA_NAME "RA" | |
181 #define WAP_NAME "WAP" | |
182 #define UDP_NAME "UDP" | |
183 #define IP_NAME "IP" | |
184 #define PPP_NAME "PPP" | |
185 #define UART_NAME "UART" | |
186 #define PSI_NAME "PSI" | |
187 #define DTI_NAME "DTI" | |
188 #define TAP_NAME "TAP" | |
189 #define BTI_NAME "BTI" /* BTI is not an entity, but the name is used to identify BTI */ | |
190 #define LC_NAME "LC" | |
191 | |
192 | |
193 #ifndef _TARGET_ | |
194 #define CLT_NAME "CLT" /* Used only during Simulation testing*/ | |
195 #endif /*!_TARGET_*/ | |
196 | |
197 #define RRLP_NAME "RRLP" | |
198 | |
199 | |
200 #ifdef FF_TRACE_OVER_MTST | |
201 #define MTST_NAME "MTST" | |
202 #endif /* FF_TRACE_OVER_MTST */ | |
203 | |
204 #ifdef GPRS | |
205 #define GMM_NAME "GMM" | |
206 #define GRR_NAME "GRR" | |
207 #define GRLC_NAME "GRLC" | |
208 #define PKTIO_NAME "PKT" | |
209 #define GPL_NAME "GRR" | |
210 #endif /* #ifdef GPRS */ | |
211 | |
212 #define DCM_NAME "MMI" | |
213 #define TCPIP_NAME "TCP" | |
214 | |
215 #define APP_NAME "APP" | |
216 #define GDD_DIO_NAME "GDDI" | |
217 | |
218 #ifndef NEW_FRAME | |
219 /*==== STATIC CONFIGURATION =======================================*/ | |
220 /* | |
221 * TRACE_FKT | |
222 * | |
223 * Description : A trace string is send to the environment when a | |
224 * function is called. | |
225 * | |
226 * Options: #define TRACE_FKT configuration is active | |
227 * #undef TRACE_FKT configuration is not active | |
228 * #define TC_FUNC <n> used trace class | |
229 * | |
230 * Function Traces only under Windows and for MMI | |
231 */ | |
232 | |
233 /* | |
234 * It is nearly impossible to debug ACI/MFW/SMI without function traces | |
235 */ | |
236 #if defined(WIN32) OR defined(ENTITY_MFW) OR defined(ENTITY_ACI) OR defined(ENTITY_SMI) | |
237 #define TRACE_FKT | |
238 #define TC_FUNC 1 | |
239 #else | |
240 #undef TRACE_FKT | |
241 #endif | |
242 | |
243 /* | |
244 * TRACE_EVE | |
245 * | |
246 * Description : A trace string is given to the environment when | |
247 * an event has happened, for example start of cell | |
248 * selection. | |
249 * | |
250 * Options: #define TRACE_EVE configuration is active | |
251 * #undef TRACE_EVE configuration is not active | |
252 * #define TC_EVENT <n> used trace class | |
253 */ | |
254 | |
255 #if !defined (NTRACE) | |
256 #define TRACE_EVE | |
257 #define TC_EVENT 2 | |
258 #else | |
259 #undef TRACE_EVE | |
260 #endif | |
261 | |
262 /* | |
263 * TRACE_ERR | |
264 * | |
265 * valid for : Mobile and Base Station | |
266 * | |
267 * Description : A trace string is given to the environment when | |
268 * an error has occured, for example parameter error | |
269 * by dynamic configuration. | |
270 * | |
271 * Options: #define TRACE_ERR configuration is active | |
272 * #undef TRACE_ERR configuration is not active | |
273 * #define TC_ERROR <n> used trace class | |
274 */ | |
275 | |
276 #if !defined (NTRACE) | |
277 #define TRACE_ERR | |
278 #define TC_ERROR 3 | |
279 #else | |
280 #undef TRACE_ERR | |
281 #endif | |
282 | |
283 /* | |
284 * TRACE_PRIM | |
285 * | |
286 * Description : A trace string is send to the environment when a | |
287 * primitive is received or send. | |
288 * | |
289 * Options: #define TRACE_PRIM configuration is active | |
290 * #undef TRACE_PRIM configuration is not active | |
291 * #define TC_PRIM <n> used trace class | |
292 */ | |
293 | |
294 #if !defined (NTRACE) | |
295 #define TRACE_PRIM | |
296 #define TC_PRIM 4 | |
297 #else | |
298 #undef TRACE_PRIM | |
299 #endif | |
300 | |
301 /* | |
302 * TRACE_STATE | |
303 * | |
304 * Description : A trace string is send to the environment when a | |
305 * state variable is changed or retrieved. | |
306 * | |
307 * Options: #define TRACE_STATE configuration is active | |
308 * #undef TRACE_STATE configuration is not active | |
309 * #define TC_STATE <n> used trace class | |
310 */ | |
311 | |
312 #if !defined (NTRACE) | |
313 #define TRACE_STATE | |
314 #define TC_STATE 8 | |
315 #else | |
316 #undef TRACE_STATE | |
317 #endif | |
318 | |
319 #endif /* NEW_FRAME */ | |
320 | |
321 /* | |
322 * SIM Application Toolkit | |
323 * | |
324 * Description : Depending of the general activation of SIM application | |
325 * Toolkit, specific parts can be activated | |
326 * | |
327 * Options: #define SAT_CBM_DNL_SUPPORT Cell Broadcast Data | |
328 * Download shall be supported | |
329 * #define SAT_SMS_DNL_SUPPORT SMS Data Download shall | |
330 * be supported | |
331 * #define SAT_CALL_CTRL_SUPPORT Call Control by SIM shall | |
332 * be supported | |
333 * #define SAT_CALL_REQ_SUPPORT Setup Call and Send SS/USSD | |
334 * shall be supported | |
335 */ | |
336 | |
337 #ifdef SIM_TOOLKIT | |
338 #define SAT_CBM_DNL_SUPPORT | |
339 #define SAT_SMS_DNL_SUPPORT | |
340 #define SAT_CALL_CTRL_SUPPORT | |
341 #define SAT_CALL_REQ_SUPPORT | |
342 #endif | |
343 | |
344 /* | |
345 * Engineering Mode | |
346 * | |
347 * Description : The configuration enables feature flag for engineering mode under WIN32. | |
348 * | |
349 * Options: #define FF_EM_MODE engineering mode is supported | |
350 * | |
351 */ | |
352 | |
353 //#if defined (WIN32) | |
354 //#define FF_EM_MODE | |
355 //#endif | |
356 | |
357 /* | |
358 * OPTION_REF | |
359 * | |
360 * Description : There are two ways defined to communicate | |
361 * between protocol stack entities. Either by | |
362 * copying buffers or by exchanging buffer | |
363 * addresses. This options defines which | |
364 * way is used. | |
365 * | |
366 * Options: #define OPTION_REF communication is | |
367 * carried out by | |
368 * exchanging buffer addresses | |
369 * #undef OPTION_REF communication is | |
370 * carried out by | |
371 * copying buffers | |
372 */ | |
373 | |
374 #define OPTION_REF | |
375 | |
376 /* | |
377 * OPTION_LENGTH | |
378 * | |
379 * Description : If the communication is carried out by | |
380 * exchanging buffer addresses it is not | |
381 * necessary to calculate the length of | |
382 * the buffer. This option suppresses | |
383 * the calculation of the size parameter | |
384 * of the sending communication buffer. | |
385 * | |
386 * Options: #undef OPTION_LENGTH size parameter is set | |
387 * to zero. | |
388 * #define OPTION_LENGTH size parameter is set | |
389 * to buffer size | |
390 */ | |
391 | |
392 #define OPTION_LENGTH | |
393 | |
394 /* | |
395 * OPTION_SET_CONFIG_ONLY | |
396 * | |
397 * Description : The pei_config () function is used | |
398 * to set and/or to read dynamic configuration. | |
399 * The possibility to read a dynamic configuration | |
400 * is switched off by this configuration. | |
401 * | |
402 * Options: #define OPTION_SET_CONFIG_ONLY | |
403 * It is not possible to read | |
404 * a dynamic configuration | |
405 * #undef OPTION_SET_CONFIG_ONLY | |
406 * It is possible to read | |
407 * a dynamic configuration | |
408 */ | |
409 | |
410 #define OPTION_SET_CONFIG_ONLY | |
411 | |
412 /* | |
413 * OPTION_GSM_ONLY | |
414 * | |
415 * Description : If the environment ensures that only GSM | |
416 * primitives are forwarded to the protocol | |
417 * stack entity this option suppresses the | |
418 * use of the vsi_c_primitive() function. | |
419 * | |
420 * Options: #define OPTION_GSM_ONLY | |
421 * The environment sends | |
422 * only GSM primitives | |
423 * #undef OPTION_GSM_ONLY | |
424 * The environment sends | |
425 * GSM and SYSTEM primitives | |
426 */ | |
427 | |
428 #undef OPTION_GSM_ONLY | |
429 | |
430 /* | |
431 * OPTION_TIMEOUT_SYNC | |
432 * | |
433 * Description : If the environment ensures that the | |
434 * pei_primitive and pei_timeout function | |
435 * not called at the same time this option | |
436 * suppresses the use of the vsi_c_awake() | |
437 * function. The timeout-handling is started | |
438 * directly by the pei_timeout() function. | |
439 * | |
440 * Options: #define OPTION_TIMOUT_SYNC | |
441 * direct timeout-handling | |
442 * #undef OPTION_TIMEOUT_SYNC | |
443 * indirect timeout-handling | |
444 * by using vsi_c_awake () | |
445 */ | |
446 | |
447 #undef OPTION_TIMEOUT_SYNC | |
448 | |
449 /* | |
450 * OPTION_SIGNAL | |
451 * | |
452 * Description : The options defines whether signal processing | |
453 * in the entity is possible or not. | |
454 * | |
455 * Options: #define OPTION_SIGNAL | |
456 * Signal processing is possible | |
457 * #undef OPTION_SIGNAL | |
458 * Signal processing is not possible | |
459 * | |
460 */ | |
461 | |
462 #define OPTION_SIGNAL | |
463 | |
464 /* | |
465 * OPTION_TIMER | |
466 * | |
467 * Description : The options defines whether timer values are | |
468 * changeable by dynamic configuration or not. | |
469 * | |
470 * Options: #define OPTION_TIMER | |
471 * Timer values are changeable | |
472 * #undef OPTION_TIMER | |
473 * Timer values are not | |
474 * changeable | |
475 */ | |
476 | |
477 #if !defined (NCONFIG) | |
478 #define OPTION_TIMER | |
479 #else | |
480 #undef OPTION_TIMER | |
481 #endif | |
482 | |
483 /* | |
484 * OPTION_RELATIVE | |
485 * | |
486 * Description : If the compiler for the target system | |
487 * uses relative addressing it is possible | |
488 * that the offset at run-time must be | |
489 * added to some jump tables containing only | |
490 * the offset at compile-time. | |
491 * | |
492 * Options: #define OPTION_RELATIVE | |
493 * add run-time offset | |
494 * #undef OPTION_RELATIVE | |
495 * don't add run-time offset | |
496 */ | |
497 | |
498 #undef OPTION_RELATIVE | |
499 | |
500 /* | |
501 * OPTION_MULTI_INSTANCE | |
502 * MAX_INSTANCES | |
503 * | |
504 * | |
505 * Description : The option is used if multiple instances are | |
506 * used. The routing information is stored in the | |
507 * header (T_ROUTE route). The routing information | |
508 * consists of instance number (inst_no), | |
509 * channel number (chan_no) and timeslot number | |
510 * (ts_no). The upper layer uses instance number | |
511 * for routing, at the interface to physical layer | |
512 * the channel and timeslot number are used. The | |
513 * constant MAX_INSTANCES defines the maximum of | |
514 * instances. | |
515 * | |
516 * Options: #define OPTION_MULTI_INSTANCE | |
517 * use multi instances | |
518 * #undef OPTION_MULTI_INSTANCE | |
519 * only one instance | |
520 */ | |
521 | |
522 #undef OPTION_MULTI_INSTANCE | |
523 #define MAX_INSTANCES 1 | |
524 | |
525 /*==== TYPES ======================================================*/ | |
526 /* | |
527 * T_PRIM_HEADER | |
528 * | |
529 * Description : This type definition defines the custom specific | |
530 * part of a primitive. All primitives have the | |
531 * general format: header followed by data. The | |
532 * header of a primitive is changeable according to | |
533 * the requirements of the target system. | |
534 * Hints: Only the operation code opc as a USHORT value must | |
535 * be present. For multi-instance protocol stacks | |
536 * the routing information must be include in the | |
537 * header (T_ROUTE route). | |
538 */ | |
539 | |
540 #ifdef OPTION_MULTI_INSTANCES | |
541 | |
542 typedef struct | |
543 { | |
544 USHORT inst_no; | |
545 USHORT chan_no; | |
546 UBYTE ts_no; | |
547 } T_ROUTE; | |
548 | |
549 #endif | |
550 | |
551 #if !defined (T_PRIM_HEADER_DEFINED) | |
552 | |
553 #define T_PRIM_HEADER_DEFINED | |
554 | |
555 #ifdef _TMS470 | |
556 | |
557 typedef struct | |
558 { | |
559 USHORT opc; /* equal to int SignalCode */ | |
560 USHORT opc2; | |
561 USHORT len; | |
562 USHORT idx; | |
563 T_sdu *sdu; | |
564 UBYTE * Sender; /* not used */ | |
565 UBYTE * SigP; /* Pointer to data area */ | |
566 } T_PRIM_HEADER; | |
567 | |
568 #else | |
569 | |
570 typedef struct | |
571 { | |
572 UBYTE ps; | |
573 UBYTE fill; | |
574 UBYTE snd; | |
575 UBYTE rcv; | |
576 ULONG timestamp; | |
577 USHORT len; | |
578 USHORT idx; | |
579 T_sdu *sdu; | |
580 USHORT lng; | |
581 #ifdef OPTION_MULTI_INSTANCES | |
582 T_ROUTE route; | |
583 #endif | |
584 USHORT opc; | |
585 USHORT opc2; | |
586 } T_PRIM_HEADER; | |
587 | |
588 #endif | |
589 | |
590 #endif /* T_PRIM_HEADER_DEFINED */ | |
591 | |
592 #endif /* CUSTOM_H */ |