comparison gsm-fw/L1/cfile/l1_drive.c @ 555:44d30f013ee5

L1: l1_drive.c almost compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 04 Aug 2014 05:43:16 +0000
parents e4feac5bc3ea
children b3549e06db7e
comparison
equal deleted inserted replaced
554:3a0ce0ea4035 555:44d30f013ee5
15 #if (RF_FAM == 61) 15 #if (RF_FAM == 61)
16 #include "apc.h" 16 #include "apc.h"
17 #endif 17 #endif
18 18
19 #if ((W_A_WAIT_DSP_RESTART_AFTER_VOCODER_ENABLE ==1)&&(W_A_DSP_PR20037 == 1)) 19 #if ((W_A_WAIT_DSP_RESTART_AFTER_VOCODER_ENABLE ==1)&&(W_A_DSP_PR20037 == 1))
20 #include "nucleus.h" 20 #include "../../nucleus/nucleus.h"
21 #endif 21 #endif
22 #include "l1_macro.h" 22 #include "l1_macro.h"
23 #if (CODE_VERSION == SIMULATION) 23 #if (CODE_VERSION == SIMULATION)
24 #include <string.h> 24 #include <string.h>
25 #include "l1_types.h" 25 #include "l1_types.h"
132 #include "tpudrv61.h" 132 #include "tpudrv61.h"
133 #endif 133 #endif
134 134
135 135
136 136
137 /*-------------------------------------------------------*/ 137 /*
138 /* Prototypes of external functions used in this file. */ 138 * Prototypes of external functions used in this file.
139 /*-------------------------------------------------------*/ 139 *
140 void l1dmacro_reset_hw (UWORD32 servingCellOffset); 140 * FreeCalypso change: removed all those prototypes which appear
141 void l1dmacro_idle (void); 141 * in tpudrv.h, and kept only the additional ones.
142 void l1dmacro_rx_synth (UWORD16 arfcn); 142 */
143 void l1dmacro_tx_synth (UWORD16 arfcn); 143
144 void l1dmacro_agc (UWORD16 arfcn,WORD8 gain, UWORD8 lna
145 #if (RF_FAM == 61)
146 , UWORD8 if_ctl
147 #endif
148 );
149 void l1dmacro_afc (UWORD16 afc_value, UWORD8 win_id);
150 #if (CODE_VERSION == SIMULATION)
151 void l1dmacro_rx_ms (UWORD16 arfcn, BOOL rxnb_select);
152 #else
153 #if (L1_MADC_ON == 1)
154 #if (RF_FAM == 61)
155 void l1dmacro_rx_ms (SYS_UWORD16 arfcn,UWORD8 adc_active);
156 #endif
157 #else
158 void l1dmacro_rx_ms (SYS_UWORD16 arfcn);
159 #endif
160 #endif
161
162 #if (L1_MADC_ON == 1)
163 #if (RF_FAM == 61)
164 void l1dmacro_rx_fb (UWORD16 arfcn , UWORD8 adc_active);
165 void l1dmacro_rx_fb26 (UWORD16 arfcn, UWORD8 adc_active);
166 #endif
167 #else
168 void l1dmacro_rx_fb (UWORD16 arfcn);
169 void l1dmacro_rx_fb26 (UWORD16 arfcn);
170 #endif
171 void l1dmacro_offset (UWORD32 offset_value, WORD32 relative_time);
172 void l1dmacro_synchro (UWORD32 when, UWORD32 value);
173 #if (L1_MADC_ON == 1)
174 #if (RF_FAM == 61)
175 void l1dmacro_rx_sb (UWORD16 arfcn, UWORD8 adc_active);
176 void l1dmacro_rx_nb (UWORD16 arfcn, UWORD8 adc_active, UWORD8 csf_filter_choice
177 #if (NEW_SNR_THRESHOLD == 1)
178 ,UWORD8 saic_flag
179 #endif /* NEW_SNR_THRESHOLD*/
180 );
181 #endif
182 #if ((REL99 == 1) && (FF_BHO == 1)) 144 #if ((REL99 == 1) && (FF_BHO == 1))
183 #if (L1_MADC_ON == 1) 145 #if (L1_MADC_ON == 1)
184 void l1dmacro_rx_fbsb (SYS_UWORD16 radio_freq,UWORD8 adc_active); 146 void l1dmacro_rx_fbsb (SYS_UWORD16 radio_freq,UWORD8 adc_active);
185 #else 147 #else
186 void l1dmacro_rx_fbsb (SYS_UWORD16 radio_freq); 148 void l1dmacro_rx_fbsb (SYS_UWORD16 radio_freq);
187 #endif 149 #endif
188 #endif//#if ((REL99 == 1) && (FF_BHO == 1)) 150 #endif//#if ((REL99 == 1) && (FF_BHO == 1))
189 #else
190 void l1dmacro_rx_sb (UWORD16 arfcn);
191 void l1dmacro_rx_nb (UWORD16 arfcn, UWORD8 csf_filter_choice);
192 #endif
193 void l1dmacro_tx_nb (UWORD16 arfcn, UWORD8 txpwr, UWORD8 adc_active);
194 void l1dmacro_tx_ra (UWORD16 arfcn, UWORD8 txpwr, UWORD8 adc_active);
195 void l1dmacro_adc_read_rx (void);
196 151
197 void Cust_get_ramp_tab(API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq); 152 void Cust_get_ramp_tab(API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq);
198 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) || (RF_FAM == 61)) 153 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) || (RF_FAM == 61))
199 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq 154 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq
200 #if(REL99 && FF_PRF) 155 #if(REL99 && FF_PRF)
1508 /* Return : */ 1463 /* Return : */
1509 /* Functionality : */ 1464 /* Functionality : */
1510 /*-------------------------------------------------------*/ 1465 /*-------------------------------------------------------*/
1511 void l1dtpu_serv_rx_nb(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off, 1466 void l1dtpu_serv_rx_nb(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off,
1512 UWORD32 synchro_serv,UWORD32 new_offset,BOOL change_offset, 1467 UWORD32 synchro_serv,UWORD32 new_offset,BOOL change_offset,
1513 UWORD8 adc_active, UWORD8 csf_filter_choice 1468 UWORD8 adc_active
1514 #if(RF_FAM == 61) 1469 #if(RF_FAM == 61)
1470 , UWORD8 csf_filter_choice
1515 , UWORD8 if_ctl 1471 , UWORD8 if_ctl
1516 #endif 1472 #endif
1517 #if (NEW_SNR_THRESHOLD == 1) 1473 #if (NEW_SNR_THRESHOLD == 1)
1518 , UWORD8 saic_flag 1474 , UWORD8 saic_flag
1519 #endif/* NEW_SNR_THRESHOLD == 1*/ 1475 #endif/* NEW_SNR_THRESHOLD == 1*/
1577 ,saic_flag 1533 ,saic_flag
1578 #endif /* NEW_SNR_THRESHOLD*/ 1534 #endif /* NEW_SNR_THRESHOLD*/
1579 ); 1535 );
1580 #endif /* RF_FAM == 61*/ 1536 #endif /* RF_FAM == 61*/
1581 #else /* L1_MADC_ON == 1 */ 1537 #else /* L1_MADC_ON == 1 */
1538 #if (RF_FAM == 61)
1582 l1dmacro_rx_cont (FALSE, radio_freq,csf_filter_choice); 1539 l1dmacro_rx_cont (FALSE, radio_freq,csf_filter_choice);
1540 #else
1541 l1dmacro_rx_cont (FALSE, radio_freq);
1542 #endif
1583 #endif 1543 #endif
1584 //TBD Danny New MAcro for Cont Tx reqd, to use only External Trigger 1544 //TBD Danny New MAcro for Cont Tx reqd, to use only External Trigger
1585 else 1545 else
1586 #endif 1546 #endif
1587 #if ( L1_MADC_ON == 1) 1547 #if ( L1_MADC_ON == 1)
1591 ,saic_flag 1551 ,saic_flag
1592 #endif /* NEW_SNR_THRESHOLD*/ 1552 #endif /* NEW_SNR_THRESHOLD*/
1593 ); // RX window for NB. 1553 ); // RX window for NB.
1594 #endif /* RF_FAM == 61*/ 1554 #endif /* RF_FAM == 61*/
1595 #else /* L1_MADC_ON == 1*/ 1555 #else /* L1_MADC_ON == 1*/
1596 l1dmacro_rx_nb (radio_freq, csf_filter_choice); // RX window for NB. 1556 #if (RF_FAM == 61)
1557 l1dmacro_rx_nb (radio_freq, csf_filter_choice); // RX window for NB.
1558 #else
1559 l1dmacro_rx_nb (radio_freq); // RX window for NB.
1560 #endif
1597 #endif 1561 #endif
1598 1562
1599 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3)) 1563 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3))
1600 l1ddsp_load_afc(l1s.afc); 1564 l1ddsp_load_afc(l1s.afc);
1601 #endif 1565 #endif
1710 ,UWORD8 saic_flag 1674 ,UWORD8 saic_flag
1711 #endif /* NEW_SNR_THRESHOLD*/ 1675 #endif /* NEW_SNR_THRESHOLD*/
1712 ) 1676 )
1713 { 1677 {
1714 UWORD32 offset_neigh; 1678 UWORD32 offset_neigh;
1679 #if (RF_FAM == 61)
1715 // By default we choose the hardware filter for neighbour Normal Bursts 1680 // By default we choose the hardware filter for neighbour Normal Bursts
1716 UWORD8 csf_filter_choice = L1_SAIC_HARDWARE_FILTER; 1681 UWORD8 csf_filter_choice = L1_SAIC_HARDWARE_FILTER;
1682 #endif
1717 1683
1718 #if TESTMODE 1684 #if TESTMODE
1719 if (!l1_config.agc_enable) 1685 if (!l1_config.agc_enable)
1720 { 1686 {
1721 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero) 1687 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero)
1747 ,saic_flag 1713 ,saic_flag
1748 #endif /* NEW_SNR_THRESHOLD*/ 1714 #endif /* NEW_SNR_THRESHOLD*/
1749 ) ; // RX window for NB. 1715 ) ; // RX window for NB.
1750 #endif /* RF_FAM == 61*/ 1716 #endif /* RF_FAM == 61*/
1751 #else /* L1_MADC_ON == 1*/ 1717 #else /* L1_MADC_ON == 1*/
1752 l1dmacro_rx_nb (radio_freq, csf_filter_choice); // RX window for NB. 1718 #if (RF_FAM == 61)
1719 l1dmacro_rx_nb (radio_freq, csf_filter_choice); // RX window for NB.
1720 #else
1721 l1dmacro_rx_nb (radio_freq); // RX window for NB.
1722 #endif
1753 #endif 1723 #endif
1754 1724
1755 // Restore offset with serving value. 1725 // Restore offset with serving value.
1756 if(reload_flag == TRUE) 1726 if(reload_flag == TRUE)
1757 l1dmacro_offset (offset_serv, IMM); 1727 l1dmacro_offset (offset_serv, IMM);