From 79a797d5b376fbfa51ffcd42d57956e83b4903c9 Mon Sep 17 00:00:00 2001 From: ejk Date: Wed, 28 Dec 2016 12:11:07 -0500 Subject: Rfnoc: Exposed analog lowpass bandwidth option in X300 ctrls --- host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 14 ++++++++++++++ host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | 2 ++ 2 files changed, 16 insertions(+) (limited to 'host/lib/usrp/x300') diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp index 90cb20ce3..c84b2ba44 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp @@ -228,6 +228,20 @@ double x300_radio_ctrl_impl::get_rx_frequency(const size_t chan) ).get(); } +double x300_radio_ctrl_impl::set_rx_bandwidth(const double bandwidth, const size_t chan) +{ + return _tree->access( + fs_path("dboards" / _radio_slot / "rx_frontends" / _rx_fe_map.at(chan).db_fe_name / "bandwidth" / "value") + ).set(bandwidth).get(); +} + +double x300_radio_ctrl_impl::get_rx_bandwidth(const size_t chan) +{ + return _tree->access( + fs_path("dboards" / _radio_slot / "rx_frontends" / _rx_fe_map.at(chan).db_fe_name / "bandwidth" / "value") + ).get(); +} + double x300_radio_ctrl_impl::set_tx_gain(const double gain, const size_t chan) { //TODO: This is extremely hacky! diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp index 6e17778bd..80cd94215 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp @@ -56,8 +56,10 @@ public: double set_tx_frequency(const double freq, const size_t chan); double set_rx_frequency(const double freq, const size_t chan); + double set_rx_bandwidth(const double bandwidth, const size_t chan); double get_tx_frequency(const size_t chan); double get_rx_frequency(const size_t chan); + double get_rx_bandwidth(const size_t chan); double set_tx_gain(const double gain, const size_t chan); double set_rx_gain(const double gain, const size_t chan); -- cgit v1.2.3