summaryrefslogtreecommitdiff
path: root/usrp/host/include
diff options
context:
space:
mode:
authorJohnathan Corgan2009-10-06 17:50:59 -0700
committerJohnathan Corgan2009-10-06 17:50:59 -0700
commit69caa7dce5a58b39614b1aba99c2dd71b38af322 (patch)
tree7573d9e00e30b540be1a27af892412fca528235f /usrp/host/include
parentbf0bbd9daf5360b5d1fb5f36dcb968d6bcd0fd60 (diff)
downloadgnuradio-69caa7dce5a58b39614b1aba99c2dd71b38af322.tar.gz
gnuradio-69caa7dce5a58b39614b1aba99c2dd71b38af322.tar.bz2
gnuradio-69caa7dce5a58b39614b1aba99c2dd71b38af322.zip
Clean up for work-in-progress
Copyright updates Trailing whitespace cleanup Move private headers out of install Use standard include guards Code cleanup
Diffstat (limited to 'usrp/host/include')
-rw-r--r--usrp/host/include/usrp/Makefile.am14
-rw-r--r--usrp/host/include/usrp/db_wbxng.h37
-rw-r--r--usrp/host/include/usrp/db_wbxng_adf4350.h37
-rw-r--r--usrp/host/include/usrp/db_wbxng_adf4350_regs.h65
4 files changed, 16 insertions, 137 deletions
diff --git a/usrp/host/include/usrp/Makefile.am b/usrp/host/include/usrp/Makefile.am
index 7c868e061..cfce51443 100644
--- a/usrp/host/include/usrp/Makefile.am
+++ b/usrp/host/include/usrp/Makefile.am
@@ -1,23 +1,23 @@
#
# Copyright 2009 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
include $(top_srcdir)/Makefile.common
@@ -32,9 +32,7 @@ usrpinclude_HEADERS = \
db_flexrf.h \
db_flexrf_mimo.h \
db_tv_rx.h \
- db_tv_rx_mimo.h \
- db_wbxng_adf4350.h \
- db_wbxng_adf4350_regs.h \
+ db_tv_rx_mimo.h \
db_wbxng.h \
db_xcvr2450.h \
libusb_types.h \
diff --git a/usrp/host/include/usrp/db_wbxng.h b/usrp/host/include/usrp/db_wbxng.h
index fb5c8da71..2158face2 100644
--- a/usrp/host/include/usrp/db_wbxng.h
+++ b/usrp/host/include/usrp/db_wbxng.h
@@ -1,33 +1,30 @@
/* -*- c++ -*- */
//
-// Copyright 2008,2009 Free Software Foundation, Inc.
-//
+// Copyright 2009 Free Software Foundation, Inc.
+//
// This file is part of GNU Radio
-//
+//
// GNU Radio is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either asversion 3, or (at your option)
// any later version.
-//
+//
// GNU Radio is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with GNU Radio; see the file COPYING. If not, write to
// the Free Software Foundation, Inc., 51 Franklin Street,
// Boston, MA 02110-1301, USA.
-#ifndef DB_WBXNG_H
-#define DB_WBXNG_H
+#ifndef INCLUDED_DB_WBXNG_H
+#define INCLUDED_DB_WBXNG_H
#include <usrp/db_base.h>
#include <cmath>
-//debug_using_gui = true // Must be set to True or False
-#define debug_using_gui false // Must be set to True or False
-
class adf4350;
class wbxng_base : public db_base
@@ -43,11 +40,6 @@ public:
double freq_max();
protected:
- void _write_all(int R, int control, int N);
- void _write_control(int control);
- void _write_R(int R);
- void _write_N(int N);
- void _write_it(int v);
bool _lock_detect();
//virtual bool _compute_regs(double freq, int &retR, int &retcontrol, int &retN, double &retfreq);
@@ -80,8 +72,6 @@ public:
wbxng_base_tx(usrp_basic_sptr usrp, int which, int _power_on=0);
~wbxng_base_tx();
- //*** TODO *** Fix comment
- // All RFX tx d'boards have fixed gain
float gain_min();
float gain_max();
float gain_db_per_step();
@@ -100,12 +90,11 @@ protected:
public:
wbxng_base_rx(usrp_basic_sptr usrp, int which, int _power_on=0);
~wbxng_base_rx();
-
+
bool set_auto_tr(bool on);
bool select_rx_antenna(int which_antenna);
bool select_rx_antenna(const std::string &which_antenna);
bool set_gain(float gain);
-
};
// ----------------------------------------------------------------
@@ -115,9 +104,6 @@ class db_wbxng_tx : public wbxng_base_tx
public:
db_wbxng_tx(usrp_basic_sptr usrp, int which);
~db_wbxng_tx();
-
- // Wrapper calls to d_common functions
- //bool _compute_regs(double freq, int &retR, int &retcontrol, int &retN, double &retfreq);
};
class db_wbxng_rx : public wbxng_base_rx
@@ -125,14 +111,11 @@ class db_wbxng_rx : public wbxng_base_rx
public:
db_wbxng_rx(usrp_basic_sptr usrp, int which);
~db_wbxng_rx();
-
+
float gain_min();
float gain_max();
float gain_db_per_step();
bool i_and_q_swapped();
-
- //bool _compute_regs(double freq, int &retR, int &retcontrol, int &retN, double &retfreq);
};
-
-#endif
+#endif /* INCLUDED_DB_WBXNG_H */
diff --git a/usrp/host/include/usrp/db_wbxng_adf4350.h b/usrp/host/include/usrp/db_wbxng_adf4350.h
deleted file mode 100644
index d7b8dd99b..000000000
--- a/usrp/host/include/usrp/db_wbxng_adf4350.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2009 Ettus Research LLC
- */
-
-#ifndef ADF4350_H
-#define ADF4350_H
-
-#include <usrp/db_wbxng_adf4350_regs.h>
-#include <usrp/db_base.h>
-#include <stdint.h>
-
-typedef uint64_t freq_t;
-class adf4350_regs;
-
-class adf4350
-{
-public:
- adf4350(usrp_basic_sptr _usrp, int _which, int _spi_enable);
- ~adf4350();
- void _update();
- bool _get_locked();
- void _enable(bool enable);
- void _write(uint8_t addr, uint32_t data);
- bool _set_freq(freq_t freq);
- freq_t _get_freq();
- freq_t _get_max_freq();
- freq_t _get_min_freq();
-
-protected:
- usrp_basic_sptr d_usrp;
- int d_which;
- int d_spi_enable;
- int d_spi_format;
- adf4350_regs *d_regs;
-};
-
-#endif /* ADF4350_H */
diff --git a/usrp/host/include/usrp/db_wbxng_adf4350_regs.h b/usrp/host/include/usrp/db_wbxng_adf4350_regs.h
deleted file mode 100644
index 6a5b77a4b..000000000
--- a/usrp/host/include/usrp/db_wbxng_adf4350_regs.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2009 Ettus Research LLC
- */
-
-#ifndef ADF4350_REGS_H
-#define ADF4350_REGS_H
-
-#include <usrp/db_wbxng_adf4350.h>
-#include <usrp/db_base.h>
-#include <stdint.h>
-
-class adf4350;
-
-class adf4350_regs
-{
-public:
- adf4350_regs(adf4350* _adf4350);
- ~adf4350_regs();
-
- adf4350* d_adf4350;
-
- uint32_t _reg_shift(uint32_t data, uint32_t shift);
- void _load_register(uint8_t addr);
-
- /* reg 0 */
- uint16_t d_int;
- uint16_t d_frac;
- /* reg 1 */
- static const uint8_t s_prescaler;
- static const uint16_t s_phase;
- uint16_t d_mod;
- /* reg 2 */
- static const uint8_t s_low_noise_and_low_spur_modes;
- static const uint8_t s_muxout;
- static const uint8_t s_reference_doubler;
- static const uint8_t s_rdiv2;
- uint16_t d_10_bit_r_counter;
- static const uint8_t s_double_buff;
- static const uint8_t s_charge_pump_setting;
- static const uint8_t s_ldf;
- static const uint8_t s_ldp;
- static const uint8_t s_pd_polarity;
- static const uint8_t s_power_down;
- static const uint8_t s_cp_three_state;
- static const uint8_t s_counter_reset;
- /* reg 3 */
- static const uint8_t s_csr;
- static const uint8_t s_clk_div_mode;
- static const uint16_t s_12_bit_clock_divider_value;
- /* reg 4 */
- static const uint8_t s_feedback_select;
- uint8_t d_divider_select;
- uint8_t d_8_bit_band_select_clock_divider_value;
- static const uint8_t s_vco_power_down;
- static const uint8_t s_mtld;
- static const uint8_t s_aux_output_select;
- static const uint8_t s_aux_output_enable;
- static const uint8_t s_aux_output_power;
- static const uint8_t s_rf_output_enable;
- static const uint8_t s_output_power;
- /* reg 5 */
- static const uint8_t s_ld_pin_mode;
-};
-
-#endif /* ADF4350_REGS_H */