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