FreeCalypso > hg > tcs211-l1-reconst
comparison chipsetsw/layer1/cust0/l1_cust.c @ 208:fe1846dee240
l1_cust.c: Cust_get_agc_from_IL() reconstructed
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 08 Jun 2016 06:30:56 +0000 |
parents | a13fa419d13b |
children | c79dd8f07fc5 |
comparison
equal
deleted
inserted
replaced
207:a13fa419d13b | 208:fe1846dee240 |
---|---|
701 /* Return : */ | 701 /* Return : */ |
702 /* Functionality : returns agc value */ | 702 /* Functionality : returns agc value */ |
703 /*-------------------------------------------------------*/ | 703 /*-------------------------------------------------------*/ |
704 WORD8 Cust_get_agc_from_IL(UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id) | 704 WORD8 Cust_get_agc_from_IL(UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id) |
705 { | 705 { |
706 WORD8 agc_value; | |
707 | |
706 // radio_freq currently not used | 708 // radio_freq currently not used |
707 // this parameter is passed in order to allow band dependent tables for specific RFs | 709 // this parameter is passed in order to allow band dependent tables for specific RFs |
708 // (e.g. dual band RF with separate AGC H/W blocks for GSM and DCS) | 710 // (e.g. dual band RF with separate AGC H/W blocks for GSM and DCS) |
709 | 711 |
710 if (agc_index > 120) | 712 if (agc_index > 120) |
711 agc_index = 120; // Clip agc_index | 713 agc_index = 120; // Clip agc_index |
712 | 714 |
713 switch (table_id) | 715 switch (table_id) |
714 { | 716 { |
715 case MAX_ID: return(rf.rx.agc.il2agc_max[agc_index]); | 717 case MAX_ID: |
716 case AV_ID: return(rf.rx.agc.il2agc_av[agc_index]); | 718 agc_value = rf.rx.agc.il2agc_max[agc_index]; |
717 case PWR_ID: return(rf.rx.agc.il2agc_pwr[agc_index]); | 719 break; |
720 case AV_ID: | |
721 agc_value = rf.rx.agc.il2agc_av[agc_index]; | |
722 break; | |
723 case PWR_ID: | |
724 agc_value = rf.rx.agc.il2agc_pwr[agc_index]; | |
725 break; | |
718 } | 726 } |
727 | |
728 return agc_value; | |
719 } | 729 } |
720 | 730 |
721 /*-------------------------------------------------------*/ | 731 /*-------------------------------------------------------*/ |
722 /* Cust_get_agc_band */ | 732 /* Cust_get_agc_band */ |
723 /*-------------------------------------------------------*/ | 733 /*-------------------------------------------------------*/ |