EFM32 Gecko Software Documentation  efm32g-doc-5.1.2
efm32g_dac.h
Go to the documentation of this file.
1 /**************************************************************************/
32 /**************************************************************************/
36 /**************************************************************************/
41 typedef struct
42 {
43  __IOM uint32_t CTRL;
44  __IM uint32_t STATUS;
45  __IOM uint32_t CH0CTRL;
46  __IOM uint32_t CH1CTRL;
47  __IOM uint32_t IEN;
48  __IM uint32_t IF;
49  __IOM uint32_t IFS;
50  __IOM uint32_t IFC;
51  __IOM uint32_t CH0DATA;
52  __IOM uint32_t CH1DATA;
53  __IOM uint32_t COMBDATA;
54  __IOM uint32_t CAL;
55  __IOM uint32_t BIASPROG;
56 } DAC_TypeDef;
58 /**************************************************************************/
63 /* Bit fields for DAC CTRL */
64 #define _DAC_CTRL_RESETVALUE 0x00000010UL
65 #define _DAC_CTRL_MASK 0x003703FFUL
66 #define DAC_CTRL_DIFF (0x1UL << 0)
67 #define _DAC_CTRL_DIFF_SHIFT 0
68 #define _DAC_CTRL_DIFF_MASK 0x1UL
69 #define _DAC_CTRL_DIFF_DEFAULT 0x00000000UL
70 #define DAC_CTRL_DIFF_DEFAULT (_DAC_CTRL_DIFF_DEFAULT << 0)
71 #define DAC_CTRL_SINEMODE (0x1UL << 1)
72 #define _DAC_CTRL_SINEMODE_SHIFT 1
73 #define _DAC_CTRL_SINEMODE_MASK 0x2UL
74 #define _DAC_CTRL_SINEMODE_DEFAULT 0x00000000UL
75 #define DAC_CTRL_SINEMODE_DEFAULT (_DAC_CTRL_SINEMODE_DEFAULT << 1)
76 #define _DAC_CTRL_CONVMODE_SHIFT 2
77 #define _DAC_CTRL_CONVMODE_MASK 0xCUL
78 #define _DAC_CTRL_CONVMODE_DEFAULT 0x00000000UL
79 #define _DAC_CTRL_CONVMODE_CONTINUOUS 0x00000000UL
80 #define _DAC_CTRL_CONVMODE_SAMPLEHOLD 0x00000001UL
81 #define _DAC_CTRL_CONVMODE_SAMPLEOFF 0x00000002UL
82 #define DAC_CTRL_CONVMODE_DEFAULT (_DAC_CTRL_CONVMODE_DEFAULT << 2)
83 #define DAC_CTRL_CONVMODE_CONTINUOUS (_DAC_CTRL_CONVMODE_CONTINUOUS << 2)
84 #define DAC_CTRL_CONVMODE_SAMPLEHOLD (_DAC_CTRL_CONVMODE_SAMPLEHOLD << 2)
85 #define DAC_CTRL_CONVMODE_SAMPLEOFF (_DAC_CTRL_CONVMODE_SAMPLEOFF << 2)
86 #define _DAC_CTRL_OUTMODE_SHIFT 4
87 #define _DAC_CTRL_OUTMODE_MASK 0x30UL
88 #define _DAC_CTRL_OUTMODE_DISABLE 0x00000000UL
89 #define _DAC_CTRL_OUTMODE_DEFAULT 0x00000001UL
90 #define _DAC_CTRL_OUTMODE_PIN 0x00000001UL
91 #define _DAC_CTRL_OUTMODE_ADC 0x00000002UL
92 #define _DAC_CTRL_OUTMODE_PINADC 0x00000003UL
93 #define DAC_CTRL_OUTMODE_DISABLE (_DAC_CTRL_OUTMODE_DISABLE << 4)
94 #define DAC_CTRL_OUTMODE_DEFAULT (_DAC_CTRL_OUTMODE_DEFAULT << 4)
95 #define DAC_CTRL_OUTMODE_PIN (_DAC_CTRL_OUTMODE_PIN << 4)
96 #define DAC_CTRL_OUTMODE_ADC (_DAC_CTRL_OUTMODE_ADC << 4)
97 #define DAC_CTRL_OUTMODE_PINADC (_DAC_CTRL_OUTMODE_PINADC << 4)
98 #define DAC_CTRL_OUTENPRS (0x1UL << 6)
99 #define _DAC_CTRL_OUTENPRS_SHIFT 6
100 #define _DAC_CTRL_OUTENPRS_MASK 0x40UL
101 #define _DAC_CTRL_OUTENPRS_DEFAULT 0x00000000UL
102 #define DAC_CTRL_OUTENPRS_DEFAULT (_DAC_CTRL_OUTENPRS_DEFAULT << 6)
103 #define DAC_CTRL_CH0PRESCRST (0x1UL << 7)
104 #define _DAC_CTRL_CH0PRESCRST_SHIFT 7
105 #define _DAC_CTRL_CH0PRESCRST_MASK 0x80UL
106 #define _DAC_CTRL_CH0PRESCRST_DEFAULT 0x00000000UL
107 #define DAC_CTRL_CH0PRESCRST_DEFAULT (_DAC_CTRL_CH0PRESCRST_DEFAULT << 7)
108 #define _DAC_CTRL_REFSEL_SHIFT 8
109 #define _DAC_CTRL_REFSEL_MASK 0x300UL
110 #define _DAC_CTRL_REFSEL_DEFAULT 0x00000000UL
111 #define _DAC_CTRL_REFSEL_1V25 0x00000000UL
112 #define _DAC_CTRL_REFSEL_2V5 0x00000001UL
113 #define _DAC_CTRL_REFSEL_VDD 0x00000002UL
114 #define DAC_CTRL_REFSEL_DEFAULT (_DAC_CTRL_REFSEL_DEFAULT << 8)
115 #define DAC_CTRL_REFSEL_1V25 (_DAC_CTRL_REFSEL_1V25 << 8)
116 #define DAC_CTRL_REFSEL_2V5 (_DAC_CTRL_REFSEL_2V5 << 8)
117 #define DAC_CTRL_REFSEL_VDD (_DAC_CTRL_REFSEL_VDD << 8)
118 #define _DAC_CTRL_PRESC_SHIFT 16
119 #define _DAC_CTRL_PRESC_MASK 0x70000UL
120 #define _DAC_CTRL_PRESC_DEFAULT 0x00000000UL
121 #define _DAC_CTRL_PRESC_NODIVISION 0x00000000UL
122 #define DAC_CTRL_PRESC_DEFAULT (_DAC_CTRL_PRESC_DEFAULT << 16)
123 #define DAC_CTRL_PRESC_NODIVISION (_DAC_CTRL_PRESC_NODIVISION << 16)
124 #define _DAC_CTRL_REFRSEL_SHIFT 20
125 #define _DAC_CTRL_REFRSEL_MASK 0x300000UL
126 #define _DAC_CTRL_REFRSEL_DEFAULT 0x00000000UL
127 #define _DAC_CTRL_REFRSEL_8CYCLES 0x00000000UL
128 #define _DAC_CTRL_REFRSEL_16CYCLES 0x00000001UL
129 #define _DAC_CTRL_REFRSEL_32CYCLES 0x00000002UL
130 #define _DAC_CTRL_REFRSEL_64CYCLES 0x00000003UL
131 #define DAC_CTRL_REFRSEL_DEFAULT (_DAC_CTRL_REFRSEL_DEFAULT << 20)
132 #define DAC_CTRL_REFRSEL_8CYCLES (_DAC_CTRL_REFRSEL_8CYCLES << 20)
133 #define DAC_CTRL_REFRSEL_16CYCLES (_DAC_CTRL_REFRSEL_16CYCLES << 20)
134 #define DAC_CTRL_REFRSEL_32CYCLES (_DAC_CTRL_REFRSEL_32CYCLES << 20)
135 #define DAC_CTRL_REFRSEL_64CYCLES (_DAC_CTRL_REFRSEL_64CYCLES << 20)
137 /* Bit fields for DAC STATUS */
138 #define _DAC_STATUS_RESETVALUE 0x00000000UL
139 #define _DAC_STATUS_MASK 0x00000003UL
140 #define DAC_STATUS_CH0DV (0x1UL << 0)
141 #define _DAC_STATUS_CH0DV_SHIFT 0
142 #define _DAC_STATUS_CH0DV_MASK 0x1UL
143 #define _DAC_STATUS_CH0DV_DEFAULT 0x00000000UL
144 #define DAC_STATUS_CH0DV_DEFAULT (_DAC_STATUS_CH0DV_DEFAULT << 0)
145 #define DAC_STATUS_CH1DV (0x1UL << 1)
146 #define _DAC_STATUS_CH1DV_SHIFT 1
147 #define _DAC_STATUS_CH1DV_MASK 0x2UL
148 #define _DAC_STATUS_CH1DV_DEFAULT 0x00000000UL
149 #define DAC_STATUS_CH1DV_DEFAULT (_DAC_STATUS_CH1DV_DEFAULT << 1)
151 /* Bit fields for DAC CH0CTRL */
152 #define _DAC_CH0CTRL_RESETVALUE 0x00000000UL
153 #define _DAC_CH0CTRL_MASK 0x00000077UL
154 #define DAC_CH0CTRL_EN (0x1UL << 0)
155 #define _DAC_CH0CTRL_EN_SHIFT 0
156 #define _DAC_CH0CTRL_EN_MASK 0x1UL
157 #define _DAC_CH0CTRL_EN_DEFAULT 0x00000000UL
158 #define DAC_CH0CTRL_EN_DEFAULT (_DAC_CH0CTRL_EN_DEFAULT << 0)
159 #define DAC_CH0CTRL_REFREN (0x1UL << 1)
160 #define _DAC_CH0CTRL_REFREN_SHIFT 1
161 #define _DAC_CH0CTRL_REFREN_MASK 0x2UL
162 #define _DAC_CH0CTRL_REFREN_DEFAULT 0x00000000UL
163 #define DAC_CH0CTRL_REFREN_DEFAULT (_DAC_CH0CTRL_REFREN_DEFAULT << 1)
164 #define DAC_CH0CTRL_PRSEN (0x1UL << 2)
165 #define _DAC_CH0CTRL_PRSEN_SHIFT 2
166 #define _DAC_CH0CTRL_PRSEN_MASK 0x4UL
167 #define _DAC_CH0CTRL_PRSEN_DEFAULT 0x00000000UL
168 #define DAC_CH0CTRL_PRSEN_DEFAULT (_DAC_CH0CTRL_PRSEN_DEFAULT << 2)
169 #define _DAC_CH0CTRL_PRSSEL_SHIFT 4
170 #define _DAC_CH0CTRL_PRSSEL_MASK 0x70UL
171 #define _DAC_CH0CTRL_PRSSEL_DEFAULT 0x00000000UL
172 #define _DAC_CH0CTRL_PRSSEL_PRSCH0 0x00000000UL
173 #define _DAC_CH0CTRL_PRSSEL_PRSCH1 0x00000001UL
174 #define _DAC_CH0CTRL_PRSSEL_PRSCH2 0x00000002UL
175 #define _DAC_CH0CTRL_PRSSEL_PRSCH3 0x00000003UL
176 #define _DAC_CH0CTRL_PRSSEL_PRSCH4 0x00000004UL
177 #define _DAC_CH0CTRL_PRSSEL_PRSCH5 0x00000005UL
178 #define _DAC_CH0CTRL_PRSSEL_PRSCH6 0x00000006UL
179 #define _DAC_CH0CTRL_PRSSEL_PRSCH7 0x00000007UL
180 #define DAC_CH0CTRL_PRSSEL_DEFAULT (_DAC_CH0CTRL_PRSSEL_DEFAULT << 4)
181 #define DAC_CH0CTRL_PRSSEL_PRSCH0 (_DAC_CH0CTRL_PRSSEL_PRSCH0 << 4)
182 #define DAC_CH0CTRL_PRSSEL_PRSCH1 (_DAC_CH0CTRL_PRSSEL_PRSCH1 << 4)
183 #define DAC_CH0CTRL_PRSSEL_PRSCH2 (_DAC_CH0CTRL_PRSSEL_PRSCH2 << 4)
184 #define DAC_CH0CTRL_PRSSEL_PRSCH3 (_DAC_CH0CTRL_PRSSEL_PRSCH3 << 4)
185 #define DAC_CH0CTRL_PRSSEL_PRSCH4 (_DAC_CH0CTRL_PRSSEL_PRSCH4 << 4)
186 #define DAC_CH0CTRL_PRSSEL_PRSCH5 (_DAC_CH0CTRL_PRSSEL_PRSCH5 << 4)
187 #define DAC_CH0CTRL_PRSSEL_PRSCH6 (_DAC_CH0CTRL_PRSSEL_PRSCH6 << 4)
188 #define DAC_CH0CTRL_PRSSEL_PRSCH7 (_DAC_CH0CTRL_PRSSEL_PRSCH7 << 4)
190 /* Bit fields for DAC CH1CTRL */
191 #define _DAC_CH1CTRL_RESETVALUE 0x00000000UL
192 #define _DAC_CH1CTRL_MASK 0x00000077UL
193 #define DAC_CH1CTRL_EN (0x1UL << 0)
194 #define _DAC_CH1CTRL_EN_SHIFT 0
195 #define _DAC_CH1CTRL_EN_MASK 0x1UL
196 #define _DAC_CH1CTRL_EN_DEFAULT 0x00000000UL
197 #define DAC_CH1CTRL_EN_DEFAULT (_DAC_CH1CTRL_EN_DEFAULT << 0)
198 #define DAC_CH1CTRL_REFREN (0x1UL << 1)
199 #define _DAC_CH1CTRL_REFREN_SHIFT 1
200 #define _DAC_CH1CTRL_REFREN_MASK 0x2UL
201 #define _DAC_CH1CTRL_REFREN_DEFAULT 0x00000000UL
202 #define DAC_CH1CTRL_REFREN_DEFAULT (_DAC_CH1CTRL_REFREN_DEFAULT << 1)
203 #define DAC_CH1CTRL_PRSEN (0x1UL << 2)
204 #define _DAC_CH1CTRL_PRSEN_SHIFT 2
205 #define _DAC_CH1CTRL_PRSEN_MASK 0x4UL
206 #define _DAC_CH1CTRL_PRSEN_DEFAULT 0x00000000UL
207 #define DAC_CH1CTRL_PRSEN_DEFAULT (_DAC_CH1CTRL_PRSEN_DEFAULT << 2)
208 #define _DAC_CH1CTRL_PRSSEL_SHIFT 4
209 #define _DAC_CH1CTRL_PRSSEL_MASK 0x70UL
210 #define _DAC_CH1CTRL_PRSSEL_DEFAULT 0x00000000UL
211 #define _DAC_CH1CTRL_PRSSEL_PRSCH0 0x00000000UL
212 #define _DAC_CH1CTRL_PRSSEL_PRSCH1 0x00000001UL
213 #define _DAC_CH1CTRL_PRSSEL_PRSCH2 0x00000002UL
214 #define _DAC_CH1CTRL_PRSSEL_PRSCH3 0x00000003UL
215 #define _DAC_CH1CTRL_PRSSEL_PRSCH4 0x00000004UL
216 #define _DAC_CH1CTRL_PRSSEL_PRSCH5 0x00000005UL
217 #define _DAC_CH1CTRL_PRSSEL_PRSCH6 0x00000006UL
218 #define _DAC_CH1CTRL_PRSSEL_PRSCH7 0x00000007UL
219 #define DAC_CH1CTRL_PRSSEL_DEFAULT (_DAC_CH1CTRL_PRSSEL_DEFAULT << 4)
220 #define DAC_CH1CTRL_PRSSEL_PRSCH0 (_DAC_CH1CTRL_PRSSEL_PRSCH0 << 4)
221 #define DAC_CH1CTRL_PRSSEL_PRSCH1 (_DAC_CH1CTRL_PRSSEL_PRSCH1 << 4)
222 #define DAC_CH1CTRL_PRSSEL_PRSCH2 (_DAC_CH1CTRL_PRSSEL_PRSCH2 << 4)
223 #define DAC_CH1CTRL_PRSSEL_PRSCH3 (_DAC_CH1CTRL_PRSSEL_PRSCH3 << 4)
224 #define DAC_CH1CTRL_PRSSEL_PRSCH4 (_DAC_CH1CTRL_PRSSEL_PRSCH4 << 4)
225 #define DAC_CH1CTRL_PRSSEL_PRSCH5 (_DAC_CH1CTRL_PRSSEL_PRSCH5 << 4)
226 #define DAC_CH1CTRL_PRSSEL_PRSCH6 (_DAC_CH1CTRL_PRSSEL_PRSCH6 << 4)
227 #define DAC_CH1CTRL_PRSSEL_PRSCH7 (_DAC_CH1CTRL_PRSSEL_PRSCH7 << 4)
229 /* Bit fields for DAC IEN */
230 #define _DAC_IEN_RESETVALUE 0x00000000UL
231 #define _DAC_IEN_MASK 0x00000033UL
232 #define DAC_IEN_CH0 (0x1UL << 0)
233 #define _DAC_IEN_CH0_SHIFT 0
234 #define _DAC_IEN_CH0_MASK 0x1UL
235 #define _DAC_IEN_CH0_DEFAULT 0x00000000UL
236 #define DAC_IEN_CH0_DEFAULT (_DAC_IEN_CH0_DEFAULT << 0)
237 #define DAC_IEN_CH1 (0x1UL << 1)
238 #define _DAC_IEN_CH1_SHIFT 1
239 #define _DAC_IEN_CH1_MASK 0x2UL
240 #define _DAC_IEN_CH1_DEFAULT 0x00000000UL
241 #define DAC_IEN_CH1_DEFAULT (_DAC_IEN_CH1_DEFAULT << 1)
242 #define DAC_IEN_CH0UF (0x1UL << 4)
243 #define _DAC_IEN_CH0UF_SHIFT 4
244 #define _DAC_IEN_CH0UF_MASK 0x10UL
245 #define _DAC_IEN_CH0UF_DEFAULT 0x00000000UL
246 #define DAC_IEN_CH0UF_DEFAULT (_DAC_IEN_CH0UF_DEFAULT << 4)
247 #define DAC_IEN_CH1UF (0x1UL << 5)
248 #define _DAC_IEN_CH1UF_SHIFT 5
249 #define _DAC_IEN_CH1UF_MASK 0x20UL
250 #define _DAC_IEN_CH1UF_DEFAULT 0x00000000UL
251 #define DAC_IEN_CH1UF_DEFAULT (_DAC_IEN_CH1UF_DEFAULT << 5)
253 /* Bit fields for DAC IF */
254 #define _DAC_IF_RESETVALUE 0x00000000UL
255 #define _DAC_IF_MASK 0x00000033UL
256 #define DAC_IF_CH0 (0x1UL << 0)
257 #define _DAC_IF_CH0_SHIFT 0
258 #define _DAC_IF_CH0_MASK 0x1UL
259 #define _DAC_IF_CH0_DEFAULT 0x00000000UL
260 #define DAC_IF_CH0_DEFAULT (_DAC_IF_CH0_DEFAULT << 0)
261 #define DAC_IF_CH1 (0x1UL << 1)
262 #define _DAC_IF_CH1_SHIFT 1
263 #define _DAC_IF_CH1_MASK 0x2UL
264 #define _DAC_IF_CH1_DEFAULT 0x00000000UL
265 #define DAC_IF_CH1_DEFAULT (_DAC_IF_CH1_DEFAULT << 1)
266 #define DAC_IF_CH0UF (0x1UL << 4)
267 #define _DAC_IF_CH0UF_SHIFT 4
268 #define _DAC_IF_CH0UF_MASK 0x10UL
269 #define _DAC_IF_CH0UF_DEFAULT 0x00000000UL
270 #define DAC_IF_CH0UF_DEFAULT (_DAC_IF_CH0UF_DEFAULT << 4)
271 #define DAC_IF_CH1UF (0x1UL << 5)
272 #define _DAC_IF_CH1UF_SHIFT 5
273 #define _DAC_IF_CH1UF_MASK 0x20UL
274 #define _DAC_IF_CH1UF_DEFAULT 0x00000000UL
275 #define DAC_IF_CH1UF_DEFAULT (_DAC_IF_CH1UF_DEFAULT << 5)
277 /* Bit fields for DAC IFS */
278 #define _DAC_IFS_RESETVALUE 0x00000000UL
279 #define _DAC_IFS_MASK 0x00000033UL
280 #define DAC_IFS_CH0 (0x1UL << 0)
281 #define _DAC_IFS_CH0_SHIFT 0
282 #define _DAC_IFS_CH0_MASK 0x1UL
283 #define _DAC_IFS_CH0_DEFAULT 0x00000000UL
284 #define DAC_IFS_CH0_DEFAULT (_DAC_IFS_CH0_DEFAULT << 0)
285 #define DAC_IFS_CH1 (0x1UL << 1)
286 #define _DAC_IFS_CH1_SHIFT 1
287 #define _DAC_IFS_CH1_MASK 0x2UL
288 #define _DAC_IFS_CH1_DEFAULT 0x00000000UL
289 #define DAC_IFS_CH1_DEFAULT (_DAC_IFS_CH1_DEFAULT << 1)
290 #define DAC_IFS_CH0UF (0x1UL << 4)
291 #define _DAC_IFS_CH0UF_SHIFT 4
292 #define _DAC_IFS_CH0UF_MASK 0x10UL
293 #define _DAC_IFS_CH0UF_DEFAULT 0x00000000UL
294 #define DAC_IFS_CH0UF_DEFAULT (_DAC_IFS_CH0UF_DEFAULT << 4)
295 #define DAC_IFS_CH1UF (0x1UL << 5)
296 #define _DAC_IFS_CH1UF_SHIFT 5
297 #define _DAC_IFS_CH1UF_MASK 0x20UL
298 #define _DAC_IFS_CH1UF_DEFAULT 0x00000000UL
299 #define DAC_IFS_CH1UF_DEFAULT (_DAC_IFS_CH1UF_DEFAULT << 5)
301 /* Bit fields for DAC IFC */
302 #define _DAC_IFC_RESETVALUE 0x00000000UL
303 #define _DAC_IFC_MASK 0x00000033UL
304 #define DAC_IFC_CH0 (0x1UL << 0)
305 #define _DAC_IFC_CH0_SHIFT 0
306 #define _DAC_IFC_CH0_MASK 0x1UL
307 #define _DAC_IFC_CH0_DEFAULT 0x00000000UL
308 #define DAC_IFC_CH0_DEFAULT (_DAC_IFC_CH0_DEFAULT << 0)
309 #define DAC_IFC_CH1 (0x1UL << 1)
310 #define _DAC_IFC_CH1_SHIFT 1
311 #define _DAC_IFC_CH1_MASK 0x2UL
312 #define _DAC_IFC_CH1_DEFAULT 0x00000000UL
313 #define DAC_IFC_CH1_DEFAULT (_DAC_IFC_CH1_DEFAULT << 1)
314 #define DAC_IFC_CH0UF (0x1UL << 4)
315 #define _DAC_IFC_CH0UF_SHIFT 4
316 #define _DAC_IFC_CH0UF_MASK 0x10UL
317 #define _DAC_IFC_CH0UF_DEFAULT 0x00000000UL
318 #define DAC_IFC_CH0UF_DEFAULT (_DAC_IFC_CH0UF_DEFAULT << 4)
319 #define DAC_IFC_CH1UF (0x1UL << 5)
320 #define _DAC_IFC_CH1UF_SHIFT 5
321 #define _DAC_IFC_CH1UF_MASK 0x20UL
322 #define _DAC_IFC_CH1UF_DEFAULT 0x00000000UL
323 #define DAC_IFC_CH1UF_DEFAULT (_DAC_IFC_CH1UF_DEFAULT << 5)
325 /* Bit fields for DAC CH0DATA */
326 #define _DAC_CH0DATA_RESETVALUE 0x00000000UL
327 #define _DAC_CH0DATA_MASK 0x00000FFFUL
328 #define _DAC_CH0DATA_DATA_SHIFT 0
329 #define _DAC_CH0DATA_DATA_MASK 0xFFFUL
330 #define _DAC_CH0DATA_DATA_DEFAULT 0x00000000UL
331 #define DAC_CH0DATA_DATA_DEFAULT (_DAC_CH0DATA_DATA_DEFAULT << 0)
333 /* Bit fields for DAC CH1DATA */
334 #define _DAC_CH1DATA_RESETVALUE 0x00000000UL
335 #define _DAC_CH1DATA_MASK 0x00000FFFUL
336 #define _DAC_CH1DATA_DATA_SHIFT 0
337 #define _DAC_CH1DATA_DATA_MASK 0xFFFUL
338 #define _DAC_CH1DATA_DATA_DEFAULT 0x00000000UL
339 #define DAC_CH1DATA_DATA_DEFAULT (_DAC_CH1DATA_DATA_DEFAULT << 0)
341 /* Bit fields for DAC COMBDATA */
342 #define _DAC_COMBDATA_RESETVALUE 0x00000000UL
343 #define _DAC_COMBDATA_MASK 0x0FFF0FFFUL
344 #define _DAC_COMBDATA_CH0DATA_SHIFT 0
345 #define _DAC_COMBDATA_CH0DATA_MASK 0xFFFUL
346 #define _DAC_COMBDATA_CH0DATA_DEFAULT 0x00000000UL
347 #define DAC_COMBDATA_CH0DATA_DEFAULT (_DAC_COMBDATA_CH0DATA_DEFAULT << 0)
348 #define _DAC_COMBDATA_CH1DATA_SHIFT 16
349 #define _DAC_COMBDATA_CH1DATA_MASK 0xFFF0000UL
350 #define _DAC_COMBDATA_CH1DATA_DEFAULT 0x00000000UL
351 #define DAC_COMBDATA_CH1DATA_DEFAULT (_DAC_COMBDATA_CH1DATA_DEFAULT << 16)
353 /* Bit fields for DAC CAL */
354 #define _DAC_CAL_RESETVALUE 0x00400000UL
355 #define _DAC_CAL_MASK 0x007F3F3FUL
356 #define _DAC_CAL_CH0OFFSET_SHIFT 0
357 #define _DAC_CAL_CH0OFFSET_MASK 0x3FUL
358 #define _DAC_CAL_CH0OFFSET_DEFAULT 0x00000000UL
359 #define DAC_CAL_CH0OFFSET_DEFAULT (_DAC_CAL_CH0OFFSET_DEFAULT << 0)
360 #define _DAC_CAL_CH1OFFSET_SHIFT 8
361 #define _DAC_CAL_CH1OFFSET_MASK 0x3F00UL
362 #define _DAC_CAL_CH1OFFSET_DEFAULT 0x00000000UL
363 #define DAC_CAL_CH1OFFSET_DEFAULT (_DAC_CAL_CH1OFFSET_DEFAULT << 8)
364 #define _DAC_CAL_GAIN_SHIFT 16
365 #define _DAC_CAL_GAIN_MASK 0x7F0000UL
366 #define _DAC_CAL_GAIN_DEFAULT 0x00000040UL
367 #define DAC_CAL_GAIN_DEFAULT (_DAC_CAL_GAIN_DEFAULT << 16)
369 /* Bit fields for DAC BIASPROG */
370 #define _DAC_BIASPROG_RESETVALUE 0x00000047UL
371 #define _DAC_BIASPROG_MASK 0x0000004FUL
372 #define _DAC_BIASPROG_BIASPROG_SHIFT 0
373 #define _DAC_BIASPROG_BIASPROG_MASK 0xFUL
374 #define _DAC_BIASPROG_BIASPROG_DEFAULT 0x00000007UL
375 #define DAC_BIASPROG_BIASPROG_DEFAULT (_DAC_BIASPROG_BIASPROG_DEFAULT << 0)
376 #define DAC_BIASPROG_HALFBIAS (0x1UL << 6)
377 #define _DAC_BIASPROG_HALFBIAS_SHIFT 6
378 #define _DAC_BIASPROG_HALFBIAS_MASK 0x40UL
379 #define _DAC_BIASPROG_HALFBIAS_DEFAULT 0x00000001UL
380 #define DAC_BIASPROG_HALFBIAS_DEFAULT (_DAC_BIASPROG_HALFBIAS_DEFAULT << 6)
__IOM uint32_t IEN
Definition: efm32g_dac.h:47
__IOM uint32_t CH0DATA
Definition: efm32g_dac.h:51
__IOM uint32_t CH1CTRL
Definition: efm32g_dac.h:46
__IOM uint32_t COMBDATA
Definition: efm32g_dac.h:53
__IOM uint32_t IFC
Definition: efm32g_dac.h:50
__IOM uint32_t CAL
Definition: efm32g_dac.h:54
__IM uint32_t IF
Definition: efm32g_dac.h:48
__IOM uint32_t CH1DATA
Definition: efm32g_dac.h:52
__IOM uint32_t CTRL
Definition: efm32g_dac.h:43
__IOM uint32_t IFS
Definition: efm32g_dac.h:49
__IM uint32_t STATUS
Definition: efm32g_dac.h:44
__IOM uint32_t CH0CTRL
Definition: efm32g_dac.h:45
__IOM uint32_t BIASPROG
Definition: efm32g_dac.h:55