FreeCalypso > hg > fc-selenite
annotate src/g23m-gsm/alr2/alr_csf.c @ 187:d05fb947b50d
src/cs: sync with Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 15 Feb 2020 20:23:30 +0000 |
parents | b4c81ea2d291 |
children |
rev | line source |
---|---|
3
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Project : GSM-PS |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 | Modul : alr_CSF |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | All rights reserved. |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | Purpose : This Modul defines the customer specific functions. |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 +----------------------------------------------------------------------------- |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 #ifndef ALR_CSF_C |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 #define ALR_CSF_C |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 #define ENTITY_PL |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 /*==== INCLUDES ===================================================*/ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #include <string.h> |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 #include <stdlib.h> |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 #include <ctype.h> |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #include "typedefs.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #include "pconst.cdg" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #include "mconst.cdg" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #include "message.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #include "ccdapi.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #include "vsi.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #include "custom.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #include "gsm.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #include "prim.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include "cnf_alr.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #include "mon_alr.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #include "pei.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #include "tok.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #include "pcm.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 #ifdef GPRS |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #include "alr_gprs.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #endif |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #ifdef _TMS470 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 #include "inth/iq.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #include "armio/armio.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #endif /* _TMS470 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 #include "alr.h" |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 /*==== IMPORT =====================================================*/ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 /*==== EXPORT =====================================================*/ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 /*==== PRIVAT =====================================================*/ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 /*==== VARIABLES ==================================================*/ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 /*==== FUNCTIONS ==================================================*/ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 +--------------------------------------------------------------------+ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 | PROJECT : GSM-PS (8403) MODULE : alr_CSF | |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 | STATE : code ROUTINE : csf_show_version | |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 +--------------------------------------------------------------------+ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 PURPOSE : Trace Layer 1 DSP version numbers |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 GLOBAL const void csf_show_version (T_TST_TEST_HW_CON *ver) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 { |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 #if defined (_TMS470) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 USHORT build, hw, jtag, rev; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 * Retrieve hardware info and build from library |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 hw = 0; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 build = IQ_GetBuild(); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 jtag = IQ_GetJtagId(); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 rev = IQ_GetRevision(); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 TRACE_EVENT_P4 ("Build=%04d HW ver=%04X, jtag=%04X, rev=%04X", build, hw, jtag, rev); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 if (ver) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 { |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 * Retrieve Layer 1 info from primitive |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 TRACE_EVENT_P3 ("DSP version/patch=%04X, %04x, chksum=%04X", |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 ver->dsp_code_version, |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 ver->dsp_patch_version, |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 ver->dsp_checksum); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 TRACE_EVENT_P3 ("MCU version ALR=%04X, GPRS=%04X, TM=%04X", |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 ver->mcu_alr_version, |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 ver->mcu_gprs_version, |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 ver->mcu_tm_version); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 PFREE (ver); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 } |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 #else /* _TMS470 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 if (ver) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 { |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 PFREE (ver); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 } |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 #endif /* _TMS470 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 } |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 #if !defined NTRACE |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 * The following monitor capabilities are used by the Condat RT system. |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 * They are only included in the trace version of protocol stack. |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 +--------------------------------------------------------------------+ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 | PROJECT : GSM-PS (6147) MODULE : alr_CSF | |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 | STATE : code ROUTINE : trc_mon_counter_idle | |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 +--------------------------------------------------------------------+ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 PURPOSE : traces the downlink counter values in idle mode if a change |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 occur. |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 UBYTE v_mon_counter_idle = 0; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 GLOBAL void trc_mon_counter_idle (UBYTE act_dlt, UBYTE max_dlt) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 { |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 if (v_mon_counter_idle) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 { |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 * only if monitoring is enabled |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 PALLOC (mon_counter_idle, MON_COUNTER_IDLE_IND); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 mon_counter_idle->act_dlt = act_dlt; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 mon_counter_idle->max_dlt = max_dlt; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 PSENDX(RR, mon_counter_idle); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 } |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 } |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 +--------------------------------------------------------------------+ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 | PROJECT : GSM-PS (6147) MODULE : alr_CSF | |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 | STATE : code ROUTINE : trc_mon_counter_dedi | |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 +--------------------------------------------------------------------+ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 PURPOSE : traces the radiolink counter values in dedicated mode |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 if a change occur. |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 UBYTE v_mon_counter_dedi = 0; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 GLOBAL void trc_mon_counter_dedi (UBYTE act_rlt, UBYTE max_rlt) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 { |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 if (v_mon_counter_dedi) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 { |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 * only if monitoring is enabled |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 PALLOC (mon_counter_dedi, MON_COUNTER_DEDI_IND); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 mon_counter_dedi->act_rlt = act_rlt; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 mon_counter_dedi->max_rlt = max_rlt; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 PSENDX(RR, mon_counter_dedi); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 } |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 } |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 #endif /* !NTRACE */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 /* |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 * Function added in FreeCalypso to support Openmoko's AT@BAND command |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 * without making ACI include ALR header files. |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 */ |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 GLOBAL void alr_get_band_of_serving_cell (char *strbuf) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 { |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 switch(alr_data->sc_band) |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 { |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 case BAND_GSM_900: |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 strcpy(strbuf, "GSM 900"); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 break; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 case BAND_DCS_1800: |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 strcpy(strbuf, "DCS 1800"); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 break; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 case BAND_PCS_1900: |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 strcpy(strbuf, "PCS 1900"); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 break; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 case BAND_E_GSM: |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 strcpy(strbuf, "EGSM"); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 break; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 case BAND_GSM_850: |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 strcpy(strbuf, "GSM 850"); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 break; |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 default: |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 strcpy(strbuf, "Unknown"); |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 } |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 } |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 |
b4c81ea2d291
src/g23m-gsm/alr2: initial import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 #endif |