comparison gsm-fw/L1/cfile/l1_drive.c @ 548:67ab5f240b7d

gsm-fw/L1/cfile/*.c: s/ANLG_FAM/ANALOG/
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 03 Aug 2014 16:13:52 +0000
parents 96a96ec34139
children e4feac5bc3ea
comparison
equal deleted inserted replaced
547:32f7494783db 548:67ab5f240b7d
194 void l1dmacro_tx_nb (UWORD16 arfcn, UWORD8 txpwr, UWORD8 adc_active); 194 void l1dmacro_tx_nb (UWORD16 arfcn, UWORD8 txpwr, UWORD8 adc_active);
195 void l1dmacro_tx_ra (UWORD16 arfcn, UWORD8 txpwr, UWORD8 adc_active); 195 void l1dmacro_tx_ra (UWORD16 arfcn, UWORD8 txpwr, UWORD8 adc_active);
196 void l1dmacro_adc_read_rx (void); 196 void l1dmacro_adc_read_rx (void);
197 197
198 void Cust_get_ramp_tab(API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq); 198 void Cust_get_ramp_tab(API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq);
199 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (RF_FAM == 61)) 199 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) || (RF_FAM == 61))
200 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq 200 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq
201 #if(REL99 && FF_PRF) 201 #if(REL99 && FF_PRF)
202 ,UWORD8 number_uplink_timeslot 202 ,UWORD8 number_uplink_timeslot
203 #endif 203 #endif
204 ); 204 );
378 378
379 { 379 {
380 #endif 380 #endif
381 //######################## For DSP Rom ################################# 381 //######################## For DSP Rom #################################
382 l1s_dsp_com.dsp_db_w_ptr->d_afc = afc; // Write new afc command. 382 l1s_dsp_com.dsp_db_w_ptr->d_afc = afc; // Write new afc command.
383 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (RF_FAM == 61)) 383 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) || (RF_FAM == 61))
384 // NOTE: In Locosto AFC loading is w.r.t DRP not in ABB 384 // NOTE: In Locosto AFC loading is w.r.t DRP not in ABB
385 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= (1 << B_AFC); // Validate new afc value. 385 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= (1 << B_AFC); // Validate new afc value.
386 #endif 386 #endif
387 #if (L1_EOTD==1) 387 #if (L1_EOTD==1)
388 } 388 }
420 */ 420 */
421 421
422 /*-------------------------------------------------------*/ 422 /*-------------------------------------------------------*/
423 void l1ddsp_load_txpwr(UWORD8 txpwr, UWORD16 radio_freq) 423 void l1ddsp_load_txpwr(UWORD8 txpwr, UWORD16 radio_freq)
424 { 424 {
425 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (RF_FAM == 61)) 425 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) || (RF_FAM == 61))
426 UWORD16 pwr_data; 426 UWORD16 pwr_data;
427 #endif 427 #endif
428 428
429 //config 429 //config
430 if (l1_config.tx_pwr_code ==0) 430 if (l1_config.tx_pwr_code ==0)
443 /*** Reference to real ramp array (GSM: 15 power levels, 5-19, DCS: 16 power levels, 0-15) ***/ 443 /*** 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); 444 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq);
445 #endif 445 #endif
446 #endif 446 #endif
447 447
448 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) 448 #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)); 449 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2));
450 #endif 450 #endif
451 451
452 #if(RF_FAM == 61) 452 #if(RF_FAM == 61)
453 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); 453 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2));
485 /*** Check to see if the TXPWR is to be suppressed (txpwr = NO_TXPWR) ***/ 485 /*** Check to see if the TXPWR is to be suppressed (txpwr = NO_TXPWR) ***/
486 486
487 if(txpwr == NO_TXPWR) 487 if(txpwr == NO_TXPWR)
488 { 488 {
489 /*** No transmit ***/ 489 /*** No transmit ***/
490 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) 490 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3))
491 l1s_dsp_com.dsp_db_w_ptr->d_power_ctl = 0x12; // AUXAPC initialization addr 9 pg 0 Omega 491 l1s_dsp_com.dsp_db_w_ptr->d_power_ctl = 0x12; // AUXAPC initialization addr 9 pg 0 Omega
492 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); 492 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2));
493 #endif 493 #endif
494 494
495 #if(RF_FAM == 61 ) //Locosto without Syren Format 495 #if(RF_FAM == 61 ) //Locosto without Syren Format
508 ,1 508 ,1
509 #endif 509 #endif
510 ); 510 );
511 511
512 /*** Load power control level adding the APC address register ***/ 512 /*** Load power control level adding the APC address register ***/
513 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) 513 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3))
514 l1s_dsp_com.dsp_db_w_ptr->d_power_ctl = ((pwr_data << 6) | 0x12); 514 l1s_dsp_com.dsp_db_w_ptr->d_power_ctl = ((pwr_data << 6) | 0x12);
515 // AUXAPC initialization addr 9 pg 0 Omega 515 // AUXAPC initialization addr 9 pg 0 Omega
516 #endif 516 #endif
517 517
518 #if(RF_FAM == 61) 518 #if(RF_FAM == 61)
538 #if (CODE_VERSION != SIMULATION) 538 #if (CODE_VERSION != SIMULATION)
539 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq); 539 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq);
540 #endif 540 #endif
541 #endif 541 #endif
542 542
543 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) 543 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3))
544 // Setting bit 3 of this register causes DSP to write to APCDEL1 register in Omega. However, 544 // Setting bit 3 of this register causes DSP to write to APCDEL1 register in Omega. However,
545 // we are controlling this register from MCU through the SPI. Therefore, set it to 0. 545 // we are controlling this register from MCU through the SPI. Therefore, set it to 0.
546 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (0 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); 546 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (0 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2));
547 #endif 547 #endif
548 548
572 #if (CODE_VERSION != SIMULATION) 572 #if (CODE_VERSION != SIMULATION)
573 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq); 573 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq);
574 #endif 574 #endif
575 #endif 575 #endif
576 576
577 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) ||(RF_FAM == 61)) 577 #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)); 578 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2));
579 #endif 579 #endif
580 } 580 }
581 } 581 }
582 } 582 }
1244 if ((win_id == 0) || (afc_mode == L1_AFC_SCRIPT_MODE)) 1244 if ((win_id == 0) || (afc_mode == L1_AFC_SCRIPT_MODE))
1245 #else 1245 #else
1246 if (win_id == 0) 1246 if (win_id == 0)
1247 #endif 1247 #endif
1248 { 1248 {
1249 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) 1249 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3))
1250 // NOTE: In Locosto AFC is in DRP not in triton 1250 // NOTE: In Locosto AFC is in DRP not in triton
1251 l1ddsp_load_afc(l1s.afc); 1251 l1ddsp_load_afc(l1s.afc);
1252 #endif 1252 #endif
1253 1253
1254 //Locosto 1254 //Locosto
1595 #endif /* RF_FAM == 61*/ 1595 #endif /* RF_FAM == 61*/
1596 #else /* L1_MADC_ON == 1*/ 1596 #else /* L1_MADC_ON == 1*/
1597 l1dmacro_rx_nb (radio_freq, csf_filter_choice); // RX window for NB. 1597 l1dmacro_rx_nb (radio_freq, csf_filter_choice); // RX window for NB.
1598 #endif 1598 #endif
1599 1599
1600 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) 1600 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3))
1601 l1ddsp_load_afc(l1s.afc); 1601 l1ddsp_load_afc(l1s.afc);
1602 #endif 1602 #endif
1603 #if (RF_FAM == 61) 1603 #if (RF_FAM == 61)
1604 l1dtpu_load_afc(l1s.afc); 1604 l1dtpu_load_afc(l1s.afc);
1605 #endif 1605 #endif