Imported Upstream version 3.2.2
[debian/gnuradio] / usrp / host / lib / legacy / db_flexrf_mimo.cc
1 /*
2  * Copyright 2008 Free Software Foundation, Inc.
3  * 
4  * This file is part of GNU Radio
5  * 
6  * GNU Radio is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  * 
11  * GNU Radio is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License
17  * along with GNU Radio; see the file COPYING.  If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */ 
21
22 #include <db_flexrf_mimo.h>
23 #include <fpga_regs_standard.h>
24 #include <fpga_regs_common.h>
25 #include <usrp_prims.h>
26 #include <usrp_spi_defs.h>
27
28
29 db_flexrf_2400_tx_mimo_a::db_flexrf_2400_tx_mimo_a(usrp_basic_sptr usrp, int which)
30   : db_flexrf_2400_tx(usrp, which)
31 {
32   _enable_refclk(true);
33   d_common->R_DIV(1);
34 }
35
36 int 
37 db_flexrf_2400_tx_mimo_a::_refclk_divisor()
38 {
39   return 16;
40 }
41
42 db_flexrf_2400_rx_mimo_a::db_flexrf_2400_rx_mimo_a(usrp_basic_sptr usrp, int which)
43   : db_flexrf_2400_rx(usrp, which)
44 {
45   _enable_refclk(true);
46   d_common->R_DIV(1);
47 }
48
49 int 
50 db_flexrf_2400_rx_mimo_a::_refclk_divisor()
51 {
52   return 16;
53 }
54       
55 db_flexrf_2400_tx_mimo_b::db_flexrf_2400_tx_mimo_b(usrp_basic_sptr usrp, int which)
56   : db_flexrf_2400_tx(usrp, which)
57 {
58   d_common->R_DIV(16);
59 }
60
61 int 
62 db_flexrf_2400_tx_mimo_b::_refclk_divisor()
63 {
64   return 1;
65 }
66
67 db_flexrf_2400_rx_mimo_b::db_flexrf_2400_rx_mimo_b(usrp_basic_sptr usrp, int which)
68   : db_flexrf_2400_rx(usrp, which)
69 {
70   d_common->R_DIV(16);
71 }
72
73 int 
74 db_flexrf_2400_rx_mimo_b::_refclk_divisor()
75 {
76   return 1;
77 }
78
79 db_flexrf_1800_tx_mimo_a::db_flexrf_1800_tx_mimo_a(usrp_basic_sptr usrp, int which)
80   : db_flexrf_1800_tx(usrp, which)
81 {
82   _enable_refclk(true);
83   d_common->R_DIV(1);
84 }
85
86 int 
87 db_flexrf_1800_tx_mimo_a::_refclk_divisor()
88 {
89   return 16;
90 }
91
92 db_flexrf_1800_rx_mimo_a::db_flexrf_1800_rx_mimo_a(usrp_basic_sptr usrp, int which)
93   : db_flexrf_1800_rx(usrp, which)
94 {
95   _enable_refclk(true);
96   d_common->R_DIV(1);
97 }
98
99 int 
100 db_flexrf_1800_rx_mimo_a::_refclk_divisor()
101 {
102   return 16;
103 }
104     
105 db_flexrf_1800_tx_mimo_b::db_flexrf_1800_tx_mimo_b(usrp_basic_sptr usrp, int which)
106   : db_flexrf_1800_tx(usrp, which)
107 {
108   d_common->R_DIV(16);
109 }
110
111 int 
112 db_flexrf_1800_tx_mimo_b::_refclk_divisor()
113 {
114   return 1;
115 }
116
117 db_flexrf_1800_rx_mimo_b::db_flexrf_1800_rx_mimo_b(usrp_basic_sptr usrp, int which)
118   : db_flexrf_1800_rx(usrp, which)
119 {
120   d_common->R_DIV(16);
121 }
122
123 int 
124 db_flexrf_1800_rx_mimo_b::_refclk_divisor()
125 {
126   return 1;
127 }
128
129 db_flexrf_1200_tx_mimo_a::db_flexrf_1200_tx_mimo_a(usrp_basic_sptr usrp, int which)
130   : db_flexrf_1200_tx(usrp, which)
131 {
132   _enable_refclk(true);
133   d_common->R_DIV(1);
134 }
135
136 int 
137 db_flexrf_1200_tx_mimo_a::_refclk_divisor()
138 {
139   return 16;
140 }
141
142 db_flexrf_1200_rx_mimo_a::db_flexrf_1200_rx_mimo_a(usrp_basic_sptr usrp, int which)
143   : db_flexrf_1200_rx(usrp, which)
144 {
145   _enable_refclk(true);
146   d_common->R_DIV(1);
147 }
148
149 int 
150 db_flexrf_1200_rx_mimo_a::_refclk_divisor()
151 {
152   return 16;
153 }
154     
155 db_flexrf_1200_tx_mimo_b::db_flexrf_1200_tx_mimo_b(usrp_basic_sptr usrp, int which)
156   : db_flexrf_1200_tx(usrp, which)
157 {
158   d_common->R_DIV(16);
159 }
160
161 int 
162 db_flexrf_1200_tx_mimo_b::_refclk_divisor()
163 {
164   return 1;
165 }
166
167 db_flexrf_1200_rx_mimo_b::db_flexrf_1200_rx_mimo_b(usrp_basic_sptr usrp, int which)
168   : db_flexrf_1200_rx(usrp, which)
169 {
170   d_common->R_DIV(16);
171 }
172
173 int 
174 db_flexrf_1200_rx_mimo_b::_refclk_divisor()
175 {
176   return 1;
177 }
178
179 db_flexrf_900_tx_mimo_a::db_flexrf_900_tx_mimo_a(usrp_basic_sptr usrp, int which)
180   : db_flexrf_900_tx(usrp, which)
181 {
182   _enable_refclk(true);
183   d_common->R_DIV(1);
184 }
185
186 int 
187 db_flexrf_900_tx_mimo_a::_refclk_divisor()
188 {
189   return 16;
190 }
191
192 db_flexrf_900_rx_mimo_a::db_flexrf_900_rx_mimo_a(usrp_basic_sptr usrp, int which)
193   : db_flexrf_900_rx(usrp, which)
194 {
195   _enable_refclk(true);
196   d_common->R_DIV(1);
197 }
198
199 int 
200 db_flexrf_900_rx_mimo_a::_refclk_divisor()
201 {
202   return 16;
203 }
204     
205 db_flexrf_900_tx_mimo_b::db_flexrf_900_tx_mimo_b(usrp_basic_sptr usrp, int which)
206   : db_flexrf_900_tx(usrp, which)
207 {
208   d_common->R_DIV(16);
209 }
210
211 int 
212 db_flexrf_900_tx_mimo_b::_refclk_divisor()
213 {
214   return 1;
215 }
216
217 db_flexrf_900_rx_mimo_b::db_flexrf_900_rx_mimo_b(usrp_basic_sptr usrp, int which)
218   : db_flexrf_900_rx(usrp, which)
219 {
220   d_common->R_DIV(16);
221 }
222
223 int db_flexrf_900_rx_mimo_b::_refclk_divisor()
224 {
225   return 1;
226 }
227
228 db_flexrf_400_tx_mimo_a::db_flexrf_400_tx_mimo_a(usrp_basic_sptr usrp, int which)
229   : db_flexrf_400_tx(usrp, which)
230 {
231   _enable_refclk(true);
232   d_common->R_DIV(1);
233 }
234
235 int 
236 db_flexrf_400_tx_mimo_a::_refclk_divisor()
237 {
238   return 16;
239 }
240     
241 db_flexrf_400_rx_mimo_a::db_flexrf_400_rx_mimo_a(usrp_basic_sptr usrp, int which)
242   : db_flexrf_400_rx(usrp, which)
243 {
244   _enable_refclk(true);
245   d_common->R_DIV(1);
246 }
247
248 int 
249 db_flexrf_400_rx_mimo_a::_refclk_divisor()
250 {
251   return 16;
252 }
253     
254 db_flexrf_400_tx_mimo_b::db_flexrf_400_tx_mimo_b(usrp_basic_sptr usrp, int which)
255   : db_flexrf_400_tx(usrp, which)
256 {
257   d_common->R_DIV(16);
258 }
259
260 int 
261 db_flexrf_400_tx_mimo_b::_refclk_divisor()
262 {
263   return 1;
264 }
265     
266 db_flexrf_400_rx_mimo_b::db_flexrf_400_rx_mimo_b(usrp_basic_sptr usrp, int which)
267   : db_flexrf_400_rx(usrp, which)
268 {
269   d_common->R_DIV(16);
270 }
271
272 int 
273 db_flexrf_400_rx_mimo_b::_refclk_divisor()
274 {
275   return 1;
276 }