From b8acf58798018f5fb4d84d470badadce5dd3a08d Mon Sep 17 00:00:00 2001 From: mattprost Date: Thu, 16 Dec 2021 13:48:26 -0600 Subject: n310: Add Filter API to n310 Add the Filter API to n3xx specifically for the AD937x device. The TX filter is limited to 32 taps, and the RX filter is limited to 48 taps. This feature requires MPM version 4.2 or later on the device. Co-authored-by: bpadalino Signed-off-by: mattprost --- .../dboard/magnesium/magnesium_radio_control.hpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp') diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp index 5ac1ca245..814fbecf1 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.hpp @@ -14,6 +14,7 @@ #include "magnesium_ad9371_iface.hpp" #include "magnesium_cpld_ctrl.hpp" #include "magnesium_cpld_regs.hpp" +#include #include #include #include @@ -31,7 +32,8 @@ namespace uhd { namespace rfnoc { * * This daughterboard is used on the USRP N310 and N300. */ -class magnesium_radio_control_impl : public radio_control_impl +class magnesium_radio_control_impl : public radio_control_impl, + public uhd::rfnoc::detail::filter_node { public: //! Frequency bands for RX. Bands are a function of the analog filter banks @@ -173,6 +175,23 @@ public: std::string get_fe_name( const size_t chan, const uhd::direction_t direction) const override; + /************************************************************************** + * Filter API + *************************************************************************/ + std::vector get_rx_filter_names(const size_t chan) const override; + uhd::filter_info_base::sptr get_rx_filter( + const std::string& name, const size_t chan) override; + void set_rx_filter(const std::string& name, + uhd::filter_info_base::sptr filter, + const size_t chan) override; + + std::vector get_tx_filter_names(const size_t chan) const override; + uhd::filter_info_base::sptr get_tx_filter( + const std::string& name, const size_t chan) override; + void set_tx_filter(const std::string& name, + uhd::filter_info_base::sptr filter, + const size_t chan) override; + private: /************************************************************************** * Helpers -- cgit v1.2.3