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 )
109 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH9 )
112 #if defined( _DAC_CH0CTRL_PRSSEL_PRSCH10 )
115 #if defined( _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_CTRL_OUTMODE_ADC
#define _DAC_CH0CTRL_PRSSEL_PRSCH1
#define _DAC_CTRL_REFRSEL_8CYCLES
Emlib peripheral API "assert" implementation.
void DAC_Enable(DAC_TypeDef *dac, unsigned int ch, bool enable)
Enable/disable DAC channel.
#define _DAC_CTRL_OUTMODE_PIN
#define _DAC_CTRL_CONVMODE_SAMPLEHOLD
#define _DAC_CTRL_REFRSEL_32CYCLES
DAC_Ref_TypeDef reference
#define _DAC_CH0CTRL_PRSSEL_PRSCH2
#define _DAC_CTRL_REFSEL_VDD
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.
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define _DAC_CH0CTRL_PRSSEL_PRSCH6
DAC_Refresh_TypeDef refresh
#define _DAC_CH0CTRL_PRSSEL_PRSCH8
#define _DAC_CTRL_REFRSEL_64CYCLES
#define _DAC_CH0CTRL_PRSSEL_PRSCH3
#define _DAC_CTRL_CONVMODE_CONTINUOUS
__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_CONVMODE_SAMPLEOFF
#define _DAC_CH0CTRL_PRSSEL_PRSCH7
__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_OUTMODE_PINADC
#define _DAC_CH0DATA_MASK
__STATIC_INLINE void DAC_Channel1OutputSet(DAC_TypeDef *dac, uint32_t value)
Set the output signal of DAC channel 1 to a given value.
DAC_Output_TypeDef outMode
#define _DAC_CTRL_REFSEL_2V5
#define _DAC_CH0CTRL_PRSSEL_PRSCH5
#define _DAC_CTRL_REFSEL_1V25
__STATIC_INLINE void DAC_IntSet(DAC_TypeDef *dac, uint32_t flags)
Set one or more pending DAC interrupts from SW.
#define _DAC_CH1DATA_MASK
#define _DAC_CTRL_OUTMODE_DISABLE
__STATIC_INLINE void DAC_IntDisable(DAC_TypeDef *dac, uint32_t flags)
Disable one or more DAC interrupts.
DAC_ConvMode_TypeDef convMode
void DAC_Reset(DAC_TypeDef *dac)
Reset DAC to same state as after a HW reset.
#define _DAC_CTRL_REFRSEL_16CYCLES
#define _DAC_CH0CTRL_PRSSEL_PRSCH4
DAC_PRSSEL_TypeDef prsSel
#define _DAC_CH0CTRL_PRSSEL_PRSCH0
#define _DAC_CH0CTRL_PRSSEL_PRSCH10
#define _DAC_CH0CTRL_PRSSEL_PRSCH9
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_CH0CTRL_PRSSEL_PRSCH11
__STATIC_INLINE uint32_t DAC_IntGet(DAC_TypeDef *dac)
Get pending DAC interrupt flags.