aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/lib/mykonos/ad937x_ctrl.cpp
diff options
context:
space:
mode:
authormattprost <matt.prost@ni.com>2021-12-16 13:48:26 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2022-04-07 13:28:02 -0700
commitb8acf58798018f5fb4d84d470badadce5dd3a08d (patch)
tree137db7eeff0d3bbc202b228fd4bee4f143b1b467 /mpm/lib/mykonos/ad937x_ctrl.cpp
parenta8ad4917d331258e163e1786c0325a4b7e7d2e3e (diff)
downloaduhd-b8acf58798018f5fb4d84d470badadce5dd3a08d.tar.gz
uhd-b8acf58798018f5fb4d84d470badadce5dd3a08d.tar.bz2
uhd-b8acf58798018f5fb4d84d470badadce5dd3a08d.zip
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 <bpadalino@gmail.com> Signed-off-by: mattprost <matt.prost@ni.com>
Diffstat (limited to 'mpm/lib/mykonos/ad937x_ctrl.cpp')
-rw-r--r--mpm/lib/mykonos/ad937x_ctrl.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp
index 7cd5c1d98..2a4bfbc87 100644
--- a/mpm/lib/mykonos/ad937x_ctrl.cpp
+++ b/mpm/lib/mykonos/ad937x_ctrl.cpp
@@ -430,7 +430,6 @@ public:
virtual void set_fir(
const std::string& which, const int8_t gain, const std::vector<int16_t>& fir)
{
- const auto dir = _get_direction_from_antenna(which);
const auto lengths = _get_valid_fir_lengths(which);
if (std::find(lengths.begin(), lengths.end(), fir.size()) == lengths.end()) {
@@ -438,15 +437,13 @@ public:
}
std::lock_guard<std::mutex> lock(*spi_mutex);
- device.set_fir(dir, gain, fir);
+ device.set_fir(which, gain, fir);
}
- virtual std::vector<int16_t> get_fir(const std::string& which, int8_t& gain)
+ virtual std::pair<int8_t, std::vector<int16_t>> get_fir(const std::string& which)
{
- auto dir = _get_direction_from_antenna(which);
-
std::lock_guard<std::mutex> lock(*spi_mutex);
- return device.get_fir(dir, gain);
+ return device.get_fir(which);
}
virtual int16_t get_temperature()