comparison gsm-fw/include/condat/custom.h @ 662:a712c95b60c1

gsm-fw/include/condat: import of TI's g23m/condat/com/include custom.h, pwr.h and rtc.h taken from TCS211 version, the others are the versions from LoCosto
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 28 Sep 2014 01:14:48 +0000
parents
children 643379e7e141
comparison
equal deleted inserted replaced
661:c36fe9d1da7e 662:a712c95b60c1
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 #define RRLP_NAME "RRLP"
192
193
194 #ifdef FF_TRACE_OVER_MTST
195 #define MTST_NAME "MTST"
196 #endif /* FF_TRACE_OVER_MTST */
197
198 #ifdef GPRS
199 #define GMM_NAME "GMM"
200 #define GRR_NAME "GRR"
201 #define GRLC_NAME "GRLC"
202 #define PKTIO_NAME "PKT"
203 #define GPL_NAME "GRR"
204 #endif /* #ifdef GPRS */
205
206 #define DCM_NAME "MMI"
207 #define TCPIP_NAME "TCP"
208
209 #define APP_NAME "APP"
210 #define GDD_DIO_NAME "GDDI"
211
212 #ifndef NEW_FRAME
213 /*==== STATIC CONFIGURATION =======================================*/
214 /*
215 * TRACE_FKT
216 *
217 * Description : A trace string is send to the environment when a
218 * function is called.
219 *
220 * Options: #define TRACE_FKT configuration is active
221 * #undef TRACE_FKT configuration is not active
222 * #define TC_FUNC <n> used trace class
223 *
224 * Function Traces only under Windows and for MMI
225 */
226
227 /*
228 * It is nearly impossible to debug ACI/MFW/SMI without function traces
229 */
230 #if defined(WIN32) OR defined(ENTITY_MFW) OR defined(ENTITY_ACI) OR defined(ENTITY_SMI)
231 #define TRACE_FKT
232 #define TC_FUNC 1
233 #else
234 #undef TRACE_FKT
235 #endif
236
237 /*
238 * TRACE_EVE
239 *
240 * Description : A trace string is given to the environment when
241 * an event has happened, for example start of cell
242 * selection.
243 *
244 * Options: #define TRACE_EVE configuration is active
245 * #undef TRACE_EVE configuration is not active
246 * #define TC_EVENT <n> used trace class
247 */
248
249 #if !defined (NTRACE)
250 #define TRACE_EVE
251 #define TC_EVENT 2
252 #else
253 #undef TRACE_EVE
254 #endif
255
256 /*
257 * TRACE_ERR
258 *
259 * valid for : Mobile and Base Station
260 *
261 * Description : A trace string is given to the environment when
262 * an error has occured, for example parameter error
263 * by dynamic configuration.
264 *
265 * Options: #define TRACE_ERR configuration is active
266 * #undef TRACE_ERR configuration is not active
267 * #define TC_ERROR <n> used trace class
268 */
269
270 #if !defined (NTRACE)
271 #define TRACE_ERR
272 #define TC_ERROR 3
273 #else
274 #undef TRACE_ERR
275 #endif
276
277 /*
278 * TRACE_PRIM
279 *
280 * Description : A trace string is send to the environment when a
281 * primitive is received or send.
282 *
283 * Options: #define TRACE_PRIM configuration is active
284 * #undef TRACE_PRIM configuration is not active
285 * #define TC_PRIM <n> used trace class
286 */
287
288 #if !defined (NTRACE)
289 #define TRACE_PRIM
290 #define TC_PRIM 4
291 #else
292 #undef TRACE_PRIM
293 #endif
294
295 /*
296 * TRACE_STATE
297 *
298 * Description : A trace string is send to the environment when a
299 * state variable is changed or retrieved.
300 *
301 * Options: #define TRACE_STATE configuration is active
302 * #undef TRACE_STATE configuration is not active
303 * #define TC_STATE <n> used trace class
304 */
305
306 #if !defined (NTRACE)
307 #define TRACE_STATE
308 #define TC_STATE 8
309 #else
310 #undef TRACE_STATE
311 #endif
312
313 #endif /* NEW_FRAME */
314
315 /*
316 * SIM Application Toolkit
317 *
318 * Description : Depending of the general activation of SIM application
319 * Toolkit, specific parts can be activated
320 *
321 * Options: #define SAT_CBM_DNL_SUPPORT Cell Broadcast Data
322 * Download shall be supported
323 * #define SAT_SMS_DNL_SUPPORT SMS Data Download shall
324 * be supported
325 * #define SAT_CALL_CTRL_SUPPORT Call Control by SIM shall
326 * be supported
327 * #define SAT_CALL_REQ_SUPPORT Setup Call and Send SS/USSD
328 * shall be supported
329 */
330
331 #ifdef SIM_TOOLKIT
332 #define SAT_CBM_DNL_SUPPORT
333 #define SAT_SMS_DNL_SUPPORT
334 #define SAT_CALL_CTRL_SUPPORT
335 #define SAT_CALL_REQ_SUPPORT
336 #endif
337
338 /*
339 * Engineering Mode
340 *
341 * Description : The configuration enables feature flag for engineering mode under WIN32.
342 *
343 * Options: #define FF_EM_MODE engineering mode is supported
344 *
345 */
346
347 #if defined (WIN32)
348 #define FF_EM_MODE
349 #endif
350
351 /*
352 * OPTION_REF
353 *
354 * Description : There are two ways defined to communicate
355 * between protocol stack entities. Either by
356 * copying buffers or by exchanging buffer
357 * addresses. This options defines which
358 * way is used.
359 *
360 * Options: #define OPTION_REF communication is
361 * carried out by
362 * exchanging buffer addresses
363 * #undef OPTION_REF communication is
364 * carried out by
365 * copying buffers
366 */
367
368 #define OPTION_REF
369
370 /*
371 * OPTION_LENGTH
372 *
373 * Description : If the communication is carried out by
374 * exchanging buffer addresses it is not
375 * necessary to calculate the length of
376 * the buffer. This option suppresses
377 * the calculation of the size parameter
378 * of the sending communication buffer.
379 *
380 * Options: #undef OPTION_LENGTH size parameter is set
381 * to zero.
382 * #define OPTION_LENGTH size parameter is set
383 * to buffer size
384 */
385
386 #define OPTION_LENGTH
387
388 /*
389 * OPTION_SET_CONFIG_ONLY
390 *
391 * Description : The pei_config () function is used
392 * to set and/or to read dynamic configuration.
393 * The possibility to read a dynamic configuration
394 * is switched off by this configuration.
395 *
396 * Options: #define OPTION_SET_CONFIG_ONLY
397 * It is not possible to read
398 * a dynamic configuration
399 * #undef OPTION_SET_CONFIG_ONLY
400 * It is possible to read
401 * a dynamic configuration
402 */
403
404 #define OPTION_SET_CONFIG_ONLY
405
406 /*
407 * OPTION_GSM_ONLY
408 *
409 * Description : If the environment ensures that only GSM
410 * primitives are forwarded to the protocol
411 * stack entity this option suppresses the
412 * use of the vsi_c_primitive() function.
413 *
414 * Options: #define OPTION_GSM_ONLY
415 * The environment sends
416 * only GSM primitives
417 * #undef OPTION_GSM_ONLY
418 * The environment sends
419 * GSM and SYSTEM primitives
420 */
421
422 #undef OPTION_GSM_ONLY
423
424 /*
425 * OPTION_TIMEOUT_SYNC
426 *
427 * Description : If the environment ensures that the
428 * pei_primitive and pei_timeout function
429 * not called at the same time this option
430 * suppresses the use of the vsi_c_awake()
431 * function. The timeout-handling is started
432 * directly by the pei_timeout() function.
433 *
434 * Options: #define OPTION_TIMOUT_SYNC
435 * direct timeout-handling
436 * #undef OPTION_TIMEOUT_SYNC
437 * indirect timeout-handling
438 * by using vsi_c_awake ()
439 */
440
441 #undef OPTION_TIMEOUT_SYNC
442
443 /*
444 * OPTION_SIGNAL
445 *
446 * Description : The options defines whether signal processing
447 * in the entity is possible or not.
448 *
449 * Options: #define OPTION_SIGNAL
450 * Signal processing is possible
451 * #undef OPTION_SIGNAL
452 * Signal processing is not possible
453 *
454 */
455
456 #define OPTION_SIGNAL
457
458 /*
459 * OPTION_TIMER
460 *
461 * Description : The options defines whether timer values are
462 * changeable by dynamic configuration or not.
463 *
464 * Options: #define OPTION_TIMER
465 * Timer values are changeable
466 * #undef OPTION_TIMER
467 * Timer values are not
468 * changeable
469 */
470
471 #if !defined (NCONFIG)
472 #define OPTION_TIMER
473 #else
474 #undef OPTION_TIMER
475 #endif
476
477 /*
478 * OPTION_RELATIVE
479 *
480 * Description : If the compiler for the target system
481 * uses relative addressing it is possible
482 * that the offset at run-time must be
483 * added to some jump tables containing only
484 * the offset at compile-time.
485 *
486 * Options: #define OPTION_RELATIVE
487 * add run-time offset
488 * #undef OPTION_RELATIVE
489 * don't add run-time offset
490 */
491
492 #undef OPTION_RELATIVE
493
494 /*
495 * OPTION_MULTI_INSTANCE
496 * MAX_INSTANCES
497 *
498 *
499 * Description : The option is used if multiple instances are
500 * used. The routing information is stored in the
501 * header (T_ROUTE route). The routing information
502 * consists of instance number (inst_no),
503 * channel number (chan_no) and timeslot number
504 * (ts_no). The upper layer uses instance number
505 * for routing, at the interface to physical layer
506 * the channel and timeslot number are used. The
507 * constant MAX_INSTANCES defines the maximum of
508 * instances.
509 *
510 * Options: #define OPTION_MULTI_INSTANCE
511 * use multi instances
512 * #undef OPTION_MULTI_INSTANCE
513 * only one instance
514 */
515
516 #undef OPTION_MULTI_INSTANCE
517 #define MAX_INSTANCES 1
518
519 /*==== TYPES ======================================================*/
520 /*
521 * T_PRIM_HEADER
522 *
523 * Description : This type definition defines the custom specific
524 * part of a primitive. All primitives have the
525 * general format: header followed by data. The
526 * header of a primitive is changeable according to
527 * the requirements of the target system.
528 * Hints: Only the operation code opc as a USHORT value must
529 * be present. For multi-instance protocol stacks
530 * the routing information must be include in the
531 * header (T_ROUTE route).
532 */
533
534 #ifdef OPTION_MULTI_INSTANCES
535
536 typedef struct
537 {
538 USHORT inst_no;
539 USHORT chan_no;
540 UBYTE ts_no;
541 } T_ROUTE;
542
543 #endif
544
545 #if !defined (T_PRIM_HEADER_DEFINED)
546
547 #define T_PRIM_HEADER_DEFINED
548
549 #ifdef _TMS470
550
551 typedef struct
552 {
553 USHORT opc; /* equal to int SignalCode */
554 USHORT opc2;
555 USHORT len;
556 USHORT idx;
557 T_sdu *sdu;
558 UBYTE * Sender; /* not used */
559 UBYTE * SigP; /* Pointer to data area */
560 } T_PRIM_HEADER;
561
562 #else
563
564 typedef struct
565 {
566 UBYTE ps;
567 UBYTE fill;
568 UBYTE snd;
569 UBYTE rcv;
570 ULONG timestamp;
571 USHORT len;
572 USHORT idx;
573 T_sdu *sdu;
574 USHORT lng;
575 #ifdef OPTION_MULTI_INSTANCES
576 T_ROUTE route;
577 #endif
578 USHORT opc;
579 USHORT opc2;
580 } T_PRIM_HEADER;
581
582 #endif
583
584 #endif /* T_PRIM_HEADER_DEFINED */
585
586 #endif /* CUSTOM_H */