FreeCalypso > hg > fc-selenite
comparison src/cs/layer1/tpu_drivers/p_source0/p_tpudr10.c @ 0:b6a5e36de839
src/cs: initial import from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 15 Jul 2018 04:39:26 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b6a5e36de839 |
---|---|
1 /************* Revision Controle System Header ************* | |
2 * GSM Layer 1 software | |
3 * | |
4 * Filename p_tpudr10.c | |
5 * Copyright 2003 (C) Texas Instruments | |
6 * | |
7 ************* Revision Controle System Header *************/ | |
8 | |
9 #include "l1_macro.h" | |
10 #include "l1_confg.h" | |
11 | |
12 #if L1_GPRS | |
13 | |
14 #include "sys_types.h" | |
15 #include "iq.h" | |
16 #include "l1_const.h" | |
17 #include "l1_types.h" | |
18 | |
19 #if TESTMODE | |
20 #include "l1tm_defty.h" | |
21 #endif | |
22 | |
23 #if (AUDIO_TASK == 1) | |
24 #include "l1audio_const.h" | |
25 #include "l1audio_cust.h" | |
26 #include "l1audio_defty.h" | |
27 #endif | |
28 | |
29 #if (L1_GTT == 1) | |
30 #include "l1gtt_const.h" | |
31 #include "l1gtt_defty.h" | |
32 #endif | |
33 | |
34 #if (L1_MP3 == 1) | |
35 #include "l1mp3_defty.h" | |
36 #endif | |
37 | |
38 #if (L1_MIDI == 1) | |
39 #include "l1midi_defty.h" | |
40 #endif | |
41 | |
42 #if (L1_AAC == 1) | |
43 #include "l1aac_defty.h" | |
44 #endif | |
45 | |
46 #include "l1_defty.h" | |
47 #include "l1_time.h" | |
48 #include "tpudrv.h" | |
49 #include "tpudrv10.h" | |
50 #include "armio.h" | |
51 | |
52 | |
53 // external function prototypes | |
54 | |
55 void l1dmacro_rx_up (void); | |
56 void l1dmacro_rx_down (WORD32 t); | |
57 | |
58 void l1dmacro_tx_up (void); | |
59 void l1dmacro_tx_down (WORD32 time, BOOL tx_flag, UWORD8 adc_active); | |
60 | |
61 // external variables and tables | |
62 extern SYS_UWORD16 *TP_Ptr; | |
63 | |
64 | |
65 /**************************************************************************/ | |
66 /**************************************************************************/ | |
67 /* EXTERNAL FUNCTIONS CALLED BY LAYER1 */ | |
68 /* COMMON TO L1 and TOOLKIT */ | |
69 /**************************************************************************/ | |
70 /**************************************************************************/ | |
71 | |
72 /*------------------------------------------*/ | |
73 /* l1dmacro_tx_synth */ | |
74 /*------------------------------------------*/ | |
75 /* programs RF synth for transmit */ | |
76 /* programs OPLL for transmit */ | |
77 /*------------------------------------------*/ | |
78 void l1pdmacro_tx_synth(SYS_UWORD16 radio_freq) | |
79 { | |
80 l1dmacro_tx_synth(radio_freq); | |
81 } | |
82 | |
83 /*------------------------------------------*/ | |
84 /* l1pdmacro_rx_up */ | |
85 /*------------------------------------------*/ | |
86 /* Open window for normal burst reception */ | |
87 /*------------------------------------------*/ | |
88 void l1pdmacro_rx_up (SYS_UWORD16 radio_freq) | |
89 { | |
90 l1dmacro_rx_up(); | |
91 } | |
92 | |
93 /*------------------------------------------*/ | |
94 /* l1pdmacro_rx_down */ | |
95 /*------------------------------------------*/ | |
96 /* Close window for normal burst reception */ | |
97 /*------------------------------------------*/ | |
98 void l1pdmacro_rx_down (SYS_UWORD16 radio_freq, UWORD8 num_rx, BOOL rx_done_flag) | |
99 { | |
100 l1dmacro_rx_down (RX_DOWN_TABLE[num_rx - 1]); | |
101 } | |
102 | |
103 /*------------------------------------------*/ | |
104 /* l1pdmacro_tx_up */ | |
105 /*------------------------------------------*/ | |
106 /* Open transmission window for normal burst*/ | |
107 /*------------------------------------------*/ | |
108 void l1pdmacro_tx_up (SYS_UWORD16 radio_freq) | |
109 { | |
110 l1dmacro_tx_up(); | |
111 } | |
112 | |
113 /*-------------------------------------------*/ | |
114 /* l1pdmacro_tx_down */ | |
115 /*-------------------------------------------*/ | |
116 /* Close transmission window for normal burst*/ | |
117 /*-------------------------------------------*/ | |
118 void l1pdmacro_tx_down (SYS_UWORD16 radio_freq, WORD16 time, BOOL tx_flag, UWORD8 timing_advance,UWORD8 adc_active) | |
119 { | |
120 l1dmacro_tx_down (time, tx_flag, adc_active); | |
121 } | |
122 | |
123 /*---------------------------------------------*/ | |
124 /* l1pdmacro_it_dsp_gen */ | |
125 /*---------------------------------------------*/ | |
126 /* Generate IT to DSP */ | |
127 /*---------------------------------------------*/ | |
128 void l1pdmacro_it_dsp_gen(WORD16 time) | |
129 { | |
130 // WARNING: 'time' must always be included between 0 and TPU_CLOCK_RANGE !!! | |
131 | |
132 *TP_Ptr++ = TPU_FAT (time); | |
133 *TP_Ptr++ = TPU_MOVE (TPU_IT_DSP_PG,0x0001); | |
134 } | |
135 | |
136 // TEMPORARY !!!!! | |
137 | |
138 /*---------------------------------------------*/ | |
139 /* l1pdmacro_anchor */ | |
140 /*---------------------------------------------*/ | |
141 /* Temporary macro used to program a TPU */ | |
142 /* scenario executed on the correct frame */ | |
143 /*---------------------------------------------*/ | |
144 void l1pdmacro_anchor(WORD16 time) | |
145 { | |
146 // WARNING: 'time' must always be included between 0 and TPU_CLOCK_RANGE !!! | |
147 | |
148 *TP_Ptr++ = TPU_FAT (time); | |
149 } | |
150 | |
151 #endif |