FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/include/condat/gsm.h @ 1034:405b5469abc4 default tip
top README: repository change notice
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 12 Jun 2016 19:06:34 +0000 |
parents | 643379e7e141 |
children |
rev | line source |
---|---|
662
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 | Project : GSM-PS (6147) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 | Modul : GSM |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 | All rights reserved. |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 | |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 | Purpose : Definition of global constants, types, and macros |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 | for the GSM Protocol Stack |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 +----------------------------------------------------------------------------- |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 #ifndef GSM_H |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 #define GSM_H |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 #ifndef CCONST_CDG |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 #include "mconst.cdg" /* MAX_BITSTREAM_LEN */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 #endif /* CCONST_CDG */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #ifndef PCONST_CDG |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #include "pconst.cdg" /* MAX_PSTRUCT_LEN */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 #endif /* PCONST_CDG */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 /*==== CONSTANTS ==================================================*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #define MAX_2_PRM 1 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #define MAX_4_PRM 3 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #define MAX_8_PRM 7 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #define MAX_16_PRM 15 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #define MAX_32_PRM 31 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #define PRM_MASK 0x00FF /* protocol primitive mask*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 #define OPC_MASK 0xFF00 /* entity mask */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 #define SYS_MASK 0x8000 /* system primitive mask */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 #define SYS_CONFIG_REQ 0xF000 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #define L3_CODING_OFFSET 32 /* coding offset in bits */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 * Not Present Value |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 #define NOT_PRESENT_8BIT 0xFF |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 #define NOT_PRESENT_CHAR (CHAR)0xFF |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 #define NOT_PRESENT_16BIT 0xFFFF |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 #define NOT_PRESENT_32BIT 0xFFFFFFFFL |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 #define INVALID_ADDRESS 0xFFFFFFFFL |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 #define SET_NOT_PRESENT(A) ((A) = ((sizeof ((A)) EQ 1)\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 ? NOT_PRESENT_8BIT\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 : (sizeof ((A)) EQ 2)\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 ? NOT_PRESENT_16BIT\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 : NOT_PRESENT_32BIT)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 #define IS_PRESENT(A) ((A) NEQ ((sizeof ((A)) EQ 1)\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 ? NOT_PRESENT_8BIT\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 : (sizeof ((A)) EQ 2)\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 ? NOT_PRESENT_16BIT\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 : NOT_PRESENT_32BIT)) /* VK 09-12-96 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 #ifndef NEW_FRAME |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 * Static Configurations |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 #ifndef TC_FUNC |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 #define TC_FUNC 1 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 #ifdef TRACE_FKT |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 #define TRACE_FUNCTION(a) vsi_o_trace(VSI_CALLER TC_FUNC,a); |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 // China change HM 6.07.00, one of this commented out |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 #define TRACE_FUNCTION(a) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 //#define TRACE_FUNCTION(a) vsi_o_mtrace(a); |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 #ifndef TC_EVE |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 #define TC_EVE 2 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 #ifdef TRACE_EVE |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 #define TRACE_EVENT(a) vsi_o_trace(VSI_CALLER TC_EVENT,a); |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 #define TRACE_EVENT(a) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 #ifndef TC_ERROR |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 #define TC_ERROR 4 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 #ifdef TRACE_ERR |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 #define TRACE_ERROR(a) vsi_o_trace(VSI_CALLER TC_ERROR,a); |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 #define TRACE_ERROR(a) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 #ifndef TC_PRIM |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 #define TC_PRIM 8 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 #ifdef TRACE_PRIM |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 #define TRACE_PRIMITIVE(a) vsi_o_trace(VSI_CALLER TC_PRIM,a); |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 #define TRACE_PRIMITIVE(a) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 #ifndef TC_SYSTEM |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 #define TC_SYSTEM 16 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 * Assert wrapper |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 #if defined NDEBUG |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 #define TRACE_ASSERT(e) ((void)0) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 #ifdef SHARED_VSI |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 #define TRACE_ASSERT(e) if ( !(e) ) vsi_o_assert("",#e,__FILE__,__LINE__) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 #define TRACE_ASSERT(e) if ( !(e) ) vsi_o_assert(#e,__FILE__,__LINE__) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 #ifdef assert |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 #undef assert |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 #define assert TRACE_ASSERT |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 #endif /* NEW_FRAME */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 * Memory Management(I) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 #ifdef OPTION_REF |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 #define FREE_BUFFER(p) vsi_c_free(VSI_CALLER (void **)&p) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 /*lint -e773 Expression-like macro not parenthesized*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 #define NEW_BUFFER(p,s) T_PRIM *p = vsi_c_new(VSI_CALLER (T_VSI_CSIZE)((s)+sizeof(T_PRIM_HEADER))) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 /*lint +e773*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 #define FREE_BUFFER(p) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 #define NEW_BUFFER(p,s) UBYTE buf_##p [(s)+sizeof(T_PRIM_HEADER)]; T_PRIM *p=(T_PRIM*)p1 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 |
663
643379e7e141
gsm-fw/include/condat: initial round of fixes
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
662
diff
changeset
|
154 #if 0 //!defined (_TMS470) |
662
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 #define Sprintf sprintf |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 int sprintf( char *buffer, const char *format, ... ); |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 #ifndef NEW_FRAME |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 |
663
643379e7e141
gsm-fw/include/condat: initial round of fixes
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
662
diff
changeset
|
162 #if 1 //#ifdef _TMS470 |
662
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 #define SET_PRIM_OPCODE(P,O) P->custom.opc = O; P->custom.opc2 = 0 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 #define SET_PRIM_OPCODE(P,O) P->custom.opc = O |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 #ifdef OPTION_LENGTH |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 #define SEND_PRIM(E,P,O,T) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER) + sizeof (T)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 #define SEND_PRIM_0(E,P,O) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 #define SEND_PRIM_SDU(E,P,O,T,L) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, (T_VSI_CSIZE) (sizeof(T_PRIM_HEADER) + sizeof (T) + (L) - SDU_TRAIL)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 #define SEND_PRIM(E,P,O,T) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER) + sizeof (T)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 #define SEND_PRIM_0(E,P,O) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 #define SEND_PRIM_SDU(E,P,O,T,L) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, (T_VSI_CSIZE) (sizeof(T_PRIM_HEADER) + sizeof (T) + (L) - SDU_TRAIL)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 #endif /* NEW_FRAME */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 * declares a pointer variable (D) of the type T |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 * and initialize it with the startaddress of the data part |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 * of the primitive P |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 #ifndef ALLOC_CHECK |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 #if defined (_TMS470) AND defined (NWARN) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 #define PRIM_ACCESS(P,S) &P->data |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 #define PRIM_ACCESS(P,S) P->data |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 #define PRIM_ACCESS(P,S) vsi_c_access(VSI_CALLER P,S) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 /*lint -e773 Expression-like macro not parenthesized*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 #define PRIM_CAST(P,D,T) T *D = (T *) PRIM_ACCESS (P, sizeof (T)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 /*lint +e773*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 * declares a pointer variable (D) of the type T and |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 * initialize it with the start address of the global declared |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 * buffer _decodedMsg[] wich contains the decoded message |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 * structure before encoding or after decoding the message |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 * with CCD. |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 /*lint -e773 Expression-like macro not parenthesized*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 #define MSG_CAST(D,T) T *D = (T *) _decodedMsg |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 /*lint +e773*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 * Memory Management(II) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
209 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 #ifndef NEW_FRAME |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 #if defined (_TMS470) AND defined (NWARN) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 #define P2D(P) (&(P)->data) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 #define P2D(P) ((P)->data) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 #define D2P(D) ((T_PRIM*)((T_PRIM_HEADER*)(D)-1)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 #ifdef ALLOC_CHECK |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 #define P2D_AC(P,T) PRIM_ACCESS(P,sizeof(T)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 #define P2D_AC(P,T) P2D(P) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 #define PRIM_TO_DATA P2D |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 #define DATA_TO_PRIM D2P |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 #define P_OPC(P) (P)->custom.opc |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 #define P_OPC2(P) (P)->custom.opc2 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 #define P_LEN(P) (P)->custom.len |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 #define P_TID(P) (P)->custom.tid |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 #define P_SDU(P) (P)->custom.sdu |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 #define D_OPC(D) P_OPC(D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 #define D_OPC2(D) P_OPC2(D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 #define D_LEN(D) P_LEN(D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 #define D_TID(D) P_TID(D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 #define D_SDU(D) P_SDU(D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
239 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
240 #define D_SDU_LEN(D) D_SDU(D)->l_buf |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 #define D_SDU_OFF(D) D_SDU(D)->o_buf |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
243 #define BITS_PER_BYTE 8 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
244 #define BYTELEN(BITLEN) ((BITLEN)<=0?0:((((BITLEN)-1)/BITS_PER_BYTE)+1)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
245 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
246 #define PRIM_SIZE(D) (sizeof(T_PRIM_HEADER)+sizeof(*(D))) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
247 #define PRIM_SIZE_SDU(D) (PRIM_SIZE(D)+BYTELEN((D)->sdu.o_buf+(D)->sdu.l_buf)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
248 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
249 #define PSIZE(D) (D_LEN(D)+((D_SDU(D)==0)?0:(BYTELEN(D_SDU_LEN(D)+D_SDU_OFF(D))-SDU_TRAIL))) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
250 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
251 #define SIZ(T) (sizeof(T_PRIM_HEADER)+sizeof(T)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
252 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 #define SIZ_SDU(T,M) (SIZ(T)+BYTELEN((M)+ENCODE_OFFSET)-SDU_TRAIL) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
255 #define P_ALL(T) (T_PRIM *) vsi_c_new(VSI_CALLER (T_VSI_CSIZE)SIZ(T) ) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
256 #define P_ALL_SDU(T,M) (T_PRIM *) vsi_c_new(VSI_CALLER (T_VSI_CSIZE)SIZ_SDU(T,M)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 #endif /* NEW_FRAME */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
259 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
260 #define OFFSETOF(P,C) ((char*)&(P->C) - (char*)P) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
261 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 #ifdef NTRACE |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
263 #define xxxNotify(A,B,C,D,E) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
264 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
265 #define xxxNotify(A,B,C,D,E) /* not used yet */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
266 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
269 #define ACT_PALLOC 0x01 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
270 #define ACT_PALLOC_SDU 0x02 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
271 #define ACT_PALLOC_MSG 0x03 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
272 #define ACT_PREUSE 0x04 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
273 #define ACT_PREUSE_SDU 0x05 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
274 #define ACT_PREUSE_MSG 0x06 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 #define ACT_PFREE 0x07 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
276 #define ACT_PSEND 0x08 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 #define ACT_PSTORE 0x09 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
278 #define ACT_PRETRIEVE 0x0A |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
279 #define ACT_PACCESS 0x0B |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
280 #define ACT_PPASS 0x0C |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
281 #define ACT_PCAST 0x0D |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
282 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
283 /*** memory alloction ***/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
284 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
285 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
286 #ifndef NEW_FRAME |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
287 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
288 #define PSENDX PSEND |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
289 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
290 #define PALLOC(D,T) T_##T *D = (T_##T*)P2D(P_ALL(T_##T));\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
291 D_OPC(D) = (T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
292 D_OPC2(D) = 0;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
293 D_LEN(D) = SIZ(T_##T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
294 D_SDU(D) = 0;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
295 xxxNotify(ACT_PALLOC,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
296 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
297 #define PALLOC_MSG(D,T,M) T_##T *D = (T_##T*)P2D(P_ALL_SDU(T_##T,BSIZE_##M));\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
298 D_OPC(D) = (T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
299 D_OPC2(D) = 0;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
300 D_LEN(D) = SIZ(T_##T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
301 D_SDU(D) = &((D)->sdu);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
302 D_SDU_LEN(D) = (BSIZE_##M);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
303 D_SDU_OFF(D) = ENCODE_OFFSET;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
304 xxxNotify(ACT_PALLOC_MSG,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
305 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
306 #define PALLOC_SDU(D,T,N) T_##T *D = (T_##T*)P2D(P_ALL_SDU(T_##T,N));\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
307 D_OPC(D) = (T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
308 D_OPC2(D) = 0;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
309 D_LEN(D) = SIZ(T_##T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
310 D_SDU(D) = &((D)->sdu);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
311 D_SDU_LEN(D) = (N);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
312 D_SDU_OFF(D) = ENCODE_OFFSET;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
313 xxxNotify(ACT_PALLOC_SDU,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
314 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
315 #define PREUSE(D0,D,T) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
316 D_OPC(D) = (T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
317 D_OPC2(D) = 0;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
318 D_LEN(D) = SIZ(T_##T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
319 D_SDU(D) = 0;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
320 xxxNotify(ACT_REUSE,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
321 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
322 #define PREUSE_MSG(D,T,M) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
323 D_OPC(D) = (T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
324 D_OPC2(D) = 0;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
325 D_LEN(D) = SIZ(T_##T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
326 D_SDU(D) = &((D)->sdu);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
327 D_SDU_LEN(D) = (BSIZE_##M);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
328 D_SDU_OFF(D) = ENCODE_OFFSET;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
329 xxxNotify(ACT_PREUSE_MSG,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
330 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
331 #define PREUSE_SDU(D,T,N) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
332 USHORT BSIZE_##N;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
333 D_OPC(D) = (T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
334 D_OPC2(D) = 0;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
335 D_LEN(D) = SIZ(T_##T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
336 D_SDU(D) = &((D)->sdu);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
337 D_SDU_LEN(D) = (N);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
338 D_SDU_OFF(D) = ENCODE_OFFSET;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
339 xxxNotify(ACT_PREUSE_SDU,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
340 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
341 #define PFREE(D) { void *z=(void*)D2P(D);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
342 vsi_c_free(VSI_CALLER (void **)&z);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
343 xxxNotify(ACT_PFREE,VSI_CALLER,__FILE__,__LINE__,D2P(D)); } |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
344 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
345 #define PSEND(E,D) PTRACE_OUT(D_OPC(D));\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
346 vsi_c_send (VSI_CALLER hComm##E, D2P(D), (T_VSI_CSIZE) PSIZE(D));\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
347 xxxNotify(ACT_PSEND,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
348 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
349 #define PPASS(D0,D,T) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
350 D_OPC(D) = (T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
351 xxxNotify(ACT_PPASS,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
352 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
353 #define PACCESS(D) xxxNotify(ACT_PACCESS,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
354 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
355 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
356 #endif /* NEW_FRAME */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
357 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
358 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
359 * to achieve backward compatibility |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
360 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
361 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
362 #if defined (NEW_FRAME) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
363 #ifdef TI_PS_HCOMM_CHANGE |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
364 #define PSENDX(A,B) PSEND(_hComm##A,B) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
365 #define _hCommACI hCommACI |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
366 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
367 #define PSENDX(A,B) PSEND(hComm##A,B) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
368 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
369 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
370 #define PSENDX PSEND |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
371 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
372 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
373 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
374 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
375 #define PRETRIEVE /* NOT DEFINED YET */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
376 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
377 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
378 #define MCAST(D,T) MSG_CAST(D,T_##T) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
379 #define PCAST(P,D,T) T_##T *D = (T_##T*)P2D_AC(P,T);\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
380 P_OPC(P)=T;\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
381 xxxNotify(ACT_PCAST,VSI_CALLER,__FILE__,__LINE__,D2P(D)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
382 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
383 #define PCOPY(DEST,SOURCE) memcpy(DEST,SOURCE,PSIZE(SOURCE)-sizeof(T_PRIM_HEADER)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
384 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
385 /*** trace primitive, trace state ***/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
386 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
387 #ifndef NEW_FRAME |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
388 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
389 #ifdef NTRACE |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
390 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
391 #define SET_STATE(PROCESS,STATE) ENTITY_DATA->state[PROCESS] = STATE |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
392 #define GET_STATE(PROCESS) ENTITY_DATA->state[PROCESS] |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
393 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
394 #define PTRACE_IN(OPC) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
395 #define PTRACE_OUT(OPC) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
396 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
397 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
398 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
399 #define SET_STATE(PROCESS,STATE)\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
400 ENTITY_DATA->state[PROCESS] =\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
401 vsi_o_strace (VSI_CALLER\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
402 PROCESS_NAME[PROCESS],\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
403 PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ],\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
404 PROCESS##_NAME [ STATE ],\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
405 STATE ) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
406 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
407 #define GET_STATE(PROCESS)\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
408 vsi_o_strace (VSI_CALLER\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
409 PROCESS_NAME[PROCESS],\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
410 PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ],\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
411 NULL ,\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
412 ENTITY_DATA->state[PROCESS] ) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
413 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
414 #define PTRACE_IN(OPC) vsi_o_ptrace (VSI_CALLER OPC, 0) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
415 #define PTRACE_OUT(OPC) vsi_o_ptrace (VSI_CALLER OPC, 1) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
416 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
417 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
418 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
419 #endif /* NEW_FRAME */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
420 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
421 * Timer, Jump Table, Configuration |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
422 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
423 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
424 #ifdef OPTION_TIMER |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
425 #define TSTART(i,h,v) tim_start_timer(i,h,v) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
426 #else |
663
643379e7e141
gsm-fw/include/condat: initial round of fixes
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
662
diff
changeset
|
427 #define TSTART(i,h,v) vsi_t_start(VSI_CALLER h,v) |
662
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
428 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
429 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
430 #ifdef OPTION_RELATIVE |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
431 #define JUMP(a) (a+offset) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
432 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
433 #define JUMP(a) (a) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
434 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
435 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
436 #ifdef OPTION_SET_CONFIG_ONLY |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
437 #define GET_CONFIG(s,i) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
438 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
439 #define GET_CONFIG(s,i) pei_get_config(s,i) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
440 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
441 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
442 /* Cause Concept (begin) */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
443 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
444 * For a definition of the cause concept please refer to document number |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
445 * 8443.711, named in February 2002 "cause_concept.doc" |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
446 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
447 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
448 /* definitions for calling the macros */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
449 /* DefinedBy bit */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
450 #define DEFBY_STD 0 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
451 #define DEFBY_CONDAT 1 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
452 /* OriginatingSide bit */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
453 #define ORIGSIDE_NET 0 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
454 #define ORIGSIDE_MS 1 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
455 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
456 * note that OriginatingEntity definitions are in the SAP GSMCOM, which is a |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
457 * central (pseudo) SAP and the definitions are referenced in the using |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
458 * "real" SAPs, like e.g. MNSS SAP for the originating entity SS |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
459 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
460 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
461 /* need to decide whether to mask ORIGIN_ENTITY (max. 6 bits) in the following macro */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
462 #define CAUSE_MAKE(DEFINED_BY, ORIGIN_SIDE, ORIGIN_ENTITY, CAUSE_VALUE) \ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
463 (USHORT)(((CAUSE_VALUE) & 0x00FF) |\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
464 ((DEFINED_BY) << 15) |\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
465 ((ORIGIN_SIDE) << 14) |\ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
466 ((ORIGIN_ENTITY) << 8)) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
467 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
468 /* Get the cause value without the originating entity */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
469 #define GET_CAUSE_VALUE(cause) (UBYTE)((cause) & 0xFF) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
470 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
471 /* Get the entity originating the cause */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
472 #define GET_CAUSE_ORIGIN_ENTITY(cause) (UBYTE)(((cause) >> 8) & 0x3F) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
473 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
474 /* Get the DefinedBy bit */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
475 #define GET_CAUSE_DEFBY(cause) (UBYTE)((cause) >> 15) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
476 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
477 /* Get the OriginatingSide bit */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
478 #define GET_CAUSE_ORIGSIDE(cause) (UBYTE)(((cause) >> 14) & 0x01) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
479 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
480 /* Determine if a cause is invalid */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
481 #define IS_CAUSE_INVALID(cause) (((cause) & 0x80FF) EQ 0x80FF) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
482 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
483 /* Cause Concept (end) */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
484 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
485 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
486 /*==== TYPES ======================================================*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
487 #if defined (_TMS470) && defined (NWARN) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
488 typedef struct |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
489 { |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
490 UBYTE x [MAX_PSTRUCT_LEN |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
491 + ( |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
492 L3_CODING_OFFSET |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
493 + MAX_BITSTREAM_LEN |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
494 ) / 8 + 1 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
495 ]; |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
496 } T_PARAMETER; |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
497 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
498 typedef struct |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
499 { |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
500 T_PRIM_HEADER custom; |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
501 T_PARAMETER data; |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
502 } T_PRIM; |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
503 #else |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
504 typedef struct |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
505 { |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
506 T_PRIM_HEADER custom; |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
507 UBYTE data [MAX_PSTRUCT_LEN |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
508 + ( |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
509 L3_CODING_OFFSET |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
510 + MAX_BITSTREAM_LEN |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
511 ) / 8 + 1 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
512 ]; |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
513 } T_PRIM; |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
514 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
515 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
516 /*==== EXPORT =====================================================*/ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
517 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
518 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
519 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
520 /* |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
521 * Multithreading |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
522 */ |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
523 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
524 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
525 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
526 #ifdef OPTION_MULTITHREAD |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
527 #if defined (ENTITY_CST) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
528 #define _ENTITY_PREFIXED(N) cst_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
529 #elif defined (ENTITY_ACI) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
530 #define _ENTITY_PREFIXED(N) aci_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
531 #elif defined (ENTITY_MFW) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
532 #define _ENTITY_PREFIXED(N) aci_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
533 #elif defined (ENTITY_MMI) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
534 #define _ENTITY_PREFIXED(N) aci_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
535 #elif defined (ENTITY_SMI) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
536 #define _ENTITY_PREFIXED(N) aci_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
537 #elif defined (ENTITY_SIM) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
538 #define _ENTITY_PREFIXED(N) sim_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
539 #elif defined (ENTITY_PL) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
540 #define _ENTITY_PREFIXED(N) pl_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
541 #elif defined (ENTITY_L1) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
542 #define _ENTITY_PREFIXED(N) l1_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
543 #elif defined (ENTITY_CC) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
544 #define _ENTITY_PREFIXED(N) cc_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
545 #elif defined (ENTITY_SS) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
546 #define _ENTITY_PREFIXED(N) ss_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
547 #elif defined (ENTITY_ESIM) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
548 #define _ENTITY_PREFIXED(N) esim_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
549 #elif defined (ENTITY_SMS) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
550 #define _ENTITY_PREFIXED(N) sms_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
551 #elif defined (ENTITY_MM) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
552 #define _ENTITY_PREFIXED(N) mm_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
553 #elif defined (ENTITY_RR) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
554 #define _ENTITY_PREFIXED(N) rr_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
555 #elif defined (ENTITY_DL) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
556 #define _ENTITY_PREFIXED(N) dl_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
557 #elif defined (ENTITY_L2R) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
558 #define _ENTITY_PREFIXED(N) l2r_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
559 #elif defined (ENTITY_TRA) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
560 #define _ENTITY_PREFIXED(N) tra_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
561 #elif defined (ENTITY_RLP) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
562 #define _ENTITY_PREFIXED(N) rlp_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
563 #elif defined (ENTITY_T30) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
564 #define _ENTITY_PREFIXED(N) t30_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
565 #elif defined (ENTITY_FAD) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
566 #define _ENTITY_PREFIXED(N) fad_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
567 #elif defined (ENTITY_RA) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
568 #define _ENTITY_PREFIXED(N) ra_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
569 #elif defined (ENTITY_WAP) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
570 #define _ENTITY_PREFIXED(N) wap_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
571 #elif defined (ENTITY_UDP) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
572 #define _ENTITY_PREFIXED(N) udp_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
573 #elif defined (ENTITY_IP) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
574 #define _ENTITY_PREFIXED(N) ip_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
575 #elif defined (ENTITY_RRLP) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
576 #define _ENTITY_PREFIXED(N) rrlp_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
577 #elif defined (ENTITY_PPP) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
578 #define _ENTITY_PREFIXED(N) ppp_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
579 #elif defined (ENTITY_BTI) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
580 #define _ENTITY_PREFIXED(N) bti_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
581 #elif defined (ENTITY_L1) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
582 #ifdef NEW_FRAME |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
583 #include "ofe.h" |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
584 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
585 #elif defined (ENTITY_TAP) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
586 #define _ENTITY_PREFIXED(N) tap_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
587 #elif defined (ENTITY_PCO) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
588 #define _ENTITY_PREFIXED(N) pco_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
589 #elif defined (ENTITY_PAN) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
590 #define _ENTITY_PREFIXED(N) pan_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
591 #elif defined (ENTITY_TST) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
592 #define _ENTITY_PREFIXED(N) tst_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
593 #elif defined (ENTITY_APP) |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
594 #define _ENTITY_PREFIXED(N) app_##N |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
595 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
596 #endif |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
597 |
a712c95b60c1
gsm-fw/include/condat: import of TI's g23m/condat/com/include
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
598 #endif |