aboutsummaryrefslogtreecommitdiffstats
path: root/source/dac.hpp
blob: 687e8cf6584e6acb64cae891fb43ff71978295ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef STMDSP_DAC_HPP_
#define STMDSP_DAC_HPP_

#include "hal.h"

class DACd
{
public:
    constexpr explicit DACd(DACDriver& driver, const DACConfig& config) :
        m_driver(&driver), m_config(config) {}

    void init();

    void write(unsigned int channel, uint16_t value);

private:
    DACDriver *m_driver;
    DACConfig m_config;

    void initPins();
};

#endif // STMDSP_DAC_HPP_