38 #if defined(DAC_COUNT) && (DAC_COUNT > 0)
61 #define DAC_REF_VALID(ref) ((ref) == DAC0)
94 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH4 )
97 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH5 )
100 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH6 )
103 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH7 )
106 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH8 )
107 dacPRSSELCh8 = _DAC_CH0CTRL_PRSSEL_PRSCH8,
109 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH9 )
110 dacPRSSELCh9 = _DAC_CH0CTRL_PRSSEL_PRSCH9,
112 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH10 )
113 dacPRSSELCh10 = _DAC_CH0CTRL_PRSSEL_PRSCH10,
115 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH11 )
116 dacPRSSELCh11 = _DAC_CH0CTRL_PRSSEL_PRSCH11,
182 #define DAC_INIT_DEFAULT \
187 dacConvModeContinuous, \
223 #define DAC_INITCHANNEL_DEFAULT \
242 unsigned int channel,
393 return dac->
IF & ien;
#define _DAC_CH0CTRL_PRSSEL_PRSCH0
Emlib peripheral API "assert" implementation.
#define _DAC_CH1DATA_MASK
void DAC_Enable(DAC_TypeDef *dac, unsigned int ch, bool enable)
Enable/disable DAC channel.
DAC_Ref_TypeDef reference
void DAC_InitChannel(DAC_TypeDef *dac, const DAC_InitChannel_TypeDef *init, unsigned int ch)
Initialize DAC channel.
uint8_t DAC_PrescaleCalc(uint32_t dacFreq, uint32_t hfperFreq)
Calculate prescaler value used to determine DAC clock.
#define _DAC_CTRL_CONVMODE_CONTINUOUS
#define _DAC_CTRL_REFRSEL_64CYCLES
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
DAC_Refresh_TypeDef refresh
#define _DAC_CTRL_OUTMODE_DISABLE
#define _DAC_CH0CTRL_PRSSEL_PRSCH3
#define _DAC_CH0CTRL_PRSSEL_PRSCH4
__STATIC_INLINE void DAC_IntEnable(DAC_TypeDef *dac, uint32_t flags)
Enable one or more DAC interrupts.
__STATIC_INLINE void DAC_IntClear(DAC_TypeDef *dac, uint32_t flags)
Clear one or more pending DAC interrupts.
#define _DAC_CTRL_REFRSEL_16CYCLES
#define _DAC_CTRL_REFRSEL_8CYCLES
#define _DAC_CTRL_REFSEL_1V25
__STATIC_INLINE void DAC_Channel0OutputSet(DAC_TypeDef *dac, uint32_t value)
Set the output signal of DAC channel 0 to a given value.
#define _DAC_CTRL_CONVMODE_SAMPLEOFF
__STATIC_INLINE void DAC_Channel1OutputSet(DAC_TypeDef *dac, uint32_t value)
Set the output signal of DAC channel 1 to a given value.
#define _DAC_CH0CTRL_PRSSEL_PRSCH7
DAC_Output_TypeDef outMode
#define _DAC_CTRL_OUTMODE_PIN
#define _DAC_CTRL_CONVMODE_SAMPLEHOLD
__STATIC_INLINE void DAC_IntSet(DAC_TypeDef *dac, uint32_t flags)
Set one or more pending DAC interrupts from SW.
__STATIC_INLINE void DAC_IntDisable(DAC_TypeDef *dac, uint32_t flags)
Disable one or more DAC interrupts.
#define _DAC_CH0CTRL_PRSSEL_PRSCH2
#define _DAC_CH0CTRL_PRSSEL_PRSCH1
DAC_ConvMode_TypeDef convMode
#define _DAC_CH0CTRL_PRSSEL_PRSCH5
void DAC_Reset(DAC_TypeDef *dac)
Reset DAC to same state as after a HW reset.
#define _DAC_CTRL_REFSEL_2V5
DAC_PRSSEL_TypeDef prsSel
#define _DAC_CTRL_OUTMODE_PINADC
#define _DAC_CTRL_REFSEL_VDD
#define _DAC_CH0CTRL_PRSSEL_PRSCH6
#define _DAC_CTRL_OUTMODE_ADC
#define _DAC_CH0DATA_MASK
void DAC_ChannelOutputSet(DAC_TypeDef *dac, unsigned int channel, uint32_t value)
Set the output signal of a DAC channel to a given value.
void DAC_Init(DAC_TypeDef *dac, const DAC_Init_TypeDef *init)
Initialize DAC.
__STATIC_INLINE uint32_t DAC_IntGetEnabled(DAC_TypeDef *dac)
Get enabled and pending DAC interrupt flags. Useful for handling more interrupt sources in the same i...
#define _DAC_CTRL_REFRSEL_32CYCLES
__STATIC_INLINE uint32_t DAC_IntGet(DAC_TypeDef *dac)
Get pending DAC interrupt flags.