FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/L1/include/l1_proto.h @ 530:25a7fe25864c
gsm-fw/L1/include: switch to LoCosto versions of all header files
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 01 Aug 2014 16:38:35 +0000 |
parents | ed6071292a5c |
children | de635895e0be |
comparison
equal
deleted
inserted
replaced
529:f72c9db5e2f5 | 530:25a7fe25864c |
---|---|
12 /**************************************/ | 12 /**************************************/ |
13 void hisr (void); | 13 void hisr (void); |
14 | 14 |
15 void frit_task (UWORD32 argc, void *argv); | 15 void frit_task (UWORD32 argc, void *argv); |
16 void l1s_task (UWORD32 argc, void *argv); | 16 void l1s_task (UWORD32 argc, void *argv); |
17 #if FF_L1_IT_DSP_USF | |
18 void usf_task (UWORD32 argc, void *argv); | |
19 #endif | |
17 void l1s_synch (void); | 20 void l1s_synch (void); |
18 | 21 |
19 void l1s_task_scheduler_process (void); | 22 void l1s_task_scheduler_process (void); |
20 void l1s_execute_frame (void); | 23 void l1s_execute_frame (void); |
21 void l1s_meas_manager (void); | 24 void l1s_meas_manager (void); |
22 void l1s_end_manager (void); | 25 void l1s_end_manager (void); |
23 void l1s_schedule_tasks (WORD32 *pending_task); | 26 void l1s_schedule_tasks (WORD32 *pending_task); |
24 void l1s_merge_manager (WORD32 dl_pending_task); | 27 void l1s_merge_manager (WORD32 dl_pending_task); |
25 | 28 |
26 void l1s_dedicated_mode_manager (void); | 29 void l1s_dedicated_mode_manager (void); |
30 void l1s_keep_mftab_hist (void); | |
27 | 31 |
28 /**************************************/ | 32 /**************************************/ |
29 /* prototypes of L1_PWMGR.C functions */ | 33 /* prototypes of L1_PWMGR.C functions */ |
30 /**************************************/ | 34 /**************************************/ |
31 void l1s_sleep_manager (void); | 35 void l1s_sleep_manager (void); |
32 void l1s_gauging_task (void); | 36 void l1s_wakeup (void); |
33 void l1s_gauging_task_end (void); | 37 void l1s_wakeup_adjust (void); |
34 WORD32 l1s_get_next_gauging_in_Packet_Idle(void); | 38 void GAUGING_Handler (void); |
35 void l1s_wakeup (void); | 39 UWORD8 l1s_recover_Os (void); |
36 void l1s_wakeup_adjust (void); | 40 UWORD8 l1s_check_System (void); |
37 void GAUGING_Handler (void); | 41 void l1s_recover_Frame (void); |
38 UWORD8 l1s_recover_Os (void); | 42 void l1s_recover_HWTimers (void); |
39 UWORD8 l1s_check_System (void); | 43 BOOL l1s_compute_wakeup_ticks (void); |
40 void l1s_recover_Frame (void); | 44 void l1s_gauging_task (void); |
41 void l1s_recover_HWTimers (void); | 45 void l1s_gauging_task_end (void); |
42 BOOL l1s_compute_wakeup_ticks (void); | 46 UWORD32 l1s_get_next_gauging_in_Packet_Idle(void); |
47 void l1s_adapt_traffic_controller (void); | |
43 | 48 |
44 /**************************************/ | 49 /**************************************/ |
45 /* prototypes of L1_MFMGR.C functions */ | 50 /* prototypes of L1_MFMGR.C functions */ |
46 /**************************************/ | 51 /**************************************/ |
47 void l1s_clear_mftab (T_FRM *frmlst); | 52 void l1s_clear_mftab (T_FRM *frmlst); |
61 void l1s_ctrl_msagc (UWORD8 task, UWORD8 param2); | 66 void l1s_ctrl_msagc (UWORD8 task, UWORD8 param2); |
62 void l1s_ctrl_fb (UWORD8 param1, UWORD8 param2); | 67 void l1s_ctrl_fb (UWORD8 param1, UWORD8 param2); |
63 void l1s_ctrl_fb26 (UWORD8 task, UWORD8 param2); | 68 void l1s_ctrl_fb26 (UWORD8 task, UWORD8 param2); |
64 void l1s_ctrl_sbgen (UWORD8 task, UWORD8 attempt); | 69 void l1s_ctrl_sbgen (UWORD8 task, UWORD8 attempt); |
65 void l1s_ctrl_sb26 (UWORD8 task, UWORD8 param2); | 70 void l1s_ctrl_sb26 (UWORD8 task, UWORD8 param2); |
66 | 71 #if ((REL99 == 1) && (FF_BHO == 1)) |
72 void l1s_ctrl_fbsb (UWORD8 task , UWORD8 param2); | |
73 #endif | |
67 void l1s_ctrl_smscb (UWORD8 task, UWORD8 burst_id); | 74 void l1s_ctrl_smscb (UWORD8 task, UWORD8 burst_id); |
68 | 75 |
69 void l1s_ctrl_snb_dl (UWORD8 task, UWORD8 param2); | 76 void l1s_ctrl_snb_dl (UWORD8 task, UWORD8 param2); |
70 void l1s_ctrl_snb_ul (UWORD8 task, UWORD8 param2); | 77 void l1s_ctrl_snb_ul (UWORD8 task, UWORD8 param2); |
71 void l1s_ctrl_nnb (UWORD8 task, UWORD8 param2); | 78 void l1s_ctrl_nnb (UWORD8 task, UWORD8 param2); |
89 void l1s_read_snb_dl (UWORD8 task, UWORD8 burst_id); | 96 void l1s_read_snb_dl (UWORD8 task, UWORD8 burst_id); |
90 void l1s_read_nnb (UWORD8 task, UWORD8 param); | 97 void l1s_read_nnb (UWORD8 task, UWORD8 param); |
91 void l1s_read_dedic_dl (UWORD8 task, UWORD8 burst_id); | 98 void l1s_read_dedic_dl (UWORD8 task, UWORD8 burst_id); |
92 | 99 |
93 void l1s_read_tx_result (UWORD8 param1, UWORD8 param2); | 100 void l1s_read_tx_result (UWORD8 param1, UWORD8 param2); |
101 | |
102 #if REL99 | |
103 #if FF_EMR | |
104 void l1s_read_dedic_scell_meas (UWORD8 meas, UWORD8 sub_flag, T_EMR_PARAMS *emr_params); | |
105 #endif | |
106 #else //REL99 | |
94 void l1s_read_dedic_scell_meas (UWORD8 meas, UWORD8 sub_flag); | 107 void l1s_read_dedic_scell_meas (UWORD8 meas, UWORD8 sub_flag); |
108 #endif //REL99 | |
95 void l1s_dedic_reporting (void); | 109 void l1s_dedic_reporting (void); |
96 | 110 |
97 void l1s_read_fb (UWORD8 task, UWORD32 fb_flag, UWORD32 toa, UWORD32 attempt, | 111 void l1s_read_fb (UWORD8 task, UWORD32 fb_flag, UWORD32 toa, UWORD32 attempt, |
98 UWORD32 pm, UWORD32 angle, UWORD32 snr); | 112 UWORD32 pm, UWORD32 angle, UWORD32 snr); |
99 void l1s_read_sb (UWORD8 task,UWORD32 flag, API *data, UWORD32 toa, UWORD8 attempt, | 113 void l1s_read_sb (UWORD8 task,UWORD32 flag, API *data, UWORD32 toa, UWORD8 attempt, |
100 UWORD32 pm, UWORD32 angle, UWORD32 snr); | 114 UWORD32 pm, UWORD32 angle, UWORD32 snr); |
115 #if ((REL99 == 1) && (FF_BHO == 1)) | |
116 void l1s_read_fbsb (UWORD8 task, UWORD8 attempt, BOOL fb_flag, BOOL sb_flag, API *data, | |
117 UWORD32 toa, UWORD32 pm, UWORD32 angle, UWORD32 snr); | |
118 #endif | |
101 void l1s_read_sacch_dl (API *info_address, UWORD32 task_rx); | 119 void l1s_read_sacch_dl (API *info_address, UWORD32 task_rx); |
102 void l1s_read_dcch_dl (API *info_address, UWORD32 task_rx); | 120 void l1s_read_dcch_dl (API *info_address, UWORD32 task_rx); |
103 void l1s_read_l3frm (UWORD8 pwr_level, API *info_address, UWORD32 task_rx); | 121 void l1s_read_l3frm (UWORD8 pwr_level, API *info_address, UWORD32 task_rx); |
122 void l1s_reset_tx_ptr(UWORD8 param1, UWORD8 param2); | |
104 | 123 |
105 | 124 |
106 /**************************************/ | 125 /**************************************/ |
107 /* prototypes of L1_AFUNC functions */ | 126 /* prototypes of L1_AFUNC functions */ |
108 /**************************************/ | 127 /**************************************/ |
120 void l1a_send_confirmation (UWORD32 SignalCode,UWORD8 queue_type); | 139 void l1a_send_confirmation (UWORD32 SignalCode,UWORD8 queue_type); |
121 void l1a_send_result (UWORD32 SignalCode, xSignalHeaderRec *msg, UWORD8 queue); | 140 void l1a_send_result (UWORD32 SignalCode, xSignalHeaderRec *msg, UWORD8 queue); |
122 UWORD8 l1a_encode_rxqual (UWORD32 inlevel); | 141 UWORD8 l1a_encode_rxqual (UWORD32 inlevel); |
123 void l1a_report_failling_ncell_sync (UWORD32 SignalCode, UWORD8 neigh_id); | 142 void l1a_report_failling_ncell_sync (UWORD32 SignalCode, UWORD8 neigh_id); |
124 UWORD8 l1a_clip_txpwr (UWORD8 supplied_txpwr, UWORD16 radio_freq); | 143 UWORD8 l1a_clip_txpwr (UWORD8 supplied_txpwr, UWORD16 radio_freq); |
125 void l1a_correct_timing (UWORD8 neigh_id,UWORD32 time_alignmt,UWORD32 fn_offset); | 144 void l1a_add_time_delta (UWORD32 *time_alignmt, UWORD32 *fn_offset, WORD32 delta); |
126 void l1a_add_time_delta (UWORD32 *time_alignmt, UWORD32 *fn_offset, WORD32 delta); | 145 void l1a_compensate_sync_ind (T_MPHC_NCELL_SYNC_IND * msg); |
127 void l1a_compensate_sync_ind (T_MPHC_NCELL_SYNC_IND * msg); | 146 void l1a_compute_Eotd_data (UWORD8 *first_scell, UWORD8 neigh_id, UWORD32 SignalCode, xSignalHeaderRec *msg); |
128 void l1a_compute_Eotd_data (UWORD8 *first_scell, UWORD8 neigh_id, UWORD32 SignalCode, xSignalHeaderRec *msg); | 147 void l1a_correct_timing (UWORD8 neigh_id,UWORD32 time_alignmt,UWORD32 fn_offset); |
129 #if (L1_MPHC_RXLEV_IND_REPORT_SORT==1) | |
130 void l1a_sort_freq_reported_in_rxlev_ind(T_POWER_ARRAY *data_tab,UWORD16 data_tab_size,UWORD16 *index_tab,UWORD16 index_tab_size); | |
131 #endif | |
132 | 148 |
133 /**************************************/ | 149 /**************************************/ |
134 /* prototypes of L1_FUNC functions */ | 150 /* prototypes of L1_FUNC functions */ |
135 /**************************************/ | 151 /**************************************/ |
136 void dsp_power_on (void); | 152 void dsp_power_on (void); |
137 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3)) | 153 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (ANLG_FAM == 11)) |
138 void l1_abb_power_on (void); | 154 void l1_abb_power_on (void); |
139 #endif | 155 #endif |
140 void tpu_init (void); | 156 void tpu_init (void); |
141 | 157 |
142 void l1s_reset_db_mcu_to_dsp (T_DB_MCU_TO_DSP *page_ptr); | 158 void l1s_reset_db_mcu_to_dsp (T_DB_MCU_TO_DSP *page_ptr); |
159 #if (DSP == 38) || (DSP == 39) | |
160 void l1s_reset_db_common_mcu_to_dsp (T_DB_COMMON_MCU_TO_DSP *page_ptr); | |
161 #endif | |
143 void l1s_reset_db_dsp_to_mcu (T_DB_DSP_TO_MCU *page_ptr); | 162 void l1s_reset_db_dsp_to_mcu (T_DB_DSP_TO_MCU *page_ptr); |
144 void initialize_l1var (void); | 163 void initialize_l1var (void); |
145 void l1_initialize (T_MMI_L1_CONFIG *mmi_l1_config); | 164 void l1_initialize (T_MMI_L1_CONFIG *mmi_l1_config); |
146 void l1_pwr_mgt_init (void); | 165 void l1_pwr_mgt_init (void); |
147 void l1_dpll_init_var (void); | 166 void l1_dpll_init_var (void); |
155 UWORD8 l1s_ADC_decision_on_NP (void); | 174 UWORD8 l1s_ADC_decision_on_NP (void); |
156 #if (AMR == 1) | 175 #if (AMR == 1) |
157 UWORD8 l1s_amr_get_ratscch_type (API *a_ratscch_dl); | 176 UWORD8 l1s_amr_get_ratscch_type (API *a_ratscch_dl); |
158 void l1s_amr_update_from_ratscch (API *a_ratscch_dl); | 177 void l1s_amr_update_from_ratscch (API *a_ratscch_dl); |
159 #endif | 178 #endif |
179 void l1_memcpy_16bit(void *dst,void* src,unsigned int len); | |
160 | 180 |
161 | 181 |
162 /**************************************/ | 182 /**************************************/ |
163 /* prototypes of L1_DRIVE functions */ | 183 /* prototypes of L1_DRIVE functions */ |
164 /**************************************/ | 184 /**************************************/ |
165 // MCU-DSP interface drivers. | 185 // MCU-DSP interface drivers. |
166 //--------------------------- | 186 //--------------------------- |
187 | |
188 #if (FF_L1_FAST_DECODING == 1) | |
189 void l1ddsp_load_fast_dec_task(API task, UWORD8 burst_id); | |
190 #endif | |
167 void l1ddsp_load_info (UWORD32 task, | 191 void l1ddsp_load_info (UWORD32 task, |
168 API *info_ptr, | 192 API *info_ptr, |
169 UWORD8 *data); | 193 UWORD8 *data); |
170 void l1ddsp_load_monit_task (API monit_task, | 194 void l1ddsp_load_monit_task (API monit_task, |
171 API fb_mode); | 195 API fb_mode); |
179 void l1ddsp_load_ra_task (API ra_task); | 203 void l1ddsp_load_ra_task (API ra_task); |
180 | 204 |
181 | 205 |
182 void l1ddsp_load_txpwr (UWORD8 txpwr, | 206 void l1ddsp_load_txpwr (UWORD8 txpwr, |
183 UWORD16 radio_freq); | 207 UWORD16 radio_freq); |
208 | |
209 // SAIC low level driver function | |
210 #if (L1_SAIC != 0) | |
211 void l1ddsp_load_swh_flag (UWORD16 SWH_flag, UWORD16 SAIC_flag); | |
212 #endif | |
213 | |
214 void l1ddsp_read_iq_dump(UWORD8 task); | |
215 void l1ddsp_apc_load_apcctrl2(UWORD16 apcctrl2); | |
216 void l1ddsp_apc_set_manual_mode(void); | |
217 void l1ddsp_apc_set_automatic_mode(void); | |
218 | |
219 #ifdef TESTMODE | |
220 void l1ddsp_apc_load_apclev(UWORD16 apclev); | |
221 #endif | |
222 | |
184 #if (AMR == 1) | 223 #if (AMR == 1) |
185 #if (FF_L1_TCH_VOCODER_CONTROL == 1) | 224 #if (FF_L1_TCH_VOCODER_CONTROL == 1) |
186 // Add the AMR synchro bit in the driver's paramters | 225 // Add the AMR synchro bit in the driver's paramters |
187 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, | 226 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, |
188 UWORD8 chan_mode, | 227 UWORD8 chan_mode, |
190 UWORD8 subchannel, | 229 UWORD8 subchannel, |
191 UWORD8 tch_loop, | 230 UWORD8 tch_loop, |
192 UWORD8 sync_tch, | 231 UWORD8 sync_tch, |
193 UWORD8 sync_amr, | 232 UWORD8 sync_amr, |
194 UWORD8 reset_sacch, | 233 UWORD8 reset_sacch, |
234 #if !FF_L1_IT_DSP_DTX | |
195 UWORD8 vocoder_on); | 235 UWORD8 vocoder_on); |
236 #else | |
237 UWORD8 vocoder_on, | |
238 BOOL dtx_dsp_interrupt); | |
239 #endif | |
196 #else | 240 #else |
197 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, | 241 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, |
198 UWORD8 chan_mode, | 242 UWORD8 chan_mode, |
199 UWORD8 chan_type, | 243 UWORD8 chan_type, |
200 UWORD8 subchannel, | 244 UWORD8 subchannel, |
201 UWORD8 tch_loop, | 245 UWORD8 tch_loop, |
202 UWORD8 sync_tch, | 246 UWORD8 sync_tch, |
247 #if !FF_L1_IT_DSP_DTX | |
203 UWORD8 sync_amr); | 248 UWORD8 sync_amr); |
249 #else | |
250 UWORD8 sync_amr, | |
251 BOOL dtx_dsp_interrupt); | |
252 #endif | |
204 #endif | 253 #endif |
205 #else | 254 #else |
206 #if (FF_L1_TCH_VOCODER_CONTROL == 1) | 255 #if (FF_L1_TCH_VOCODER_CONTROL == 1) |
207 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, | 256 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, |
208 UWORD8 chan_mode, | 257 UWORD8 chan_mode, |
209 UWORD8 chan_type, | 258 UWORD8 chan_type, |
210 UWORD8 subchannel, | 259 UWORD8 subchannel, |
211 UWORD8 tch_loop, | 260 UWORD8 tch_loop, |
212 UWORD8 sync_tch, | 261 UWORD8 sync_tch, |
213 UWORD8 reset_sacch, | 262 UWORD8 reset_sacch, |
263 #if !FF_L1_IT_DSP_DTX | |
214 UWORD8 vocoder_on); | 264 UWORD8 vocoder_on); |
265 #else | |
266 UWORD8 vocoder_on, | |
267 BOOL dtx_dsp_interrupt); | |
268 #endif | |
215 #else | 269 #else |
216 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, | 270 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, |
217 UWORD8 chan_mode, | 271 UWORD8 chan_mode, |
218 UWORD8 chan_type, | 272 UWORD8 chan_type, |
219 UWORD8 subchannel, | 273 UWORD8 subchannel, |
220 UWORD8 tch_loop, | 274 UWORD8 tch_loop, |
275 #if !FF_L1_IT_DSP_DTX | |
221 UWORD8 sync_tch); | 276 UWORD8 sync_tch); |
277 #else | |
278 UWORD8 sync_tch, | |
279 BOOL dtx_dsp_interrupt); | |
280 #endif | |
222 #endif | 281 #endif |
223 #endif | 282 #endif |
224 | 283 |
225 BOOL enable_tch_vocoder (BOOL vocoder_on); | 284 #if (L1_VOCODER_IF_CHANGE == 0) |
226 | 285 BOOL enable_tch_vocoder (BOOL vocoder_on); |
286 #endif // L1_VOCODER_IF_CHANGE == 0 | |
227 BOOL l1_select_mcsi_port (UWORD8 port); | 287 BOOL l1_select_mcsi_port (UWORD8 port); |
228 | 288 |
229 void l1ddsp_load_ciph_param (UWORD8 a5mode, | 289 void l1ddsp_load_ciph_param (UWORD8 a5mode, |
230 T_ENCRYPTION_KEY *ciph_key); | 290 T_ENCRYPTION_KEY *ciph_key); |
231 void l1ddsp_load_tch_mode (UWORD8 dai_mode, | 291 void l1ddsp_load_tch_mode (UWORD8 dai_mode, |
232 BOOL dtx_allowed); | 292 BOOL dtx_allowed); |
233 #if (AMR == 1) | 293 #if (AMR == 1) |
234 void l1ddsp_load_amr_param (T_AMR_CONFIGURATION amr_param, UWORD8 cmip); | 294 void l1ddsp_load_amr_param (T_AMR_CONFIGURATION amr_param, UWORD8 cmip); |
235 #endif | 295 #endif |
236 | 296 void l1ddsp_stop_tch (void); |
237 void l1ddsp_stop_tch (void); | 297 void l1ddsp_load_afc (API afc); |
238 | |
239 | 298 |
240 // MCU-TPU interface drivers. | 299 // MCU-TPU interface drivers. |
241 //--------------------------- | 300 //--------------------------- |
242 void l1dtpu_meas (UWORD16 radio_freq, | 301 void l1dtpu_meas (UWORD16 radio_freq, |
243 WORD8 agc, | 302 WORD8 agc, |
244 UWORD8 lna_off, | 303 UWORD8 lna_off, |
245 UWORD16 win_id, | 304 UWORD16 win_id, |
246 UWORD16 tpu_synchro, | 305 UWORD16 tpu_synchro, |
247 UWORD8 adc_active); | 306 UWORD8 adc_active |
307 #if(RF_FAM == 61) | |
308 ,UWORD8 afc_mode | |
309 ,UWORD8 if_ctl | |
310 #endif | |
311 ); | |
248 void l1dtpu_neig_fb (UWORD16 radio_freq, | 312 void l1dtpu_neig_fb (UWORD16 radio_freq, |
249 WORD8 agc, | 313 WORD8 agc, |
250 UWORD8 lna_off); | 314 UWORD8 lna_off); |
251 void l1dtpu_neig_fb26 (UWORD16 radio_freq, | 315 void l1dtpu_neig_fb26 (UWORD16 radio_freq, |
252 WORD8 agc, | 316 WORD8 agc, |
256 WORD8 agc, | 320 WORD8 agc, |
257 UWORD8 lna_off, | 321 UWORD8 lna_off, |
258 UWORD32 time_alignmt, | 322 UWORD32 time_alignmt, |
259 UWORD32 offset_serv, | 323 UWORD32 offset_serv, |
260 UWORD8 reload_flag, | 324 UWORD8 reload_flag, |
261 UWORD8 attempt); | 325 UWORD8 attempt |
326 #if(RF_FAM == 61) | |
327 ,UWORD8 if_ctl | |
328 #endif | |
329 ); | |
262 void l1dtpu_neig_sb26 (UWORD16 radio_freq, | 330 void l1dtpu_neig_sb26 (UWORD16 radio_freq, |
263 WORD8 agc, | 331 WORD8 agc, |
264 UWORD8 lna_off, | 332 UWORD8 lna_off, |
265 UWORD32 time_alignmt, | 333 UWORD32 time_alignmt, |
266 UWORD32 fn_offset, | 334 UWORD32 fn_offset, |
267 UWORD32 offset_serv); | 335 UWORD32 offset_serv |
336 #if(RF_FAM == 61) | |
337 ,UWORD8 if_ctl | |
338 #endif | |
339 ); | |
268 void l1dtpu_serv_rx_nb (UWORD16 radio_freq, | 340 void l1dtpu_serv_rx_nb (UWORD16 radio_freq, |
269 WORD8 agc, | 341 WORD8 agc, |
270 UWORD8 lna_off, | 342 UWORD8 lna_off, |
271 UWORD32 synchro_serv, | 343 UWORD32 synchro_serv, |
272 UWORD32 new_offset, | 344 UWORD32 new_offset, |
273 BOOL change_offset, | 345 BOOL change_offset, |
274 UWORD8 adc_active); | 346 UWORD8 adc_active |
347 #if(RF_FAM == 61) | |
348 ,UWORD8 csf_filter_choice | |
349 ,UWORD8 if_ctl | |
350 #endif | |
351 #if (NEW_SNR_THRESHOLD == 1) | |
352 ,UWORD8 saic_flag | |
353 #endif /* NEW_SNR_THRESHOLD*/ | |
354 ); | |
275 void l1dtpu_serv_tx_nb (UWORD16 radio_freq, | 355 void l1dtpu_serv_tx_nb (UWORD16 radio_freq, |
276 UWORD8 timing_advance, | 356 UWORD8 timing_advance, |
277 UWORD32 offset_serv, | 357 UWORD32 offset_serv, |
278 UWORD8 txpwr, | 358 UWORD8 txpwr, |
279 UWORD8 adc_active); | 359 UWORD8 adc_active); |
281 WORD8 agc, | 361 WORD8 agc, |
282 UWORD8 lna_off, | 362 UWORD8 lna_off, |
283 UWORD32 time_alignmt, | 363 UWORD32 time_alignmt, |
284 UWORD32 offset_serv, | 364 UWORD32 offset_serv, |
285 UWORD8 reload_flag, | 365 UWORD8 reload_flag, |
286 UWORD8 nop); | 366 UWORD8 nop |
367 #if(RF_FAM == 61) | |
368 ,UWORD8 if_ctl | |
369 #endif | |
370 #if (NEW_SNR_THRESHOLD == 1) | |
371 ,UWORD8 saic_flag | |
372 #endif /* NEW_SNR_THRESHOLD*/ | |
373 ); | |
374 | |
287 void l1dtpu_serv_tx_ra (UWORD16 radio_freq, | 375 void l1dtpu_serv_tx_ra (UWORD16 radio_freq, |
288 UWORD32 offset_serv, | 376 UWORD32 offset_serv, |
289 UWORD8 txpwr, | 377 UWORD8 txpwr, |
290 UWORD8 adc_active); | 378 UWORD8 adc_active); |
291 | 379 |
339 | 427 |
340 void l1a_idle_ba_list_meas_process (xSignalHeaderRec *msg); | 428 void l1a_idle_ba_list_meas_process (xSignalHeaderRec *msg); |
341 void l1a_idle_full_list_meas_process (xSignalHeaderRec *msg); | 429 void l1a_idle_full_list_meas_process (xSignalHeaderRec *msg); |
342 void l1a_test_process (xSignalHeaderRec *msg); | 430 void l1a_test_process (xSignalHeaderRec *msg); |
343 void l1a_freq_band_configuration (xSignalHeaderRec *msg); | 431 void l1a_freq_band_configuration (xSignalHeaderRec *msg); |
344 | 432 void l1a_at_power_process (xSignalHeaderRec *msg); |
433 | |
434 #if(L1_CHECK_COMPATIBLE == 1) | |
435 void l1a_checkmsg_compatibility (xSignalHeaderRec *msg); | |
436 #endif | |
345 #if (OP_L1_STANDALONE == 1) | 437 #if (OP_L1_STANDALONE == 1) |
346 // Dynamic configuration process for L1 standalone only | 438 // Dynamic configuration process for L1 standalone only |
347 void l1a_test_config_process (xSignalHeaderRec *msg); | 439 void l1a_test_config_process (xSignalHeaderRec *msg); |
348 #endif | 440 #endif |
349 | 441 |
366 | 458 |
367 | 459 |
368 /**************************************/ | 460 /**************************************/ |
369 /* Prototypes for Nu_main. */ | 461 /* Prototypes for Nu_main. */ |
370 /**************************************/ | 462 /**************************************/ |
371 UWORD32 get_arm_version (void); | |
372 void usart_hisr (void); | |
373 void Adc_timer (UWORD32 id); | 463 void Adc_timer (UWORD32 id); |
464 | |
374 /**************************************/ | 465 /**************************************/ |
375 /* Prototypes for l2 task */ | 466 /* Prototypes for l2 task */ |
376 /**************************************/ | 467 /**************************************/ |
377 T_RADIO_FRAME *dll_read_dcch (UWORD8 chn_mode); | 468 T_RADIO_FRAME *dll_read_dcch (UWORD8 chn_mode); |
378 T_RADIO_FRAME *dll_read_sacch (UWORD8 chn_mode); | 469 T_RADIO_FRAME *dll_read_sacch (UWORD8 chn_mode); |
387 UWORD8 channel_mode, | 478 UWORD8 channel_mode, |
388 UWORD8 blk_seq_number); | 479 UWORD8 blk_seq_number); |
389 UWORD8 *tx_tch_data (void); | 480 UWORD8 *tx_tch_data (void); |
390 | 481 |
391 #if (SEND_FN_TO_L2_IN_DCCH==1) | 482 #if (SEND_FN_TO_L2_IN_DCCH==1) |
483 #if (L1_SAGEM_INTERFACE == 1) | |
484 void dll_dcch_downlink (API *info_address, | |
485 UWORD8 valid_flag, | |
486 UWORD32 frame_number, | |
487 UWORD8 channel_type); | |
488 #else | |
392 void dll_dcch_downlink (API *info_address, | 489 void dll_dcch_downlink (API *info_address, |
393 UWORD8 valid_flag, | 490 UWORD8 valid_flag, |
394 UWORD32 frame_number); | 491 UWORD32 frame_number); |
492 #endif | |
493 #else | |
494 #if (L1_SAGEM_INTERFACE == 1) | |
495 void dll_dcch_downlink (API *info_address, | |
496 UWORD8 valid_flag, | |
497 UWORD8 channel_type); | |
395 #else | 498 #else |
396 void dll_dcch_downlink (API *info_address, | 499 void dll_dcch_downlink (API *info_address, |
397 UWORD8 valid_flag); | 500 UWORD8 valid_flag); |
501 #endif | |
398 #endif | 502 #endif |
399 | 503 |
400 /***************************************/ | 504 /***************************************/ |
401 /* Prototypes of L1_TRACE.c functions */ | 505 /* Prototypes of L1_TRACE.c functions */ |
402 /***************************************/ | 506 /***************************************/ |
403 void l1_trace_message (xSignalHeaderRec *msg); | 507 void l1_trace_message (xSignalHeaderRec *msg); |
404 void send_debug_sig (UWORD8 debug_code, UWORD8 task); | 508 void send_debug_sig (UWORD8 debug_code, UWORD8 task); |
405 void l1_trace_cpu_load (UWORD8 cpu_load); | 509 void l1_trace_cpu_load (UWORD8 cpu_load); |
406 void l1_trace_ratscch(UWORD16 fn, UWORD16 amr_change_bitmap); | |
407 | 510 |
408 #if (TRACE_TYPE==7) // CPU_LOAD | 511 #if (TRACE_TYPE==7) // CPU_LOAD |
409 void l1_cpu_load_start (void); | 512 void l1_cpu_load_start (void); |
410 void l1_cpu_load_stop (void); | 513 void l1_cpu_load_stop (void); |
411 void l1_cpu_load_init (void); | 514 void l1_cpu_load_init (void); |
413 #endif | 516 #endif |
414 | 517 |
415 /***************************************/ | 518 /***************************************/ |
416 /* Prototypes of HW_DEBUG.c functions */ | 519 /* Prototypes of HW_DEBUG.c functions */ |
417 /***************************************/ | 520 /***************************************/ |
418 void get_usart_characters (void); // HISR for Rx characters | |
419 void wait_for_next_message (CHAR *); | 521 void wait_for_next_message (CHAR *); |
420 | 522 |
421 /***************************************/ | 523 /***************************************/ |
422 /* Prototypes of L1_DEBUG.c functions */ | 524 /* Prototypes of L1_DEBUG.c functions */ |
423 /***************************************/ | 525 /***************************************/ |
433 void trace_ULPD (CHAR *text, UWORD32 frame_number); | 535 void trace_ULPD (CHAR *text, UWORD32 frame_number); |
434 void log_fct (CHAR *fct_name, UWORD32 radio_freq); | 536 void log_fct (CHAR *fct_name, UWORD32 radio_freq); |
435 void trace_msg (CHAR *msg_name, CHAR *queue_name); | 537 void trace_msg (CHAR *msg_name, CHAR *queue_name); |
436 void log_msg (CHAR *msg_name, CHAR *queue_name); | 538 void log_msg (CHAR *msg_name, CHAR *queue_name); |
437 void trace_dedic (void); | 539 void trace_dedic (void); |
438 void trace_fct_simu (CHAR *fct_name, WORD32 radio_freq); | 540 void trace_fct_simu (CHAR *fct_name, UWORD32 radio_freq); |
439 void trace_flowchart_msg (CHAR *msg_name, CHAR *dest_queue_name); | 541 void trace_flowchart_msg (CHAR *msg_name, CHAR *dest_queue_name); |
440 void trace_flowchart_l1tsk (UWORD32 bit_register, UWORD32 *src_register_set); | 542 void trace_flowchart_l1tsk (UWORD32 bit_register, UWORD32 *src_register_set); |
441 void trace_flowchart_dedic (WORD32 SignalCode); | 543 void trace_flowchart_dedic (WORD32 SignalCode); |
442 void trace_flowchart_tpu (CHAR *task_name); | 544 void trace_flowchart_tpu (CHAR *task_name); |
443 void trace_flowchart_dsp (CHAR *task_name); | 545 void trace_flowchart_dsp (CHAR *task_name); |
444 void trace_flowchart_dsp_tpu (CHAR *task_name); | 546 void trace_flowchart_dsp_tpu (CHAR *task_name); |
445 void trace_flowchart_dspres (CHAR *task_name); | 547 void trace_flowchart_dspres (CHAR *task_name); |
446 void trace_flowchart_dsptx (CHAR *task_name); | 548 void trace_flowchart_dsptx (CHAR *task_name); |
447 void trace_flowchart_header (void); | 549 void trace_flowchart_header (void); |
448 void trace_sim_freq_band_configuration (UWORD8 freq_band_config); | 550 void trace_sim_freq_band_configuration (UWORD8 freq_band_config); |
551 #if (TOA_ALGO == 2) | |
552 void trace_toa_sim_ctrl (UWORD16 SNR_val, UWORD16 TOA_val, UWORD32 l1_mode, | |
553 UWORD32 frames_counter, UWORD32 cumul_counter,WORD16 cumul); | |
554 void trace_toa_sim_update (WORD16 toa_shift, UWORD32 tpu_offset); | |
555 #endif | |
556 #if (L1_SAIC != 0) | |
557 void trace_saic_sim (UWORD32 Il_for_rxlev, UWORD32 l1_mode, UWORD32 SWH_flag); | |
558 #endif | |
449 | 559 |
450 /**************************************/ | 560 /**************************************/ |
451 /* prototypes of control functions */ | 561 /* prototypes of control functions */ |
452 /**************************************/ | 562 /**************************************/ |
453 #if (VCXO_ALGO == 0) | 563 #if (VCXO_ALGO == 0) |
462 WORD16 angle, | 572 WORD16 angle, |
463 WORD32 snr, | 573 WORD32 snr, |
464 UWORD16 radio_freq, | 574 UWORD16 radio_freq, |
465 UWORD32 l1_mode); | 575 UWORD32 l1_mode); |
466 #endif | 576 #endif |
577 | |
578 #if (TOA_ALGO == 2) | |
579 WORD16 l1ctl_toa (UWORD8 phase, | |
580 UWORD32 l1_mode, | |
581 UWORD16 SNR_val, | |
582 UWORD16 TOA_val); | |
583 #else | |
467 WORD16 l1ctl_toa (UWORD8 phase, | 584 WORD16 l1ctl_toa (UWORD8 phase, |
468 UWORD32 l1_mode, | 585 UWORD32 l1_mode, |
469 UWORD16 SNR_val, | 586 UWORD16 SNR_val, |
470 UWORD16 TOA_val, | 587 UWORD16 TOA_val, |
471 BOOL *toa_update, | 588 BOOL *toa_update, |
472 UWORD16 *toa_period_count); | 589 UWORD16 *toa_period_count |
590 #if (FF_L1_FAST_DECODING == 1) | |
591 ,UWORD8 skipped_values | |
592 #endif /* FF_L1_FAST_DECODING */ | |
593 ); | |
594 #endif | |
595 | |
596 // SAIC Control Function | |
597 #if (L1_SAIC != 0) | |
598 UWORD8 l1ctl_saic (UWORD8 IL_for_rxlev, | |
599 UWORD32 l1_mode | |
600 #if (NEW_SNR_THRESHOLD == 1) | |
601 ,UWORD8 task, | |
602 UWORD8 * saic_flag | |
603 #endif /* NEW_SNR_THRESHOLD*/ | |
604 ); | |
605 #endif | |
606 | |
473 UWORD8 l1ctl_txpwr (UWORD8 target_txpwr, | 607 UWORD8 l1ctl_txpwr (UWORD8 target_txpwr, |
474 UWORD8 current_txpwr); | 608 UWORD8 current_txpwr); |
475 | 609 |
476 // Utility for agc control algorithms | 610 // Utility for agc control algorithms |
477 | 611 |
478 void l1ctl_encode_lna (UWORD8 input_level, | 612 void l1ctl_encode_lna (UWORD8 input_level, |
479 UWORD8 * lna_state, | 613 UWORD8 * lna_state, |
480 UWORD16 radio_freq); | 614 UWORD16 radio_freq); |
481 UWORD8 l1ctl_find_max (UWORD8 *buff, | 615 UWORD8 l1ctl_find_max (UWORD8 *buff, |
482 UWORD8 buffer_len); | 616 UWORD8 buffer_len); |
617 | |
483 // Automatic Gain Control Algorithms | 618 // Automatic Gain Control Algorithms |
484 void l1ctl_pgc2 (UWORD8 pm_high_agc, | 619 void l1ctl_pgc2 (UWORD8 pm_high_agc, |
485 UWORD8 pm_low_agc, | 620 UWORD8 pm_low_agc, |
486 UWORD16 radio_freq); | 621 UWORD16 radio_freq); |
487 UWORD8 l1ctl_csgc (UWORD8 pm, | 622 UWORD8 l1ctl_csgc (UWORD8 pm, |
506 T_INPUT_LEVEL *traffic_meas_ptr); | 641 T_INPUT_LEVEL *traffic_meas_ptr); |
507 #endif | 642 #endif |
508 | 643 |
509 UWORD16 l1ctl_get_g_magic (UWORD16 radio_freq); | 644 UWORD16 l1ctl_get_g_magic (UWORD16 radio_freq); |
510 UWORD16 l1ctl_get_lna_att (UWORD16 radio_freq); | 645 UWORD16 l1ctl_get_lna_att (UWORD16 radio_freq); |
511 void l1ctl_update_TPU_with_toa(void); | 646 UWORD16 l1ctl_update_TPU_with_toa(void); |
647 | |
648 #if (FF_L1_FAST_DECODING == 1) | |
649 void l1ctl_pagc_missing_bursts (UWORD8 skipped_values); | |
650 #endif | |
512 | 651 |
513 //functions for customization | 652 //functions for customization |
514 void Cust_init_std (void); | 653 void Cust_init_std (void); |
515 void Cust_init_params (void); | 654 void Cust_init_params (void); |
516 WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id); | 655 WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id,UWORD8 lna_off_val); |
517 WORD8 l1ctl_encode_delta1 (UWORD16 radio_freq); | 656 WORD8 l1ctl_encode_delta1 (UWORD16 radio_freq); |
518 WORD8 l1ctl_encode_delta2 (UWORD16 radio_freq); | 657 WORD8 l1ctl_encode_delta2 (UWORD16 radio_freq); |
519 void Cust_get_ramp_tab (API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq); | 658 void Cust_get_ramp_tab (API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq); |
520 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3)) | 659 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (RF_FAM == 61)) |
521 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq); | 660 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq |
522 #endif | 661 #if(REL99 && FF_PRF) |
523 | 662 ,UWORD8 number_uplink_timeslot |
524 | 663 #endif |
525 | 664 ); |
665 #endif | |
666 | |
667 #if (RF_FAM == 61) | |
668 void l1_drp_wrapper_init (void); | |
669 void l1_drp_init (void); | |
670 void l1dapc_init_ramp_tables(void ); | |
671 void cust_get_if_dco_ctl_algo (UWORD16* dco_algo_ctl, UWORD8* if_ctl, | |
672 UWORD8 input_level_flag, UWORD8 input_level, UWORD16 radio_freq, UWORD8 if_threshold); | |
673 #endif | |
674 | |
675 void l1s_restore_synchro(void); | |
676 | |
677 #if (FF_L1_FAST_DECODING == 1) | |
678 BOOL l1s_check_deferred_control(UWORD8 task, UWORD8 burst_id); | |
679 BOOL l1s_check_fast_decoding_authorized(UWORD8 task); | |
680 #endif /* FF_L1_FAST_DECODING */ | |
681 | |
682 #if (DRP_FW_EXT == 1) | |
683 void l1_get_boot_result_and_version(T_L1_BOOT_VERSION_CODE * p_version); | |
684 #endif /* DRP_FW_EXT */ | |
685 | |
686 /*-----------------------------------------------------------------*/ | |
687 /* Prototypes of MULTIBAND related functions */ | |
688 /*-----------------------------------------------------------------*/ | |
689 #if (L1_FF_MULTIBAND == 1) | |
690 #if 0 | |
691 UWORD16 l1_multiband_radio_freq_convert_into_operative_radio_freq(UWORD16 radio_freq); | |
692 UWORD8 l1_multiband_radio_freq_convert_into_physical_band_id(UWORD16 radio_freq); | |
693 UWORD8 l1_multiband_radio_freq_convert_into_effective_band_id(UWORD16 radio_freq); | |
694 void l1_multiband_fill_power_meas_array(UWORD16 power_array_size, T_FULL_LIST_MEAS *full_list); | |
695 UWORD8 l1_multiband_map_radio_freq_into_tpu_table(UWORD16 radio_freq); | |
696 void l1_multiband_increment_effective_band_id(UWORD8 *effective_band_id); | |
697 void l1_multiband_trace_params(UWORD8 multiband_table_id, UWORD8 multiband_trace_id) ; | |
698 void l1_multiband_tpu_get_power_classes(T_L1_MULTIBAND_POWER_CLASS multiband_power_class[]); | |
699 void l1_multiband_error_handler(UWORD16 radio_freq); | |
700 #endif // if 0 | |
701 | |
702 #endif /*if(L1_FF_MULTIBAND == 1)*/ | |
703 | |
704 |