EFM32 Pearl Gecko Software Documentation  efm32pg1-doc-4.2.1
em_opamp.h
Go to the documentation of this file.
1 /**************************************************************************/
33 #ifndef __SILICON_LABS_EM_OPAMP_H__
34 #define __SILICON_LABS_EM_OPAMP_H__
35 
36 #include "em_device.h"
37 #if defined(OPAMP_PRESENT) && (OPAMP_COUNT == 1)
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 #include <stdint.h>
44 #include <stdbool.h>
45 #include "em_dac.h"
46 
47 /***************************************************************************/
52 /***************************************************************************/
60 #define DAC_OPA_VALID(opa) ((opa) <= OPA2)
61 
64 /*******************************************************************************
65  ******************************** ENUMS ************************************
66  ******************************************************************************/
67 
69 typedef enum
70 {
71  OPA0 = 0,
72  OPA1 = 1,
73  OPA2 = 2
74 } OPAMP_TypeDef;
75 
77 typedef enum
78 {
79  opaNegSelDisable = DAC_OPA0MUX_NEGSEL_DISABLE,
80  opaNegSelUnityGain = DAC_OPA0MUX_NEGSEL_UG,
81  opaNegSelResTap = DAC_OPA0MUX_NEGSEL_OPATAP,
82  opaNegSelNegPad = DAC_OPA0MUX_NEGSEL_NEGPAD
83 } OPAMP_NegSel_TypeDef;
84 
86 typedef enum
87 {
88  opaPosSelDisable = DAC_OPA0MUX_POSSEL_DISABLE,
89  opaPosSelDac = DAC_OPA0MUX_POSSEL_DAC,
90  opaPosSelPosPad = DAC_OPA0MUX_POSSEL_POSPAD,
91  opaPosSelOpaIn = DAC_OPA0MUX_POSSEL_OPA0INP,
92  opaPosSelResTapOpa0 = DAC_OPA0MUX_POSSEL_OPATAP
93 } OPAMP_PosSel_TypeDef;
94 
96 typedef enum
97 {
98  opaOutModeDisable = DAC_OPA0MUX_OUTMODE_DISABLE,
99  opaOutModeMain = DAC_OPA0MUX_OUTMODE_MAIN,
100  opaOutModeAlt = DAC_OPA0MUX_OUTMODE_ALT,
101  opaOutModeAll = DAC_OPA0MUX_OUTMODE_ALL
102 } OPAMP_OutMode_TypeDef;
103 
105 typedef enum
106 {
107  opaResSelDefault = DAC_OPA0MUX_RESSEL_DEFAULT,
108  opaResSelR2eq0_33R1 = DAC_OPA0MUX_RESSEL_RES0,
109  opaResSelR2eqR1 = DAC_OPA0MUX_RESSEL_RES1,
110  opaResSelR1eq1_67R1 = DAC_OPA0MUX_RESSEL_RES2,
111  opaResSelR2eq2R1 = DAC_OPA0MUX_RESSEL_RES3,
112  opaResSelR2eq3R1 = DAC_OPA0MUX_RESSEL_RES4,
113  opaResSelR2eq4_33R1 = DAC_OPA0MUX_RESSEL_RES5,
114  opaResSelR2eq7R1 = DAC_OPA0MUX_RESSEL_RES6,
115  opaResSelR2eq15R1 = DAC_OPA0MUX_RESSEL_RES7
116 } OPAMP_ResSel_TypeDef;
117 
119 typedef enum
120 {
121  opaResInMuxDisable = DAC_OPA0MUX_RESINMUX_DISABLE,
122  opaResInMuxOpaIn = DAC_OPA0MUX_RESINMUX_OPA0INP,
123  opaResInMuxNegPad = DAC_OPA0MUX_RESINMUX_NEGPAD,
124  opaResInMuxPosPad = DAC_OPA0MUX_RESINMUX_POSPAD,
125  opaResInMuxVss = DAC_OPA0MUX_RESINMUX_VSS
126 } OPAMP_ResInMux_TypeDef;
127 
128 /*******************************************************************************
129  ******************************* STRUCTS ***********************************
130  ******************************************************************************/
131 
133 typedef struct
134 {
135  OPAMP_NegSel_TypeDef negSel;
136  OPAMP_PosSel_TypeDef posSel;
137  OPAMP_OutMode_TypeDef outMode;
138  OPAMP_ResSel_TypeDef resSel;
139  OPAMP_ResInMux_TypeDef resInMux;
140  uint32_t outPen;
167  uint32_t bias;
168  bool halfBias;
169  bool lpfPosPadDisable;
170  bool lpfNegPadDisable;
171  bool nextOut;
172  bool npEn;
173  bool ppEn;
174  bool shortInputs;
175  bool hcmDisable;
176  bool defaultOffset;
177  uint32_t offset;
178 } OPAMP_Init_TypeDef;
179 
181 #define OPA_INIT_UNITY_GAIN \
182 { \
183  opaNegSelUnityGain, /* Unity gain. */ \
184  opaPosSelPosPad, /* Pos input from pad. */ \
185  opaOutModeMain, /* Main output enabled. */ \
186  opaResSelDefault, /* Resistor ladder is not used. */ \
187  opaResInMuxDisable, /* Resistor ladder disabled. */ \
188  0, /* No alternate outputs enabled. */ \
189  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
190  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
191  false, /* No low pass filter on pos pad. */ \
192  false, /* No low pass filter on neg pad. */ \
193  false, /* No nextout output enabled. */ \
194  false, /* Neg pad disabled. */ \
195  true, /* Pos pad enabled, used as signal input. */ \
196  false, /* No shorting of inputs. */ \
197  false, /* Rail-to-rail input enabled. */ \
198  true, /* Use factory calibrated opamp offset. */ \
199  0 /* Opamp offset value (not used). */ \
200 }
201 
203 #define OPA_INIT_UNITY_GAIN_OPA2 \
204 { \
205  opaNegSelUnityGain, /* Unity gain. */ \
206  opaPosSelPosPad, /* Pos input from pad. */ \
207  opaOutModeMain, /* Main output enabled. */ \
208  opaResSelDefault, /* Resistor ladder is not used. */ \
209  opaResInMuxDisable, /* Resistor ladder disabled. */ \
210  DAC_OPA0MUX_OUTPEN_OUT0, /* Alternate output 0 enabled. */ \
211  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
212  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
213  false, /* No low pass filter on pos pad. */ \
214  false, /* No low pass filter on neg pad. */ \
215  false, /* No nextout output enabled. */ \
216  false, /* Neg pad disabled. */ \
217  true, /* Pos pad enabled, used as signal input. */ \
218  false, /* No shorting of inputs. */ \
219  false, /* Rail-to-rail input enabled. */ \
220  true, /* Use factory calibrated opamp offset. */ \
221  0 /* Opamp offset value (not used). */ \
222 }
223 
225 #define OPA_INIT_NON_INVERTING \
226 { \
227  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
228  opaPosSelPosPad, /* Pos input from pad. */ \
229  opaOutModeMain, /* Main output enabled. */ \
230  opaResSelR2eq0_33R1, /* R2 = 1/3 R1 */ \
231  opaResInMuxNegPad, /* Resistor ladder input from neg pad. */ \
232  0, /* No alternate outputs enabled. */ \
233  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
234  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
235  false, /* No low pass filter on pos pad. */ \
236  false, /* No low pass filter on neg pad. */ \
237  false, /* No nextout output enabled. */ \
238  true, /* Neg pad enabled, used as signal ground. */ \
239  true, /* Pos pad enabled, used as signal input. */ \
240  false, /* No shorting of inputs. */ \
241  false, /* Rail-to-rail input enabled. */ \
242  true, /* Use factory calibrated opamp offset. */ \
243  0 /* Opamp offset value (not used). */ \
244 }
245 
247 #define OPA_INIT_NON_INVERTING_OPA2 \
248 { \
249  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
250  opaPosSelPosPad, /* Pos input from pad. */ \
251  opaOutModeMain, /* Main output enabled. */ \
252  opaResSelR2eq0_33R1, /* R2 = 1/3 R1 */ \
253  opaResInMuxNegPad, /* Resistor ladder input from neg pad. */ \
254  DAC_OPA0MUX_OUTPEN_OUT0, /* Alternate output 0 enabled. */ \
255  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
256  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
257  false, /* No low pass filter on pos pad. */ \
258  false, /* No low pass filter on neg pad. */ \
259  false, /* No nextout output enabled. */ \
260  true, /* Neg pad enabled, used as signal ground. */ \
261  true, /* Pos pad enabled, used as signal input. */ \
262  false, /* No shorting of inputs. */ \
263  false, /* Rail-to-rail input enabled. */ \
264  true, /* Use factory calibrated opamp offset. */ \
265  0 /* Opamp offset value (not used). */ \
266 }
267 
269 #define OPA_INIT_INVERTING \
270 { \
271  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
272  opaPosSelPosPad, /* Pos input from pad. */ \
273  opaOutModeMain, /* Main output enabled. */ \
274  opaResSelR2eqR1, /* R2 = R1 */ \
275  opaResInMuxNegPad, /* Resistor ladder input from neg pad. */ \
276  0, /* No alternate outputs enabled. */ \
277  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
278  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
279  false, /* No low pass filter on pos pad. */ \
280  false, /* No low pass filter on neg pad. */ \
281  false, /* No nextout output enabled. */ \
282  true, /* Neg pad enabled, used as signal input. */ \
283  true, /* Pos pad enabled, used as signal ground. */ \
284  false, /* No shorting of inputs. */ \
285  false, /* Rail-to-rail input enabled. */ \
286  true, /* Use factory calibrated opamp offset. */ \
287  0 /* Opamp offset value (not used). */ \
288 }
289 
291 #define OPA_INIT_INVERTING_OPA2 \
292 { \
293  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
294  opaPosSelPosPad, /* Pos input from pad. */ \
295  opaOutModeMain, /* Main output enabled. */ \
296  opaResSelR2eqR1, /* R2 = R1 */ \
297  opaResInMuxNegPad, /* Resistor ladder input from neg pad. */ \
298  DAC_OPA0MUX_OUTPEN_OUT0, /* Alternate output 0 enabled. */ \
299  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
300  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
301  false, /* No low pass filter on pos pad. */ \
302  false, /* No low pass filter on neg pad. */ \
303  false, /* No nextout output enabled. */ \
304  true, /* Neg pad enabled, used as signal input. */ \
305  true, /* Pos pad enabled, used as signal ground. */ \
306  false, /* No shorting of inputs. */ \
307  false, /* Rail-to-rail input enabled. */ \
308  true, /* Use factory calibrated opamp offset. */ \
309  0 /* Opamp offset value (not used). */ \
310 }
311 
313 #define OPA_INIT_CASCADED_NON_INVERTING_OPA0 \
314 { \
315  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
316  opaPosSelPosPad, /* Pos input from pad. */ \
317  opaOutModeAll, /* Both main and alternate outputs. */ \
318  opaResSelR2eq0_33R1, /* R2 = 1/3 R1 */ \
319  opaResInMuxNegPad, /* Resistor ladder input from neg pad. */ \
320  0, /* No alternate outputs enabled. */ \
321  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
322  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
323  false, /* No low pass filter on pos pad. */ \
324  false, /* No low pass filter on neg pad. */ \
325  true, /* Pass output to next stage (OPA1). */ \
326  true, /* Neg pad enabled, used as signal ground. */ \
327  true, /* Pos pad enabled, used as signal input. */ \
328  false, /* No shorting of inputs. */ \
329  false, /* Rail-to-rail input enabled. */ \
330  true, /* Use factory calibrated opamp offset. */ \
331  0 /* Opamp offset value (not used). */ \
332 }
333 
335 #define OPA_INIT_CASCADED_NON_INVERTING_OPA1 \
336 { \
337  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
338  opaPosSelOpaIn, /* Pos input from OPA0 output. */ \
339  opaOutModeAll, /* Both main and alternate outputs. */ \
340  opaResSelR2eq0_33R1, /* R2 = 1/3 R1 */ \
341  opaResInMuxNegPad, /* Resistor ladder input from neg pad. */ \
342  0, /* No alternate outputs enabled. */ \
343  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
344  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
345  false, /* No low pass filter on pos pad. */ \
346  false, /* No low pass filter on neg pad. */ \
347  true, /* Pass output to next stage (OPA2). */ \
348  true, /* Neg pad enabled, used as signal ground. */ \
349  false, /* Pos pad disabled. */ \
350  false, /* No shorting of inputs. */ \
351  false, /* Rail-to-rail input enabled. */ \
352  true, /* Use factory calibrated opamp offset. */ \
353  0 /* Opamp offset value (not used). */ \
354 }
355 
357 #define OPA_INIT_CASCADED_NON_INVERTING_OPA2 \
358 { \
359  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
360  opaPosSelOpaIn, /* Pos input from OPA1 output. */ \
361  opaOutModeMain, /* Main output enabled. */ \
362  opaResSelR2eq0_33R1, /* R2 = 1/3 R1 */ \
363  opaResInMuxNegPad, /* Resistor ladder input from neg pad. */ \
364  DAC_OPA0MUX_OUTPEN_OUT0, /* Alternate output 0 enabled. */ \
365  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
366  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
367  false, /* No low pass filter on pos pad. */ \
368  false, /* No low pass filter on neg pad. */ \
369  false, /* No nextout output enabled. */ \
370  true, /* Neg pad enabled, used as signal ground. */ \
371  false, /* Pos pad disabled. */ \
372  false, /* No shorting of inputs. */ \
373  false, /* Rail-to-rail input enabled. */ \
374  true, /* Use factory calibrated opamp offset. */ \
375  0 /* Opamp offset value (not used). */ \
376 }
377 
379 #define OPA_INIT_CASCADED_INVERTING_OPA0 \
380 { \
381  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
382  opaPosSelPosPad, /* Pos input from pad. */ \
383  opaOutModeAll, /* Both main and alternate outputs. */ \
384  opaResSelR2eqR1, /* R2 = R1 */ \
385  opaResInMuxNegPad, /* Resistor ladder input from neg pad. */ \
386  0, /* No alternate outputs enabled. */ \
387  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
388  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
389  false, /* No low pass filter on pos pad. */ \
390  false, /* No low pass filter on neg pad. */ \
391  true, /* Pass output to next stage (OPA1). */ \
392  true, /* Neg pad enabled, used as signal input. */ \
393  true, /* Pos pad enabled, used as signal ground. */ \
394  false, /* No shorting of inputs. */ \
395  false, /* Rail-to-rail input enabled. */ \
396  true, /* Use factory calibrated opamp offset. */ \
397  0 /* Opamp offset value (not used). */ \
398 }
399 
401 #define OPA_INIT_CASCADED_INVERTING_OPA1 \
402 { \
403  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
404  opaPosSelPosPad, /* Pos input from pad. */ \
405  opaOutModeAll, /* Both main and alternate outputs. */ \
406  opaResSelR2eqR1, /* R2 = R1 */ \
407  opaResInMuxOpaIn, /* Resistor ladder input from OPA0. */ \
408  0, /* No alternate outputs enabled. */ \
409  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
410  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
411  false, /* No low pass filter on pos pad. */ \
412  false, /* No low pass filter on neg pad. */ \
413  true, /* Pass output to next stage (OPA2). */ \
414  false, /* Neg pad disabled. */ \
415  true, /* Pos pad enabled, used as signal ground. */ \
416  false, /* No shorting of inputs. */ \
417  false, /* Rail-to-rail input enabled. */ \
418  true, /* Use factory calibrated opamp offset. */ \
419  0 /* Opamp offset value (not used). */ \
420 }
421 
423 #define OPA_INIT_CASCADED_INVERTING_OPA2 \
424 { \
425  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
426  opaPosSelPosPad, /* Pos input from pad. */ \
427  opaOutModeMain, /* Main output enabled. */ \
428  opaResSelR2eqR1, /* R2 = R1 */ \
429  opaResInMuxOpaIn, /* Resistor ladder input from OPA1. */ \
430  DAC_OPA0MUX_OUTPEN_OUT0, /* Alternate output 0 enabled. */ \
431  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
432  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
433  false, /* No low pass filter on pos pad. */ \
434  false, /* No low pass filter on neg pad. */ \
435  false, /* No nextout output enabled. */ \
436  false, /* Neg pad disabled. */ \
437  true, /* Pos pad enabled, used as signal ground. */ \
438  false, /* No shorting of inputs. */ \
439  false, /* Rail-to-rail input enabled. */ \
440  true, /* Use factory calibrated opamp offset. */ \
441  0 /* Opamp offset value (not used). */ \
442 }
443 
445 #define OPA_INIT_DIFF_DRIVER_OPA0 \
446 { \
447  opaNegSelUnityGain, /* Unity gain. */ \
448  opaPosSelPosPad, /* Pos input from pad. */ \
449  opaOutModeAll, /* Both main and alternate outputs. */ \
450  opaResSelDefault, /* Resistor ladder is not used. */ \
451  opaResInMuxDisable, /* Resistor ladder disabled. */ \
452  0, /* No alternate outputs enabled. */ \
453  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
454  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
455  false, /* No low pass filter on pos pad. */ \
456  false, /* No low pass filter on neg pad. */ \
457  true, /* Pass output to next stage (OPA1). */ \
458  false, /* Neg pad disabled. */ \
459  true, /* Pos pad enabled, used as signal input. */ \
460  false, /* No shorting of inputs. */ \
461  false, /* Rail-to-rail input enabled. */ \
462  true, /* Use factory calibrated opamp offset. */ \
463  0 /* Opamp offset value (not used). */ \
464 }
465 
467 #define OPA_INIT_DIFF_DRIVER_OPA1 \
468 { \
469  opaNegSelResTap, /* Neg input from resistor ladder tap. */ \
470  opaPosSelPosPad, /* Pos input from pad. */ \
471  opaOutModeMain, /* Main output enabled. */ \
472  opaResSelR2eqR1, /* R2 = R1 */ \
473  opaResInMuxOpaIn, /* Resistor ladder input from OPA0. */ \
474  0, /* No alternate outputs enabled. */ \
475  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
476  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
477  false, /* No low pass filter on pos pad. */ \
478  false, /* No low pass filter on neg pad. */ \
479  false, /* No nextout output enabled. */ \
480  false, /* Neg pad disabled. */ \
481  true, /* Pos pad enabled, used as signal ground. */ \
482  false, /* No shorting of inputs. */ \
483  false, /* Rail-to-rail input enabled. */ \
484  true, /* Use factory calibrated opamp offset. */ \
485  0 /* Opamp offset value (not used). */ \
486 }
487 
489 #define OPA_INIT_DIFF_RECEIVER_OPA0 \
490 { \
491  opaNegSelUnityGain, /* Unity gain. */ \
492  opaPosSelPosPad, /* Pos input from pad. */ \
493  opaOutModeAll, /* Both main and alternate outputs. */ \
494  opaResSelR2eqR1, /* R2 = R1 */ \
495  opaResInMuxNegPad, /* Resistor ladder input from neg pad. */ \
496  0, /* No alternate outputs enabled. */ \
497  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
498  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
499  false, /* No low pass filter on pos pad. */ \
500  false, /* No low pass filter on neg pad. */ \
501  true, /* Pass output to next stage (OPA2). */ \
502  true, /* Neg pad enabled, used as signal ground. */ \
503  true, /* Pos pad enabled, used as signal input. */ \
504  false, /* No shorting of inputs. */ \
505  false, /* Rail-to-rail input enabled. */ \
506  true, /* Use factory calibrated opamp offset. */ \
507  0 /* Opamp offset value (not used). */ \
508 }
509 
511 #define OPA_INIT_DIFF_RECEIVER_OPA1 \
512 { \
513  opaNegSelUnityGain, /* Unity gain. */ \
514  opaPosSelPosPad, /* Pos input from pad. */ \
515  opaOutModeAll, /* Both main and alternate outputs. */ \
516  opaResSelDefault, /* Resistor ladder is not used. */ \
517  opaResInMuxDisable, /* Disable resistor ladder. */ \
518  0, /* No alternate outputs enabled. */ \
519  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
520  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
521  false, /* No low pass filter on pos pad. */ \
522  false, /* No low pass filter on neg pad. */ \
523  true, /* Pass output to next stage (OPA2). */ \
524  false, /* Neg pad disabled. */ \
525  true, /* Pos pad enabled, used as signal input. */ \
526  false, /* No shorting of inputs. */ \
527  false, /* Rail-to-rail input enabled. */ \
528  true, /* Use factory calibrated opamp offset. */ \
529  0 /* Opamp offset value (not used). */ \
530 }
531 
533 #define OPA_INIT_DIFF_RECEIVER_OPA2 \
534 { \
535  opaNegSelResTap, /* Input from resistor ladder tap. */ \
536  opaPosSelResTapOpa0, /* Input from OPA0 resistor ladder tap. */ \
537  opaOutModeMain, /* Main output enabled. */ \
538  opaResSelR2eqR1, /* R2 = R1 */ \
539  opaResInMuxOpaIn, /* Resistor ladder input from OPA1. */ \
540  DAC_OPA0MUX_OUTPEN_OUT0, /* Enable alternate output 0. */ \
541  _DAC_BIASPROG_BIASPROG_DEFAULT, /* Default bias setting. */ \
542  _DAC_BIASPROG_HALFBIAS_DEFAULT, /* Default half-bias setting. */ \
543  false, /* No low pass filter on pos pad. */ \
544  false, /* No low pass filter on neg pad. */ \
545  false, /* No nextout output enabled. */ \
546  false, /* Neg pad disabled. */ \
547  false, /* Pos pad disabled. */ \
548  false, /* No shorting of inputs. */ \
549  false, /* Rail-to-rail input enabled. */ \
550  true, /* Use factory calibrated opamp offset. */ \
551  0 /* Opamp offset value (not used). */ \
552 }
553 
554 /*******************************************************************************
555  ***************************** PROTOTYPES **********************************
556  ******************************************************************************/
557 
558 void OPAMP_Disable(DAC_TypeDef *dac, OPAMP_TypeDef opa);
559 void OPAMP_Enable(DAC_TypeDef *dac, OPAMP_TypeDef opa, const OPAMP_Init_TypeDef *init);
560 
564 #ifdef __cplusplus
565 }
566 #endif
567 
568 #endif /* defined( OPAMP_PRESENT ) && ( OPAMP_COUNT == 1 ) */
569 #endif /* __SILICON_LABS_EM_OPAMP_H__ */
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
Digital to Analog Converter (DAC) peripheral API.