48#include "px_dac_cfg.h"
51#if ( !defined(PX_DAC_CFG_DAC1_EN ) \
52 || !defined(PX_DAC_CFG_DAC1_CH1_EN) \
53 || !defined(PX_DAC_CFG_DAC1_CH2_EN) )
54#error "One or more options not defined in 'px_dac_cfg.h'"
56#if ( (PX_DAC_CFG_DAC1_EN > 1) \
57 ||(PX_DAC_CFG_DAC1_CH1_EN > 1) \
58 ||(PX_DAC_CFG_DAC1_CH2_EN > 1) )
59#error "PX_DAC_CFG_DACx_EN must be 0 or 1"
63#define PX_DAC_CFG_PER_COUNT (PX_DAC_CFG_DAC1_EN)
64#if (PX_DAC_CFG_PER_COUNT == 0)
65#error "No peripherals enabled"
struct px_dac_per_s * dac_per
DAC peripheral data.
bool px_dac_close(px_dac_handle_t *handle)
Close specified device.
px_dac_channel_t
Specify DAC channel.
void px_dac_wr(px_dac_handle_t *handle, px_dac_channel_t channel, uint16_t data)
Perform a single output on the specified DAC channel.
void px_dac_init(void)
Initialise DAC driver.
px_dac_nr_t
Specify DAC peripheral.
bool px_dac_open(px_dac_handle_t *handle, px_dac_nr_t dac_nr)
Open DAC peripheral using predefined (default) parameters.