comparison gsm-fw/L1/cfile/l1_ctl.c @ 552:81cef37b96f9

L1: l1_ctl.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 03 Aug 2014 18:59:50 +0000
parents 96a96ec34139
children
comparison
equal deleted inserted replaced
551:2e662daa7441 552:81cef37b96f9
7 * 7 *
8 ************* Revision Controle System Header *************/ 8 ************* Revision Controle System Header *************/
9 9
10 #define L1_CTL_C 10 #define L1_CTL_C
11 11
12 #include "config.h"
13 #include "l1_confg.h"
12 #include "l1_macro.h" 14 #include "l1_macro.h"
13 #include "l1_confg.h"
14 15
15 #if (CODE_VERSION == SIMULATION) 16 #if (CODE_VERSION == SIMULATION)
16 #include <string.h> 17 #include <string.h>
17 #include "l1_types.h" 18 #include "l1_types.h"
18 #include "sys_types.h" 19 #include "sys_types.h"
101 //ADDED FOR AAC 102 //ADDED FOR AAC
102 #if (L1_AAC == 1) 103 #if (L1_AAC == 1)
103 #include "l1aac_defty.h" 104 #include "l1aac_defty.h"
104 #endif 105 #endif
105 #include "l1_defty.h" 106 #include "l1_defty.h"
106 #include "cust_os.h" 107 #include "../../gpf/inc/cust_os.h"
107 #include "l1_msgty.h" 108 #include "l1_msgty.h"
108 #include "l1_varex.h" 109 #include "l1_varex.h"
109 #include "l1_proto.h" 110 #include "l1_proto.h"
110 #include "l1_tabs.h" 111 #include "l1_tabs.h"
111 #include "l1_ctl.h" 112 #include "l1_ctl.h"
115 116
116 #if TESTMODE 117 #if TESTMODE
117 #include "l1tm_msgty.h" 118 #include "l1tm_msgty.h"
118 #include "l1tm_varex.h" 119 #include "l1tm_varex.h"
119 #endif 120 #endif
120 #if (OP_L1_STANDALONE == 1)
121 #ifdef _INLINE 121 #ifdef _INLINE
122 #define INLINE static inline // Inline functions when -v option is set 122 #define INLINE static inline // Inline functions when -v option is set
123 #else // when the compiler is ivoked. 123 #else // when the compiler is ivoked.
124 #define INLINE 124 #define INLINE
125 #endif 125 #endif
126 #endif //omaps00090550
127 #endif 126 #endif
128 127
129 #if(RF_FAM == 61) 128 #if(RF_FAM == 61)
130 #include "l1_rf61.h" 129 #include "l1_rf61.h"
131 #endif 130 #endif
132 131
133 #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4) 132 #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4)
134 #include "l1_trace.h" 133 #include "l1_trace.h"
135 #endif 134 #endif
136 135
137 extern SYS_UWORD16 Convert_l1_radio_freq(SYS_UWORD16 radio_freq); 136 extern SYS_UWORD16 Convert_l1_radio_freq(SYS_UWORD16 radio_freq);
137 #if(RF_FAM == 61)
138 extern WORD16 drp_gain_correction(UWORD16 arfcn, UWORD8 lna_off, UWORD16 agc); 138 extern WORD16 drp_gain_correction(UWORD16 arfcn, UWORD8 lna_off, UWORD16 agc);
139 139 #endif
140 140
141 #define LNA_OFF 1 141 #define LNA_OFF 1
142 #define LNA_ON 0 142 #define LNA_ON 0
143 143
144 144
1933 UWORD32 index; 1933 UWORD32 index;
1934 UWORD16 g_magic; 1934 UWORD16 g_magic;
1935 UWORD16 arfcn; 1935 UWORD16 arfcn;
1936 UWORD16 dco_algo_ctl_pw_temp = 0; 1936 UWORD16 dco_algo_ctl_pw_temp = 0;
1937 UWORD8 if_ctl = 0; 1937 UWORD8 if_ctl = 0;
1938 #if (CODE_VERSION != SIMULATION) 1938 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
1939 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 1939 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
1940 #endif 1940 #endif
1941 1941
1942 #if (L1_FF_MULTIBAND == 0) 1942 #if (L1_FF_MULTIBAND == 0)
1943 1943
1944 // initialize index 1944 // initialize index
1945 index = radio_freq - l1_config.std.radio_freq_index_offset; 1945 index = radio_freq - l1_config.std.radio_freq_index_offset;
2117 WORD16 delta_drp_gain=0; 2117 WORD16 delta_drp_gain=0;
2118 WORD32 index, lna_value; 2118 WORD32 index, lna_value;
2119 UWORD16 arfcn; 2119 UWORD16 arfcn;
2120 UWORD16 dco_algo_ctl_pw_temp = 0; 2120 UWORD16 dco_algo_ctl_pw_temp = 0;
2121 UWORD8 if_ctl = 0; 2121 UWORD8 if_ctl = 0;
2122 #if (CODE_VERSION != SIMULATION) 2122 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
2123 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2123 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2124 #endif 2124 #endif
2125 2125
2126 #if (L1_FF_MULTIBAND == 0) 2126 #if (L1_FF_MULTIBAND == 0)
2127 2127
2128 // initialize index 2128 // initialize index
2129 index = radio_freq - l1_config.std.radio_freq_index_offset; 2129 index = radio_freq - l1_config.std.radio_freq_index_offset;
2218 WORD32 index; 2218 WORD32 index;
2219 UWORD16 g_magic; 2219 UWORD16 g_magic;
2220 UWORD16 arfcn; 2220 UWORD16 arfcn;
2221 UWORD16 dco_algo_ctl_pw_temp = 0; 2221 UWORD16 dco_algo_ctl_pw_temp = 0;
2222 UWORD8 if_ctl = 0; 2222 UWORD8 if_ctl = 0;
2223 #if (CODE_VERSION != SIMULATION) 2223 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
2224 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2224 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2225 #endif 2225 #endif
2226 2226
2227 #if (L1_FF_MULTIBAND == 0) 2227 #if (L1_FF_MULTIBAND == 0)
2228 2228
2229 // initialize index 2229 // initialize index
2230 index = radio_freq - l1_config.std.radio_freq_index_offset; 2230 index = radio_freq - l1_config.std.radio_freq_index_offset;
2397 WORD32 lna_value; 2397 WORD32 lna_value;
2398 UWORD16 arfcn; 2398 UWORD16 arfcn;
2399 UWORD8 lna_off; 2399 UWORD8 lna_off;
2400 UWORD16 dco_algo_ctl_pw_temp = 0; 2400 UWORD16 dco_algo_ctl_pw_temp = 0;
2401 UWORD8 if_ctl = 0; 2401 UWORD8 if_ctl = 0;
2402 #if (CODE_VERSION != SIMULATION) 2402 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
2403 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2403 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2404 #endif 2404 #endif
2405 2405
2406 delta1_freq = l1ctl_encode_delta1(radio_freq); 2406 delta1_freq = l1ctl_encode_delta1(radio_freq);
2407 delta2_freq = l1ctl_encode_delta2(radio_freq); 2407 delta2_freq = l1ctl_encode_delta2(radio_freq);
2408 2408
2409 // Update fifo 2409 // Update fifo
2507 WORD32 lna_value; 2507 WORD32 lna_value;
2508 UWORD16 arfcn; 2508 UWORD16 arfcn;
2509 UWORD8 lna_off; 2509 UWORD8 lna_off;
2510 UWORD16 dco_algo_ctl_pw_temp = 0; 2510 UWORD16 dco_algo_ctl_pw_temp = 0;
2511 UWORD8 if_ctl = 0; 2511 UWORD8 if_ctl = 0;
2512 #if (CODE_VERSION != SIMULATION) 2512 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
2513 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2513 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2514 #endif 2514 #endif
2515 2515
2516 delta1_freq = l1ctl_encode_delta1(radio_freq); 2516 delta1_freq = l1ctl_encode_delta1(radio_freq);
2517 delta2_freq = l1ctl_encode_delta2(radio_freq); 2517 delta2_freq = l1ctl_encode_delta2(radio_freq);
2518 2518
2519 aset = l1a_l1s_com.dedic_set.aset; 2519 aset = l1a_l1s_com.dedic_set.aset;
2689 { 2689 {
2690 UWORD8 av_G_all, av_G_DTX; 2690 UWORD8 av_G_all, av_G_DTX;
2691 UWORD8 max_G_all, max_G_DTX, max_il; 2691 UWORD8 max_G_all, max_G_DTX, max_il;
2692 WORD32 last_known_agc, new_IL, current_calibrated_IL; 2692 WORD32 last_known_agc, new_IL, current_calibrated_IL;
2693 WORD8 delta1_freq, delta2_freq; 2693 WORD8 delta1_freq, delta2_freq;
2694 WORD16 delta_drp_gain=0; 2694 WORD16 delta_drp_gain=0;
2695 UWORD8 i; 2695 UWORD8 i;
2696 UWORD8 *tab_ptr, *tab_amr_ptr; 2696 UWORD8 *tab_ptr, *tab_amr_ptr;
2697 T_DEDIC_SET *aset; 2697 T_DEDIC_SET *aset;
2698 WORD32 lna_value; 2698 WORD32 lna_value;
2699 UWORD16 arfcn; 2699 UWORD16 arfcn;
2700 UWORD8 lna_off; 2700 UWORD8 lna_off;
2701 UWORD16 dco_algo_ctl_pw_temp = 0; 2701 UWORD16 dco_algo_ctl_pw_temp = 0;
2702 UWORD8 if_ctl = 0; 2702 UWORD8 if_ctl = 0;
2703 #if (CODE_VERSION != SIMULATION) 2703 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
2704 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2704 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2705 #endif 2705 #endif
2706 2706
2707 delta1_freq = l1ctl_encode_delta1(radio_freq); 2707 delta1_freq = l1ctl_encode_delta1(radio_freq);
2708 delta2_freq = l1ctl_encode_delta2(radio_freq); 2708 delta2_freq = l1ctl_encode_delta2(radio_freq);
2709 2709
2710 aset = l1a_l1s_com.dedic_set.aset; 2710 aset = l1a_l1s_com.dedic_set.aset;
3171 { 3171 {
3172 l1a_l1s_com.Scell_info.buff_beacon[i] = l1_config.params.il_min; 3172 l1a_l1s_com.Scell_info.buff_beacon[i] = l1_config.params.il_min;
3173 } 3173 }
3174 } 3174 }
3175 #endif /* #if (FF_L1_FAST_DECODING == 1) */ 3175 #endif /* #if (FF_L1_FAST_DECODING == 1) */
3176
3177
3178