From 4cdb75606b6d79ac15d4b64e706a1c75368bba7d Mon Sep 17 00:00:00 2001 From: Julian Arnold Date: Thu, 19 Mar 2015 11:48:39 -0700 Subject: b2xx: filter API implementation. Supports listing of RX/TX filters, querying RX/TX filter information and writing of analog and FIR filters --- host/lib/usrp/common/ad9361_ctrl.hpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'host/lib/usrp/common/ad9361_ctrl.hpp') diff --git a/host/lib/usrp/common/ad9361_ctrl.hpp b/host/lib/usrp/common/ad9361_ctrl.hpp index 0dd1b08d9..a6d65ad11 100644 --- a/host/lib/usrp/common/ad9361_ctrl.hpp +++ b/host/lib/usrp/common/ad9361_ctrl.hpp @@ -27,6 +27,8 @@ #include #include #include +#include +#include namespace uhd { namespace usrp { @@ -79,11 +81,8 @@ public: return uhd::meta_range_t(5e6, ad9361_device_t::AD9361_MAX_CLOCK_RATE); //5 MHz DCM low end } - //! set the filter bandwidth for the frontend - double set_bw_filter(const std::string &/*which*/, const double /*bw*/) - { - return 56e6; //TODO - } + //! set the filter bandwidth for the frontend's analog low pass + virtual double set_bw_filter(const std::string &/*which*/, const double /*bw*/) = 0; //! set the gain for a particular gain element virtual double set_gain(const std::string &which, const double value) = 0; @@ -131,6 +130,15 @@ public: //! read the internal temp sensor virtual sensor_value_t get_temperature() = 0; + + //! List all available filters by name + virtual std::vector get_filter_names(const std::string &which) = 0; + + //! Return a list of all filters + virtual filter_info_base::sptr get_filter(const std::string &which, const std::string &filter_name) = 0; + + //! Write back a filter + virtual void set_filter(const std::string &which, const std::string &filter_name, const filter_info_base::sptr) = 0; }; }} -- cgit v1.2.3