diff options
author | Mark Meserve <mark.meserve@ni.com> | 2017-03-23 14:49:42 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:44 -0800 |
commit | bc4d1bf0ca341a72a7d7f6b2168aa3d2e936aabf (patch) | |
tree | 5af9a631efc95c2a1e94e58aa1a86b84e2c91712 /mpm/lib/mykonos/config/ad937x_fir.hpp | |
parent | 1a4348038d0eb57d53475074dca49e8192aeb2d7 (diff) | |
download | uhd-bc4d1bf0ca341a72a7d7f6b2168aa3d2e936aabf.tar.gz uhd-bc4d1bf0ca341a72a7d7f6b2168aa3d2e936aabf.tar.bz2 uhd-bc4d1bf0ca341a72a7d7f6b2168aa3d2e936aabf.zip |
mpm: Rearchitecture of AD9371 code to use ctrl/device paradigm
Diffstat (limited to 'mpm/lib/mykonos/config/ad937x_fir.hpp')
-rw-r--r-- | mpm/lib/mykonos/config/ad937x_fir.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mpm/lib/mykonos/config/ad937x_fir.hpp b/mpm/lib/mykonos/config/ad937x_fir.hpp new file mode 100644 index 000000000..f243f0f47 --- /dev/null +++ b/mpm/lib/mykonos/config/ad937x_fir.hpp @@ -0,0 +1,35 @@ +// +// Copyright 2017 Ettus Research (National Instruments) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#pragma once + +#include "../adi/t_mykonos.h" +#include <vector> + +// wraps FIR allocation and provides a fixed mykonosFir_t pointer +class ad937x_fir +{ + std::vector<int16_t> _fir_coefficients; + mykonosFir_t _fir; +public: + mykonosFir_t* const fir = &_fir; + ad937x_fir(); + ad937x_fir(int8_t gain, const std::vector<int16_t>& coefficients); + + void set_fir(int8_t gain, const std::vector<int16_t>& coefficients); + std::vector<int16_t> get_fir(int8_t &gain); +}; |