comparison src/aci2/alr/alr_csf.c @ 3:93999a60b835

src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2016 00:29:36 +0000
parents
children 5e39123540e6
comparison
equal deleted inserted replaced
2:c41a534f33c6 3:93999a60b835
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS
4 | Modul : alr_CSF
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : This Modul defines the customer specific functions.
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef ALR_CSF_C
22 #define ALR_CSF_C
23
24 #define ENTITY_PL
25
26 /*==== INCLUDES ===================================================*/
27 #include <string.h>
28 #include <stdlib.h>
29 #include <ctype.h>
30 #include "typedefs.h"
31 #include "pconst.cdg"
32 #include "mconst.cdg"
33 #include "message.h"
34 #include "ccdapi.h"
35 #include "vsi.h"
36 #include "custom.h"
37 #include "gsm.h"
38 #include "prim.h"
39 #include "cnf_alr.h"
40 #include "mon_alr.h"
41 #include "pei.h"
42 #include "tok.h"
43
44 #include "pcm.h"
45 #ifdef GPRS
46 #include "alr_gprs.h"
47 #endif
48
49 #ifdef _TMS470
50 #include "inth/iq.h"
51 #include "armio/armio.h"
52 #endif /* _TMS470 */
53
54 #include "alr.h"
55
56
57 /*==== IMPORT =====================================================*/
58
59 /*==== EXPORT =====================================================*/
60
61 /*==== PRIVAT =====================================================*/
62
63 /*==== VARIABLES ==================================================*/
64
65 /*==== FUNCTIONS ==================================================*/
66
67 /*
68 +--------------------------------------------------------------------+
69 | PROJECT : GSM-PS (8403) MODULE : alr_CSF |
70 | STATE : code ROUTINE : csf_show_version |
71 +--------------------------------------------------------------------+
72
73 PURPOSE : Trace Layer 1 DSP version numbers
74
75 */
76
77 GLOBAL const void csf_show_version (T_TST_TEST_HW_CON *ver)
78 {
79 #if defined (_TMS470)
80 USHORT build, hw, jtag, rev;
81
82 /*
83 * Retrieve hardware info and build from library
84 */
85 hw = 0;
86
87 build = IQ_GetBuild();
88 jtag = IQ_GetJtagId();
89 rev = IQ_GetRevision();
90
91 TRACE_EVENT_P4 ("Build=%04d HW ver=%04X, jtag=%04X, rev=%04X", build, hw, jtag, rev);
92
93 if (ver)
94 {
95 /*
96 * Retrieve Layer 1 info from primitive
97 */
98 TRACE_EVENT_P3 ("DSP version/patch=%04X, %04x, chksum=%04X",
99 ver->dsp_code_version,
100 ver->dsp_patch_version,
101 ver->dsp_checksum);
102 TRACE_EVENT_P3 ("MCU version ALR=%04X, GPRS=%04X, TM=%04X",
103 ver->mcu_alr_version,
104 ver->mcu_gprs_version,
105 ver->mcu_tm_version);
106 PFREE (ver);
107 }
108 #else /* _TMS470 */
109 if (ver)
110 {
111 PFREE (ver);
112 }
113 #endif /* _TMS470 */
114 }
115
116 #if !defined NTRACE
117 /*
118 * The following monitor capabilities are used by the Condat RT system.
119 * They are only included in the trace version of protocol stack.
120 /*
121 +--------------------------------------------------------------------+
122 | PROJECT : GSM-PS (6147) MODULE : alr_CSF |
123 | STATE : code ROUTINE : trc_mon_counter_idle |
124 +--------------------------------------------------------------------+
125
126 PURPOSE : traces the downlink counter values in idle mode if a change
127 occur.
128
129 */
130
131 UBYTE v_mon_counter_idle = 0;
132
133 GLOBAL void trc_mon_counter_idle (UBYTE act_dlt, UBYTE max_dlt)
134 {
135 if (v_mon_counter_idle)
136 {
137 /*
138 * only if monitoring is enabled
139 */
140 PALLOC (mon_counter_idle, MON_COUNTER_IDLE_IND);
141
142 mon_counter_idle->act_dlt = act_dlt;
143 mon_counter_idle->max_dlt = max_dlt;
144
145 PSENDX(RR, mon_counter_idle);
146 }
147 }
148
149 /*
150 +--------------------------------------------------------------------+
151 | PROJECT : GSM-PS (6147) MODULE : alr_CSF |
152 | STATE : code ROUTINE : trc_mon_counter_dedi |
153 +--------------------------------------------------------------------+
154
155 PURPOSE : traces the radiolink counter values in dedicated mode
156 if a change occur.
157
158 */
159
160 UBYTE v_mon_counter_dedi = 0;
161
162 GLOBAL void trc_mon_counter_dedi (UBYTE act_rlt, UBYTE max_rlt)
163 {
164 if (v_mon_counter_dedi)
165 {
166 /*
167 * only if monitoring is enabled
168 */
169 PALLOC (mon_counter_dedi, MON_COUNTER_DEDI_IND);
170
171 mon_counter_dedi->act_rlt = act_rlt;
172 mon_counter_dedi->max_rlt = max_rlt;
173
174 PSENDX(RR, mon_counter_dedi);
175 }
176 }
177
178 #endif /* !NTRACE */
179
180 #endif