3 * Copyright 2008,2009 Free Software Foundation, Inc.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 bool db_basic_init(struct db_base *db);
23 bool db_basic_set_freq(struct db_base *db, u2_fxpt_freq_t freq, u2_fxpt_freq_t *dc);
24 bool db_basic_set_gain(struct db_base *db, u2_fxpt_gain_t gain);
25 bool db_basic_set_tx_enable(struct db_base *, bool on);
32 struct db_basic db_basic_tx = {
35 .base.output_enables = 0x0000,
36 .base.used_pins = 0x0000,
37 .base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(-90e9),
38 .base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(90e9),
39 .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
40 .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(0),
41 .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0),
42 .base.is_quadrature = true,
43 .base.i_and_q_swapped = false,
44 .base.spectrum_inverted = false,
45 .base.default_lo_offset = U2_DOUBLE_TO_FXPT_FREQ(0),
49 //.base.atr_tx_delay = 0,
50 //.base.atr_rx_delay = 0,
52 .base.init = db_basic_init,
53 .base.set_freq = db_basic_set_freq,
54 .base.set_gain = db_basic_set_gain,
55 .base.set_tx_enable = db_basic_set_tx_enable,
56 .base.set_antenna = 0,
59 struct db_basic db_basic_rx = {
62 .base.output_enables = 0x0000,
63 .base.used_pins = 0x0000,
64 .base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(-90e9),
65 .base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(90e9),
66 .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
67 .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(0),
68 .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0),
69 .base.is_quadrature = false,
70 .base.i_and_q_swapped = false,
71 .base.spectrum_inverted = false,
72 .base.default_lo_offset = U2_DOUBLE_TO_FXPT_FREQ(0),
76 //.base.atr_tx_delay = 0,
77 //.base.atr_rx_delay = 0,
79 .base.init = db_basic_init,
80 .base.set_freq = db_basic_set_freq,
81 .base.set_gain = db_basic_set_gain,
82 .base.set_tx_enable = db_basic_set_tx_enable,
83 .base.set_antenna = 0,
86 struct db_basic db_lf_tx = {
89 .base.output_enables = 0x0000,
90 .base.used_pins = 0x0000,
91 .base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(-32e6),
92 .base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(32e6),
93 .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
94 .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(0),
95 .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0),
96 .base.is_quadrature = true,
97 .base.i_and_q_swapped = false,
98 .base.spectrum_inverted = false,
99 .base.default_lo_offset = U2_DOUBLE_TO_FXPT_FREQ(0),
103 //.base.atr_tx_delay = 0,
104 //.base.atr_rx_delay = 0,
106 .base.init = db_basic_init,
107 .base.set_freq = db_basic_set_freq,
108 .base.set_gain = db_basic_set_gain,
109 .base.set_tx_enable = db_basic_set_tx_enable,
110 .base.set_antenna = 0,
113 struct db_basic db_lf_rx = {
116 .base.output_enables = 0x0000,
117 .base.used_pins = 0x0000,
118 .base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(0),
119 .base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(32e6),
120 .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
121 .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(0),
122 .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0),
123 .base.is_quadrature = false,
124 .base.i_and_q_swapped = false,
125 .base.spectrum_inverted = false,
126 .base.default_lo_offset = U2_DOUBLE_TO_FXPT_FREQ(0),
130 //.base.atr_tx_delay = 0,
131 //.base.atr_rx_delay = 0,
133 .base.init = db_basic_init,
134 .base.set_freq = db_basic_set_freq,
135 .base.set_gain = db_basic_set_gain,
136 .base.set_tx_enable = db_basic_set_tx_enable,
137 .base.set_antenna = 0,
142 db_basic_init(struct db_base *db)
148 db_basic_set_freq(struct db_base *db, u2_fxpt_freq_t freq, u2_fxpt_freq_t *dc)
155 db_basic_set_gain(struct db_base *db, u2_fxpt_gain_t gain)
161 db_basic_set_tx_enable(struct db_base *db, bool on)