FreeCalypso > hg > ffs-editor
comparison src/cs/layer1/include/l1_proto.h @ 0:92470e5d0b9e
src: partial import from FC Selenite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 15 May 2020 01:28:16 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:92470e5d0b9e |
---|---|
1 /************* Revision Controle System Header ************* | |
2 * GSM Layer 1 software | |
3 * L1_PROTO.H | |
4 * | |
5 * Filename l1_proto.h | |
6 * Copyright 2003 (C) Texas Instruments | |
7 * | |
8 ************* Revision Controle System Header *************/ | |
9 | |
10 /**************************************/ | |
11 /* prototypes of L1_SYNC.C functions */ | |
12 /**************************************/ | |
13 void hisr (void); | |
14 | |
15 void frit_task (UWORD32 argc, void *argv); | |
16 void l1s_task (UWORD32 argc, void *argv); | |
17 void l1s_synch (void); | |
18 | |
19 void l1s_task_scheduler_process (void); | |
20 void l1s_execute_frame (void); | |
21 void l1s_meas_manager (void); | |
22 void l1s_end_manager (void); | |
23 void l1s_schedule_tasks (WORD32 *pending_task); | |
24 void l1s_merge_manager (WORD32 dl_pending_task); | |
25 | |
26 void l1s_dedicated_mode_manager (void); | |
27 | |
28 /**************************************/ | |
29 /* prototypes of L1_PWMGR.C functions */ | |
30 /**************************************/ | |
31 void l1s_sleep_manager (void); | |
32 void l1s_gauging_task (void); | |
33 void l1s_gauging_task_end (void); | |
34 WORD32 l1s_get_next_gauging_in_Packet_Idle(void); | |
35 void l1s_wakeup (void); | |
36 void l1s_wakeup_adjust (void); | |
37 void GAUGING_Handler (void); | |
38 UWORD8 l1s_recover_Os (void); | |
39 UWORD8 l1s_check_System (void); | |
40 void l1s_recover_Frame (void); | |
41 void l1s_recover_HWTimers (void); | |
42 BOOL l1s_compute_wakeup_ticks (void); | |
43 | |
44 /**************************************/ | |
45 /* prototypes of L1_MFMGR.C functions */ | |
46 /**************************************/ | |
47 void l1s_clear_mftab (T_FRM *frmlst); | |
48 void l1s_exec_mftab (void); | |
49 void l1s_load_mftab (const T_FCT *fct, | |
50 const UWORD8 size, | |
51 UWORD8 frame, | |
52 T_FRM *frmlst); | |
53 | |
54 /**************************************/ | |
55 /* prototypes of L1_CMPLX.C functions */ | |
56 /**************************************/ | |
57 void l1s_new_synchro (UWORD8 param1, UWORD8 param2); | |
58 void l1s_abort (UWORD8 param1, UWORD8 param2); | |
59 void l1s_ctrl_ADC (UWORD8 param1, UWORD8 param2); | |
60 | |
61 void l1s_ctrl_msagc (UWORD8 task, UWORD8 param2); | |
62 void l1s_ctrl_fb (UWORD8 param1, UWORD8 param2); | |
63 void l1s_ctrl_fb26 (UWORD8 task, UWORD8 param2); | |
64 void l1s_ctrl_sbgen (UWORD8 task, UWORD8 attempt); | |
65 void l1s_ctrl_sb26 (UWORD8 task, UWORD8 param2); | |
66 | |
67 void l1s_ctrl_smscb (UWORD8 task, UWORD8 burst_id); | |
68 | |
69 void l1s_ctrl_snb_dl (UWORD8 task, UWORD8 param2); | |
70 void l1s_ctrl_snb_ul (UWORD8 task, UWORD8 param2); | |
71 void l1s_ctrl_nnb (UWORD8 task, UWORD8 param2); | |
72 | |
73 void l1s_ctrl_rach (UWORD8 task, UWORD8 param2); | |
74 void l1s_ctrl_tchtf (UWORD8 task, UWORD8 param2); | |
75 void l1s_ctrl_tchth (UWORD8 task, UWORD8 param2); | |
76 void l1s_ctrl_tchtd (UWORD8 task, UWORD8 param2); | |
77 void l1s_ctrl_tcha (UWORD8 task, UWORD8 param2); | |
78 void l1s_hopping_algo (UWORD8 param1, UWORD8 param2); | |
79 | |
80 void l1s_ctrl_hwtest (UWORD8 task, UWORD8 param2); | |
81 void l1s_read_hwtest (UWORD8 task, UWORD8 param2); | |
82 | |
83 void l1s_read_dummy (UWORD8 task, UWORD8 param2); | |
84 void l1s_read_msagc (UWORD8 task, UWORD8 param2); | |
85 void l1s_read_mon_result (UWORD8 task, UWORD8 param2); | |
86 | |
87 void l1s_read_rx_result (UWORD8 param1, UWORD8 attempt_for_sb2); | |
88 | |
89 void l1s_read_snb_dl (UWORD8 task, UWORD8 burst_id); | |
90 void l1s_read_nnb (UWORD8 task, UWORD8 param); | |
91 void l1s_read_dedic_dl (UWORD8 task, UWORD8 burst_id); | |
92 | |
93 void l1s_read_tx_result (UWORD8 param1, UWORD8 param2); | |
94 void l1s_read_dedic_scell_meas (UWORD8 meas, UWORD8 sub_flag); | |
95 void l1s_dedic_reporting (void); | |
96 | |
97 void l1s_read_fb (UWORD8 task, UWORD32 fb_flag, UWORD32 toa, UWORD32 attempt, | |
98 UWORD32 pm, UWORD32 angle, UWORD32 snr); | |
99 void l1s_read_sb (UWORD8 task,UWORD32 flag, API *data, UWORD32 toa, UWORD8 attempt, | |
100 UWORD32 pm, UWORD32 angle, UWORD32 snr); | |
101 void l1s_read_sacch_dl (API *info_address, UWORD32 task_rx); | |
102 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); | |
104 | |
105 | |
106 /**************************************/ | |
107 /* prototypes of L1_AFUNC functions */ | |
108 /**************************************/ | |
109 void l1a_reset_full_list (void); | |
110 void l1a_reset_ba_list (void); | |
111 void l1a_add_time_for_nb (UWORD32 *time_alignmt, UWORD32 *fn_offset); | |
112 void l1a_add_timeslot (UWORD32 *time_alignmt, UWORD32 *fn_offset, UWORD8 tn); | |
113 void l1a_sub_time_for_nb (UWORD32 *time_alignmt, UWORD32 *fn_offset); | |
114 void l1a_sub_timeslot (UWORD32 *time_alignmt, UWORD32 *fn_offset, UWORD8 tn); | |
115 | |
116 T_DEDIC_SET *l1a_get_free_dedic_set (void); | |
117 void l1a_fill_bef_sti_param (T_DEDIC_SET *set_ptr, BOOL start_time_present); | |
118 WORD32 l1a_decode_starting_time (T_STARTING_TIME coded_starting_time); | |
119 void l1a_reset_cell_info (T_CELL_INFO *cell_info); | |
120 void l1a_send_confirmation (UWORD32 SignalCode,UWORD8 queue_type); | |
121 void l1a_send_result (UWORD32 SignalCode, xSignalHeaderRec *msg, UWORD8 queue); | |
122 UWORD8 l1a_encode_rxqual (UWORD32 inlevel); | |
123 void l1a_report_failling_ncell_sync (UWORD32 SignalCode, UWORD8 neigh_id); | |
124 UWORD8 l1a_clip_txpwr (UWORD8 supplied_txpwr, UWORD16 radio_freq); | |
125 void l1a_correct_timing (UWORD8 neigh_id,UWORD32 time_alignmt,UWORD32 fn_offset); | |
126 void l1a_add_time_delta (UWORD32 *time_alignmt, UWORD32 *fn_offset, WORD32 delta); | |
127 void l1a_compensate_sync_ind (T_MPHC_NCELL_SYNC_IND * msg); | |
128 void l1a_compute_Eotd_data (UWORD8 *first_scell, UWORD8 neigh_id, UWORD32 SignalCode, xSignalHeaderRec *msg); | |
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 | |
133 /**************************************/ | |
134 /* prototypes of L1_FUNC functions */ | |
135 /**************************************/ | |
136 void dsp_power_on (void); | |
137 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) | |
138 void l1_abb_power_on (void); | |
139 #endif | |
140 void tpu_init (void); | |
141 | |
142 void l1s_reset_db_mcu_to_dsp (T_DB_MCU_TO_DSP *page_ptr); | |
143 void l1s_reset_db_dsp_to_mcu (T_DB_DSP_TO_MCU *page_ptr); | |
144 void initialize_l1var (void); | |
145 void l1_initialize (T_MMI_L1_CONFIG *mmi_l1_config); | |
146 void l1_pwr_mgt_init (void); | |
147 void l1_dpll_init_var (void); | |
148 | |
149 void l1s_increment_time (T_TIME_INFO *time, UWORD32 fn_offset); | |
150 WORD16 l1s_encode_rxlev (UWORD8 inlevel); | |
151 void l1s_send_ho_finished (UWORD8 cause); | |
152 void l1s_reset_dedic_serving_meas(void); | |
153 UWORD32 l1s_swap_iq_dl (UWORD16 radio_freq, UWORD8 task); | |
154 UWORD32 l1s_swap_iq_ul (UWORD16 radio_freq, UWORD8 task); | |
155 UWORD8 l1s_ADC_decision_on_NP (void); | |
156 #if (AMR == 1) | |
157 UWORD8 l1s_amr_get_ratscch_type (API *a_ratscch_dl); | |
158 void l1s_amr_update_from_ratscch (API *a_ratscch_dl); | |
159 #endif | |
160 | |
161 | |
162 /**************************************/ | |
163 /* prototypes of L1_DRIVE functions */ | |
164 /**************************************/ | |
165 // MCU-DSP interface drivers. | |
166 //--------------------------- | |
167 void l1ddsp_load_info (UWORD32 task, | |
168 API *info_ptr, | |
169 UWORD8 *data); | |
170 void l1ddsp_load_monit_task (API monit_task, | |
171 API fb_mode); | |
172 void l1ddsp_load_afc (API afc); | |
173 void l1ddsp_load_rx_task (API rx_task, | |
174 UWORD8 burst_id, | |
175 UWORD8 tsq); | |
176 void l1ddsp_load_tx_task (API tx_task, | |
177 UWORD8 burst_id, | |
178 UWORD8 tsq); | |
179 void l1ddsp_load_ra_task (API ra_task); | |
180 | |
181 | |
182 void l1ddsp_load_txpwr (UWORD8 txpwr, | |
183 UWORD16 radio_freq); | |
184 #if (AMR == 1) | |
185 #if (FF_L1_TCH_VOCODER_CONTROL == 1) | |
186 // Add the AMR synchro bit in the driver's paramters | |
187 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, | |
188 UWORD8 chan_mode, | |
189 UWORD8 chan_type, | |
190 UWORD8 subchannel, | |
191 UWORD8 tch_loop, | |
192 UWORD8 sync_tch, | |
193 UWORD8 sync_amr, | |
194 UWORD8 reset_sacch, | |
195 UWORD8 vocoder_on); | |
196 #else | |
197 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, | |
198 UWORD8 chan_mode, | |
199 UWORD8 chan_type, | |
200 UWORD8 subchannel, | |
201 UWORD8 tch_loop, | |
202 UWORD8 sync_tch, | |
203 UWORD8 sync_amr); | |
204 #endif | |
205 #else | |
206 #if (FF_L1_TCH_VOCODER_CONTROL == 1) | |
207 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, | |
208 UWORD8 chan_mode, | |
209 UWORD8 chan_type, | |
210 UWORD8 subchannel, | |
211 UWORD8 tch_loop, | |
212 UWORD8 sync_tch, | |
213 UWORD8 reset_sacch, | |
214 UWORD8 vocoder_on); | |
215 #else | |
216 void l1ddsp_load_tch_param (T_TIME_INFO *next_time, | |
217 UWORD8 chan_mode, | |
218 UWORD8 chan_type, | |
219 UWORD8 subchannel, | |
220 UWORD8 tch_loop, | |
221 UWORD8 sync_tch); | |
222 #endif | |
223 #endif | |
224 | |
225 BOOL enable_tch_vocoder (BOOL vocoder_on); | |
226 | |
227 BOOL l1_select_mcsi_port (UWORD8 port); | |
228 | |
229 void l1ddsp_load_ciph_param (UWORD8 a5mode, | |
230 T_ENCRYPTION_KEY *ciph_key); | |
231 void l1ddsp_load_tch_mode (UWORD8 dai_mode, | |
232 BOOL dtx_allowed); | |
233 #if (AMR == 1) | |
234 void l1ddsp_load_amr_param (T_AMR_CONFIGURATION amr_param, UWORD8 cmip); | |
235 #endif | |
236 | |
237 void l1ddsp_stop_tch (void); | |
238 | |
239 | |
240 // MCU-TPU interface drivers. | |
241 //--------------------------- | |
242 void l1dtpu_meas (UWORD16 radio_freq, | |
243 WORD8 agc, | |
244 UWORD8 lna_off, | |
245 UWORD16 win_id, | |
246 UWORD16 tpu_synchro, | |
247 UWORD8 adc_active); | |
248 void l1dtpu_neig_fb (UWORD16 radio_freq, | |
249 WORD8 agc, | |
250 UWORD8 lna_off); | |
251 void l1dtpu_neig_fb26 (UWORD16 radio_freq, | |
252 WORD8 agc, | |
253 UWORD8 lna_off, | |
254 UWORD32 offset_serv); | |
255 void l1dtpu_neig_sb (UWORD16 radio_freq, | |
256 WORD8 agc, | |
257 UWORD8 lna_off, | |
258 UWORD32 time_alignmt, | |
259 UWORD32 offset_serv, | |
260 UWORD8 reload_flag, | |
261 UWORD8 attempt); | |
262 void l1dtpu_neig_sb26 (UWORD16 radio_freq, | |
263 WORD8 agc, | |
264 UWORD8 lna_off, | |
265 UWORD32 time_alignmt, | |
266 UWORD32 fn_offset, | |
267 UWORD32 offset_serv); | |
268 void l1dtpu_serv_rx_nb (UWORD16 radio_freq, | |
269 WORD8 agc, | |
270 UWORD8 lna_off, | |
271 UWORD32 synchro_serv, | |
272 UWORD32 new_offset, | |
273 BOOL change_offset, | |
274 UWORD8 adc_active); | |
275 void l1dtpu_serv_tx_nb (UWORD16 radio_freq, | |
276 UWORD8 timing_advance, | |
277 UWORD32 offset_serv, | |
278 UWORD8 txpwr, | |
279 UWORD8 adc_active); | |
280 void l1dtpu_neig_rx_nb (UWORD16 radio_freq, | |
281 WORD8 agc, | |
282 UWORD8 lna_off, | |
283 UWORD32 time_alignmt, | |
284 UWORD32 offset_serv, | |
285 UWORD8 reload_flag, | |
286 UWORD8 nop); | |
287 void l1dtpu_serv_tx_ra (UWORD16 radio_freq, | |
288 UWORD32 offset_serv, | |
289 UWORD8 txpwr, | |
290 UWORD8 adc_active); | |
291 | |
292 // MCU-DSP interface drivers for POWER-ON. | |
293 //---------------------------------------- | |
294 void l1dtpu_init_dpram (UWORD8 process); | |
295 | |
296 // MCU-DSP interface drivers for RESET. | |
297 //------------------------------------- | |
298 void l1ddsp_end_scenario (UWORD8 type); | |
299 void l1dtpu_end_scenario (void); | |
300 void l1d_reset_hw (UWORD32 offset_value); | |
301 | |
302 | |
303 | |
304 /**************************************/ | |
305 /* Prototypes for L1 ASYNCH task */ | |
306 /**************************************/ | |
307 | |
308 void l1a_task (UWORD32 argc, void *argv); | |
309 void l1a_balance_l1a_tasks (void); | |
310 | |
311 void l1a_mmi_adc_req (xSignalHeaderRec *msg); | |
312 void l1a_network_lost (xSignalHeaderRec *msg); | |
313 void l1a_idle_6strongest_monitoring_process (xSignalHeaderRec *msg); | |
314 void l1a_idle_serving_cell_bcch_reading_process (xSignalHeaderRec *msg); | |
315 void l1a_idle_serving_cell_paging_process (xSignalHeaderRec *msg); | |
316 void l1a_idle_smscb_process (xSignalHeaderRec *msg); | |
317 void l1a_initial_network_sync_process (xSignalHeaderRec *msg); | |
318 void l1a_cres_process (xSignalHeaderRec *msg); | |
319 void l1a_dedic_ba_list_meas_process (xSignalHeaderRec *msg); | |
320 | |
321 void l1a_full_list_meas_process (xSignalHeaderRec *msg); | |
322 void l1a_csel_bcch_process (xSignalHeaderRec *msg); | |
323 | |
324 void l1a_idle_serv_meas_process (xSignalHeaderRec *msg); | |
325 | |
326 void l1a_idle_neigh_meas_process (xSignalHeaderRec *msg); | |
327 void l1a_idle_neigh_full_bcch_process(xSignalHeaderRec *msg); | |
328 void l1a_idle_neigh_norm_bcch_process(xSignalHeaderRec *msg); | |
329 void l1a_idle_neigh_ext_bcch_process (xSignalHeaderRec *msg); | |
330 void l1a_idle_6conf_process (xSignalHeaderRec *msg); | |
331 | |
332 void l1a_idle_smscb_process (xSignalHeaderRec *msg); | |
333 | |
334 void l1a_access_process (xSignalHeaderRec *msg); | |
335 void l1a_dedicated_process (xSignalHeaderRec *msg); | |
336 void l1a_dedic_bcch_process (xSignalHeaderRec *msg); | |
337 void l1a_dedic6_process (xSignalHeaderRec *msg); | |
338 void l1a_dedic_neigh_meas_process (xSignalHeaderRec *msg); | |
339 | |
340 void l1a_idle_ba_list_meas_process (xSignalHeaderRec *msg); | |
341 void l1a_idle_full_list_meas_process (xSignalHeaderRec *msg); | |
342 void l1a_test_process (xSignalHeaderRec *msg); | |
343 void l1a_freq_band_configuration (xSignalHeaderRec *msg); | |
344 | |
345 #if (OP_L1_STANDALONE == 1) | |
346 // Dynamic configuration process for L1 standalone only | |
347 void l1a_test_config_process (xSignalHeaderRec *msg); | |
348 #endif | |
349 | |
350 // ...................NEW FOR ALR.................... | |
351 void l1a_neighbour_cell_bcch_reading_process (xSignalHeaderRec *msg); | |
352 // ...................NEW FOR ALR.................... | |
353 | |
354 /**************************************/ | |
355 /* Prototypes for l3 task */ | |
356 /**************************************/ | |
357 void l3_task (UWORD32 argc, void *argv); | |
358 void l3_expire_fct (UWORD32 id); | |
359 | |
360 #if TESTMODE | |
361 void mmi_task (UWORD32 argc, void *argv); | |
362 #endif | |
363 | |
364 | |
365 | |
366 | |
367 | |
368 /**************************************/ | |
369 /* Prototypes for Nu_main. */ | |
370 /**************************************/ | |
371 UWORD32 get_arm_version (void); | |
372 void usart_hisr (void); | |
373 void Adc_timer (UWORD32 id); | |
374 /**************************************/ | |
375 /* Prototypes for l2 task */ | |
376 /**************************************/ | |
377 T_RADIO_FRAME *dll_read_dcch (UWORD8 chn_mode); | |
378 T_RADIO_FRAME *dll_read_sacch (UWORD8 chn_mode); | |
379 void l2_task (UWORD32 argc, void *argv); | |
380 | |
381 #if (DSP_BACKGROUND_TASKS == 1) | |
382 // Task for backgrounds DSP testing | |
383 void background_task(UWORD32 argc, void *argv); | |
384 #endif | |
385 | |
386 void rx_tch_data (API *data_address, | |
387 UWORD8 channel_mode, | |
388 UWORD8 blk_seq_number); | |
389 UWORD8 *tx_tch_data (void); | |
390 | |
391 #if (SEND_FN_TO_L2_IN_DCCH==1) | |
392 void dll_dcch_downlink (API *info_address, | |
393 UWORD8 valid_flag, | |
394 UWORD32 frame_number); | |
395 #else | |
396 void dll_dcch_downlink (API *info_address, | |
397 UWORD8 valid_flag); | |
398 #endif | |
399 | |
400 /***************************************/ | |
401 /* Prototypes of L1_TRACE.c functions */ | |
402 /***************************************/ | |
403 void l1_trace_message (xSignalHeaderRec *msg); | |
404 void send_debug_sig (UWORD8 debug_code, UWORD8 task); | |
405 void l1_trace_cpu_load (UWORD8 cpu_load); | |
406 void l1_trace_ratscch(UWORD16 fn, UWORD16 amr_change_bitmap); | |
407 | |
408 #if (TRACE_TYPE==7) // CPU_LOAD | |
409 void l1_cpu_load_start (void); | |
410 void l1_cpu_load_stop (void); | |
411 void l1_cpu_load_init (void); | |
412 void l1_cpu_load_interm (void); | |
413 #endif | |
414 | |
415 /***************************************/ | |
416 /* Prototypes of HW_DEBUG.c functions */ | |
417 /***************************************/ | |
418 void get_usart_characters (void); // HISR for Rx characters | |
419 void wait_for_next_message (CHAR *); | |
420 | |
421 /***************************************/ | |
422 /* Prototypes of L1_DEBUG.c functions */ | |
423 /***************************************/ | |
424 void scenario_and_log_files (void); | |
425 void decode_msg (xSignalHeaderRec *msg, CHAR *filename); | |
426 void trace_mft (CHAR *fct_name, WORD32 frame); | |
427 #if (L1_EOTD ==1) | |
428 void trace_EOTD_serving (UWORD16 arfcn, UWORD32 timetag, CHAR *text); | |
429 void trace_EOTD_serving1 (CHAR *text); | |
430 void trace_EOTD_neighbour (UWORD8 nbr, UWORD16 arfcn, UWORD32 delta_fn, WORD32 delta_qbit, | |
431 UWORD32 timetag, CHAR *text); | |
432 #endif | |
433 void trace_ULPD (CHAR *text, UWORD32 frame_number); | |
434 void log_fct (CHAR *fct_name, UWORD32 radio_freq); | |
435 void trace_msg (CHAR *msg_name, CHAR *queue_name); | |
436 void log_msg (CHAR *msg_name, CHAR *queue_name); | |
437 void trace_dedic (void); | |
438 void trace_fct_simu (CHAR *fct_name, WORD32 radio_freq); | |
439 void trace_flowchart_msg (CHAR *msg_name, CHAR *dest_queue_name); | |
440 void trace_flowchart_l1tsk (UWORD32 bit_register, UWORD32 *src_register_set); | |
441 void trace_flowchart_dedic (WORD32 SignalCode); | |
442 void trace_flowchart_tpu (CHAR *task_name); | |
443 void trace_flowchart_dsp (CHAR *task_name); | |
444 void trace_flowchart_dsp_tpu (CHAR *task_name); | |
445 void trace_flowchart_dspres (CHAR *task_name); | |
446 void trace_flowchart_dsptx (CHAR *task_name); | |
447 void trace_flowchart_header (void); | |
448 void trace_sim_freq_band_configuration (UWORD8 freq_band_config); | |
449 | |
450 /**************************************/ | |
451 /* prototypes of control functions */ | |
452 /**************************************/ | |
453 #if (VCXO_ALGO == 0) | |
454 WORD16 l1ctl_afc (UWORD8 phase, | |
455 UWORD32 *frame_count, | |
456 WORD16 angle, | |
457 WORD32 snr, | |
458 UWORD16 radio_freq); | |
459 #else | |
460 WORD16 l1ctl_afc (UWORD8 phase, | |
461 UWORD32 *frame_count, | |
462 WORD16 angle, | |
463 WORD32 snr, | |
464 UWORD16 radio_freq, | |
465 UWORD32 l1_mode); | |
466 #endif | |
467 WORD16 l1ctl_toa (UWORD8 phase, | |
468 UWORD32 l1_mode, | |
469 UWORD16 SNR_val, | |
470 UWORD16 TOA_val, | |
471 BOOL *toa_update, | |
472 UWORD16 *toa_period_count); | |
473 UWORD8 l1ctl_txpwr (UWORD8 target_txpwr, | |
474 UWORD8 current_txpwr); | |
475 | |
476 // Utility for agc control algorithms | |
477 | |
478 void l1ctl_encode_lna (UWORD8 input_level, | |
479 UWORD8 * lna_state, | |
480 UWORD16 radio_freq); | |
481 UWORD8 l1ctl_find_max (UWORD8 *buff, | |
482 UWORD8 buffer_len); | |
483 // Automatic Gain Control Algorithms | |
484 void l1ctl_pgc2 (UWORD8 pm_high_agc, | |
485 UWORD8 pm_low_agc, | |
486 UWORD16 radio_freq); | |
487 UWORD8 l1ctl_csgc (UWORD8 pm, | |
488 UWORD16 radio_freq); | |
489 UWORD8 l1ctl_pgc (UWORD8 pm, | |
490 UWORD8 used_IL, | |
491 UWORD8 lna_off, | |
492 UWORD16 radio_freq); | |
493 UWORD8 l1ctl_pagc (UWORD8 pm, | |
494 UWORD16 radio_freq, | |
495 T_INPUT_LEVEL *traffic_meas_ptr); | |
496 UWORD8 l1ctl_dpagc (BOOL dtx_on, | |
497 BOOL beacon, | |
498 UWORD8 pm, | |
499 UWORD16 radio_freq, | |
500 T_INPUT_LEVEL *traffic_meas_ptr); | |
501 #if (AMR == 1) | |
502 UWORD8 l1ctl_dpagc_amr (BOOL dtx_on, | |
503 BOOL beacon, | |
504 UWORD8 pm, | |
505 UWORD16 radio_freq, | |
506 T_INPUT_LEVEL *traffic_meas_ptr); | |
507 #endif | |
508 | |
509 UWORD16 l1ctl_get_g_magic (UWORD16 radio_freq); | |
510 UWORD16 l1ctl_get_lna_att (UWORD16 radio_freq); | |
511 void l1ctl_update_TPU_with_toa(void); | |
512 | |
513 //functions for customization | |
514 void Cust_init_std (void); | |
515 void Cust_init_params (void); | |
516 WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id); | |
517 WORD8 l1ctl_encode_delta1 (UWORD16 radio_freq); | |
518 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); | |
520 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) | |
521 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq); | |
522 #endif | |
523 | |
524 | |
525 |