aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_sbx_common.hpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-10-06 12:47:14 -0700
committerAshish Chaudhari <ashish@ettus.com>2016-02-12 11:13:20 -0800
commitb0ad2ec29f3a1bd5f2980ed1f905dac50f87c21a (patch)
tree43bb34d910823a57bf965637f1eabd8be3f0b9d0 /host/lib/usrp/dboard/db_sbx_common.hpp
parent7c7622c1fe4779c84e7c7149caa6dd08400e2774 (diff)
downloaduhd-b0ad2ec29f3a1bd5f2980ed1f905dac50f87c21a.tar.gz
uhd-b0ad2ec29f3a1bd5f2980ed1f905dac50f87c21a.tar.bz2
uhd-b0ad2ec29f3a1bd5f2980ed1f905dac50f87c21a.zip
adf435x: Refactored ADF435X control code
- Removed adf435x_common and replaced with a real encapsulated interface - Looks similar to the MAX287X code - Updated all DB classes to use the new common code
Diffstat (limited to 'host/lib/usrp/dboard/db_sbx_common.hpp')
-rw-r--r--host/lib/usrp/dboard/db_sbx_common.hpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/host/lib/usrp/dboard/db_sbx_common.hpp b/host/lib/usrp/dboard/db_sbx_common.hpp
index 4800bbd83..974cee114 100644
--- a/host/lib/usrp/dboard/db_sbx_common.hpp
+++ b/host/lib/usrp/dboard/db_sbx_common.hpp
@@ -16,10 +16,15 @@
//
#include <uhd/types/device_addr.hpp>
-
-#include "adf435x_common.hpp"
+#include "adf435x.hpp"
#include "max287x.hpp"
+// LO Related
+#define ADF435X_CE (1 << 3)
+#define ADF435X_PDBRF (1 << 2)
+#define ADF435X_MUXOUT (1 << 1) // INPUT!!!
+#define LOCKDET_MASK (1 << 0) // INPUT!!!
+
// Common IO Pins
#define LO_LPF_EN (1 << 15)
@@ -36,6 +41,8 @@
#define RX_LED_LD (1 << 6) // LED for RX Lock Detect
#define DIS_POWER_RX (1 << 5) // on UNIT_RX, 0 powers up RX
#define RX_DISABLE (1 << 4) // on UNIT_RX, 1 disables RX Mixer and Baseband
+#define RX_ATTN_SHIFT 8 //lsb of RX Attenuator Control
+#define RX_ATTN_MASK (63 << RX_ATTN_SHIFT) //valid bits of RX Attenuator Control
// TX Attenuator Pins
#define TX_ATTN_SHIFT 8 // lsb of TX Attenuator Control
@@ -190,6 +197,10 @@ protected:
/*! This is the registered instance of the wrapper class, sbx_base. */
sbx_xcvr *self_base;
+ private:
+ adf435x_iface::sptr _txlo;
+ adf435x_iface::sptr _rxlo;
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
};
/*!
@@ -206,6 +217,10 @@ protected:
/*! This is the registered instance of the wrapper class, sbx_base. */
sbx_xcvr *self_base;
+ private:
+ adf435x_iface::sptr _txlo;
+ adf435x_iface::sptr _rxlo;
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
};
/*!