1#[doc = "Register `CTRL` reader"]
2pub struct R(crate::R<CTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CTRL` writer"]
17pub struct W(crate::W<CTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CTRL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<CTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `ADCEN` reader - ADC Enable."]
38pub type ADCEN_R = crate::BitReader<ADCEN_A>;
39#[doc = "ADC Enable.\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum ADCEN_A {
42 #[doc = "0: ADC is disabled."]
43 ADCEN_0 = 0,
44 #[doc = "1: ADC is enabled."]
45 ADCEN_1 = 1,
46}
47impl From<ADCEN_A> for bool {
48 #[inline(always)]
49 fn from(variant: ADCEN_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl ADCEN_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> ADCEN_A {
57 match self.bits {
58 false => ADCEN_A::ADCEN_0,
59 true => ADCEN_A::ADCEN_1,
60 }
61 }
62 #[doc = "Checks if the value of the field is `ADCEN_0`"]
63 #[inline(always)]
64 pub fn is_adcen_0(&self) -> bool {
65 *self == ADCEN_A::ADCEN_0
66 }
67 #[doc = "Checks if the value of the field is `ADCEN_1`"]
68 #[inline(always)]
69 pub fn is_adcen_1(&self) -> bool {
70 *self == ADCEN_A::ADCEN_1
71 }
72}
73#[doc = "Field `ADCEN` writer - ADC Enable."]
74pub type ADCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, ADCEN_A, O>;
75impl<'a, const O: u8> ADCEN_W<'a, O> {
76 #[doc = "ADC is disabled."]
77 #[inline(always)]
78 pub fn adcen_0(self) -> &'a mut W {
79 self.variant(ADCEN_A::ADCEN_0)
80 }
81 #[doc = "ADC is enabled."]
82 #[inline(always)]
83 pub fn adcen_1(self) -> &'a mut W {
84 self.variant(ADCEN_A::ADCEN_1)
85 }
86}
87#[doc = "Field `RST` reader - Software Reset."]
88pub type RST_R = crate::BitReader<RST_A>;
89#[doc = "Software Reset.\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum RST_A {
92 #[doc = "0: ADC logic is not reset."]
93 RST_0 = 0,
94 #[doc = "1: ADC logic is reset."]
95 RST_1 = 1,
96}
97impl From<RST_A> for bool {
98 #[inline(always)]
99 fn from(variant: RST_A) -> Self {
100 variant as u8 != 0
101 }
102}
103impl RST_R {
104 #[doc = "Get enumerated values variant"]
105 #[inline(always)]
106 pub fn variant(&self) -> RST_A {
107 match self.bits {
108 false => RST_A::RST_0,
109 true => RST_A::RST_1,
110 }
111 }
112 #[doc = "Checks if the value of the field is `RST_0`"]
113 #[inline(always)]
114 pub fn is_rst_0(&self) -> bool {
115 *self == RST_A::RST_0
116 }
117 #[doc = "Checks if the value of the field is `RST_1`"]
118 #[inline(always)]
119 pub fn is_rst_1(&self) -> bool {
120 *self == RST_A::RST_1
121 }
122}
123#[doc = "Field `RST` writer - Software Reset."]
124pub type RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, RST_A, O>;
125impl<'a, const O: u8> RST_W<'a, O> {
126 #[doc = "ADC logic is not reset."]
127 #[inline(always)]
128 pub fn rst_0(self) -> &'a mut W {
129 self.variant(RST_A::RST_0)
130 }
131 #[doc = "ADC logic is reset."]
132 #[inline(always)]
133 pub fn rst_1(self) -> &'a mut W {
134 self.variant(RST_A::RST_1)
135 }
136}
137#[doc = "Field `DOZEN` reader - Doze Enable."]
138pub type DOZEN_R = crate::BitReader<DOZEN_A>;
139#[doc = "Doze Enable.\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq, Eq)]
141pub enum DOZEN_A {
142 #[doc = "0: ADC is enabled in Doze mode."]
143 DOZEN_0 = 0,
144 #[doc = "1: ADC is disabled in Doze mode."]
145 DOZEN_1 = 1,
146}
147impl From<DOZEN_A> for bool {
148 #[inline(always)]
149 fn from(variant: DOZEN_A) -> Self {
150 variant as u8 != 0
151 }
152}
153impl DOZEN_R {
154 #[doc = "Get enumerated values variant"]
155 #[inline(always)]
156 pub fn variant(&self) -> DOZEN_A {
157 match self.bits {
158 false => DOZEN_A::DOZEN_0,
159 true => DOZEN_A::DOZEN_1,
160 }
161 }
162 #[doc = "Checks if the value of the field is `DOZEN_0`"]
163 #[inline(always)]
164 pub fn is_dozen_0(&self) -> bool {
165 *self == DOZEN_A::DOZEN_0
166 }
167 #[doc = "Checks if the value of the field is `DOZEN_1`"]
168 #[inline(always)]
169 pub fn is_dozen_1(&self) -> bool {
170 *self == DOZEN_A::DOZEN_1
171 }
172}
173#[doc = "Field `DOZEN` writer - Doze Enable."]
174pub type DOZEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, DOZEN_A, O>;
175impl<'a, const O: u8> DOZEN_W<'a, O> {
176 #[doc = "ADC is enabled in Doze mode."]
177 #[inline(always)]
178 pub fn dozen_0(self) -> &'a mut W {
179 self.variant(DOZEN_A::DOZEN_0)
180 }
181 #[doc = "ADC is disabled in Doze mode."]
182 #[inline(always)]
183 pub fn dozen_1(self) -> &'a mut W {
184 self.variant(DOZEN_A::DOZEN_1)
185 }
186}
187#[doc = "Field `CAL_REQ` reader - Auto-Calibration Request."]
188pub type CAL_REQ_R = crate::BitReader<CAL_REQ_A>;
189#[doc = "Auto-Calibration Request.\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191pub enum CAL_REQ_A {
192 #[doc = "0: No request for auto-calibration has been made."]
193 CAL_REQ_0 = 0,
194 #[doc = "1: A request for auto-calibration has been made."]
195 CAL_REQ_1 = 1,
196}
197impl From<CAL_REQ_A> for bool {
198 #[inline(always)]
199 fn from(variant: CAL_REQ_A) -> Self {
200 variant as u8 != 0
201 }
202}
203impl CAL_REQ_R {
204 #[doc = "Get enumerated values variant"]
205 #[inline(always)]
206 pub fn variant(&self) -> CAL_REQ_A {
207 match self.bits {
208 false => CAL_REQ_A::CAL_REQ_0,
209 true => CAL_REQ_A::CAL_REQ_1,
210 }
211 }
212 #[doc = "Checks if the value of the field is `CAL_REQ_0`"]
213 #[inline(always)]
214 pub fn is_cal_req_0(&self) -> bool {
215 *self == CAL_REQ_A::CAL_REQ_0
216 }
217 #[doc = "Checks if the value of the field is `CAL_REQ_1`"]
218 #[inline(always)]
219 pub fn is_cal_req_1(&self) -> bool {
220 *self == CAL_REQ_A::CAL_REQ_1
221 }
222}
223#[doc = "Field `CAL_REQ` writer - Auto-Calibration Request."]
224pub type CAL_REQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, CAL_REQ_A, O>;
225impl<'a, const O: u8> CAL_REQ_W<'a, O> {
226 #[doc = "No request for auto-calibration has been made."]
227 #[inline(always)]
228 pub fn cal_req_0(self) -> &'a mut W {
229 self.variant(CAL_REQ_A::CAL_REQ_0)
230 }
231 #[doc = "A request for auto-calibration has been made."]
232 #[inline(always)]
233 pub fn cal_req_1(self) -> &'a mut W {
234 self.variant(CAL_REQ_A::CAL_REQ_1)
235 }
236}
237#[doc = "Field `CALOFS` reader - Configure for offset calibration function."]
238pub type CALOFS_R = crate::BitReader<CALOFS_A>;
239#[doc = "Configure for offset calibration function.\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq, Eq)]
241pub enum CALOFS_A {
242 #[doc = "0: Calibration function disabled."]
243 CALOFS_0 = 0,
244 #[doc = "1: Request for offset calibration function."]
245 CALOFS_1 = 1,
246}
247impl From<CALOFS_A> for bool {
248 #[inline(always)]
249 fn from(variant: CALOFS_A) -> Self {
250 variant as u8 != 0
251 }
252}
253impl CALOFS_R {
254 #[doc = "Get enumerated values variant"]
255 #[inline(always)]
256 pub fn variant(&self) -> CALOFS_A {
257 match self.bits {
258 false => CALOFS_A::CALOFS_0,
259 true => CALOFS_A::CALOFS_1,
260 }
261 }
262 #[doc = "Checks if the value of the field is `CALOFS_0`"]
263 #[inline(always)]
264 pub fn is_calofs_0(&self) -> bool {
265 *self == CALOFS_A::CALOFS_0
266 }
267 #[doc = "Checks if the value of the field is `CALOFS_1`"]
268 #[inline(always)]
269 pub fn is_calofs_1(&self) -> bool {
270 *self == CALOFS_A::CALOFS_1
271 }
272}
273#[doc = "Field `CALOFS` writer - Configure for offset calibration function."]
274pub type CALOFS_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, CALOFS_A, O>;
275impl<'a, const O: u8> CALOFS_W<'a, O> {
276 #[doc = "Calibration function disabled."]
277 #[inline(always)]
278 pub fn calofs_0(self) -> &'a mut W {
279 self.variant(CALOFS_A::CALOFS_0)
280 }
281 #[doc = "Request for offset calibration function."]
282 #[inline(always)]
283 pub fn calofs_1(self) -> &'a mut W {
284 self.variant(CALOFS_A::CALOFS_1)
285 }
286}
287#[doc = "Field `RSTFIFO0` reader - Reset FIFO 0."]
288pub type RSTFIFO0_R = crate::BitReader<RSTFIFO0_A>;
289#[doc = "Reset FIFO 0.\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq, Eq)]
291pub enum RSTFIFO0_A {
292 #[doc = "0: No effect."]
293 RSTFIFO0_0 = 0,
294 #[doc = "1: FIFO 0 is reset."]
295 RSTFIFO0_1 = 1,
296}
297impl From<RSTFIFO0_A> for bool {
298 #[inline(always)]
299 fn from(variant: RSTFIFO0_A) -> Self {
300 variant as u8 != 0
301 }
302}
303impl RSTFIFO0_R {
304 #[doc = "Get enumerated values variant"]
305 #[inline(always)]
306 pub fn variant(&self) -> RSTFIFO0_A {
307 match self.bits {
308 false => RSTFIFO0_A::RSTFIFO0_0,
309 true => RSTFIFO0_A::RSTFIFO0_1,
310 }
311 }
312 #[doc = "Checks if the value of the field is `RSTFIFO0_0`"]
313 #[inline(always)]
314 pub fn is_rstfifo0_0(&self) -> bool {
315 *self == RSTFIFO0_A::RSTFIFO0_0
316 }
317 #[doc = "Checks if the value of the field is `RSTFIFO0_1`"]
318 #[inline(always)]
319 pub fn is_rstfifo0_1(&self) -> bool {
320 *self == RSTFIFO0_A::RSTFIFO0_1
321 }
322}
323#[doc = "Field `RSTFIFO0` writer - Reset FIFO 0."]
324pub type RSTFIFO0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, RSTFIFO0_A, O>;
325impl<'a, const O: u8> RSTFIFO0_W<'a, O> {
326 #[doc = "No effect."]
327 #[inline(always)]
328 pub fn rstfifo0_0(self) -> &'a mut W {
329 self.variant(RSTFIFO0_A::RSTFIFO0_0)
330 }
331 #[doc = "FIFO 0 is reset."]
332 #[inline(always)]
333 pub fn rstfifo0_1(self) -> &'a mut W {
334 self.variant(RSTFIFO0_A::RSTFIFO0_1)
335 }
336}
337#[doc = "Field `RSTFIFO1` reader - Reset FIFO 1."]
338pub type RSTFIFO1_R = crate::BitReader<RSTFIFO1_A>;
339#[doc = "Reset FIFO 1.\n\nValue on reset: 0"]
340#[derive(Clone, Copy, Debug, PartialEq, Eq)]
341pub enum RSTFIFO1_A {
342 #[doc = "0: No effect."]
343 RSTFIFO1_0 = 0,
344 #[doc = "1: FIFO 1 is reset."]
345 RSTFIFO1_1 = 1,
346}
347impl From<RSTFIFO1_A> for bool {
348 #[inline(always)]
349 fn from(variant: RSTFIFO1_A) -> Self {
350 variant as u8 != 0
351 }
352}
353impl RSTFIFO1_R {
354 #[doc = "Get enumerated values variant"]
355 #[inline(always)]
356 pub fn variant(&self) -> RSTFIFO1_A {
357 match self.bits {
358 false => RSTFIFO1_A::RSTFIFO1_0,
359 true => RSTFIFO1_A::RSTFIFO1_1,
360 }
361 }
362 #[doc = "Checks if the value of the field is `RSTFIFO1_0`"]
363 #[inline(always)]
364 pub fn is_rstfifo1_0(&self) -> bool {
365 *self == RSTFIFO1_A::RSTFIFO1_0
366 }
367 #[doc = "Checks if the value of the field is `RSTFIFO1_1`"]
368 #[inline(always)]
369 pub fn is_rstfifo1_1(&self) -> bool {
370 *self == RSTFIFO1_A::RSTFIFO1_1
371 }
372}
373#[doc = "Field `RSTFIFO1` writer - Reset FIFO 1."]
374pub type RSTFIFO1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, RSTFIFO1_A, O>;
375impl<'a, const O: u8> RSTFIFO1_W<'a, O> {
376 #[doc = "No effect."]
377 #[inline(always)]
378 pub fn rstfifo1_0(self) -> &'a mut W {
379 self.variant(RSTFIFO1_A::RSTFIFO1_0)
380 }
381 #[doc = "FIFO 1 is reset."]
382 #[inline(always)]
383 pub fn rstfifo1_1(self) -> &'a mut W {
384 self.variant(RSTFIFO1_A::RSTFIFO1_1)
385 }
386}
387#[doc = "Field `CAL_AVGS` reader - Auto-Calibration Averages."]
388pub type CAL_AVGS_R = crate::FieldReader<u8, CAL_AVGS_A>;
389#[doc = "Auto-Calibration Averages.\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq, Eq)]
391#[repr(u8)]
392pub enum CAL_AVGS_A {
393 #[doc = "0: Single conversion."]
394 CAL_AVGS_0 = 0,
395 #[doc = "1: 2 conversions averaged."]
396 CAL_AVGS_1 = 1,
397 #[doc = "2: 4 conversions averaged."]
398 CAL_AVGS_2 = 2,
399 #[doc = "3: 8 conversions averaged."]
400 CAL_AVGS_3 = 3,
401 #[doc = "4: 16 conversions averaged."]
402 CAL_AVGS_4 = 4,
403 #[doc = "5: 32 conversions averaged."]
404 CAL_AVGS_5 = 5,
405 #[doc = "6: 64 conversions averaged."]
406 CAL_AVGS_6 = 6,
407 #[doc = "7: 128 conversions averaged."]
408 CAL_AVGS_7 = 7,
409}
410impl From<CAL_AVGS_A> for u8 {
411 #[inline(always)]
412 fn from(variant: CAL_AVGS_A) -> Self {
413 variant as _
414 }
415}
416impl CAL_AVGS_R {
417 #[doc = "Get enumerated values variant"]
418 #[inline(always)]
419 pub fn variant(&self) -> CAL_AVGS_A {
420 match self.bits {
421 0 => CAL_AVGS_A::CAL_AVGS_0,
422 1 => CAL_AVGS_A::CAL_AVGS_1,
423 2 => CAL_AVGS_A::CAL_AVGS_2,
424 3 => CAL_AVGS_A::CAL_AVGS_3,
425 4 => CAL_AVGS_A::CAL_AVGS_4,
426 5 => CAL_AVGS_A::CAL_AVGS_5,
427 6 => CAL_AVGS_A::CAL_AVGS_6,
428 7 => CAL_AVGS_A::CAL_AVGS_7,
429 _ => unreachable!(),
430 }
431 }
432 #[doc = "Checks if the value of the field is `CAL_AVGS_0`"]
433 #[inline(always)]
434 pub fn is_cal_avgs_0(&self) -> bool {
435 *self == CAL_AVGS_A::CAL_AVGS_0
436 }
437 #[doc = "Checks if the value of the field is `CAL_AVGS_1`"]
438 #[inline(always)]
439 pub fn is_cal_avgs_1(&self) -> bool {
440 *self == CAL_AVGS_A::CAL_AVGS_1
441 }
442 #[doc = "Checks if the value of the field is `CAL_AVGS_2`"]
443 #[inline(always)]
444 pub fn is_cal_avgs_2(&self) -> bool {
445 *self == CAL_AVGS_A::CAL_AVGS_2
446 }
447 #[doc = "Checks if the value of the field is `CAL_AVGS_3`"]
448 #[inline(always)]
449 pub fn is_cal_avgs_3(&self) -> bool {
450 *self == CAL_AVGS_A::CAL_AVGS_3
451 }
452 #[doc = "Checks if the value of the field is `CAL_AVGS_4`"]
453 #[inline(always)]
454 pub fn is_cal_avgs_4(&self) -> bool {
455 *self == CAL_AVGS_A::CAL_AVGS_4
456 }
457 #[doc = "Checks if the value of the field is `CAL_AVGS_5`"]
458 #[inline(always)]
459 pub fn is_cal_avgs_5(&self) -> bool {
460 *self == CAL_AVGS_A::CAL_AVGS_5
461 }
462 #[doc = "Checks if the value of the field is `CAL_AVGS_6`"]
463 #[inline(always)]
464 pub fn is_cal_avgs_6(&self) -> bool {
465 *self == CAL_AVGS_A::CAL_AVGS_6
466 }
467 #[doc = "Checks if the value of the field is `CAL_AVGS_7`"]
468 #[inline(always)]
469 pub fn is_cal_avgs_7(&self) -> bool {
470 *self == CAL_AVGS_A::CAL_AVGS_7
471 }
472}
473#[doc = "Field `CAL_AVGS` writer - Auto-Calibration Averages."]
474pub type CAL_AVGS_W<'a, const O: u8> =
475 crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, CAL_AVGS_A, 3, O>;
476impl<'a, const O: u8> CAL_AVGS_W<'a, O> {
477 #[doc = "Single conversion."]
478 #[inline(always)]
479 pub fn cal_avgs_0(self) -> &'a mut W {
480 self.variant(CAL_AVGS_A::CAL_AVGS_0)
481 }
482 #[doc = "2 conversions averaged."]
483 #[inline(always)]
484 pub fn cal_avgs_1(self) -> &'a mut W {
485 self.variant(CAL_AVGS_A::CAL_AVGS_1)
486 }
487 #[doc = "4 conversions averaged."]
488 #[inline(always)]
489 pub fn cal_avgs_2(self) -> &'a mut W {
490 self.variant(CAL_AVGS_A::CAL_AVGS_2)
491 }
492 #[doc = "8 conversions averaged."]
493 #[inline(always)]
494 pub fn cal_avgs_3(self) -> &'a mut W {
495 self.variant(CAL_AVGS_A::CAL_AVGS_3)
496 }
497 #[doc = "16 conversions averaged."]
498 #[inline(always)]
499 pub fn cal_avgs_4(self) -> &'a mut W {
500 self.variant(CAL_AVGS_A::CAL_AVGS_4)
501 }
502 #[doc = "32 conversions averaged."]
503 #[inline(always)]
504 pub fn cal_avgs_5(self) -> &'a mut W {
505 self.variant(CAL_AVGS_A::CAL_AVGS_5)
506 }
507 #[doc = "64 conversions averaged."]
508 #[inline(always)]
509 pub fn cal_avgs_6(self) -> &'a mut W {
510 self.variant(CAL_AVGS_A::CAL_AVGS_6)
511 }
512 #[doc = "128 conversions averaged."]
513 #[inline(always)]
514 pub fn cal_avgs_7(self) -> &'a mut W {
515 self.variant(CAL_AVGS_A::CAL_AVGS_7)
516 }
517}
518impl R {
519 #[doc = "Bit 0 - ADC Enable."]
520 #[inline(always)]
521 pub fn adcen(&self) -> ADCEN_R {
522 ADCEN_R::new((self.bits & 1) != 0)
523 }
524 #[doc = "Bit 1 - Software Reset."]
525 #[inline(always)]
526 pub fn rst(&self) -> RST_R {
527 RST_R::new(((self.bits >> 1) & 1) != 0)
528 }
529 #[doc = "Bit 2 - Doze Enable."]
530 #[inline(always)]
531 pub fn dozen(&self) -> DOZEN_R {
532 DOZEN_R::new(((self.bits >> 2) & 1) != 0)
533 }
534 #[doc = "Bit 3 - Auto-Calibration Request."]
535 #[inline(always)]
536 pub fn cal_req(&self) -> CAL_REQ_R {
537 CAL_REQ_R::new(((self.bits >> 3) & 1) != 0)
538 }
539 #[doc = "Bit 4 - Configure for offset calibration function."]
540 #[inline(always)]
541 pub fn calofs(&self) -> CALOFS_R {
542 CALOFS_R::new(((self.bits >> 4) & 1) != 0)
543 }
544 #[doc = "Bit 8 - Reset FIFO 0."]
545 #[inline(always)]
546 pub fn rstfifo0(&self) -> RSTFIFO0_R {
547 RSTFIFO0_R::new(((self.bits >> 8) & 1) != 0)
548 }
549 #[doc = "Bit 9 - Reset FIFO 1."]
550 #[inline(always)]
551 pub fn rstfifo1(&self) -> RSTFIFO1_R {
552 RSTFIFO1_R::new(((self.bits >> 9) & 1) != 0)
553 }
554 #[doc = "Bits 16:18 - Auto-Calibration Averages."]
555 #[inline(always)]
556 pub fn cal_avgs(&self) -> CAL_AVGS_R {
557 CAL_AVGS_R::new(((self.bits >> 16) & 7) as u8)
558 }
559}
560impl W {
561 #[doc = "Bit 0 - ADC Enable."]
562 #[inline(always)]
563 pub fn adcen(&mut self) -> ADCEN_W<0> {
564 ADCEN_W::new(self)
565 }
566 #[doc = "Bit 1 - Software Reset."]
567 #[inline(always)]
568 pub fn rst(&mut self) -> RST_W<1> {
569 RST_W::new(self)
570 }
571 #[doc = "Bit 2 - Doze Enable."]
572 #[inline(always)]
573 pub fn dozen(&mut self) -> DOZEN_W<2> {
574 DOZEN_W::new(self)
575 }
576 #[doc = "Bit 3 - Auto-Calibration Request."]
577 #[inline(always)]
578 pub fn cal_req(&mut self) -> CAL_REQ_W<3> {
579 CAL_REQ_W::new(self)
580 }
581 #[doc = "Bit 4 - Configure for offset calibration function."]
582 #[inline(always)]
583 pub fn calofs(&mut self) -> CALOFS_W<4> {
584 CALOFS_W::new(self)
585 }
586 #[doc = "Bit 8 - Reset FIFO 0."]
587 #[inline(always)]
588 pub fn rstfifo0(&mut self) -> RSTFIFO0_W<8> {
589 RSTFIFO0_W::new(self)
590 }
591 #[doc = "Bit 9 - Reset FIFO 1."]
592 #[inline(always)]
593 pub fn rstfifo1(&mut self) -> RSTFIFO1_W<9> {
594 RSTFIFO1_W::new(self)
595 }
596 #[doc = "Bits 16:18 - Auto-Calibration Averages."]
597 #[inline(always)]
598 pub fn cal_avgs(&mut self) -> CAL_AVGS_W<16> {
599 CAL_AVGS_W::new(self)
600 }
601 #[doc = "Writes raw bits to the register."]
602 #[inline(always)]
603 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
604 self.0.bits(bits);
605 self
606 }
607}
608#[doc = "ADC Control Register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctrl](index.html) module"]
609pub struct CTRL_SPEC;
610impl crate::RegisterSpec for CTRL_SPEC {
611 type Ux = u32;
612}
613#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
614impl crate::Readable for CTRL_SPEC {
615 type Reader = R;
616}
617#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
618impl crate::Writable for CTRL_SPEC {
619 type Writer = W;
620}
621#[doc = "`reset()` method sets CTRL to value 0"]
622impl crate::Resettable for CTRL_SPEC {
623 #[inline(always)]
624 fn reset_value() -> Self::Ux {
625 0
626 }
627}