EZR32 Wonder Gecko Software Documentation  ezr32wg-doc-5.1.2
em_acmp.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef EM_ACMP_H
34 #define EM_ACMP_H
35 
36 #include "em_device.h"
37 #if defined(ACMP_COUNT) && (ACMP_COUNT > 0)
38 
39 #include <stdint.h>
40 #include <stdbool.h>
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /***************************************************************************/
51 /***************************************************************************/
92 /*******************************************************************************
93  ******************************** ENUMS ************************************
94  ******************************************************************************/
95 
98 typedef enum
99 {
104 #if defined(_ACMP_INPUTSEL_CSRESSEL_RES4)
105  acmpResistor4 = _ACMP_INPUTSEL_CSRESSEL_RES4,
106  acmpResistor5 = _ACMP_INPUTSEL_CSRESSEL_RES5,
107  acmpResistor6 = _ACMP_INPUTSEL_CSRESSEL_RES6,
108  acmpResistor7 = _ACMP_INPUTSEL_CSRESSEL_RES7,
109 #endif
111 
114 typedef enum
115 {
116 #if defined(_ACMP_CTRL_HYSTSEL_MASK)
125 #endif
126 #if defined(_ACMP_HYSTERESIS0_HYST_MASK)
127  acmpHysteresisLevel0 = _ACMP_HYSTERESIS0_HYST_HYST0,
128  acmpHysteresisLevel1 = _ACMP_HYSTERESIS0_HYST_HYST1,
129  acmpHysteresisLevel2 = _ACMP_HYSTERESIS0_HYST_HYST2,
130  acmpHysteresisLevel3 = _ACMP_HYSTERESIS0_HYST_HYST3,
131  acmpHysteresisLevel4 = _ACMP_HYSTERESIS0_HYST_HYST4,
132  acmpHysteresisLevel5 = _ACMP_HYSTERESIS0_HYST_HYST5,
133  acmpHysteresisLevel6 = _ACMP_HYSTERESIS0_HYST_HYST6,
134  acmpHysteresisLevel7 = _ACMP_HYSTERESIS0_HYST_HYST7,
135  acmpHysteresisLevel8 = _ACMP_HYSTERESIS0_HYST_HYST8,
136  acmpHysteresisLevel9 = _ACMP_HYSTERESIS0_HYST_HYST9,
137  acmpHysteresisLevel10 = _ACMP_HYSTERESIS0_HYST_HYST10,
138  acmpHysteresisLevel11 = _ACMP_HYSTERESIS0_HYST_HYST11,
139  acmpHysteresisLevel12 = _ACMP_HYSTERESIS0_HYST_HYST12,
140  acmpHysteresisLevel13 = _ACMP_HYSTERESIS0_HYST_HYST13,
141  acmpHysteresisLevel14 = _ACMP_HYSTERESIS0_HYST_HYST14,
142  acmpHysteresisLevel15 = _ACMP_HYSTERESIS0_HYST_HYST15,
143 #endif
145 
146 #if defined(_ACMP_CTRL_WARMTIME_MASK)
147 
149 typedef enum
150 {
168 #endif
169 
170 #if defined(_ACMP_CTRL_INPUTRANGE_MASK)
171 
174 typedef enum
175 {
176  acmpInputRangeFull = _ACMP_CTRL_INPUTRANGE_FULL,
177  acmpInputRangeHigh = _ACMP_CTRL_INPUTRANGE_GTVDDDIV2,
178  acmpInputRangeLow = _ACMP_CTRL_INPUTRANGE_LTVDDDIV2
179 } ACMP_InputRange_TypeDef;
180 #endif
181 
182 #if defined(_ACMP_CTRL_PWRSEL_MASK)
183 
186 typedef enum
187 {
188  acmpPowerSourceAvdd = _ACMP_CTRL_PWRSEL_AVDD,
189  acmpPowerSourceVddVreg = _ACMP_CTRL_PWRSEL_VREGVDD,
190  acmpPowerSourceIOVdd0 = _ACMP_CTRL_PWRSEL_IOVDD0,
191  acmpPowerSourceIOVdd1 = _ACMP_CTRL_PWRSEL_IOVDD1,
192 } ACMP_PowerSource_TypeDef;
193 #endif
194 
195 #if defined(_ACMP_CTRL_ACCURACY_MASK)
196 
199 typedef enum
200 {
201  acmpAccuracyLow = _ACMP_CTRL_ACCURACY_LOW,
202  acmpAccuracyHigh = _ACMP_CTRL_ACCURACY_HIGH
203 } ACMP_Accuracy_TypeDef;
204 #endif
205 
206 #if defined(_ACMP_INPUTSEL_VASEL_MASK)
207 
209 typedef enum
210 {
211  acmpVAInputVDD = _ACMP_INPUTSEL_VASEL_VDD,
212  acmpVAInputAPORT2YCH0 = _ACMP_INPUTSEL_VASEL_APORT2YCH0,
213  acmpVAInputAPORT2YCH2 = _ACMP_INPUTSEL_VASEL_APORT2YCH2,
214  acmpVAInputAPORT2YCH4 = _ACMP_INPUTSEL_VASEL_APORT2YCH4,
215  acmpVAInputAPORT2YCH6 = _ACMP_INPUTSEL_VASEL_APORT2YCH6,
216  acmpVAInputAPORT2YCH8 = _ACMP_INPUTSEL_VASEL_APORT2YCH8,
217  acmpVAInputAPORT2YCH10 = _ACMP_INPUTSEL_VASEL_APORT2YCH10,
218  acmpVAInputAPORT2YCH12 = _ACMP_INPUTSEL_VASEL_APORT2YCH12,
219  acmpVAInputAPORT2YCH14 = _ACMP_INPUTSEL_VASEL_APORT2YCH14,
220  acmpVAInputAPORT2YCH16 = _ACMP_INPUTSEL_VASEL_APORT2YCH16,
221  acmpVAInputAPORT2YCH18 = _ACMP_INPUTSEL_VASEL_APORT2YCH18,
222  acmpVAInputAPORT2YCH20 = _ACMP_INPUTSEL_VASEL_APORT2YCH20,
223  acmpVAInputAPORT2YCH22 = _ACMP_INPUTSEL_VASEL_APORT2YCH22,
224  acmpVAInputAPORT2YCH24 = _ACMP_INPUTSEL_VASEL_APORT2YCH24,
225  acmpVAInputAPORT2YCH26 = _ACMP_INPUTSEL_VASEL_APORT2YCH26,
226  acmpVAInputAPORT2YCH28 = _ACMP_INPUTSEL_VASEL_APORT2YCH28,
227  acmpVAInputAPORT2YCH30 = _ACMP_INPUTSEL_VASEL_APORT2YCH30,
228  acmpVAInputAPORT1XCH0 = _ACMP_INPUTSEL_VASEL_APORT1XCH0,
229  acmpVAInputAPORT1YCH1 = _ACMP_INPUTSEL_VASEL_APORT1YCH1,
230  acmpVAInputAPORT1XCH2 = _ACMP_INPUTSEL_VASEL_APORT1XCH2,
231  acmpVAInputAPORT1YCH3 = _ACMP_INPUTSEL_VASEL_APORT1YCH3,
232  acmpVAInputAPORT1XCH4 = _ACMP_INPUTSEL_VASEL_APORT1XCH4,
233  acmpVAInputAPORT1YCH5 = _ACMP_INPUTSEL_VASEL_APORT1YCH5,
234  acmpVAInputAPORT1XCH6 = _ACMP_INPUTSEL_VASEL_APORT1XCH6,
235  acmpVAInputAPORT1YCH7 = _ACMP_INPUTSEL_VASEL_APORT1YCH7,
236  acmpVAInputAPORT1XCH8 = _ACMP_INPUTSEL_VASEL_APORT1XCH8,
237  acmpVAInputAPORT1YCH9 = _ACMP_INPUTSEL_VASEL_APORT1YCH9,
238  acmpVAInputAPORT1XCH10 = _ACMP_INPUTSEL_VASEL_APORT1XCH10,
239  acmpVAInputAPORT1YCH11 = _ACMP_INPUTSEL_VASEL_APORT1YCH11,
240  acmpVAInputAPORT1XCH12 = _ACMP_INPUTSEL_VASEL_APORT1XCH12,
241  acmpVAInputAPORT1YCH13 = _ACMP_INPUTSEL_VASEL_APORT1YCH13,
242  acmpVAInputAPORT1XCH14 = _ACMP_INPUTSEL_VASEL_APORT1XCH14,
243  acmpVAInputAPORT1YCH15 = _ACMP_INPUTSEL_VASEL_APORT1YCH15,
244  acmpVAInputAPORT1XCH16 = _ACMP_INPUTSEL_VASEL_APORT1XCH16,
245  acmpVAInputAPORT1YCH17 = _ACMP_INPUTSEL_VASEL_APORT1YCH17,
246  acmpVAInputAPORT1XCH18 = _ACMP_INPUTSEL_VASEL_APORT1XCH18,
247  acmpVAInputAPORT1YCH19 = _ACMP_INPUTSEL_VASEL_APORT1YCH19,
248  acmpVAInputAPORT1XCH20 = _ACMP_INPUTSEL_VASEL_APORT1XCH20,
249  acmpVAInputAPORT1YCH21 = _ACMP_INPUTSEL_VASEL_APORT1YCH21,
250  acmpVAInputAPORT1XCH22 = _ACMP_INPUTSEL_VASEL_APORT1XCH22,
251  acmpVAInputAPORT1YCH23 = _ACMP_INPUTSEL_VASEL_APORT1YCH23,
252  acmpVAInputAPORT1XCH24 = _ACMP_INPUTSEL_VASEL_APORT1XCH24,
253  acmpVAInputAPORT1YCH25 = _ACMP_INPUTSEL_VASEL_APORT1YCH25,
254  acmpVAInputAPORT1XCH26 = _ACMP_INPUTSEL_VASEL_APORT1XCH26,
255  acmpVAInputAPORT1YCH27 = _ACMP_INPUTSEL_VASEL_APORT1YCH27,
256  acmpVAInputAPORT1XCH28 = _ACMP_INPUTSEL_VASEL_APORT1XCH28,
257  acmpVAInputAPORT1YCH29 = _ACMP_INPUTSEL_VASEL_APORT1YCH29,
258  acmpVAInputAPORT1XCH30 = _ACMP_INPUTSEL_VASEL_APORT1XCH30,
259  acmpVAInputAPORT1YCH31 = _ACMP_INPUTSEL_VASEL_APORT1YCH31
260 } ACMP_VAInput_TypeDef;
261 #endif
262 
263 #if defined(_ACMP_INPUTSEL_VBSEL_MASK)
264 
268 typedef enum
269 {
270  acmpVBInput1V25 = _ACMP_INPUTSEL_VBSEL_1V25,
271  acmpVBInput2V5 = _ACMP_INPUTSEL_VBSEL_2V5
272 } ACMP_VBInput_TypeDef;
273 #endif
274 
275 #if defined(_ACMP_INPUTSEL_VLPSEL_MASK)
276 
279 typedef enum
280 {
281  acmpVLPInputVADIV = _ACMP_INPUTSEL_VLPSEL_VADIV,
282  acmpVLPInputVBDIV = _ACMP_INPUTSEL_VLPSEL_VBDIV
283 } ACMP_VLPInput_Typedef;
284 #endif
285 
286 #if defined(_ACMP_INPUTSEL_POSSEL_APORT0XCH0)
287 
288 typedef enum
289 {
290  acmpInputAPORT0XCH0 = _ACMP_INPUTSEL_POSSEL_APORT0XCH0,
291  acmpInputAPORT0XCH1 = _ACMP_INPUTSEL_POSSEL_APORT0XCH1,
292  acmpInputAPORT0XCH2 = _ACMP_INPUTSEL_POSSEL_APORT0XCH2,
293  acmpInputAPORT0XCH3 = _ACMP_INPUTSEL_POSSEL_APORT0XCH3,
294  acmpInputAPORT0XCH4 = _ACMP_INPUTSEL_POSSEL_APORT0XCH4,
295  acmpInputAPORT0XCH5 = _ACMP_INPUTSEL_POSSEL_APORT0XCH5,
296  acmpInputAPORT0XCH6 = _ACMP_INPUTSEL_POSSEL_APORT0XCH6,
297  acmpInputAPORT0XCH7 = _ACMP_INPUTSEL_POSSEL_APORT0XCH7,
298  acmpInputAPORT0XCH8 = _ACMP_INPUTSEL_POSSEL_APORT0XCH8,
299  acmpInputAPORT0XCH9 = _ACMP_INPUTSEL_POSSEL_APORT0XCH9,
300  acmpInputAPORT0XCH10 = _ACMP_INPUTSEL_POSSEL_APORT0XCH10,
301  acmpInputAPORT0XCH11 = _ACMP_INPUTSEL_POSSEL_APORT0XCH11,
302  acmpInputAPORT0XCH12 = _ACMP_INPUTSEL_POSSEL_APORT0XCH12,
303  acmpInputAPORT0XCH13 = _ACMP_INPUTSEL_POSSEL_APORT0XCH13,
304  acmpInputAPORT0XCH14 = _ACMP_INPUTSEL_POSSEL_APORT0XCH14,
305  acmpInputAPORT0XCH15 = _ACMP_INPUTSEL_POSSEL_APORT0XCH15,
306  acmpInputAPORT0YCH0 = _ACMP_INPUTSEL_POSSEL_APORT0YCH0,
307  acmpInputAPORT0YCH1 = _ACMP_INPUTSEL_POSSEL_APORT0YCH1,
308  acmpInputAPORT0YCH2 = _ACMP_INPUTSEL_POSSEL_APORT0YCH2,
309  acmpInputAPORT0YCH3 = _ACMP_INPUTSEL_POSSEL_APORT0YCH3,
310  acmpInputAPORT0YCH4 = _ACMP_INPUTSEL_POSSEL_APORT0YCH4,
311  acmpInputAPORT0YCH5 = _ACMP_INPUTSEL_POSSEL_APORT0YCH5,
312  acmpInputAPORT0YCH6 = _ACMP_INPUTSEL_POSSEL_APORT0YCH6,
313  acmpInputAPORT0YCH7 = _ACMP_INPUTSEL_POSSEL_APORT0YCH7,
314  acmpInputAPORT0YCH8 = _ACMP_INPUTSEL_POSSEL_APORT0YCH8,
315  acmpInputAPORT0YCH9 = _ACMP_INPUTSEL_POSSEL_APORT0YCH9,
316  acmpInputAPORT0YCH10 = _ACMP_INPUTSEL_POSSEL_APORT0YCH10,
317  acmpInputAPORT0YCH11 = _ACMP_INPUTSEL_POSSEL_APORT0YCH11,
318  acmpInputAPORT0YCH12 = _ACMP_INPUTSEL_POSSEL_APORT0YCH12,
319  acmpInputAPORT0YCH13 = _ACMP_INPUTSEL_POSSEL_APORT0YCH13,
320  acmpInputAPORT0YCH14 = _ACMP_INPUTSEL_POSSEL_APORT0YCH14,
321  acmpInputAPORT0YCH15 = _ACMP_INPUTSEL_POSSEL_APORT0YCH15,
322  acmpInputAPORT1XCH0 = _ACMP_INPUTSEL_POSSEL_APORT1XCH0,
323  acmpInputAPORT1YCH1 = _ACMP_INPUTSEL_POSSEL_APORT1YCH1,
324  acmpInputAPORT1XCH2 = _ACMP_INPUTSEL_POSSEL_APORT1XCH2,
325  acmpInputAPORT1YCH3 = _ACMP_INPUTSEL_POSSEL_APORT1YCH3,
326  acmpInputAPORT1XCH4 = _ACMP_INPUTSEL_POSSEL_APORT1XCH4,
327  acmpInputAPORT1YCH5 = _ACMP_INPUTSEL_POSSEL_APORT1YCH5,
328  acmpInputAPORT1XCH6 = _ACMP_INPUTSEL_POSSEL_APORT1XCH6,
329  acmpInputAPORT1YCH7 = _ACMP_INPUTSEL_POSSEL_APORT1YCH7,
330  acmpInputAPORT1XCH8 = _ACMP_INPUTSEL_POSSEL_APORT1XCH8,
331  acmpInputAPORT1YCH9 = _ACMP_INPUTSEL_POSSEL_APORT1YCH9,
332  acmpInputAPORT1XCH10 = _ACMP_INPUTSEL_POSSEL_APORT1XCH10,
333  acmpInputAPORT1YCH11 = _ACMP_INPUTSEL_POSSEL_APORT1YCH11,
334  acmpInputAPORT1XCH12 = _ACMP_INPUTSEL_POSSEL_APORT1XCH12,
335  acmpInputAPORT1YCH13 = _ACMP_INPUTSEL_POSSEL_APORT1YCH13,
336  acmpInputAPORT1XCH14 = _ACMP_INPUTSEL_POSSEL_APORT1XCH14,
337  acmpInputAPORT1YCH15 = _ACMP_INPUTSEL_POSSEL_APORT1YCH15,
338  acmpInputAPORT1XCH16 = _ACMP_INPUTSEL_POSSEL_APORT1XCH16,
339  acmpInputAPORT1YCH17 = _ACMP_INPUTSEL_POSSEL_APORT1YCH17,
340  acmpInputAPORT1XCH18 = _ACMP_INPUTSEL_POSSEL_APORT1XCH18,
341  acmpInputAPORT1YCH19 = _ACMP_INPUTSEL_POSSEL_APORT1YCH19,
342  acmpInputAPORT1XCH20 = _ACMP_INPUTSEL_POSSEL_APORT1XCH20,
343  acmpInputAPORT1YCH21 = _ACMP_INPUTSEL_POSSEL_APORT1YCH21,
344  acmpInputAPORT1XCH22 = _ACMP_INPUTSEL_POSSEL_APORT1XCH22,
345  acmpInputAPORT1YCH23 = _ACMP_INPUTSEL_POSSEL_APORT1YCH23,
346  acmpInputAPORT1XCH24 = _ACMP_INPUTSEL_POSSEL_APORT1XCH24,
347  acmpInputAPORT1YCH25 = _ACMP_INPUTSEL_POSSEL_APORT1YCH25,
348  acmpInputAPORT1XCH26 = _ACMP_INPUTSEL_POSSEL_APORT1XCH26,
349  acmpInputAPORT1YCH27 = _ACMP_INPUTSEL_POSSEL_APORT1YCH27,
350  acmpInputAPORT1XCH28 = _ACMP_INPUTSEL_POSSEL_APORT1XCH28,
351  acmpInputAPORT1YCH29 = _ACMP_INPUTSEL_POSSEL_APORT1YCH29,
352  acmpInputAPORT1XCH30 = _ACMP_INPUTSEL_POSSEL_APORT1XCH30,
353  acmpInputAPORT1YCH31 = _ACMP_INPUTSEL_POSSEL_APORT1YCH31,
354  acmpInputAPORT2YCH0 = _ACMP_INPUTSEL_POSSEL_APORT2YCH0,
355  acmpInputAPORT2XCH1 = _ACMP_INPUTSEL_POSSEL_APORT2XCH1,
356  acmpInputAPORT2YCH2 = _ACMP_INPUTSEL_POSSEL_APORT2YCH2,
357  acmpInputAPORT2XCH3 = _ACMP_INPUTSEL_POSSEL_APORT2XCH3,
358  acmpInputAPORT2YCH4 = _ACMP_INPUTSEL_POSSEL_APORT2YCH4,
359  acmpInputAPORT2XCH5 = _ACMP_INPUTSEL_POSSEL_APORT2XCH5,
360  acmpInputAPORT2YCH6 = _ACMP_INPUTSEL_POSSEL_APORT2YCH6,
361  acmpInputAPORT2XCH7 = _ACMP_INPUTSEL_POSSEL_APORT2XCH7,
362  acmpInputAPORT2YCH8 = _ACMP_INPUTSEL_POSSEL_APORT2YCH8,
363  acmpInputAPORT2XCH9 = _ACMP_INPUTSEL_POSSEL_APORT2XCH9,
364  acmpInputAPORT2YCH10 = _ACMP_INPUTSEL_POSSEL_APORT2YCH10,
365  acmpInputAPORT2XCH11 = _ACMP_INPUTSEL_POSSEL_APORT2XCH11,
366  acmpInputAPORT2YCH12 = _ACMP_INPUTSEL_POSSEL_APORT2YCH12,
367  acmpInputAPORT2XCH13 = _ACMP_INPUTSEL_POSSEL_APORT2XCH13,
368  acmpInputAPORT2YCH14 = _ACMP_INPUTSEL_POSSEL_APORT2YCH14,
369  acmpInputAPORT2XCH15 = _ACMP_INPUTSEL_POSSEL_APORT2XCH15,
370  acmpInputAPORT2YCH16 = _ACMP_INPUTSEL_POSSEL_APORT2YCH16,
371  acmpInputAPORT2XCH17 = _ACMP_INPUTSEL_POSSEL_APORT2XCH17,
372  acmpInputAPORT2YCH18 = _ACMP_INPUTSEL_POSSEL_APORT2YCH18,
373  acmpInputAPORT2XCH19 = _ACMP_INPUTSEL_POSSEL_APORT2XCH19,
374  acmpInputAPORT2YCH20 = _ACMP_INPUTSEL_POSSEL_APORT2YCH20,
375  acmpInputAPORT2XCH21 = _ACMP_INPUTSEL_POSSEL_APORT2XCH21,
376  acmpInputAPORT2YCH22 = _ACMP_INPUTSEL_POSSEL_APORT2YCH22,
377  acmpInputAPORT2XCH23 = _ACMP_INPUTSEL_POSSEL_APORT2XCH23,
378  acmpInputAPORT2YCH24 = _ACMP_INPUTSEL_POSSEL_APORT2YCH24,
379  acmpInputAPORT2XCH25 = _ACMP_INPUTSEL_POSSEL_APORT2XCH25,
380  acmpInputAPORT2YCH26 = _ACMP_INPUTSEL_POSSEL_APORT2YCH26,
381  acmpInputAPORT2XCH27 = _ACMP_INPUTSEL_POSSEL_APORT2XCH27,
382  acmpInputAPORT2YCH28 = _ACMP_INPUTSEL_POSSEL_APORT2YCH28,
383  acmpInputAPORT2XCH29 = _ACMP_INPUTSEL_POSSEL_APORT2XCH29,
384  acmpInputAPORT2YCH30 = _ACMP_INPUTSEL_POSSEL_APORT2YCH30,
385  acmpInputAPORT2XCH31 = _ACMP_INPUTSEL_POSSEL_APORT2XCH31,
386  acmpInputAPORT3XCH0 = _ACMP_INPUTSEL_POSSEL_APORT3XCH0,
387  acmpInputAPORT3YCH1 = _ACMP_INPUTSEL_POSSEL_APORT3YCH1,
388  acmpInputAPORT3XCH2 = _ACMP_INPUTSEL_POSSEL_APORT3XCH2,
389  acmpInputAPORT3YCH3 = _ACMP_INPUTSEL_POSSEL_APORT3YCH3,
390  acmpInputAPORT3XCH4 = _ACMP_INPUTSEL_POSSEL_APORT3XCH4,
391  acmpInputAPORT3YCH5 = _ACMP_INPUTSEL_POSSEL_APORT3YCH5,
392  acmpInputAPORT3XCH6 = _ACMP_INPUTSEL_POSSEL_APORT3XCH6,
393  acmpInputAPORT3YCH7 = _ACMP_INPUTSEL_POSSEL_APORT3YCH7,
394  acmpInputAPORT3XCH8 = _ACMP_INPUTSEL_POSSEL_APORT3XCH8,
395  acmpInputAPORT3YCH9 = _ACMP_INPUTSEL_POSSEL_APORT3YCH9,
396  acmpInputAPORT3XCH10 = _ACMP_INPUTSEL_POSSEL_APORT3XCH10,
397  acmpInputAPORT3YCH11 = _ACMP_INPUTSEL_POSSEL_APORT3YCH11,
398  acmpInputAPORT3XCH12 = _ACMP_INPUTSEL_POSSEL_APORT3XCH12,
399  acmpInputAPORT3YCH13 = _ACMP_INPUTSEL_POSSEL_APORT3YCH13,
400  acmpInputAPORT3XCH14 = _ACMP_INPUTSEL_POSSEL_APORT3XCH14,
401  acmpInputAPORT3YCH15 = _ACMP_INPUTSEL_POSSEL_APORT3YCH15,
402  acmpInputAPORT3XCH16 = _ACMP_INPUTSEL_POSSEL_APORT3XCH16,
403  acmpInputAPORT3YCH17 = _ACMP_INPUTSEL_POSSEL_APORT3YCH17,
404  acmpInputAPORT3XCH18 = _ACMP_INPUTSEL_POSSEL_APORT3XCH18,
405  acmpInputAPORT3YCH19 = _ACMP_INPUTSEL_POSSEL_APORT3YCH19,
406  acmpInputAPORT3XCH20 = _ACMP_INPUTSEL_POSSEL_APORT3XCH20,
407  acmpInputAPORT3YCH21 = _ACMP_INPUTSEL_POSSEL_APORT3YCH21,
408  acmpInputAPORT3XCH22 = _ACMP_INPUTSEL_POSSEL_APORT3XCH22,
409  acmpInputAPORT3YCH23 = _ACMP_INPUTSEL_POSSEL_APORT3YCH23,
410  acmpInputAPORT3XCH24 = _ACMP_INPUTSEL_POSSEL_APORT3XCH24,
411  acmpInputAPORT3YCH25 = _ACMP_INPUTSEL_POSSEL_APORT3YCH25,
412  acmpInputAPORT3XCH26 = _ACMP_INPUTSEL_POSSEL_APORT3XCH26,
413  acmpInputAPORT3YCH27 = _ACMP_INPUTSEL_POSSEL_APORT3YCH27,
414  acmpInputAPORT3XCH28 = _ACMP_INPUTSEL_POSSEL_APORT3XCH28,
415  acmpInputAPORT3YCH29 = _ACMP_INPUTSEL_POSSEL_APORT3YCH29,
416  acmpInputAPORT3XCH30 = _ACMP_INPUTSEL_POSSEL_APORT3XCH30,
417  acmpInputAPORT3YCH31 = _ACMP_INPUTSEL_POSSEL_APORT3YCH31,
418  acmpInputAPORT4YCH0 = _ACMP_INPUTSEL_POSSEL_APORT4YCH0,
419  acmpInputAPORT4XCH1 = _ACMP_INPUTSEL_POSSEL_APORT4XCH1,
420  acmpInputAPORT4YCH2 = _ACMP_INPUTSEL_POSSEL_APORT4YCH2,
421  acmpInputAPORT4XCH3 = _ACMP_INPUTSEL_POSSEL_APORT4XCH3,
422  acmpInputAPORT4YCH4 = _ACMP_INPUTSEL_POSSEL_APORT4YCH4,
423  acmpInputAPORT4XCH5 = _ACMP_INPUTSEL_POSSEL_APORT4XCH5,
424  acmpInputAPORT4YCH6 = _ACMP_INPUTSEL_POSSEL_APORT4YCH6,
425  acmpInputAPORT4XCH7 = _ACMP_INPUTSEL_POSSEL_APORT4XCH7,
426  acmpInputAPORT4YCH8 = _ACMP_INPUTSEL_POSSEL_APORT4YCH8,
427  acmpInputAPORT4XCH9 = _ACMP_INPUTSEL_POSSEL_APORT4XCH9,
428  acmpInputAPORT4YCH10 = _ACMP_INPUTSEL_POSSEL_APORT4YCH10,
429  acmpInputAPORT4XCH11 = _ACMP_INPUTSEL_POSSEL_APORT4XCH11,
430  acmpInputAPORT4YCH12 = _ACMP_INPUTSEL_POSSEL_APORT4YCH12,
431  acmpInputAPORT4XCH13 = _ACMP_INPUTSEL_POSSEL_APORT4XCH13,
432  acmpInputAPORT4YCH16 = _ACMP_INPUTSEL_POSSEL_APORT4YCH16,
433  acmpInputAPORT4XCH17 = _ACMP_INPUTSEL_POSSEL_APORT4XCH17,
434  acmpInputAPORT4YCH18 = _ACMP_INPUTSEL_POSSEL_APORT4YCH18,
435  acmpInputAPORT4XCH19 = _ACMP_INPUTSEL_POSSEL_APORT4XCH19,
436  acmpInputAPORT4YCH20 = _ACMP_INPUTSEL_POSSEL_APORT4YCH20,
437  acmpInputAPORT4XCH21 = _ACMP_INPUTSEL_POSSEL_APORT4XCH21,
438  acmpInputAPORT4YCH22 = _ACMP_INPUTSEL_POSSEL_APORT4YCH22,
439  acmpInputAPORT4XCH23 = _ACMP_INPUTSEL_POSSEL_APORT4XCH23,
440  acmpInputAPORT4YCH24 = _ACMP_INPUTSEL_POSSEL_APORT4YCH24,
441  acmpInputAPORT4XCH25 = _ACMP_INPUTSEL_POSSEL_APORT4XCH25,
442  acmpInputAPORT4YCH26 = _ACMP_INPUTSEL_POSSEL_APORT4YCH26,
443  acmpInputAPORT4XCH27 = _ACMP_INPUTSEL_POSSEL_APORT4XCH27,
444  acmpInputAPORT4YCH28 = _ACMP_INPUTSEL_POSSEL_APORT4YCH28,
445  acmpInputAPORT4XCH29 = _ACMP_INPUTSEL_POSSEL_APORT4XCH29,
446  acmpInputAPORT4YCH30 = _ACMP_INPUTSEL_POSSEL_APORT4YCH30,
447  acmpInputAPORT4YCH14 = _ACMP_INPUTSEL_POSSEL_APORT4YCH14,
448  acmpInputAPORT4XCH15 = _ACMP_INPUTSEL_POSSEL_APORT4XCH15,
449  acmpInputAPORT4XCH31 = _ACMP_INPUTSEL_POSSEL_APORT4XCH31,
450 #if defined(_ACMP_INPUTSEL_POSSEL_DACOUT0)
451  acmpInputDACOUT0 = _ACMP_INPUTSEL_POSSEL_DACOUT0,
452 #endif
453 #if defined(_ACMP_INPUTSEL_POSSEL_DACOUT1)
454  acmpInputDACOUT1 = _ACMP_INPUTSEL_POSSEL_DACOUT1,
455 #endif
456  acmpInputVLP = _ACMP_INPUTSEL_POSSEL_VLP,
457  acmpInputVBDIV = _ACMP_INPUTSEL_POSSEL_VBDIV,
458  acmpInputVADIV = _ACMP_INPUTSEL_POSSEL_VADIV,
459  acmpInputVDD = _ACMP_INPUTSEL_POSSEL_VDD,
460  acmpInputVSS = _ACMP_INPUTSEL_POSSEL_VSS,
462 #else
463 
465 typedef enum
466 {
489 
490 #if defined(_ACMP_INPUTSEL_NEGSEL_DAC0CH0)
491 
493 #endif
494 
495 #if defined(_ACMP_INPUTSEL_NEGSEL_DAC0CH1)
496 
498 #endif
499 
500 #if defined(_ACMP_INPUTSEL_NEGSEL_CAPSENSE)
501 
503 #endif
505 #endif
506 
507 #if defined(_ACMP_EXTIFCTRL_MASK)
508 
513 typedef enum
514 {
515  acmpExternalInputAPORT0X = _ACMP_EXTIFCTRL_APORTSEL_APORT0X,
516  acmpExternalInputAPORT0Y = _ACMP_EXTIFCTRL_APORTSEL_APORT0Y,
517  acmpExternalInputAPORT1X = _ACMP_EXTIFCTRL_APORTSEL_APORT1X,
518  acmpExternalInputAPORT1Y = _ACMP_EXTIFCTRL_APORTSEL_APORT1Y,
519  acmpExternalInputAPORT1XY = _ACMP_EXTIFCTRL_APORTSEL_APORT1XY,
520  acmpExternalInputAPORT2X = _ACMP_EXTIFCTRL_APORTSEL_APORT2X,
521  acmpExternalInputAPORT2Y = _ACMP_EXTIFCTRL_APORTSEL_APORT2Y,
522  acmpExternalInputAPORT2YX = _ACMP_EXTIFCTRL_APORTSEL_APORT2YX,
523  acmpExternalInputAPORT3X = _ACMP_EXTIFCTRL_APORTSEL_APORT3X,
524  acmpExternalInputAPORT3Y = _ACMP_EXTIFCTRL_APORTSEL_APORT3Y,
525  acmpExternalInputAPORT3XY = _ACMP_EXTIFCTRL_APORTSEL_APORT3XY,
526  acmpExternalInputAPORT4X = _ACMP_EXTIFCTRL_APORTSEL_APORT4X,
527  acmpExternalInputAPORT4Y = _ACMP_EXTIFCTRL_APORTSEL_APORT4Y,
528  acmpExternalInputAPORT4YX = _ACMP_EXTIFCTRL_APORTSEL_APORT4YX,
529 } ACMP_ExternalInput_Typedef;
530 #endif
531 
532 /*******************************************************************************
533  ****************************** STRUCTS ************************************
534  ******************************************************************************/
535 
537 typedef struct
538 {
541  bool fullBias;
542 
543 #if defined(_ACMP_CTRL_HALFBIAS_MASK)
544 
546  bool halfBias;
547 #endif
548 
551  uint32_t biasProg;
552 
553 #if defined(_ACMP_CTRL_WARMTIME_MASK)
554 
557 #endif
558 
559 #if defined(_ACMP_CTRL_HYSTSEL_MASK)
560 
562 #else
563 
564  ACMP_HysteresisLevel_TypeDef hysteresisLevel_0;
565 
567  ACMP_HysteresisLevel_TypeDef hysteresisLevel_1;
568 #endif
569 
573 
574 #if defined(_ACMP_INPUTSEL_LPREF_MASK)
575 
578 #endif
579 
580 #if defined(_ACMP_INPUTSEL_VDDLEVEL_MASK)
581 
583  uint32_t vddLevel;
584 #else
585 
592  uint32_t vddLevelHigh;
593 
601  uint32_t vddLevelLow;
602 #endif
603 
605  bool enable;
607 
609 #if defined(_ACMP_HYSTERESIS0_HYST_MASK)
610 #define ACMP_CAPSENSE_INIT_DEFAULT \
611 { \
612  false, /* Don't use fullBias to lower power consumption */ \
613  0x20, /* Using biasProg value of 0x20 (32) */ \
614  acmpHysteresisLevel8, /* Use hysteresis level 8 when ACMP output is 0 */ \
615  acmpHysteresisLevel8, /* Use hysteresis level 8 when ACMP output is 1 */ \
616  acmpResistor5, /* Use internal resistor value 5 */ \
617  0x30, /* VDD level high */ \
618  0x10, /* VDD level low */ \
619  true /* Enable after init. */ \
620 }
621 #elif defined(_ACMP_CTRL_WARMTIME_MASK)
622 #define ACMP_CAPSENSE_INIT_DEFAULT \
623 { \
624  false, /* fullBias */ \
625  false, /* halfBias */ \
626  0x7, /* biasProg */ \
627  acmpWarmTime512, /* 512 cycle warmup to be safe */ \
628  acmpHysteresisLevel5, \
629  acmpResistor3, \
630  false, /* low power reference */ \
631  0x3D, /* VDD level */ \
632  true /* Enable after init. */ \
633 }
634 #else
635 #define ACMP_CAPSENSE_INIT_DEFAULT \
636 { \
637  false, /* fullBias */ \
638  false, /* halfBias */ \
639  0x7, /* biasProg */ \
640  acmpHysteresisLevel5, \
641  acmpResistor3, \
642  false, /* low power reference */ \
643  0x3D, /* VDD level */ \
644  true /* Enable after init. */ \
645 }
646 #endif
647 
649 typedef struct
650 {
653  bool fullBias;
654 
655 #if defined(_ACMP_CTRL_HALFBIAS_MASK)
656 
658  bool halfBias;
659 #endif
660 
663  uint32_t biasProg;
664 
667 
670 
671 #if defined(_ACMP_CTRL_INPUTRANGE_MASK)
672 
674  ACMP_InputRange_TypeDef inputRange;
675 #endif
676 
677 #if defined(_ACMP_CTRL_ACCURACY_MASK)
678 
681  ACMP_Accuracy_TypeDef accuracy;
682 #endif
683 
684 #if defined(_ACMP_CTRL_PWRSEL_MASK)
685 
686  ACMP_PowerSource_TypeDef powerSource;
687 #endif
688 
689 #if defined(_ACMP_CTRL_WARMTIME_MASK)
690 
693 #endif
694 
695 #if defined(_ACMP_CTRL_HYSTSEL_MASK)
696 
698 #else
699 
700  ACMP_HysteresisLevel_TypeDef hysteresisLevel_0;
701 
703  ACMP_HysteresisLevel_TypeDef hysteresisLevel_1;
704 #endif
705 
706 #if defined(_ACMP_INPUTSEL_VLPSEL_MASK)
707 
709  ACMP_VLPInput_Typedef vlpInput;
710 #endif
711 
714 
715 #if defined(_ACMP_INPUTSEL_LPREF_MASK)
716 
719 #endif
720 
721 #if defined(_ACMP_INPUTSEL_VDDLEVEL_MASK)
722 
724  uint32_t vddLevel;
725 #endif
726 
728  bool enable;
730 
732 #if defined(_ACMP_HYSTERESIS0_HYST_MASK)
733 #define ACMP_INIT_DEFAULT \
734 { \
735  false, /* fullBias */ \
736  0x7, /* biasProg */ \
737  false, /* No interrupt on falling edge. */ \
738  false, /* No interrupt on rising edge. */ \
739  acmpInputRangeFull, /* Input range from 0 to Vdd. */ \
740  acmpAccuracyLow, /* Low accuracy, less current usage. */ \
741  acmpPowerSourceAvdd, /* Use the AVDD supply. */ \
742  acmpHysteresisLevel5, /* Use hysteresis level 5 when output is 0 */ \
743  acmpHysteresisLevel5, /* Use hysteresis level 5 when output is 1 */ \
744  acmpVLPInputVADIV, /* Use VADIV as the VLP input source. */ \
745  false, /* Output 0 when ACMP is inactive. */ \
746  true /* Enable after init. */ \
747 }
748 #elif defined(_ACMP_CTRL_WARMTIME_MASK)
749 #define ACMP_INIT_DEFAULT \
750 { \
751  false, /* fullBias */ \
752  false, /* halfBias */ \
753  0x7, /* biasProg */ \
754  false, /* No interrupt on falling edge. */ \
755  false, /* No interrupt on rising edge. */ \
756  acmpWarmTime512, /* 512 cycle warmup to be safe */ \
757  acmpHysteresisLevel5, \
758  false, /* Disabled emitting inactive value during warmup. */ \
759  false, /* low power reference */ \
760  0x3D, /* VDD level */ \
761  true /* Enable after init. */ \
762 }
763 #else
764 #define ACMP_INIT_DEFAULT \
765 { \
766  false, /* fullBias */ \
767  false, /* halfBias */ \
768  0x7, /* biasProg */ \
769  false, /* No interrupt on falling edge. */ \
770  false, /* No interrupt on rising edge. */ \
771  acmpHysteresisLevel5, \
772  false, /* Disabled emitting inactive value during warmup. */ \
773  false, /* low power reference */ \
774  0x3D, /* VDD level */ \
775  true /* Enable after init. */ \
776 }
777 #endif
778 
779 #if defined(_ACMP_INPUTSEL_VASEL_MASK)
780 
782 typedef struct
783 {
784  ACMP_VAInput_TypeDef input;
793  uint32_t div0;
794 
802  uint32_t div1;
803 } ACMP_VAConfig_TypeDef;
804 
805 #define ACMP_VACONFIG_DEFAULT \
806 { \
807  acmpVAInputVDD, /* Use Vdd as VA voltage input source */ \
808  63, /* No division of the VA source when ACMP output is 0 */ \
809  63, /* No division of the VA source when ACMP output is 1 */ \
810 }
811 #endif
812 
813 #if defined(_ACMP_INPUTSEL_VBSEL_MASK)
814 
816 typedef struct
817 {
818  ACMP_VBInput_TypeDef input;
827  uint32_t div0;
828 
836  uint32_t div1;
837 } ACMP_VBConfig_TypeDef;
838 
839 #define ACMP_VBCONFIG_DEFAULT \
840 { \
841  acmpVBInput1V25, /* Use 1.25 V as VB voltage input source */ \
842  63, /* No division of the VB source when ACMP output is 0 */ \
843  63, /* No division of the VB source when ACMP output is 1 */ \
844 }
845 #endif
846 
847 /*******************************************************************************
848  ***************************** PROTOTYPES **********************************
849  ******************************************************************************/
850 
854 void ACMP_Disable(ACMP_TypeDef *acmp);
855 void ACMP_Enable(ACMP_TypeDef *acmp);
856 #if defined(_ACMP_EXTIFCTRL_MASK)
857 void ACMP_ExternalInputSelect(ACMP_TypeDef *acmp, ACMP_ExternalInput_Typedef aport);
858 #endif
859 void ACMP_GPIOSetup(ACMP_TypeDef *acmp, uint32_t location, bool enable, bool invert);
860 void ACMP_Init(ACMP_TypeDef *acmp, const ACMP_Init_TypeDef *init);
861 void ACMP_Reset(ACMP_TypeDef *acmp);
862 #if defined(_ACMP_INPUTSEL_VASEL_MASK)
863 void ACMP_VASetup(ACMP_TypeDef *acmp, const ACMP_VAConfig_TypeDef *vaconfig);
864 #endif
865 #if defined(_ACMP_INPUTSEL_VBSEL_MASK)
866 void ACMP_VBSetup(ACMP_TypeDef *acmp, const ACMP_VBConfig_TypeDef *vbconfig);
867 #endif
868 
869 /***************************************************************************/
881 __STATIC_INLINE void ACMP_IntClear(ACMP_TypeDef *acmp, uint32_t flags)
882 {
883  acmp->IFC = flags;
884 }
885 
886 
887 /***************************************************************************/
899 __STATIC_INLINE void ACMP_IntDisable(ACMP_TypeDef *acmp, uint32_t flags)
900 {
901  acmp->IEN &= ~(flags);
902 }
903 
904 
905 /***************************************************************************/
922 __STATIC_INLINE void ACMP_IntEnable(ACMP_TypeDef *acmp, uint32_t flags)
923 {
924  acmp->IEN |= flags;
925 }
926 
927 
928 /***************************************************************************/
943 __STATIC_INLINE uint32_t ACMP_IntGet(ACMP_TypeDef *acmp)
944 {
945  return acmp->IF;
946 }
947 
948 
949 /***************************************************************************/
968 __STATIC_INLINE uint32_t ACMP_IntGetEnabled(ACMP_TypeDef *acmp)
969 {
970  uint32_t tmp;
971 
972  /* Store ACMPx->IEN in temporary variable in order to define explicit order
973  * of volatile accesses. */
974  tmp = acmp->IEN;
975 
976  /* Bitwise AND of pending and enabled interrupts */
977  return acmp->IF & tmp;
978 }
979 
980 
981 /***************************************************************************/
993 __STATIC_INLINE void ACMP_IntSet(ACMP_TypeDef *acmp, uint32_t flags)
994 {
995  acmp->IFS = flags;
996 }
997 
1001 #ifdef __cplusplus
1002 }
1003 #endif
1004 
1005 #endif /* defined(ACMP_COUNT) && (ACMP_COUNT > 0) */
1006 #endif /* EM_ACMP_H */
__STATIC_INLINE void ACMP_IntClear(ACMP_TypeDef *acmp, uint32_t flags)
Clear one or more pending ACMP interrupts.
Definition: em_acmp.h:881
ACMP_WarmTime_TypeDef
Definition: em_acmp.h:149
ACMP_CapsenseResistor_TypeDef
Definition: em_acmp.h:98
#define _ACMP_INPUTSEL_CSRESSEL_RES3
Definition: ezr32wg_acmp.h:237
ACMP_CapsenseResistor_TypeDef resistor
Definition: em_acmp.h:572
#define _ACMP_INPUTSEL_NEGSEL_DAC0CH0
Definition: ezr32wg_acmp.h:200
void ACMP_Disable(ACMP_TypeDef *acmp)
Disables the ACMP.
Definition: em_acmp.c:210
ACMP_HysteresisLevel_TypeDef hysteresisLevel
Definition: em_acmp.h:561
#define _ACMP_INPUTSEL_NEGSEL_CH7
Definition: ezr32wg_acmp.h:194
ACMP_Channel_TypeDef
Definition: em_acmp.h:465
#define _ACMP_INPUTSEL_NEGSEL_CH5
Definition: ezr32wg_acmp.h:192
__IOM uint32_t IFC
Definition: ezr32wg_acmp.h:49
__STATIC_INLINE uint32_t ACMP_IntGet(ACMP_TypeDef *acmp)
Get pending ACMP interrupt flags.
Definition: em_acmp.h:943
#define _ACMP_INPUTSEL_NEGSEL_CH6
Definition: ezr32wg_acmp.h:193
#define _ACMP_INPUTSEL_NEGSEL_CAPSENSE
Definition: ezr32wg_acmp.h:199
uint32_t biasProg
Definition: em_acmp.h:663
__STATIC_INLINE uint32_t ACMP_IntGetEnabled(ACMP_TypeDef *acmp)
Get enabled and pending ACMP interrupt flags. Useful for handling more interrupt sources in the same ...
Definition: em_acmp.h:968
void ACMP_CapsenseChannelSet(ACMP_TypeDef *acmp, ACMP_Channel_TypeDef channel)
Sets the ACMP channel used for capacative sensing.
Definition: em_acmp.c:185
bool interruptOnRisingEdge
Definition: em_acmp.h:669
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define _ACMP_CTRL_HYSTSEL_HYST4
Definition: ezr32wg_acmp.h:96
__STATIC_INLINE void ACMP_IntSet(ACMP_TypeDef *acmp, uint32_t flags)
Set one or more pending ACMP interrupts from SW.
Definition: em_acmp.h:993
#define _ACMP_CTRL_WARMTIME_4CYCLES
Definition: ezr32wg_acmp.h:112
__IOM uint32_t IEN
Definition: ezr32wg_acmp.h:46
void ACMP_Enable(ACMP_TypeDef *acmp)
Enables the ACMP.
Definition: em_acmp.c:225
#define _ACMP_INPUTSEL_NEGSEL_VDD
Definition: ezr32wg_acmp.h:198
#define _ACMP_INPUTSEL_NEGSEL_CH3
Definition: ezr32wg_acmp.h:190
#define _ACMP_CTRL_HYSTSEL_HYST7
Definition: ezr32wg_acmp.h:99
uint32_t vddLevel
Definition: em_acmp.h:724
#define _ACMP_CTRL_WARMTIME_256CYCLES
Definition: ezr32wg_acmp.h:118
#define _ACMP_CTRL_WARMTIME_16CYCLES
Definition: ezr32wg_acmp.h:114
#define _ACMP_CTRL_HYSTSEL_HYST3
Definition: ezr32wg_acmp.h:95
#define _ACMP_INPUTSEL_CSRESSEL_RES2
Definition: ezr32wg_acmp.h:236
#define _ACMP_CTRL_WARMTIME_512CYCLES
Definition: ezr32wg_acmp.h:119
bool lowPowerReferenceEnabled
Definition: em_acmp.h:718
ACMP_WarmTime_TypeDef warmTime
Definition: em_acmp.h:556
#define _ACMP_CTRL_WARMTIME_8CYCLES
Definition: ezr32wg_acmp.h:113
void ACMP_ChannelSet(ACMP_TypeDef *acmp, ACMP_Channel_TypeDef negSel, ACMP_Channel_TypeDef posSel)
Sets which channels should be used in ACMP comparisons.
Definition: em_acmp.c:340
void ACMP_CapsenseInit(ACMP_TypeDef *acmp, const ACMP_CapsenseInit_TypeDef *init)
Sets up the ACMP for use in capacative sense applications.
Definition: em_acmp.c:109
#define _ACMP_INPUTSEL_NEGSEL_2V5
Definition: ezr32wg_acmp.h:197
void ACMP_Reset(ACMP_TypeDef *acmp)
Reset ACMP to same state as after a HW reset.
Definition: em_acmp.c:270
ACMP_WarmTime_TypeDef warmTime
Definition: em_acmp.h:692
#define _ACMP_CTRL_WARMTIME_64CYCLES
Definition: ezr32wg_acmp.h:116
__STATIC_INLINE void ACMP_IntEnable(ACMP_TypeDef *acmp, uint32_t flags)
Enable one or more ACMP interrupts.
Definition: em_acmp.h:922
__STATIC_INLINE void ACMP_IntDisable(ACMP_TypeDef *acmp, uint32_t flags)
Disable one or more ACMP interrupts.
Definition: em_acmp.h:899
__IOM uint32_t IFS
Definition: ezr32wg_acmp.h:48
#define _ACMP_INPUTSEL_NEGSEL_1V25
Definition: ezr32wg_acmp.h:196
#define _ACMP_INPUTSEL_CSRESSEL_RES1
Definition: ezr32wg_acmp.h:235
#define _ACMP_INPUTSEL_NEGSEL_CH0
Definition: ezr32wg_acmp.h:187
#define _ACMP_INPUTSEL_NEGSEL_CH2
Definition: ezr32wg_acmp.h:189
#define _ACMP_INPUTSEL_NEGSEL_DAC0CH1
Definition: ezr32wg_acmp.h:201
bool interruptOnFallingEdge
Definition: em_acmp.h:666
#define _ACMP_INPUTSEL_NEGSEL_CH4
Definition: ezr32wg_acmp.h:191
#define _ACMP_CTRL_HYSTSEL_HYST6
Definition: ezr32wg_acmp.h:98
__IM uint32_t IF
Definition: ezr32wg_acmp.h:47
#define _ACMP_CTRL_HYSTSEL_HYST0
Definition: ezr32wg_acmp.h:92
#define _ACMP_CTRL_WARMTIME_32CYCLES
Definition: ezr32wg_acmp.h:115
#define _ACMP_INPUTSEL_CSRESSEL_RES0
Definition: ezr32wg_acmp.h:234
#define _ACMP_INPUTSEL_NEGSEL_CH1
Definition: ezr32wg_acmp.h:188
#define _ACMP_CTRL_WARMTIME_128CYCLES
Definition: ezr32wg_acmp.h:117
void ACMP_Init(ACMP_TypeDef *acmp, const ACMP_Init_TypeDef *init)
Initialize ACMP.
Definition: em_acmp.c:374
#define _ACMP_CTRL_HYSTSEL_HYST1
Definition: ezr32wg_acmp.h:93
#define _ACMP_CTRL_HYSTSEL_HYST2
Definition: ezr32wg_acmp.h:94
ACMP_HysteresisLevel_TypeDef
Definition: em_acmp.h:114
void ACMP_GPIOSetup(ACMP_TypeDef *acmp, uint32_t location, bool enable, bool invert)
Sets up GPIO output from the ACMP.
Definition: em_acmp.c:305
#define _ACMP_CTRL_HYSTSEL_HYST5
Definition: ezr32wg_acmp.h:97
ACMP_HysteresisLevel_TypeDef hysteresisLevel
Definition: em_acmp.h:697
bool inactiveValue
Definition: em_acmp.h:713