EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-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)
109 #endif
111 
114 typedef enum
115 {
116 #if defined(_ACMP_CTRL_HYSTSEL_MASK)
117  acmpHysteresisLevel0 = _ACMP_CTRL_HYSTSEL_HYST0,
118  acmpHysteresisLevel1 = _ACMP_CTRL_HYSTSEL_HYST1,
119  acmpHysteresisLevel2 = _ACMP_CTRL_HYSTSEL_HYST2,
120  acmpHysteresisLevel3 = _ACMP_CTRL_HYSTSEL_HYST3,
121  acmpHysteresisLevel4 = _ACMP_CTRL_HYSTSEL_HYST4,
122  acmpHysteresisLevel5 = _ACMP_CTRL_HYSTSEL_HYST5,
123  acmpHysteresisLevel6 = _ACMP_CTRL_HYSTSEL_HYST6,
124  acmpHysteresisLevel7 = _ACMP_CTRL_HYSTSEL_HYST7
125 #endif
126 #if defined(_ACMP_HYSTERESIS0_HYST_MASK)
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,
143 #endif
145 
146 #if defined(_ACMP_CTRL_WARMTIME_MASK)
147 
149 typedef enum
150 {
152  acmpWarmTime4 = _ACMP_CTRL_WARMTIME_4CYCLES,
154  acmpWarmTime8 = _ACMP_CTRL_WARMTIME_8CYCLES,
156  acmpWarmTime16 = _ACMP_CTRL_WARMTIME_16CYCLES,
158  acmpWarmTime32 = _ACMP_CTRL_WARMTIME_32CYCLES,
160  acmpWarmTime64 = _ACMP_CTRL_WARMTIME_64CYCLES,
162  acmpWarmTime128 = _ACMP_CTRL_WARMTIME_128CYCLES,
164  acmpWarmTime256 = _ACMP_CTRL_WARMTIME_256CYCLES,
166  acmpWarmTime512 = _ACMP_CTRL_WARMTIME_512CYCLES
167 } ACMP_WarmTime_TypeDef;
168 #endif
169 
170 #if defined(_ACMP_CTRL_INPUTRANGE_MASK)
171 
174 typedef enum
175 {
180 #endif
181 
182 #if defined(_ACMP_CTRL_PWRSEL_MASK)
183 
186 typedef enum
187 {
193 #endif
194 
195 #if defined(_ACMP_CTRL_ACCURACY_MASK)
196 
199 typedef enum
200 {
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
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
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
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 {
468  acmpChannel0 = _ACMP_INPUTSEL_NEGSEL_CH0,
470  acmpChannel1 = _ACMP_INPUTSEL_NEGSEL_CH1,
472  acmpChannel2 = _ACMP_INPUTSEL_NEGSEL_CH2,
474  acmpChannel3 = _ACMP_INPUTSEL_NEGSEL_CH3,
476  acmpChannel4 = _ACMP_INPUTSEL_NEGSEL_CH4,
478  acmpChannel5 = _ACMP_INPUTSEL_NEGSEL_CH5,
480  acmpChannel6 = _ACMP_INPUTSEL_NEGSEL_CH6,
482  acmpChannel7 = _ACMP_INPUTSEL_NEGSEL_CH7,
484  acmpChannel1V25 = _ACMP_INPUTSEL_NEGSEL_1V25,
486  acmpChannel2V5 = _ACMP_INPUTSEL_NEGSEL_2V5,
488  acmpChannelVDD = _ACMP_INPUTSEL_NEGSEL_VDD,
489 
490 #if defined(_ACMP_INPUTSEL_NEGSEL_DAC0CH0)
491 
492  acmpChannelDAC0Ch0 = _ACMP_INPUTSEL_NEGSEL_DAC0CH0,
493 #endif
494 
495 #if defined(_ACMP_INPUTSEL_NEGSEL_DAC0CH1)
496 
497  acmpChannelDAC0Ch1 = _ACMP_INPUTSEL_NEGSEL_DAC0CH1,
498 #endif
499 
500 #if defined(_ACMP_INPUTSEL_NEGSEL_CAPSENSE)
501 
502  acmpChannelCapSense = _ACMP_INPUTSEL_NEGSEL_CAPSENSE,
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 
556  ACMP_WarmTime_TypeDef warmTime;
557 #endif
558 
559 #if defined(_ACMP_CTRL_HYSTSEL_MASK)
560 
561  ACMP_HysteresisLevel_TypeDef hysteresisLevel;
562 #else
563 
565 
568 #endif
569 
573 
574 #if defined(_ACMP_INPUTSEL_LPREF_MASK)
575 
577  bool lowPowerReferenceEnabled;
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 
675 #endif
676 
677 #if defined(_ACMP_CTRL_ACCURACY_MASK)
678 
682 #endif
683 
684 #if defined(_ACMP_CTRL_PWRSEL_MASK)
685 
687 #endif
688 
689 #if defined(_ACMP_CTRL_WARMTIME_MASK)
690 
692  ACMP_WarmTime_TypeDef warmTime;
693 #endif
694 
695 #if defined(_ACMP_CTRL_HYSTSEL_MASK)
696 
697  ACMP_HysteresisLevel_TypeDef hysteresisLevel;
698 #else
699 
701 
704 #endif
705 
706 #if defined(_ACMP_INPUTSEL_VLPSEL_MASK)
707 
710 #endif
711 
714 
715 #if defined(_ACMP_INPUTSEL_LPREF_MASK)
716 
718  bool lowPowerReferenceEnabled;
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 {
793  uint32_t div0;
794 
802  uint32_t div1;
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 {
827  uint32_t div0;
828 
836  uint32_t div1;
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 */
#define _ACMP_INPUTSEL_VASEL_APORT2YCH6
#define _ACMP_CTRL_INPUTRANGE_LTVDDDIV2
#define _ACMP_HYSTERESIS0_HYST_HYST2
ACMP_HysteresisLevel_TypeDef hysteresisLevel_1
Definition: em_acmp.h:567
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH14
#define _ACMP_INPUTSEL_VASEL_APORT2YCH30
__STATIC_INLINE void ACMP_IntClear(ACMP_TypeDef *acmp, uint32_t flags)
Clear one or more pending ACMP interrupts.
Definition: em_acmp.h:881
ACMP_CapsenseResistor_TypeDef
Definition: em_acmp.h:98
void ACMP_VASetup(ACMP_TypeDef *acmp, const ACMP_VAConfig_TypeDef *vaconfig)
Setup the VA Source.
Definition: em_acmp.c:440
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH5
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH15
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH5
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH31
ACMP_CapsenseResistor_TypeDef resistor
Definition: em_acmp.h:572
#define _ACMP_INPUTSEL_VASEL_APORT1YCH21
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH11
#define _ACMP_INPUTSEL_VASEL_APORT1YCH11
void ACMP_Disable(ACMP_TypeDef *acmp)
Disables the ACMP.
Definition: em_acmp.c:210
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH0
#define _ACMP_INPUTSEL_VASEL_APORT1XCH20
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH29
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH0
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH30
#define _ACMP_INPUTSEL_VASEL_APORT1YCH27
#define _ACMP_HYSTERESIS0_HYST_HYST10
#define _ACMP_HYSTERESIS0_HYST_HYST9
#define _ACMP_INPUTSEL_VASEL_APORT1XCH10
ACMP_Channel_TypeDef
Definition: em_acmp.h:288
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH9
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH19
#define _ACMP_INPUTSEL_CSRESSEL_RES4
__IOM uint32_t IFC
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH11
#define _ACMP_INPUTSEL_POSSEL_VSS
#define _ACMP_INPUTSEL_CSRESSEL_RES6
__STATIC_INLINE uint32_t ACMP_IntGet(ACMP_TypeDef *acmp)
Get pending ACMP interrupt flags.
Definition: em_acmp.h:943
#define _ACMP_CTRL_ACCURACY_LOW
#define _ACMP_CTRL_PWRSEL_AVDD
#define _ACMP_INPUTSEL_VASEL_APORT1XCH2
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH4
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH21
#define _ACMP_INPUTSEL_VASEL_APORT1XCH4
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH23
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH11
void ACMP_VBSetup(ACMP_TypeDef *acmp, const ACMP_VBConfig_TypeDef *vbconfig)
Setup the VB Source.
Definition: em_acmp.c:466
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH28
ACMP_VBInput_TypeDef
Definition: em_acmp.h:268
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH6
#define _ACMP_INPUTSEL_VASEL_APORT1YCH31
#define _ACMP_INPUTSEL_NEGSEL_VDD
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH6
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH26
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH6
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH15
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH10
#define _ACMP_INPUTSEL_CSRESSEL_RES1
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH0
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH8
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH2
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH24
#define _ACMP_INPUTSEL_VASEL_APORT1XCH30
#define _ACMP_CTRL_INPUTRANGE_GTVDDDIV2
#define _ACMP_HYSTERESIS0_HYST_HYST8
ACMP_InputRange_TypeDef inputRange
Definition: em_acmp.h:674
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH21
uint32_t biasProg
Definition: em_acmp.h:663
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH17
__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
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH6
void ACMP_CapsenseChannelSet(ACMP_TypeDef *acmp, ACMP_Channel_TypeDef channel)
Sets the ACMP channel used for capacative sensing.
Definition: em_acmp.c:185
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH15
ACMP_VLPInput_Typedef vlpInput
Definition: em_acmp.h:709
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH31
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH17
bool interruptOnRisingEdge
Definition: em_acmp.h:669
ACMP_PowerSource_TypeDef powerSource
Definition: em_acmp.h:686
#define _ACMP_INPUTSEL_VASEL_APORT1XCH0
#define _ACMP_INPUTSEL_VASEL_APORT2YCH24
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH10
#define _ACMP_INPUTSEL_VASEL_APORT1XCH12
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH2
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH25
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH15
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH19
#define _ACMP_INPUTSEL_VASEL_APORT1YCH7
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH16
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH0
#define _ACMP_INPUTSEL_VLPSEL_VBDIV
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH3
#define _ACMP_INPUTSEL_VASEL_APORT2YCH4
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH6
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH31
__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_INPUTSEL_VBSEL_2V5
__IOM uint32_t IEN
#define _ACMP_INPUTSEL_CSRESSEL_RES3
void ACMP_Enable(ACMP_TypeDef *acmp)
Enables the ACMP.
Definition: em_acmp.c:225
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH18
#define _ACMP_INPUTSEL_VASEL_APORT1YCH5
#define _ACMP_INPUTSEL_VASEL_VDD
#define _ACMP_HYSTERESIS0_HYST_HYST6
ACMP_VBInput_TypeDef input
Definition: em_acmp.h:818
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH7
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH15
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH22
#define _ACMP_CTRL_ACCURACY_HIGH
ACMP_VAInput_TypeDef
Definition: em_acmp.h:209
#define _ACMP_INPUTSEL_VASEL_APORT1XCH14
#define _ACMP_CTRL_INPUTRANGE_FULL
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH27
#define _ACMP_INPUTSEL_CSRESSEL_RES5
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH21
#define _ACMP_HYSTERESIS0_HYST_HYST13
#define _ACMP_INPUTSEL_VASEL_APORT1YCH1
#define _ACMP_INPUTSEL_VASEL_APORT2YCH16
#define _ACMP_INPUTSEL_VASEL_APORT2YCH18
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH13
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH27
#define _ACMP_INPUTSEL_VLPSEL_VADIV
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH13
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH4
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH7
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH5
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH12
#define _ACMP_INPUTSEL_CSRESSEL_RES2
#define _ACMP_INPUTSEL_VASEL_APORT1YCH25
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH30
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH9
#define _ACMP_INPUTSEL_CSRESSEL_RES7
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH25
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH24
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH14
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH5
ACMP_VAInput_TypeDef input
Definition: em_acmp.h:784
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH19
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH14
#define _ACMP_INPUTSEL_VASEL_APORT1XCH18
#define _ACMP_INPUTSEL_VASEL_APORT2YCH8
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH3
#define _ACMP_INPUTSEL_VASEL_APORT1YCH3
#define _ACMP_HYSTERESIS0_HYST_HYST0
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH26
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH6
#define _ACMP_INPUTSEL_POSSEL_VADIV
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH22
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH31
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH1
#define _ACMP_INPUTSEL_VASEL_APORT1YCH19
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH16
#define _ACMP_INPUTSEL_VASEL_APORT2YCH28
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH8
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
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH22
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH18
#define _ACMP_HYSTERESIS0_HYST_HYST12
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_POSSEL_APORT1XCH18
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH16
#define _ACMP_INPUTSEL_VASEL_APORT2YCH26
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH13
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH24
ACMP_HysteresisLevel_TypeDef hysteresisLevel_0
Definition: em_acmp.h:700
void ACMP_Reset(ACMP_TypeDef *acmp)
Reset ACMP to same state as after a HW reset.
Definition: em_acmp.c:270
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH12
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH3
#define _ACMP_CTRL_PWRSEL_IOVDD0
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH20
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH27
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH8
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH2
#define _ACMP_INPUTSEL_VASEL_APORT1XCH8
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH29
ACMP_HysteresisLevel_TypeDef hysteresisLevel_1
Definition: em_acmp.h:703
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH8
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH17
#define _ACMP_INPUTSEL_VASEL_APORT2YCH20
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH11
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH0
#define _ACMP_CTRL_PWRSEL_VREGVDD
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH8
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH16
__STATIC_INLINE void ACMP_IntEnable(ACMP_TypeDef *acmp, uint32_t flags)
Enable one or more ACMP interrupts.
Definition: em_acmp.h:922
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH2
#define _ACMP_INPUTSEL_POSSEL_VBDIV
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH5
#define _ACMP_INPUTSEL_VASEL_APORT2YCH14
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH9
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH21
__STATIC_INLINE void ACMP_IntDisable(ACMP_TypeDef *acmp, uint32_t flags)
Disable one or more ACMP interrupts.
Definition: em_acmp.h:899
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH1
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH9
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH23
#define _ACMP_INPUTSEL_VBSEL_1V25
ACMP_Accuracy_TypeDef accuracy
Definition: em_acmp.h:681
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH7
__IOM uint32_t IFS
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH1
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH10
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH11
#define _ACMP_INPUTSEL_CSRESSEL_RES0
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH25
#define _ACMP_INPUTSEL_VASEL_APORT1XCH24
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH1
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH14
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH14
#define _ACMP_HYSTERESIS0_HYST_HYST1
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH3
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH20
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH13
#define _ACMP_HYSTERESIS0_HYST_HYST7
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH23
#define _ACMP_INPUTSEL_VASEL_APORT2YCH0
#define _ACMP_INPUTSEL_VASEL_APORT1YCH17
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH9
#define _ACMP_CTRL_PWRSEL_IOVDD1
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH9
ACMP_Accuracy_TypeDef
Definition: em_acmp.h:199
#define _ACMP_INPUTSEL_VASEL_APORT1YCH15
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH19
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH25
#define _ACMP_INPUTSEL_VASEL_APORT1YCH29
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH12
#define _ACMP_INPUTSEL_POSSEL_APORT1YCH13
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH20
#define _ACMP_INPUTSEL_VASEL_APORT1XCH28
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH28
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH17
#define _ACMP_HYSTERESIS0_HYST_HYST5
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH0
#define _ACMP_INPUTSEL_VASEL_APORT1XCH22
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH4
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH10
#define _ACMP_INPUTSEL_VASEL_APORT2YCH12
bool interruptOnFallingEdge
Definition: em_acmp.h:666
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH30
#define _ACMP_INPUTSEL_VASEL_APORT2YCH22
ACMP_HysteresisLevel_TypeDef hysteresisLevel_0
Definition: em_acmp.h:564
#define _ACMP_INPUTSEL_VASEL_APORT2YCH2
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH29
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH10
ACMP_PowerSource_TypeDef
Definition: em_acmp.h:186
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH5
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH28
#define _ACMP_HYSTERESIS0_HYST_HYST11
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH12
__IM uint32_t IF
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH4
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH27
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH26
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH12
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH7
#define _ACMP_INPUTSEL_VASEL_APORT1XCH6
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH7
ACMP_InputRange_TypeDef
Definition: em_acmp.h:174
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH2
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH1
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH30
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH3
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH15
#define _ACMP_INPUTSEL_VASEL_APORT1YCH23
#define _ACMP_INPUTSEL_VASEL_APORT1XCH26
#define _ACMP_HYSTERESIS0_HYST_HYST15
void ACMP_Init(ACMP_TypeDef *acmp, const ACMP_Init_TypeDef *init)
Initialize ACMP.
Definition: em_acmp.c:374
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH8
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH1
#define _ACMP_INPUTSEL_POSSEL_APORT0XCH14
#define _ACMP_INPUTSEL_VASEL_APORT1YCH9
#define _ACMP_INPUTSEL_POSSEL_APORT1XCH22
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH28
#define _ACMP_HYSTERESIS0_HYST_HYST3
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH13
#define _ACMP_INPUTSEL_POSSEL_APORT2YCH10
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH4
#define _ACMP_INPUTSEL_POSSEL_VDD
#define _ACMP_HYSTERESIS0_HYST_HYST4
ACMP_HysteresisLevel_TypeDef
Definition: em_acmp.h:114
ACMP_VLPInput_Typedef
Definition: em_acmp.h:279
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH7
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_INPUTSEL_VASEL_APORT1YCH13
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH3
#define _ACMP_INPUTSEL_VASEL_APORT1XCH16
#define _ACMP_INPUTSEL_POSSEL_APORT3YCH29
#define _ACMP_HYSTERESIS0_HYST_HYST14
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH4
#define _ACMP_INPUTSEL_POSSEL_APORT4XCH23
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH18
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH2
#define _ACMP_INPUTSEL_POSSEL_APORT2XCH11
#define _ACMP_INPUTSEL_POSSEL_VLP
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH26
#define _ACMP_INPUTSEL_POSSEL_APORT0YCH12
#define _ACMP_INPUTSEL_POSSEL_APORT4YCH20
bool inactiveValue
Definition: em_acmp.h:713
#define _ACMP_INPUTSEL_POSSEL_APORT3XCH24
#define _ACMP_INPUTSEL_VASEL_APORT2YCH10