aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-10-23 18:04:18 -0700
committerJosh Blum <josh@joshknows.com>2011-11-03 20:37:13 -0700
commitbd08f403e3936d9c35b04f8990605dd49310fbfd (patch)
treed065de2e429987520bf95f1a63f9adaa61e103ee /host/lib/usrp/usrp2/usrp2_impl.cpp
parent3d3c77983b917fefc7a3e59669a43e440ba4f688 (diff)
downloaduhd-bd08f403e3936d9c35b04f8990605dd49310fbfd.tar.gz
uhd-bd08f403e3936d9c35b04f8990605dd49310fbfd.tar.bz2
uhd-bd08f403e3936d9c35b04f8990605dd49310fbfd.zip
usrp: register properties for correction and dc offset
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 24178d10c..6f215471e 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -456,12 +456,28 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
_mbc[mb].tx_fe = tx_frontend_core_200::make(
_mbc[mb].iface, U2_REG_SR_ADDR(SR_TX_FRONT)
);
- //TODO lots of properties to expose here for frontends
+
_tree->create<subdev_spec_t>(mb_path / "rx_subdev_spec")
.subscribe(boost::bind(&usrp2_impl::update_rx_subdev_spec, this, mb, _1));
_tree->create<subdev_spec_t>(mb_path / "tx_subdev_spec")
.subscribe(boost::bind(&usrp2_impl::update_tx_subdev_spec, this, mb, _1));
+ _tree->create<std::complex<double> >(mb_path / "dboards" / "A" / "rx_frontends" / "dc_offset" / "value")
+ .coerce(boost::bind(&rx_frontend_core_200::set_dc_offset, _mbc[mb].rx_fe, _1))
+ .set(std::complex<double>(0.0, 0.0));
+ _tree->create<bool>(mb_path / "dboards" / "A" / "rx_frontends" / "dc_offset" / "enable")
+ .subscribe(boost::bind(&rx_frontend_core_200::set_dc_offset_auto, _mbc[mb].rx_fe, _1))
+ .set(true);
+ _tree->create<std::complex<double> >(mb_path / "dboards" / "A" / "rx_frontends" / "correction" / "value")
+ .subscribe(boost::bind(&rx_frontend_core_200::set_correction, _mbc[mb].rx_fe, _1))
+ .set(std::complex<double>(0.0, 0.0));
+ _tree->create<std::complex<double> >(mb_path / "dboards" / "A" / "tx_frontends" / "dc_offset" / "value")
+ .coerce(boost::bind(&tx_frontend_core_200::set_dc_offset, _mbc[mb].tx_fe, _1))
+ .set(std::complex<double>(0.0, 0.0));
+ _tree->create<std::complex<double> >(mb_path / "dboards" / "A" / "tx_frontends" / "correction" / "value")
+ .subscribe(boost::bind(&tx_frontend_core_200::set_correction, _mbc[mb].tx_fe, _1))
+ .set(std::complex<double>(0.0, 0.0));
+
////////////////////////////////////////////////////////////////
// create rx dsp control objects
////////////////////////////////////////////////////////////////