FreeCalypso > hg > tcs211-l1-reconst
changeset 327:294adc9e1d3c
l1p_func.c: Cust_get_agc_from_IL() argument count fix
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 04 Oct 2017 22:46:22 +0000 |
parents | 84ef3a68e832 |
children | 2604e9569e31 |
files | chipsetsw/layer1/p_cfile/l1p_func.c |
diffstat | 1 files changed, 8 insertions(+), 66 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/p_cfile/l1p_func.c Wed Oct 04 21:12:29 2017 +0000 +++ b/chipsetsw/layer1/p_cfile/l1p_func.c Wed Oct 04 22:46:22 2017 +0000 @@ -75,7 +75,7 @@ ,UWORD8 if_ctl #endif ); -WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id, UWORD8 lna_off_val); +WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id); void l1ps_macs_init (void); /*-------------------------------------------------------*/ @@ -357,44 +357,24 @@ UWORD8 lna_off; WORD8 agc; -#if(L1_FF_MULTIBAND == 1) - UWORD16 operative_radio_freq; -#endif - UWORD8 mode = PACKET_TRANSFER; UWORD8 input_level; #if (RF_FAM == 61) UWORD16 dco_algo_ctl_pw = 0; UWORD8 if_ctl = 0; - UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; + UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; #endif radio_freq_ctrl = l1pa_l1ps_com.cres_freq_list.alist->freq_list[l1pa_l1ps_com.tcr_freq_list.tcr_next_to_ctrl]; // Get AGC according to the last known IL. -#if(L1_FF_MULTIBAND == 0) - + input_level = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level; lna_off = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].lna_off; - agc = Cust_get_agc_from_IL(radio_freq_ctrl, input_level >> 1, PWR_ID, lna_off); - -#else // L1_FF_MULTIBAND = 1 below - - operative_radio_freq = - l1_multiband_radio_freq_convert_into_operative_radio_freq(radio_freq_ctrl); - input_level = - l1a_l1s_com.last_input_level[operative_radio_freq].input_level; - lna_off = - l1a_l1s_com.last_input_level[operative_radio_freq].lna_off; - agc = - Cust_get_agc_from_IL(radio_freq_ctrl, input_level >> 1, PWR_ID, lna_off); - -#endif // #if(L1_FF_MULTIBAND == 0) else - - + agc = Cust_get_agc_from_IL(radio_freq_ctrl, input_level >> 1, PWR_ID); #if (RF_FAM == 61) // Locosto DCO - #if (PWMEAS_IF_MODE_FORCE == 0) + #if (PWMEAS_IF_MODE_FORCE == 0) cust_get_if_dco_ctl_algo(&dco_algo_ctl_pw, &if_ctl, (UWORD8) L1_IL_VALID , input_level, l1pa_l1ps_com.p_idle_param.radio_freq, if_threshold); @@ -408,22 +388,10 @@ l1s.tcr_prog_done=1; #endif -#if (L1_FF_MULTIBAND == 0) - // Memorize the IL and LNA used for AGC setting. 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; 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; -#else // L1_FF_MULTIBAND = 1 below - - // Memorize the IL and LNA used for AGC setting. - l1pa_l1ps_com.tcr_freq_list.used_il_lna.il = - l1a_l1s_com.last_input_level[operative_radio_freq].input_level; - l1pa_l1ps_com.tcr_freq_list.used_il_lna.lna = - l1a_l1s_com.last_input_level[operative_radio_freq].lna_off; - -#endif // #if (L1_FF_MULTIBAND == 0) else - // tpu pgm: 1 measurement only. l1dtpu_meas(radio_freq_ctrl, agc, @@ -482,16 +450,13 @@ { UWORD8 lna_off; WORD8 agc; -#if(L1_FF_MULTIBAND == 1) - UWORD16 operative_radio_freq = 0; -#endif - + UWORD8 mode = PACKET_TRANSFER; UWORD8 input_level; #if (RF_FAM == 61) UWORD16 dco_algo_ctl_pw =0; UWORD8 if_ctl=0; - UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; + UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; #endif @@ -499,38 +464,15 @@ { #define radio_freq_ctrl l1a_l1s_com.Scell_info.radio_freq -#if(L1_FF_MULTIBAND == 0) - // Get AGC according to the last known IL. input_level = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level; lna_off = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].lna_off; - agc = Cust_get_agc_from_IL(radio_freq_ctrl, input_level >> 1, PWR_ID, lna_off); + agc = Cust_get_agc_from_IL(radio_freq_ctrl, input_level >> 1, PWR_ID); // Memorize the IL and LNA used for AGC setting. // Note: the same structure as for TCR meas is used for PC_MEAS_CHAN measurements l1pa_l1ps_com.tcr_freq_list.used_il_lna.il = input_level; 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; -#else // L1_FF_MULTIBAND = 1 below - - operative_radio_freq = - l1_multiband_radio_freq_convert_into_operative_radio_freq(radio_freq_ctrl); - - // Get AGC according to the last known IL. - input_level = - l1a_l1s_com.last_input_level[operative_radio_freq].input_level; - lna_off = - l1a_l1s_com.last_input_level[operative_radio_freq].lna_off; - agc = - Cust_get_agc_from_IL(radio_freq_ctrl, input_level >> 1, PWR_ID, lna_off); - - // Memorize the IL and LNA used for AGC setting. - // Note: the same structure as for TCR meas is used for PC_MEAS_CHAN measurements - l1pa_l1ps_com.tcr_freq_list.used_il_lna.il = input_level; - l1pa_l1ps_com.tcr_freq_list.used_il_lna.lna = - l1a_l1s_com.last_input_level[operative_radio_freq].lna_off; - -#endif // #if(L1_FF_MULTIBAND == 0) else - #if (RF_FAM == 61) // Locosto DCO cust_get_if_dco_ctl_algo(&dco_algo_ctl_pw, &if_ctl, (UWORD8) L1_IL_VALID,