aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300/e300_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/e300/e300_impl.cpp')
-rw-r--r--host/lib/usrp/e300/e300_impl.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index 8be3e47c9..3d92bc5c8 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -361,7 +361,7 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
e300_fifo_config_t fifo_cfg;
try {
fifo_cfg = e300_read_sysfs();
- } catch (uhd::lookup_error &e) {
+ } catch (...) {
throw uhd::runtime_error("Failed to get driver parameters from sysfs.");
}
_fifo_iface = e300_fifo_interface::make(fifo_cfg);
@@ -610,7 +610,7 @@ uhd::sensor_value_t e300_impl::_get_fe_pll_lock(const bool is_tx)
{
const boost::uint32_t st =
_global_regs->peek32(global_regs::RB32_CORE_PLL);
- const bool locked = is_tx ? st & 0x1 : st & 0x2;
+ const bool locked = is_tx ? ((st & 0x1) > 0) : ((st & 0x2) > 0);
return sensor_value_t("LO", locked, "locked", "unlocked");
}
@@ -665,7 +665,7 @@ void e300_impl::_register_loopback_self_test(wb_iface::sptr iface)
{
bool test_fail = false;
UHD_MSG(status) << "Performing register loopback test... " << std::flush;
- size_t hash = time(NULL);
+ size_t hash = size_t(time(NULL));
for (size_t i = 0; i < 100; i++)
{
boost::hash_combine(hash, i);
@@ -705,7 +705,7 @@ void e300_impl::_codec_loopback_self_test(wb_iface::sptr iface)
bool test_fail = false;
UHD_ASSERT_THROW(bool(iface));
UHD_MSG(status) << "Performing CODEC loopback test... " << std::flush;
- size_t hash = time(NULL);
+ size_t hash = size_t(time(NULL));
for (size_t i = 0; i < 100; i++)
{
boost::hash_combine(hash, i);
@@ -1056,6 +1056,18 @@ void e300_impl::_setup_radio(const size_t dspno)
_tree->create<meta_range_t>(rf_fe_path / "freq" / "range")
.publish(boost::bind(&ad9361_ctrl::get_rf_freq_range));
+ //only in local mode
+ if(_xport_path == AXI) {
+ //add all frontend filters
+ std::vector<std::string> filter_names = _codec_ctrl->get_filter_names(key);
+ for(size_t i = 0;i < filter_names.size(); i++)
+ {
+ _tree->create<filter_info_base::sptr>(rf_fe_path / "filters" / filter_names[i] / "value" )
+ .publish(boost::bind(&ad9361_ctrl::get_filter, _codec_ctrl, key, filter_names[i]))
+ .subscribe(boost::bind(&ad9361_ctrl::set_filter, _codec_ctrl, key, filter_names[i], _1));
+ }
+ }
+
//setup RX related stuff
if (key[0] == 'R') {
static const std::vector<std::string> ants = boost::assign::list_of("TX/RX")("RX2");