FreeCalypso > hg > fc-magnetite
annotate src/cs/layer1/p_cfile/l1p_func.c @ 357:38c284cd102b
gsmcomp.c: TIF pool enlarged like in Citrine
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 25 Dec 2017 02:55:34 +0000 |
parents | 0740b5ff15f6 |
children |
rev | line source |
---|---|
302
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /************* Revision Controle System Header ************* |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * GSM Layer 1 software |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * L1P_FUNC.C |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * Filename l1p_func.c |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 * Copyright 2003 (C) Texas Instruments |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 ************* Revision Controle System Header *************/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #define L1P_FUNC_C |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #include "l1_macro.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #include "l1_confg.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 #if L1_GPRS |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 #if (CODE_VERSION == SIMULATION) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 #include "stddef.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 #include "l1_types.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 #include "sys_types.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #include "l1_const.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 #if TESTMODE |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #include "l1tm_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 #if (AUDIO_TASK == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #include "l1audio_const.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #include "l1audio_cust.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 #include "l1audio_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #if (L1_GTT == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 #include "l1gtt_const.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #include "l1gtt_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 #if (L1_MP3 == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include "l1mp3_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #if (L1_MIDI == 1) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #include "l1midi_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #include "l1_defty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 #include "l1_varex.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #include "cust_os.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 #include "l1_msgty.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #include "l1_time.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #include "l1p_cons.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #include "l1p_msgt.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 #include "l1p_deft.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 #include "l1p_vare.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 #include "l1p_sign.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 #if(RF_FAM == 61) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 #include "l1_rf61.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 #include "tpudrv61.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 #if (CODE_VERSION == SIMULATION) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #include "l1_rf2.h" |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 /* Prototypes of external functions used in this file. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 void l1pddsp_meas_ctrl (UWORD8 nbmeas, UWORD8 pm_pos); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 void l1dtpu_meas (UWORD16 radio_freq,WORD8 agc,UWORD8 lna_off, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 UWORD16 win_id,UWORD16 tpu_synchro, UWORD8 adc_active |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 #if (RF_FAM == 61) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 ,UWORD8 afc_mode |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 ,UWORD8 if_ctl |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 ); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 void l1ps_macs_init (void); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 /* initialize_l1pvar() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 /* ------------- */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 /* ------------- */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 /* Description : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 /* ------------- */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 /* This routine is used to initialize the l1pa, l1ps and */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 /* l1pa_l1ps_com global structures. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 void initialize_l1pvar(void) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 UWORD8 i; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 // Reset "l1ps" structure. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 l1ps.last_PR_good = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 l1ps.ILmin_beacon = 255; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 #if 0 /* FreeCalypso TCS211 reconstruction */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 l1ps.read_param.assignment_id = 0xFF; /* do not return non initialized value to RLC */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 for(i = 0; i < 8; i++) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 l1ps.ILmin_others[i] = l1_config.params.il_min; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 // Reset "l1pa" structure. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 for(i=0;i<NBR_L1PA_PROCESSES;i++) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 l1pa.state[i] = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 l1pa.l1pa_en_meas[i] = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 // Reset "l1pa_l1ps_com" structure. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 // Initialize PC_MEAS_CHAN flag |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 l1ps.pc_meas_chan_ctrl = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 // Initialize active list used in Neighbour Measurement Transfer Process |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 l1pa_l1ps_com.cres_freq_list.alist = &(l1pa_l1ps_com.cres_freq_list.list[0]); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 // Initialize parameters used in Neighbour Measurement Transfer Process |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 l1pa_l1ps_com.cres_freq_list.alist->nb_carrier = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 l1pa_l1ps_com.tcr_freq_list.new_list_present = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 l1pa_l1ps_com.transfer.semaphore = TRUE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 l1pa_l1ps_com.transfer.aset = &(l1pa_l1ps_com.transfer.set[0]); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 l1pa_l1ps_com.transfer.fset[0] = &(l1pa_l1ps_com.transfer.set[1]); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 l1pa_l1ps_com.transfer.fset[1] = &(l1pa_l1ps_com.transfer.set[2]); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 // Initialize Downlink Power Control Struture. Set CRC to BAD, bcch_level |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 // and burst_level[] to INVALID. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 l1pa_l1ps_com.transfer.dl_pwr_ctrl.crc_error = TRUE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 l1pa_l1ps_com.transfer.dl_pwr_ctrl.bcch_level = (WORD8)0x80;//omaps00090550 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 for(i = 0; i < 4; i++) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 l1pa_l1ps_com.transfer.dl_pwr_ctrl.burst_level[i] = (WORD8)0x80;//omaps00090550 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 l1pa_l1ps_com.transfer.set[0].ul_tbf_alloc = &(l1pa_l1ps_com.transfer.ul_tbf_alloc[0]); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 l1pa_l1ps_com.transfer.set[1].ul_tbf_alloc = &(l1pa_l1ps_com.transfer.ul_tbf_alloc[1]); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 l1pa_l1ps_com.transfer.set[2].ul_tbf_alloc = &(l1pa_l1ps_com.transfer.ul_tbf_alloc[2]); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 for(i=0;i<3;i++) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 l1pa_l1ps_com.transfer.set[i].SignalCode = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 l1pa_l1ps_com.transfer.set[i].dl_tbf_synchro_timeslot = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 l1pa_l1ps_com.transfer.set[i].dl_tbf_synchro_timeslot = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 l1pa_l1ps_com.transfer.set[i].transfer_synchro_timeslot = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 l1pa_l1ps_com.transfer.set[i].allocated_tbf = NO_TBF; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 l1pa_l1ps_com.transfer.set[i].assignment_command = NO_TBF; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 l1pa_l1ps_com.transfer.set[i].multislot_class = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 l1pa_l1ps_com.transfer.set[i].packet_ta.ta = 255; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 l1pa_l1ps_com.transfer.set[i].packet_ta.ta_index = 255; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 l1pa_l1ps_com.transfer.set[i].packet_ta.ta_tn = 255; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 l1pa_l1ps_com.transfer.set[i].tsc = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 l1pa_l1ps_com.transfer.set[i].freq_param.chan_sel.h = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 l1pa_l1ps_com.transfer.set[i].freq_param.chan_sel. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 rf_channel.single_rf.radio_freq = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 l1pa_l1ps_com.transfer.set[i].tbf_sti.present = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 l1pa_l1ps_com.transfer.set[i].mac_mode = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 l1pa_l1ps_com.transfer.set[i].ul_tbf_alloc->tfi = 255; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 l1pa_l1ps_com.transfer.set[i].dl_tbf_alloc.tfi = 255; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 l1pa_l1ps_com.transfer.set[i].dl_pwr_ctl.p0 = 255; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 l1pa_l1ps_com.transfer.set[i].dl_pwr_ctl.bts_pwr_ctl_mode = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 l1pa_l1ps_com.transfer.set[i].dl_pwr_ctl.pr_mode = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 // Reset "l1pa_macs_com" structure. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 l1ps_macs_com.fix_alloc_exhaust_flag = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 l1ps_macs_com.rlc_downlink_call = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 #if FF_L1_IT_DSP_USF |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 l1ps_macs_com.usf_status = USF_AVAILABLE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 #if L1_EDA |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 l1ps_macs_com.fb_sb_task_enabled = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 l1ps_macs_com.fb_sb_task_detect = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 // Reset MAC-S static structure. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 l1ps_macs_init(); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 // Reset packet transfer mode commands. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 //++++++++++++++++++++++++++++++++++++++++++ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 l1pa_l1ps_com.transfer.ptcch.ta_update_cmd = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 l1pa_l1ps_com.transfer.psi_param.psi_param_update_cmd = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 l1pa_l1ps_com.transfer.tbf_release_param.tbf_release_cmd = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 l1pa_l1ps_com.transfer.pdch_release_param.pdch_release_cmd = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 l1pa_l1ps_com.transfer.repeat_alloc.repeat_allocation = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 /* l1ps_reset_db_mcu_to_dsp() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 /* Functionality : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 void l1ps_reset_db_mcu_to_dsp(T_DB_MCU_TO_DSP_GPRS *page_ptr) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 API i; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 API size = sizeof(T_DB_MCU_TO_DSP_GPRS) / sizeof(API); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 API *ptr = (API *)page_ptr; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 // Clear all locations. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 for(i=0; i<size; i++) *ptr++ = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 /* l1ps_reset_db_dsp_to_mcu() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 /* Functionality : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 void l1ps_reset_db_dsp_to_mcu(T_DB_DSP_TO_MCU *page_ptr) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 API i; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 API size = sizeof(T_DB_DSP_TO_MCU_GPRS) / sizeof(API); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 API *ptr = (API *)page_ptr; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 // Clear all locations. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 for(i=0; i<size; i++) *ptr++ = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 // Set crc result as "SB not found". |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 page_ptr->a_sch[0] = (1<<B_SCH_CRC); // B_SCH_CRC =1, BLUD =0 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 /* l1ps_swap_iq_dl() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 /* Functionality : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 BOOL l1ps_swap_iq_dl(UWORD16 radio_freq) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 UWORD8 swap_iq; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 BOOL swap_flag; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 #if (L1_FF_MULTIBAND == 0) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 if(((l1_config.std.id == DUAL) || (l1_config.std.id == DUALEXT) || (l1_config.std.id == DUAL_US)) && |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 (radio_freq >= l1_config.std.first_radio_freq_band2)) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 swap_iq = l1_config.std.swap_iq_band2; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 swap_iq = l1_config.std.swap_iq_band1; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 #else // L1_FF_MULTIBAND = 1 below |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 UWORD16 physical_band_id; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 physical_band_id = |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 l1_multiband_radio_freq_convert_into_physical_band_id(radio_freq); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 swap_iq = rf_band[physical_band_id].swap_iq; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 #endif // #if (L1_FF_MULTIBAND == 0) else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 switch(swap_iq) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 case 0: /* No swap at all. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 case 2: /* DL, no swap. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 swap_flag = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 break; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 case 1: /* DL I/Q swap. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 case 3: /* DL I/Q swap. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 swap_flag = TRUE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 break; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 return(swap_flag); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 /* l1ps_swap_iq_ul() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 /* Functionality : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 BOOL l1ps_swap_iq_ul(UWORD16 radio_freq) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 UWORD8 swap_iq; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 BOOL swap_flag; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 #if (L1_FF_MULTIBAND == 0) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 if(((l1_config.std.id == DUAL) || (l1_config.std.id == DUALEXT) || (l1_config.std.id == DUAL_US)) && |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 (radio_freq >= l1_config.std.first_radio_freq_band2)) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 swap_iq = l1_config.std.swap_iq_band2; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 swap_iq = l1_config.std.swap_iq_band1; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 #else // L1_FF_MULTIBAND = 1 below |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 UWORD16 physical_band_id = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 physical_band_id = |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 l1_multiband_radio_freq_convert_into_physical_band_id(radio_freq); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 swap_iq = rf_band[physical_band_id].swap_iq; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 #endif // #if (L1_FF_MULTIBAND == 0) else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 switch(swap_iq) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 case 0: /* No swap at all. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 case 1: /* UL, no swap. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 swap_flag = FALSE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 break; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 case 2: /* UL I/Q swap. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 case 3: /* UL I/Q swap. */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 swap_flag = TRUE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 break; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 return(swap_flag); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 /* l1ps_tcr_ctrl() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 /* Functionality : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 void l1ps_tcr_ctrl(UWORD8 pm_position) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 UWORD16 radio_freq_ctrl; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 UWORD8 lna_off; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 WORD8 agc; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 UWORD8 mode = PACKET_TRANSFER; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 UWORD8 input_level; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 #if (RF_FAM == 61) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 UWORD16 dco_algo_ctl_pw = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 UWORD8 if_ctl = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 radio_freq_ctrl = l1pa_l1ps_com.cres_freq_list.alist->freq_list[l1pa_l1ps_com.tcr_freq_list.tcr_next_to_ctrl]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 // Get AGC according to the last known IL. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 input_level = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 agc = Cust_get_agc_from_IL(radio_freq_ctrl, input_level >> 1, PWR_ID); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 lna_off = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].lna_off; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 #if (RF_FAM == 61) // Locosto DCO |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 #if (PWMEAS_IF_MODE_FORCE == 0) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 cust_get_if_dco_ctl_algo(&dco_algo_ctl_pw, &if_ctl, (UWORD8) L1_IL_VALID , |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 input_level, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 l1pa_l1ps_com.p_idle_param.radio_freq, if_threshold); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 #else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 if_ctl = IF_120KHZ_DSP; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 dco_algo_ctl_pw = DCO_IF_0KHZ; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 l1ddsp_load_dco_ctl_algo_pw(dco_algo_ctl_pw); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 l1s.tcr_prog_done=1; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 // Memorize the IL and LNA used for AGC setting. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 l1pa_l1ps_com.tcr_freq_list.used_il_lna.il = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 l1pa_l1ps_com.tcr_freq_list.used_il_lna.lna = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].lna_off; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 // tpu pgm: 1 measurement only. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 l1dtpu_meas(radio_freq_ctrl, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 agc, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 lna_off, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 l1s.tpu_win, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 l1s.tpu_offset,INACTIVE |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 #if(RF_FAM == 61) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 ,L1_AFC_SCRIPT_MODE |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 ,if_ctl |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 ); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 // Increment tpu window identifier. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 l1s.tpu_win += (l1_config.params.rx_synth_load_split + PWR_LOAD); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 // increment carrier counter for next measurement... |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 if(++l1pa_l1ps_com.tcr_freq_list.tcr_next_to_ctrl >= l1pa_l1ps_com.cres_freq_list.alist->nb_carrier) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 l1pa_l1ps_com.tcr_freq_list.tcr_next_to_ctrl = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 // Program DSP, in order to performed 1 measure. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 // Second argument specifies PW position. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 l1pddsp_meas_ctrl(1, pm_position); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 #if (TRACE_TYPE!=0) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 //trace_fct(CST_CTRL_TRANSFER_MEAS, radio_freq_ctrl); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 // Update d_debug timer |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 l1s_dsp_com.dsp_db_w_ptr->d_debug = (l1s.debug_time + 2) ; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 // Flag measurement control. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 // ************************** |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 // Set flag "ms_ctrl" to nb_meas_to_perform. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 // It will be used as 2 tdma delayed to trigger Read phase. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431 l1pa_l1ps_com.tcr_freq_list.ms_ctrl = 1; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 // Flag DSP and TPU programmation. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 // ******************************** |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 // Set "CTRL_MS" flag in the controle flag register. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 l1s.tpu_ctrl_reg |= CTRL_MS; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 l1s.dsp_ctrl_reg |= CTRL_MS; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 /* l1ps_bcch_meas_ctrl() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 /* Functionality : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 void l1ps_bcch_meas_ctrl(UWORD8 ts) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 UWORD8 lna_off; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 WORD8 agc; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 UWORD8 mode = PACKET_TRANSFER; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 UWORD8 input_level; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 #if (RF_FAM == 61) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 UWORD16 dco_algo_ctl_pw =0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 UWORD8 if_ctl=0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 if ((l1s.dsp_ctrl_reg & CTRL_ABORT) == 0) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 #define radio_freq_ctrl l1a_l1s_com.Scell_info.radio_freq |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 // Get AGC according to the last known IL. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 input_level = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 agc = Cust_get_agc_from_IL(radio_freq_ctrl, input_level >> 1, PWR_ID); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 lna_off = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].lna_off; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 // Memorize the IL and LNA used for AGC setting. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 // Note: the same structure as for TCR meas is used for PC_MEAS_CHAN measurements |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 l1pa_l1ps_com.tcr_freq_list.used_il_lna.il = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 l1pa_l1ps_com.tcr_freq_list.used_il_lna.lna = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].lna_off; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 #if (RF_FAM == 61) // Locosto DCO |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 cust_get_if_dco_ctl_algo(&dco_algo_ctl_pw, &if_ctl, (UWORD8) L1_IL_VALID, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 input_level, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 radio_freq_ctrl,if_threshold); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 l1ddsp_load_dco_ctl_algo_pw(dco_algo_ctl_pw); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 // tpu pgm: 1 measurement only. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 l1dtpu_meas(radio_freq_ctrl, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 agc, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 lna_off, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 l1s.tpu_win, |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 l1s.tpu_offset,INACTIVE |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 #if(RF_FAM == 61) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 ,L1_AFC_SCRIPT_MODE |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 ,if_ctl |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 ); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 // Increment tpu window identifier. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 l1s.tpu_win += (l1_config.params.rx_synth_load_split + PWR_LOAD); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 // Program DSP, in order to performed 1 measure. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 // Second argument specifies PW position. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 l1pddsp_meas_ctrl(1, (UWORD8)ts); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 #if (TRACE_TYPE!=0) && (TRACE_TYPE!=5) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 //trace_fct(CST_CTRL_SCELL_TRANSFER_MEAS, radio_freq_ctrl); |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 // Update d_debug timer |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 l1s_dsp_com.dsp_db_w_ptr->d_debug = (l1s.debug_time + 2) ; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 // Flag measurement control. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 // ************************** |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 l1ps.pc_meas_chan_ctrl = TRUE; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 // Flag DSP and TPU programmation. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 // ******************************** |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 // Set "CTRL_MS" flag in the controle flag register. |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 l1s.tpu_ctrl_reg |= CTRL_MS; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 l1s.dsp_ctrl_reg |= CTRL_MS; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 /* l1ps_update_read_set_parameters() */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 /* Parameters : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 /* Return : */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 /* Functionality : Updating of the "Read_param" structure*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 /* usefull in case the aset structure has been updated */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 /* before the last read of the current block */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 /*-------------------------------------------------------*/ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 void l1ps_update_read_set_parameters(void) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 #define READ_PARAM l1ps.read_param |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 #define ASET l1pa_l1ps_com.transfer.aset |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 // Copy of the "aset" parameters in the "read_param" structure |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 #if 0 /* FreeCalypso TCS211 reconstruction */ |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543 READ_PARAM.dl_tn = l1a_l1s_com.dl_tn; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 #endif |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 READ_PARAM.new_set = 0; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 READ_PARAM.assignment_id = ASET->assignment_id; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 READ_PARAM.allocated_tbf = ASET->allocated_tbf; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 READ_PARAM.dl_tfi = ASET->dl_tbf_alloc.tfi; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 READ_PARAM.ul_tfi = ASET->ul_tbf_alloc->tfi; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 READ_PARAM.dl_pwr_ctl = ASET->dl_pwr_ctl; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 READ_PARAM.pc_meas_chan = ASET->pc_meas_chan; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 // We need to know on which frequency band we work for LNA state processing |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 if (!l1pa_l1ps_com.transfer.aset->freq_param.chan_sel.h) |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 // Single frequency |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 READ_PARAM.radio_freq_for_lna = l1pa_l1ps_com.transfer.aset->freq_param.chan_sel.rf_channel.single_rf.radio_freq; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 else |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 { |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 // Frequency hopping: all frequencies of the frequency list are on the same band |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 // We take the first frequency of the list |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 READ_PARAM.radio_freq_for_lna = l1pa_l1ps_com.transfer.aset->freq_param.freq_list.rf_chan_no.A[0]; |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 } |
0740b5ff15f6
reconstructed L1_GPRS source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 #endif |