FreeCalypso > hg > fc-magnetite
comparison src/cs/layer1/tpu_drivers/source0/tpudrv10.c @ 411:ee49b250774f
tpudrv10.c: initial rf_path[] reconstruction
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 19 Jan 2018 07:38:43 +0000 |
parents | d926a8986755 |
children | 2b038b43e31b |
comparison
equal
deleted
inserted
replaced
410:bc1654e1e80d | 411:ee49b250774f |
---|---|
153 | 153 |
154 struct synth_s { | 154 struct synth_s { |
155 // common | 155 // common |
156 UWORD16 arfcn0; | 156 UWORD16 arfcn0; |
157 UWORD16 limit; | 157 UWORD16 limit; |
158 UWORD16 rf_chip_band; /* from tpudrv12.obj, not in tpudrv61.c */ | |
159 T_TX_RX tx_rx[2]; | 158 T_TX_RX tx_rx[2]; |
160 }; | 159 }; |
161 | 160 |
162 struct rf_path_s { | 161 struct rf_path_s { |
163 UWORD8 rx_up; | 162 UWORD16 rf_chip_band; |
164 UWORD8 rx_down; | 163 UWORD8 rx_up; |
165 UWORD8 tx_up; | 164 UWORD8 rx_down; |
166 UWORD8 tx_down; | 165 UWORD8 tx_up; |
167 struct synth_s *synth; | 166 UWORD8 tx_down; |
167 UWORD8 tx_up_rev; | |
168 struct synth_s *synth; | |
168 }; | 169 }; |
169 | 170 |
170 #if 0 | |
171 const struct synth_s synth_900[] = | 171 const struct synth_s synth_900[] = |
172 { | 172 { |
173 { 0, 124, BAND_SELECT_GSM, {{ 890, 1}, { 935, 2}}},// gsm 0 - 124 | 173 { 0, 124, {{ 890, 1}, { 935, 4}}},// gsm 0 - 124 |
174 {974, 1023, BAND_SELECT_GSM, {{ 880, 1}, { 925, 2}}},// egsm 975 - 1023 | 174 {974, 1023, {{ 880, 1}, { 925, 4}}},// egsm 975 - 1023 |
175 }; | 175 }; |
176 | 176 |
177 const struct synth_s synth_1800[] = | 177 const struct synth_s synth_1800[] = |
178 { | 178 { |
179 {511, 885, BAND_SELECT_DCS, {{1710, 1}, {1805, 1}}}, // dcs 512 - 885 | 179 {511, 885, {{1710, -1}, {1805, 1}}}, // dcs 512 - 885 |
180 }; | 180 }; |
181 | 181 |
182 const struct synth_s synth_1900[] = | 182 const struct synth_s synth_1900[] = |
183 { | 183 { |
184 {511, 810, BAND_SELECT_PCS, {{1850, 1}, {1930, 1}}}, // pcs 512 - 810; | 184 {511, 810, {{1850, -1}, {1930, 1}}}, // pcs 512 - 810; |
185 }; | 185 }; |
186 | 186 |
187 const struct synth_s synth_850[] = | 187 const struct synth_s synth_850[] = |
188 { | 188 { |
189 {127, 192, BAND_SELECT_850_LO, {{ 824, 2}, { 869, 2}}}, // gsm850 low | 189 {127, 251, {{ 824, 1}, { 869, 4}}}, // gsm850 high |
190 {127, 251, BAND_SELECT_850_HI, {{ 824, 1}, { 869, 2}}}, // gsm850 high | |
191 }; | 190 }; |
192 | 191 |
193 struct rf_path_s rf_path[] = { //same index used as for band_config[] - 1 | 192 struct rf_path_s rf_path[] = { //same index used as for band_config[] - 1 |
194 { RU_900, RD_900, TU_900, TD_900, (struct synth_s *)synth_900 }, //EGSM | 193 /* EGSM */ |
195 { RU_1800, RD_1800, TU_1800, TD_1800, (struct synth_s *)synth_1800}, //DCS | 194 { BAND_SELECT_GSM, RU_900, RD_900, TU_900, TD_900, TU_REV_900, |
196 { RU_1900, RD_1900, TU_1900, TD_1900, (struct synth_s *)synth_1900}, //PCS | 195 (struct synth_s *)synth_900 }, |
197 { RU_850, RD_850, TU_850, TD_850, (struct synth_s *)synth_850 }, //GSM850 | 196 /* DCS */ |
198 { RU_900, RD_900, TU_900, TD_900, (struct synth_s *)synth_900 }, //GSM | 197 { BAND_SELECT_DCS, RU_1800, RD_1800, TU_1800, TD_1800, TU_REV_1800, |
198 (struct synth_s *)synth_1800}, | |
199 /* PCS */ | |
200 { BAND_SELECT_PCS, RU_1900, RD_1900, TU_1900, TD_1900, TU_REV_1900, | |
201 (struct synth_s *)synth_1900}, | |
202 /* GSM850 */ | |
203 { BAND_SELECT_850, RU_850, RD_850, TU_850, TD_850, TU_REV_850, | |
204 (struct synth_s *)synth_850 }, | |
205 /* PCS in dual-us */ | |
206 { BAND_SELECT_PCS, RU_1900, RD_1900, TU_1900, TD_1900, TU_REV_1900, | |
207 (struct synth_s *)synth_1900}, | |
208 /* non-E GSM */ | |
209 { BAND_SELECT_GSM, RU_900, RD_900, TU_900, TD_900, TU_REV_900, | |
210 (struct synth_s *)synth_900 }, | |
199 }; | 211 }; |
200 | 212 |
201 /* | 213 /* |
202 * Leonardo tpudrv12.obj contains a function named calc_a_b(); there is | 214 * Leonardo tpudrv12.obj contains a function named calc_a_b(); there is |
203 * no such function in the LoCosto version, but there is a similar-looking | 215 * no such function in the LoCosto version, but there is a similar-looking |
204 * calc_rf_freq() function instead. Let's try making our calc_a_b() | 216 * calc_rf_freq() function instead. Let's try making our calc_a_b() |
205 * from LoCosto's calc_rf_freq(). | 217 * from LoCosto's calc_rf_freq(). |
206 */ | 218 */ |
207 | 219 |
220 #if 0 | |
208 UWORD32 calc_a_b(UWORD16 arfcn, UWORD8 downlink) | 221 UWORD32 calc_a_b(UWORD16 arfcn, UWORD8 downlink) |
209 { | 222 { |
210 UWORD32 farfcn; /* in 200 kHz units */ | 223 UWORD32 farfcn; /* in 200 kHz units */ |
211 UWORD32 n; /* B * P + A */ | 224 UWORD32 n; /* B * P + A */ |
212 struct synth_s *s; | 225 struct synth_s *s; |