FreeCalypso > hg > fc-magnetite
annotate src/g23m-gsm/alr/alr_tim.c @ 225:b16d79c550a2
aci2: AT@SC bogon fully expunged
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 24 Oct 2016 05:50:25 +0000 |
parents | 27a4235405c6 |
children |
rev | line source |
---|---|
104
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Project : |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 | Modul : J:\g23m-gsm\alr\alr_tim.c |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | All rights reserved. |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | Purpose : |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 +----------------------------------------------------------------------------- |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 #ifndef ALR_TIM_C |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 #define ALR_TIM_C |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #define ENTITY_PL |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 /*==== INCLUDES ===================================================*/ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 #include <string.h> |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #include <stdlib.h> |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 #include <ctype.h> |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 #include "typedefs.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #include "pconst.cdg" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #include "mconst.cdg" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #include "message.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #include "ccdapi.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #include "vsi.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #include "custom.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #include "gsm.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #include "prim.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #include "cnf_alr.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include "mon_alr.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #include "pei.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #include "tok.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #include "pcm.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #ifdef GPRS |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 #include "alr_gprs.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 #endif |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #include "alr.h" |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 /*==== PRIVAT =====================================================*/ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #if defined(TIMER_TRACE) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #define TRACE_TIMER(FMT) TRACE_EVENT((FMT)) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 #define TRACE_TIMER_P1(FMT,P1) TRACE_EVENT_P1((FMT),(P1)) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 #define TRACE_TIMER_P2(FMT,P1,P2) TRACE_EVENT_P2((FMT),(P1),(P2)) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 #define TRACE_TIMER_P3(FMT,P1,P2,P3) TRACE_EVENT_P3((FMT),(P1),(P2),(P3)) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 #else |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 #define TRACE_TIMER(FMT) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 #define TRACE_TIMER_P1(FMT,P1) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 #define TRACE_TIMER_P2(FMT,P1,P2) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 #define TRACE_TIMER_P3(FMT,P1,P2,P2) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 #endif |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 /* Implements Measure#32: Row 247, 248, 249, 251, 252, 259 and 260 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 static T_S2I_STRING const tim_names[] = |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 S2I_STRING("TIM_POWERMEAS"), |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 S2I_STRING("TIM_NW_SYNC_GUARD"), |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 #if defined(FF_HOMEZONE) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 S2I_STRING("TIM_HOMEZONE"), |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 #endif /* FF_HOMEZONE */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 S2I_STRING("???") |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 }; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 /*==== EXPORT =====================================================*/ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 /*==== FUCTIONS ===================================================*/ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 #if defined(TIMER_TRACE) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 void trace_timer (USHORT index, long value) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 GET_INSTANCE_DATA; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 switch(value) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 /* Implements Measure#32: Row 247, 248, 249, 251 and 252 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 default:/* >0: start */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 TRACE_TIMER_P2 ("T-Start:%s=%lu", S2I_STRING(tim_names[index]), value); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 break; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 case 0:/* ==0: stop */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 TRACE_TIMER_P1 ("T-Stop:%s", S2I_STRING(tim_names[index])); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 break; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 case -1:/* -1: expire */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 TRACE_TIMER_P1 ("T-Expired:%s ", S2I_STRING(tim_names[index])); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 break; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 case -2:/* -2: check */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 if(alr_data->tim_data.running[index]) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 TRACE_TIMER_P1 ("T-Check:%s active", S2I_STRING(tim_names[index])); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 else |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 TRACE_TIMER_P1 ("T-Check:%s inactive", S2I_STRING(tim_names[index])); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 break; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 case -3:/* -2: set expire function */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 TRACE_TIMER_P1 ("T-Set:%s expire function", S2I_STRING(tim_names[index])); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 break; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 #else |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 #define trace_timer(index,value) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 #endif /* TIMER_TRACE */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 /* |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 | PROJECT : GSM-PS (6147) MODULE : RR_TIM | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 | STATE : code ROUTINE : tim_exec_timeout | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 PURPOSE : reset timeout functions and values. |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 GLOBAL void tim_init (void) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 GET_INSTANCE_DATA; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 TRACE_FUNCTION ("tim_init()"); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 memset (&alr_data->tim_data, 0, sizeof (alr_data->tim_data)); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 alr_data->tim_data.expire[TIM_POWERMEAS] = ma_cs_rxlev_req; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 alr_data->tim_data.expire[TIM_NW_SYNC_GUARD] = tim_stop_sync_to_nw; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 #if defined(FF_HOMEZONE) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 alr_data->tim_data.expire[TIM_HOMEZONE] = cb_tim_homezone; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 #endif /* FF_HOMEZONE */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 /* |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 | PROJECT : GSM-PS (6147) MODULE : RR_TIM | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 | STATE : code ROUTINE : tim_exec_timeout | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 PURPOSE : execute timeout for the new frame variant. |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 GLOBAL void tim_exec_timeout (USHORT index) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 GET_INSTANCE_DATA; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 #if !defined(TIMER_TRACE) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 TRACE_FUNCTION ("tim_exec_timeout()"); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 #endif /* !TIMER_TRACE */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 if (index < NUM_OF_ALR_TIMERS) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 trace_timer (index, -1); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 alr_data->tim_data.running[index] = 0; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 if (alr_data->tim_data.expire[index]) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 alr_data->tim_data.expire[index] (); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 else |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 SYST_TRACE_P ((SYST, "tim_exec_timeout: index=%u (>=%u)", index, NUM_OF_ALR_TIMERS)); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 TRACE_ASSERT (index < NUM_OF_ALR_TIMERS); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 /* |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 | PROJECT : GSM-PS (6147) MODULE : RR_TIM | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 | STATE : code ROUTINE : tim_stop_timer | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 PURPOSE : stop timer in the new frame variant. |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 GLOBAL void tim_stop_timer (USHORT index) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 GET_INSTANCE_DATA; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 #if !defined(TIMER_TRACE) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 TRACE_FUNCTION ("tim_stop_timer()"); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 #endif /* !TIMER_TRACE */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 if (index < NUM_OF_ALR_TIMERS) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 trace_timer (index, 0); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 alr_data->tim_data.running[index] = 0; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 /* |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 * stop physical timer. |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 TIMER_STOP(pl_handle, index); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 else |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 SYST_TRACE_P ((SYST,"tim_stop_timer: index=%u (>=%u)", index, NUM_OF_ALR_TIMERS)); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 TRACE_ASSERT (index < NUM_OF_ALR_TIMERS); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 /* |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 | PROJECT : GSM-PS (6147) MODULE : RR_TIM | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 | STATE : code ROUTINE : tim_start_timer | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 PURPOSE : start timer in the new frame variant. |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 GLOBAL void tim_start_timer (USHORT index, T_TIME value) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 GET_INSTANCE_DATA; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 #if !defined(TIMER_TRACE) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 TRACE_FUNCTION ("tim_start_timer()"); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 #endif /* !TIMER_TRACE */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 if (index < NUM_OF_ALR_TIMERS) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 trace_timer (index, value); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 alr_data->tim_data.running[index] = 1; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 /* |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 * start physical timer. |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 TIMER_START(pl_handle, index, value); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 else |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 SYST_TRACE_P ((SYST,"tim_start_timer: index=%u (>=%u)", index, NUM_OF_ALR_TIMERS)); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 TRACE_ASSERT (index < NUM_OF_ALR_TIMERS); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 /* |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 | PROJECT : GSM-PS (6147) MODULE : RR_TIM | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 | STATE : code ROUTINE : tim_check_timer | |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 +--------------------------------------------------------------------+ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 PURPOSE : check timer in the new frame variant. |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 GLOBAL BOOL tim_check_timer(USHORT index) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 GET_INSTANCE_DATA; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 T_TIME value = 0; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 #if !defined(TIMER_TRACE) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 TRACE_FUNCTION ("tim_check_timer()"); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 #endif /* !TIMER_TRACE */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 if (index < NUM_OF_ALR_TIMERS) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 #if defined(TIMER_TRACE) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 if (alr_data->tim_data.running[index]) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 SHORT vsi_ret; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 vsi_ret = TIMER_STATUS(pl_handle, index, &value); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 if ((vsi_ret EQ VSI_OK) AND (value NEQ 0)) |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 /* Implements Measure#32: Row 259 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 TRACE_TIMER_P2 ("T-Check:%s active (%u left)", S2I_STRING(tim_names[index]), value); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 else |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 /* Implements Measure#32: Row 260 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 TRACE_TIMER_P1 ("T-Check:%s inactive", S2I_STRING(tim_names[index])); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 else |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 /* Implements Measure#32: Row 260 */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 TRACE_TIMER_P1 ("T-Check:%s inactive", S2I_STRING(tim_names[index])); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 #endif /* TIMER_TRACE */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 return alr_data->tim_data.running[index]; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 else |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 { |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 SYST_TRACE_P ((SYST,"tim_check_timer: index=%u (>=%u)", index, NUM_OF_ALR_TIMERS)); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 TRACE_ASSERT (index < NUM_OF_ALR_TIMERS); |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 return FALSE; |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 } |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 #endif /* ALR_TIM_C */ |
27a4235405c6
src/g23m-gsm: import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 |