3 // Copyright 2008 Free Software Foundation, Inc.
5 // This file is part of GNU Radio
7 // GNU Radio is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either asversion 3, or (at your option)
12 // GNU Radio is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with GNU Radio; see the file COPYING. If not, write to
19 // the Free Software Foundation, Inc., 51 Franklin Street,
20 // Boston, MA 02110-1301, USA.
34 class db_dbs_rx : public db_base
37 int d_osc, d_cp, d_n, d_div2, d_r, d_r_int;
38 int d_fdac, d_m, d_dl, d_ade, d_adl, d_gc1, d_gc2, d_diag;
41 // Internal gain functions
42 void _write_reg(int regno, int v);
43 void _write_regs(int starting_regno, const std::vector<int> &vals);
44 std::vector<int> _read_status();
45 void _send_reg(int regno);
47 void _set_fdac(int fdac);
48 bw_t set_bw(float bw);
50 void _set_gc2(int gc2);
51 void _set_gc1(int gc1);
52 void _set_pga(int pga_gain);
54 // Internal frequency function
55 void _set_osc(int osc);
58 void _set_div2(int div2);
60 void _set_ade(int ade);
62 int _refclk_divisor();
68 db_dbs_rx(usrp_basic_sptr usrp, int which);
73 float gain_db_per_step();
76 struct freq_result_t set_freq(double freq);
77 bool set_gain(float gain);