aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/lib/mykonos/config/ad937x_fir.h
blob: ff277ef26e0cc317524a268b36a9f90bcc14fce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <vector>
#include "../adi/t_mykonos.h"

// wraps FIR allocation
class ad937x_fir
{
    // these should be const, but can't be because of C API
    // 
    mykonosFir_t _fir;
    std::vector<int16_t> fir_coefficients;

    void ad937x_fir::_set_gain(int8_t gain);
public:
    ad937x_fir(int8_t gain, const std::vector<int16_t>& coefficients);
    ad937x_fir(int8_t gain, std::vector<int16_t>&& coefficients);

    mykonosFir_t* getFir();
};