FreeCalypso > hg > fc-tourmaline
comparison src/g23m-fad/l2r/tra_ups.c @ 1:fa8dc04885d8
src/g23m-*: import from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:25:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:4e78acac3d88 | 1:fa8dc04885d8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : CSD (8411) | |
4 | Modul : L2r_ups.c | |
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 functions for processing | |
18 | of incomming signals for the component | |
19 | L2R of the base station | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 | |
23 | |
24 #ifndef TRA_UPS_C | |
25 #define TRA_UPS_C | |
26 #endif | |
27 | |
28 #define ENTITY_L2R | |
29 | |
30 /*==== INCLUDES ===================================================*/ | |
31 | |
32 #include <string.h> | |
33 | |
34 #include "typedefs.h" | |
35 #include "pconst.cdg" | |
36 #include "vsi.h" | |
37 #include "macdef.h" | |
38 #include "custom.h" | |
39 #include "gsm.h" | |
40 #include "prim.h" | |
41 #include "pei.h" | |
42 #include "tok.h" | |
43 #include "dti.h" | |
44 | |
45 #include "cl_ribu.h" | |
46 #include "tra_pei.h" | |
47 #include "tra.h" | |
48 | |
49 /*==== CONST =======================================================*/ | |
50 | |
51 /*==== TYPES =======================================================*/ | |
52 | |
53 /*==== VAR EXPORT ==================================================*/ | |
54 | |
55 /*==== VAR LOCAL ===================================================*/ | |
56 | |
57 /*==== FUNCTIONS ===================================================*/ | |
58 | |
59 /* | |
60 +------------------------------------------------------------------------------------- | |
61 | Function : sig_mgt_tra_up_dti_conn_setup | |
62 +------------------------------------------------------------------------------------- | |
63 | Description : Process signal SIG_MGT_UL_CONNECT received from process management. | |
64 | | |
65 | Parameters : - | |
66 | | |
67 | Return : - | |
68 +------------------------------------------------------------------------------------- | |
69 */ | |
70 GLOBAL void sig_mgt_tra_up_dti_conn_setup () | |
71 { | |
72 TRACE_FUNCTION ("sig_mgt_tra_up_dti_conn_setup()"); | |
73 | |
74 switch (GET_STATE (UP)) | |
75 { | |
76 case UP_INACTIVE: | |
77 ul_init(&tra_data->up); | |
78 break; | |
79 } | |
80 } | |
81 | |
82 | |
83 /* | |
84 +------------------------------------------------------------------------------------- | |
85 | Function : sig_mgt_tra_up_dti_conn_open | |
86 +------------------------------------------------------------------------------------- | |
87 | Description : Process signal SIG_MGT_UL_CONNECT received from process management. | |
88 | | |
89 | Parameters : - | |
90 | | |
91 | Return : - | |
92 +------------------------------------------------------------------------------------- | |
93 */ | |
94 GLOBAL void sig_mgt_tra_up_dti_conn_open () | |
95 { | |
96 TRACE_FUNCTION ("sig_mgt_tra_up_dti_conn_open()"); | |
97 | |
98 switch (GET_STATE (UP)) | |
99 { | |
100 case UP_INACTIVE: | |
101 /* changed from _IDLE, | |
102 * for not having to wait for RA_READY_IND | |
103 */ | |
104 SET_STATE (UP, UP_WAIT); | |
105 up_start_dti_flow(); | |
106 break; | |
107 } | |
108 } | |
109 | |
110 | |
111 /* | |
112 +------------------------------------------------------------------------------ | |
113 | Function : sig_mgt_tra_up_dti_disc | |
114 +------------------------------------------------------------------------------ | |
115 | Description : Process signal SIG_MGT_UL_DISC received from | |
116 | process management. | |
117 | | |
118 | Parameters : - | |
119 | | |
120 | | |
121 | Return : - | |
122 +------------------------------------------------------------------------------ | |
123 */ | |
124 | |
125 | |
126 GLOBAL void sig_mgt_tra_up_dti_disc(void) | |
127 { | |
128 TRACE_FUNCTION ("sig_mgt_tra_up_dti_disc()"); | |
129 | |
130 if (tra_data->up.Prim NEQ NULL) /* free allocated prims and their lists */ | |
131 { | |
132 PFREE_DESC2(tra_data->up.Prim) | |
133 tra_data->up.Prim = NULL; | |
134 } | |
135 | |
136 SET_STATE (UP, UP_INACTIVE); | |
137 } | |
138 | |
139 | |
140 /* | |
141 +------------------------------------------------------------------------------ | |
142 | Function : sig_mgt_tra_up_sendbreak_req | |
143 +------------------------------------------------------------------------------ | |
144 | Description : Process signal SIG_MGT_UP_SEND_BREAK_REQ | |
145 | received from process management. | |
146 | | |
147 | Parameters : - | |
148 | | |
149 | Return : - | |
150 +------------------------------------------------------------------------------ | |
151 */ | |
152 GLOBAL void sig_mgt_tra_up_send_break_req(USHORT break_len) | |
153 { | |
154 TRACE_FUNCTION ("sig_mgt_tra_up_send_break_req()"); | |
155 | |
156 /* xxxxx correct location? Lock ringbuffer! */ | |
157 | |
158 snd_break_to_RA(break_len); | |
159 } | |
160 | |
161 | |
162 /* | |
163 +------------------------------------------------------------------------------ | |
164 | Function : sig_mgt_tra_up_break_req | |
165 +------------------------------------------------------------------------------ | |
166 | Description : Process signal SIG_MGT_UP_BREAK_REQ received from process management. | |
167 | | |
168 | Parameters : - | |
169 | | |
170 | Return : - | |
171 +------------------------------------------------------------------------------ | |
172 */ | |
173 | |
174 GLOBAL void sig_mgt_tra_up_break_req(void) | |
175 { | |
176 T_TRA_UP *dul = &tra_data->up; | |
177 | |
178 TRACE_FUNCTION ("sig_mgt_tra_up_break_req()"); | |
179 | |
180 switch (GET_STATE (UP)) | |
181 { | |
182 case UP_SEND: | |
183 SET_STATE (UP, UP_IDLE); | |
184 /* Fall through */ | |
185 | |
186 case UP_IDLE: | |
187 case UP_WAIT: | |
188 /* | |
189 * Reset | |
190 */ | |
191 dul->sa = FL_INACTIVE; | |
192 dul->sb = FL_INACTIVE; | |
193 dul->x = FL_INACTIVE; | |
194 dul->List_off = 0; | |
195 | |
196 if (dul->Prim NEQ NULL) /* free allocated prims and their lists */ | |
197 { | |
198 PFREE_DESC2(dul->Prim) | |
199 dul->Prim = NULL; | |
200 } | |
201 break; | |
202 } | |
203 } | |
204 | |
205 |