FreeCalypso > hg > tcs211-l1-reconst
diff chipsetsw/layer1/tpu_drivers/p_source0/p_tpudr12.c @ 344:ad79bc0b3312
p_tpudr12.c reconstructed, perfect match to original TCS211 object
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 30 Oct 2017 05:27:59 +0000 |
parents | 5df5579f9f92 |
children |
line wrap: on
line diff
--- a/chipsetsw/layer1/tpu_drivers/p_source0/p_tpudr12.c Mon Oct 30 05:11:46 2017 +0000 +++ b/chipsetsw/layer1/tpu_drivers/p_source0/p_tpudr12.c Mon Oct 30 05:27:59 2017 +0000 @@ -39,68 +39,27 @@ #include "l1midi_defty.h" #endif - #if (L1_AAC == 1) - #include "l1aac_defty.h" - #endif +#if (L1_AAC == 1) + #include "l1aac_defty.h" +#endif + #include "l1_defty.h" #include "l1_time.h" #include "tpudrv.h" -#include "tpudrv61.h" +#include "tpudrv12.h" #include "armio.h" -#if (L1_RF_KBD_FIX == 1) -#include "l1_varex.h" -#endif - // external function prototypes -#if (L1_RF_KBD_FIX == 1) -#if (L1_MADC_ON == 1) -void l1dmacro_rx_up (UWORD8 adc_active, UWORD8 csf_filter_choice, UWORD8 kbd_config - #if(NEW_SNR_THRESHOLD==1) - , UWORD8 saic_flag_rx_up - #endif - ); -#else -void l1dmacro_rx_up (UWORD8 csf_filter_choice, UWORD8 kbd_config - #if(NEW_SNR_THRESHOLD==1) - , UWORD8 saic_flag_rx_up - #endif - ); -#endif -#endif/*(L1_RF_KBD_FIX == 1)*/ -#if (L1_RF_KBD_FIX == 0) -#if (L1_MADC_ON == 1) -void l1dmacro_rx_up (UWORD8 adc_active, UWORD8 csf_filter_choice - #if(NEW_SNR_THRESHOLD==1) - , UWORD8 saic_flag_rx_up - #endif - ); -#else -void l1dmacro_rx_up (UWORD8 csf_filter_choice - #if(NEW_SNR_THRESHOLD==1) - , UWORD8 saic_flag_rx_up - #endif - ); -#endif -#endif/*(L1_RF_KBD_FIX == 0)*/ +void l1dmacro_rx_up (void); +void l1dmacro_rx_down (WORD32 t); - -void l1dmacro_rx_down (WORD32 t); -#if (L1_RF_KBD_FIX == 1) -void l1dmacro_tx_up (UWORD8 kbd_config); -void l1dmacro_tx_down (WORD32 time, BOOL tx_flag, UWORD8 adc_active, UWORD8 kbd_config); -#endif/*#if (L1_RF_KBD_FIX == 1)*/ - -#if (L1_RF_KBD_FIX == 0) void l1dmacro_tx_up (void); void l1dmacro_tx_down (WORD32 time, BOOL tx_flag, UWORD8 adc_active); -#endif/*(L1_RF_KBD_FIX == 0)*/ // external variables and tables extern SYS_UWORD16 *TP_Ptr; -//extern UWORD16 total_kbd_on_time; /**************************************************************************/ @@ -126,146 +85,47 @@ /*------------------------------------------*/ /* Open window for normal burst reception */ /*------------------------------------------*/ -#if(L1_RF_KBD_FIX == 1) - -#if (L1_MADC_ON == 1) -void l1pdmacro_rx_up (SYS_UWORD16 radio_freq,UWORD8 adc_active, UWORD8 csf_filter_choice - #if(NEW_SNR_THRESHOLD==1) - , UWORD8 saic_flag_rx_up - #endif - ) +void l1pdmacro_rx_up (SYS_UWORD16 radio_freq) { - l1dmacro_rx_up(adc_active, csf_filter_choice, L1_KBD_DIS_RX_NB - #if(NEW_SNR_THRESHOLD==1) - , saic_flag_rx_up - #endif - ); -} -#else -void l1pdmacro_rx_up (SYS_UWORD16 radio_freq, UWORD8 csf_filter_choice - #if(NEW_SNR_THRESHOLD==1) - , UWORD8 saic_flag_rx_up - #endif - ) -{ - l1dmacro_rx_up(csf_filter_choice, L1_KBD_DIS_RX_NB - #if(NEW_SNR_THRESHOLD==1) - , saic_flag_rx_up - #endif - ); - + l1dmacro_rx_up(); } -#endif - -#endif /*#if(L1_RF_KBD_FIX == 1)*/ - -#if(L1_RF_KBD_FIX == 0) -#if (L1_MADC_ON == 1) -void l1pdmacro_rx_up (SYS_UWORD16 radio_freq,UWORD8 adc_active, UWORD8 csf_filter_choice - #if(NEW_SNR_THRESHOLD==1) - , UWORD8 saic_flag_rx_up - #endif - ) -{ - l1dmacro_rx_up(adc_active, csf_filter_choice - #if(NEW_SNR_THRESHOLD==1) - , saic_flag_rx_up - #endif - ); -} -#else -void l1pdmacro_rx_up (SYS_UWORD16 radio_freq, UWORD8 csf_filter_choice - #if(NEW_SNR_THRESHOLD==1) - , UWORD8 saic_flag_rx_up - #endif - ) -{ - l1dmacro_rx_up(csf_filter_choice - #if(NEW_SNR_THRESHOLD==1) - , saic_flag_rx_up - #endif - ); - -} -#endif - - -#endif/*#if(L1_RF_KBD_FIX == 0)*/ - /*------------------------------------------*/ /* l1pdmacro_rx_down */ /*------------------------------------------*/ /* Close window for normal burst reception */ /*------------------------------------------*/ -#if(L1_RF_KBD_FIX == 1) - void l1pdmacro_rx_down (SYS_UWORD16 radio_freq, UWORD8 num_rx, BOOL rx_done_flag) { l1dmacro_rx_down (RX_DOWN_TABLE[num_rx - 1]); - l1s.total_kbd_on_time = l1s.total_kbd_on_time - L1_KBD_DIS_RX_NB * (-TRF_R3_1 + RX_DOWN_TABLE[num_rx - 1] - TRF_R7); -} -#endif - -#if(L1_RF_KBD_FIX == 0) - -void l1pdmacro_rx_down (SYS_UWORD16 radio_freq, UWORD8 num_rx, BOOL rx_done_flag) -{ - l1dmacro_rx_down (RX_DOWN_TABLE[num_rx - 1]); - } -#endif /*------------------------------------------*/ /* l1pdmacro_tx_up */ /*------------------------------------------*/ /* Open transmission window for normal burst*/ /*------------------------------------------*/ -#if(L1_RF_KBD_FIX == 1) - -void l1pdmacro_tx_up (SYS_UWORD16 radio_freq) -{ - l1dmacro_tx_up(L1_KBD_DIS_TX_NB); -} -#endif - -#if(L1_RF_KBD_FIX == 0) void l1pdmacro_tx_up (SYS_UWORD16 radio_freq) { l1dmacro_tx_up(); } -#endif - - /*-------------------------------------------*/ /* l1pdmacro_tx_down */ /*-------------------------------------------*/ /* Close transmission window for normal burst*/ /*-------------------------------------------*/ -#if(L1_RF_KBD_FIX == 1) - -void l1pdmacro_tx_down (SYS_UWORD16 radio_freq, WORD16 time, BOOL tx_flag, UWORD8 timing_advance,UWORD8 adc_active) -{ - l1dmacro_tx_down (time, tx_flag, adc_active, L1_KBD_DIS_TX_NB); - l1s.total_kbd_on_time = l1s.total_kbd_on_time - L1_KBD_DIS_TX_NB * (-TRF_T3_1 + time + TRF_T12); -} -#endif - -#if(L1_RF_KBD_FIX == 0) void l1pdmacro_tx_down (SYS_UWORD16 radio_freq, WORD16 time, BOOL tx_flag, UWORD8 timing_advance,UWORD8 adc_active) { l1dmacro_tx_down (time, tx_flag, adc_active); - } -#endif /*---------------------------------------------*/ /* l1pdmacro_it_dsp_gen */ /*---------------------------------------------*/ /* Generate IT to DSP */ /*---------------------------------------------*/ -void l1pdmacro_it_dsp_gen(UWORD16 time) +void l1pdmacro_it_dsp_gen(WORD16 time) { // WARNING: 'time' must always be included between 0 and TPU_CLOCK_RANGE !!!