You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
737 B
C++
37 lines
737 B
C++
4 years ago
|
/**
|
||
|
* @file dac.hpp
|
||
4 years ago
|
* @brief Manages signal creation using the DAC.
|
||
4 years ago
|
*
|
||
4 years ago
|
* Copyright (C) 2021 Clyne Sullivan
|
||
4 years ago
|
*
|
||
|
* Distributed under the GNU GPL v3 or later. You should have received a copy of
|
||
|
* the GNU General Public License along with this program.
|
||
|
* If not, see <https://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
|
||
4 years ago
|
#ifndef STMDSP_DAC_HPP_
|
||
|
#define STMDSP_DAC_HPP_
|
||
|
|
||
|
#include "hal.h"
|
||
4 years ago
|
#undef DAC
|
||
4 years ago
|
|
||
4 years ago
|
class DAC
|
||
4 years ago
|
{
|
||
4 years ago
|
public:
|
||
|
static void begin();
|
||
|
|
||
|
static void start(int channel, dacsample_t *buffer, size_t count);
|
||
|
static void stop(int channel);
|
||
|
|
||
4 years ago
|
static int sigGenWantsMore();
|
||
|
|
||
4 years ago
|
private:
|
||
|
static DACDriver *m_driver[2];
|
||
|
|
||
|
static const DACConfig m_config;
|
||
|
static const DACConversionGroup m_group_config;
|
||
|
};
|
||
4 years ago
|
|
||
|
#endif // STMDSP_DAC_HPP_
|
||
|
|