38 #if defined(VDAC_COUNT) && (VDAC_COUNT > 0)
97 #define VDAC_REF_VALID(ref) ((ref) == VDAC0)
108 vdacRefresh8 = _VDAC_CTRL_REFRESHPERIOD_8CYCLES,
109 vdacRefresh16 = _VDAC_CTRL_REFRESHPERIOD_16CYCLES,
110 vdacRefresh32 = _VDAC_CTRL_REFRESHPERIOD_32CYCLES,
111 vdacRefresh64 = _VDAC_CTRL_REFRESHPERIOD_64CYCLES,
112 } VDAC_Refresh_TypeDef;
117 vdacRef1V25Ln = _VDAC_CTRL_REFSEL_1V25LN,
118 vdacRef2V5Ln = _VDAC_CTRL_REFSEL_2V5LN,
119 vdacRef1V25 = _VDAC_CTRL_REFSEL_1V25,
120 vdacRef2V5 = _VDAC_CTRL_REFSEL_2V5,
121 vdacRefAvdd = _VDAC_CTRL_REFSEL_VDD,
122 vdacRefExtPin = _VDAC_CTRL_REFSEL_EXT,
128 vdacPrsSelCh0 = _VDAC_CH0CTRL_PRSSEL_PRSCH0 ,
129 vdacPrsSelCh1 = _VDAC_CH0CTRL_PRSSEL_PRSCH1 ,
130 vdacPrsSelCh2 = _VDAC_CH0CTRL_PRSSEL_PRSCH2 ,
131 vdacPrsSelCh3 = _VDAC_CH0CTRL_PRSSEL_PRSCH3 ,
132 vdacPrsSelCh4 = _VDAC_CH0CTRL_PRSSEL_PRSCH4 ,
133 vdacPrsSelCh5 = _VDAC_CH0CTRL_PRSSEL_PRSCH5 ,
134 vdacPrsSelCh6 = _VDAC_CH0CTRL_PRSSEL_PRSCH6 ,
135 vdacPrsSelCh7 = _VDAC_CH0CTRL_PRSSEL_PRSCH7 ,
136 vdacPrsSelCh8 = _VDAC_CH0CTRL_PRSSEL_PRSCH8 ,
137 vdacPrsSelCh9 = _VDAC_CH0CTRL_PRSSEL_PRSCH9 ,
138 vdacPrsSelCh10 = _VDAC_CH0CTRL_PRSSEL_PRSCH10,
139 vdacPrsSelCh11 = _VDAC_CH0CTRL_PRSSEL_PRSCH11,
140 } VDAC_PrsSel_TypeDef;
145 vdacTrigModeSw = _VDAC_CH0CTRL_TRIGMODE_SW,
146 vdacTrigModePrs = _VDAC_CH0CTRL_TRIGMODE_PRS,
147 vdacTrigModeRefresh = _VDAC_CH0CTRL_TRIGMODE_REFRESH,
148 vdacTrigModeSwPrs = _VDAC_CH0CTRL_TRIGMODE_SWPRS,
149 vdacTrigModeSwRefresh = _VDAC_CH0CTRL_TRIGMODE_SWREFRESH,
150 vdacTrigModeLesense = _VDAC_CH0CTRL_TRIGMODE_LESENSE,
151 } VDAC_TrigMode_TypeDef;
161 bool mainCalibration;
171 VDAC_Refresh_TypeDef refresh;
177 VDAC_Ref_TypeDef reference;
193 #define VDAC_INIT_DEFAULT \
216 VDAC_PrsSel_TypeDef prsSel;
222 VDAC_TrigMode_TypeDef trigMode;
227 } VDAC_InitChannel_TypeDef;
230 #define VDAC_INITCHANNEL_DEFAULT \
243 void VDAC_ChannelOutputSet(VDAC_TypeDef *vdac,
244 unsigned int channel,
246 void VDAC_Enable(VDAC_TypeDef *vdac,
unsigned int ch,
bool enable);
247 void VDAC_Init(VDAC_TypeDef *vdac,
const VDAC_Init_TypeDef *init);
248 void VDAC_InitChannel(VDAC_TypeDef *vdac,
249 const VDAC_InitChannel_TypeDef *init,
266 __STATIC_INLINE
void VDAC_Channel0OutputSet(VDAC_TypeDef *vdac,
269 EFM_ASSERT(value<=_VDAC_CH0DATA_MASK);
270 vdac->CH0DATA = value;
287 __STATIC_INLINE
void VDAC_Channel1OutputSet(VDAC_TypeDef *vdac,
290 EFM_ASSERT(value<=_VDAC_CH1DATA_MASK);
291 vdac->CH1DATA = value;
305 __STATIC_INLINE
void VDAC_IntClear(VDAC_TypeDef *vdac, uint32_t flags)
321 __STATIC_INLINE
void VDAC_IntDisable(VDAC_TypeDef *vdac, uint32_t flags)
342 __STATIC_INLINE
void VDAC_IntEnable(VDAC_TypeDef *vdac, uint32_t flags)
361 __STATIC_INLINE uint32_t VDAC_IntGet(VDAC_TypeDef *vdac)
385 __STATIC_INLINE uint32_t VDAC_IntGetEnabled(VDAC_TypeDef *vdac)
387 uint32_t ien = vdac->IEN;
390 return vdac->IF & ien;
404 __STATIC_INLINE
void VDAC_IntSet(VDAC_TypeDef *vdac, uint32_t flags)
409 uint32_t VDAC_PrescaleCalc(uint32_t vdacFreq,
bool syncMode, uint32_t hfperFreq);
410 void VDAC_Reset(VDAC_TypeDef *vdac);
Emlib peripheral API "assert" implementation.
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.