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.
36 class db_dbs_rx : public db_base
39 int d_osc, d_cp, d_n, d_div2, d_r, d_r_int;
40 int d_fdac, d_m, d_dl, d_ade, d_adl, d_gc1, d_gc2, d_diag;
43 // Internal gain functions
44 void _write_reg(int regno, int v);
45 void _write_regs(int starting_regno, const std::vector<int> &vals);
46 std::vector<int> _read_status();
47 void _send_reg(int regno);
49 void _set_fdac(int fdac);
51 void _set_gc2(int gc2);
52 void _set_gc1(int gc1);
53 void _set_pga(int pga_gain);
55 // Internal frequency function
56 void _set_osc(int osc);
59 void _set_div2(int div2);
61 void _set_ade(int ade);
63 int _refclk_divisor();
69 db_dbs_rx(usrp_basic_sptr usrp, int which);
74 float gain_db_per_step();
77 struct freq_result_t set_freq(double freq);
78 bool set_gain(float gain);
80 bool set_bw(float bw);