comparison gsm-fw/L1/cfile/l1_drive.c @ 553:e4feac5bc3ea

gsm-fw/L1/cfile/l1_drive.c: preliminary preen
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 04 Aug 2014 00:07:21 +0000
parents 67ab5f240b7d
children 44d30f013ee5
comparison
equal deleted inserted replaced
552:81cef37b96f9 553:e4feac5bc3ea
7 * 7 *
8 ************* Revision Controle System Header *************/ 8 ************* Revision Controle System Header *************/
9 9
10 #define L1_DRIVE_C 10 #define L1_DRIVE_C
11 11
12 12 #include "config.h"
13 #include "l1_confg.h" 13 #include "l1_confg.h"
14
15 14
16 #if (RF_FAM == 61) 15 #if (RF_FAM == 61)
17 #include "apc.h" 16 #include "apc.h"
18 #endif 17 #endif
19 18
105 #if (L1_AAC == 1) 104 #if (L1_AAC == 1)
106 #include "l1aac_defty.h" 105 #include "l1aac_defty.h"
107 #endif 106 #endif
108 #include "l1_defty.h" 107 #include "l1_defty.h"
109 #include "l1_varex.h" 108 #include "l1_varex.h"
110 #include "cust_os.h" 109 #include "../../gpf/inc/cust_os.h"
111 #include "l1_msgty.h" 110 #include "l1_msgty.h"
112 #if TESTMODE 111 #if TESTMODE
113 #include "l1tm_varex.h" 112 #include "l1tm_varex.h"
114 #endif 113 #endif
115 #if L2_L3_SIMUL 114 #if L2_L3_SIMUL
437 //Locosto has new API for Ramp 436 //Locosto has new API for Ramp
438 #if (DSP == 38) || (DSP == 39) 437 #if (DSP == 38) || (DSP == 39)
439 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_drp_ramp, txpwr, txpwr, radio_freq); 438 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_drp_ramp, txpwr, txpwr, radio_freq);
440 #endif 439 #endif
441 #else 440 #else
442 #if (CODE_VERSION != SIMULATION) 441 #if (CODE_VERSION != SIMULATION)
443 /*** Reference to real ramp array (GSM: 15 power levels, 5-19, DCS: 16 power levels, 0-15) ***/ 442 /*** Reference to real ramp array (GSM: 15 power levels, 5-19, DCS: 16 power levels, 0-15) ***/
444 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq); 443 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq);
445 #endif 444 #endif
446 #endif 445 #endif
447 446
448 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3)) 447 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3))
449 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); 448 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2));
450 #endif 449 #endif
563 l1s.last_used_txpwr = txpwr; 562 l1s.last_used_txpwr = txpwr;
564 last_used_freq_band = freq_band; 563 last_used_freq_band = freq_band;
565 564
566 /*** Reference to real ramp array (GSM: 15 power levels, 5-19, DCS: 16 power levels, 0-15) ***/ 565 /*** Reference to real ramp array (GSM: 15 power levels, 5-19, DCS: 16 power levels, 0-15) ***/
567 #if(RF_FAM == 61) 566 #if(RF_FAM == 61)
568 #if (DSP == 38) || (DSP == 39) 567 #if (DSP == 38) || (DSP == 39)
569 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_drp_ramp, txpwr, txpwr, radio_freq); 568 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_drp_ramp, txpwr, txpwr, radio_freq);
570 #endif 569 #endif
571 #else 570 #else
572 #if (CODE_VERSION != SIMULATION) 571 #if (CODE_VERSION != SIMULATION)
573 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq); 572 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq);
574 #endif 573 #endif
575 #endif 574 #endif
576 575
577 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) ||(RF_FAM == 61)) 576 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) ||(RF_FAM == 61))
578 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); 577 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2));
579 #endif 578 #endif
690 UWORD8 tch_loop, UWORD8 sync_tch, 689 UWORD8 tch_loop, UWORD8 sync_tch,
691 UWORD8 sync_amr, 690 UWORD8 sync_amr,
692 UWORD8 reset_sacch, 691 UWORD8 reset_sacch,
693 #if !FF_L1_IT_DSP_DTX 692 #if !FF_L1_IT_DSP_DTX
694 UWORD8 vocoder_on) 693 UWORD8 vocoder_on)
695 #else 694 #else
696 UWORD8 vocoder_on, 695 UWORD8 vocoder_on,
697 BOOL dtx_dsp_interrupt) 696 BOOL dtx_dsp_interrupt)
698 #endif 697 #endif
699 #else 698 #else
700 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode, 699 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode,
788 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode, 787 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode,
789 UWORD8 chan_type, UWORD8 subchannel, 788 UWORD8 chan_type, UWORD8 subchannel,
790 UWORD8 tch_loop, UWORD8 sync_tch, 789 UWORD8 tch_loop, UWORD8 sync_tch,
791 #if !FF_L1_IT_DSP_DTX 790 #if !FF_L1_IT_DSP_DTX
792 UWORD8 reset_sacch, UWORD8 vocoder_on) 791 UWORD8 reset_sacch, UWORD8 vocoder_on)
793 #else 792 #else
794 UWORD8 reset_sacch, UWORD8 vocoder_on, 793 UWORD8 reset_sacch, UWORD8 vocoder_on,
795 BOOL dtx_dsp_interrupt) 794 BOOL dtx_dsp_interrupt)
796 #endif 795 #endif
797 #else 796 #else
798 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode, 797 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode,
1045 { 1044 {
1046 l1s_dsp_com.dsp_db_common_w_ptr->d_swh_ctrl_db = SAIC_ENABLE_DB; 1045 l1s_dsp_com.dsp_db_common_w_ptr->d_swh_ctrl_db = SAIC_ENABLE_DB;
1047 if(SWH_flag) 1046 if(SWH_flag)
1048 { 1047 {
1049 l1s_dsp_com.dsp_db_common_w_ptr->d_swh_ctrl_db |= (0x01<< B_SWH_DB); 1048 l1s_dsp_com.dsp_db_common_w_ptr->d_swh_ctrl_db |= (0x01<< B_SWH_DB);
1050 } 1049 }
1051 } 1050 }
1052 else 1051 else
1053 { 1052 {
1054 l1s_dsp_com.dsp_db_common_w_ptr->d_swh_ctrl_db = 0; 1053 l1s_dsp_com.dsp_db_common_w_ptr->d_swh_ctrl_db = 0;
1055 } 1054 }
1150 } 1149 }
1151 break; 1150 break;
1152 } 1151 }
1153 1152
1154 // write dsp tasks..... 1153 // write dsp tasks.....
1155 #if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) 1154 #if (DSP >= 33)
1156 l1s_dsp_com.dsp_ndb_ptr->d_dsp_page = (API) dsp_task; 1155 l1s_dsp_com.dsp_ndb_ptr->d_dsp_page = (API) dsp_task;
1157 #else 1156 #else
1158 l1s_dsp_com.dsp_param_ptr->d_dsp_page = (API) dsp_task; 1157 l1s_dsp_com.dsp_param_ptr->d_dsp_page = (API) dsp_task;
1159 #endif 1158 #endif
1160 1159