1#[doc = "Register `CTRL` reader"]
2pub type R = crate::R<CtrlSpec>;
3#[doc = "Register `CTRL` writer"]
4pub type W = crate::W<CtrlSpec>;
5#[doc = "ADC Enable\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum Adcen {
9 #[doc = "0: ADC is disabled."]
10 Disabled = 0,
11 #[doc = "1: ADC is enabled."]
12 Enabled = 1,
13}
14impl From<Adcen> for bool {
15 #[inline(always)]
16 fn from(variant: Adcen) -> Self {
17 variant as u8 != 0
18 }
19}
20#[doc = "Field `ADCEN` reader - ADC Enable"]
21pub type AdcenR = crate::BitReader<Adcen>;
22impl AdcenR {
23 #[doc = "Get enumerated values variant"]
24 #[inline(always)]
25 pub const fn variant(&self) -> Adcen {
26 match self.bits {
27 false => Adcen::Disabled,
28 true => Adcen::Enabled,
29 }
30 }
31 #[doc = "ADC is disabled."]
32 #[inline(always)]
33 pub fn is_disabled(&self) -> bool {
34 *self == Adcen::Disabled
35 }
36 #[doc = "ADC is enabled."]
37 #[inline(always)]
38 pub fn is_enabled(&self) -> bool {
39 *self == Adcen::Enabled
40 }
41}
42#[doc = "Field `ADCEN` writer - ADC Enable"]
43pub type AdcenW<'a, REG> = crate::BitWriter<'a, REG, Adcen>;
44impl<'a, REG> AdcenW<'a, REG>
45where
46 REG: crate::Writable + crate::RegisterSpec,
47{
48 #[doc = "ADC is disabled."]
49 #[inline(always)]
50 pub fn disabled(self) -> &'a mut crate::W<REG> {
51 self.variant(Adcen::Disabled)
52 }
53 #[doc = "ADC is enabled."]
54 #[inline(always)]
55 pub fn enabled(self) -> &'a mut crate::W<REG> {
56 self.variant(Adcen::Enabled)
57 }
58}
59#[doc = "Software Reset\n\nValue on reset: 0"]
60#[cfg_attr(feature = "defmt", derive(defmt::Format))]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum Rst {
63 #[doc = "0: ADC logic is not reset."]
64 ReleasedFromReset = 0,
65 #[doc = "1: ADC logic is reset."]
66 HeldInReset = 1,
67}
68impl From<Rst> for bool {
69 #[inline(always)]
70 fn from(variant: Rst) -> Self {
71 variant as u8 != 0
72 }
73}
74#[doc = "Field `RST` reader - Software Reset"]
75pub type RstR = crate::BitReader<Rst>;
76impl RstR {
77 #[doc = "Get enumerated values variant"]
78 #[inline(always)]
79 pub const fn variant(&self) -> Rst {
80 match self.bits {
81 false => Rst::ReleasedFromReset,
82 true => Rst::HeldInReset,
83 }
84 }
85 #[doc = "ADC logic is not reset."]
86 #[inline(always)]
87 pub fn is_released_from_reset(&self) -> bool {
88 *self == Rst::ReleasedFromReset
89 }
90 #[doc = "ADC logic is reset."]
91 #[inline(always)]
92 pub fn is_held_in_reset(&self) -> bool {
93 *self == Rst::HeldInReset
94 }
95}
96#[doc = "Field `RST` writer - Software Reset"]
97pub type RstW<'a, REG> = crate::BitWriter<'a, REG, Rst>;
98impl<'a, REG> RstW<'a, REG>
99where
100 REG: crate::Writable + crate::RegisterSpec,
101{
102 #[doc = "ADC logic is not reset."]
103 #[inline(always)]
104 pub fn released_from_reset(self) -> &'a mut crate::W<REG> {
105 self.variant(Rst::ReleasedFromReset)
106 }
107 #[doc = "ADC logic is reset."]
108 #[inline(always)]
109 pub fn held_in_reset(self) -> &'a mut crate::W<REG> {
110 self.variant(Rst::HeldInReset)
111 }
112}
113#[doc = "Doze Enable\n\nValue on reset: 0"]
114#[cfg_attr(feature = "defmt", derive(defmt::Format))]
115#[derive(Clone, Copy, Debug, PartialEq, Eq)]
116pub enum Dozen {
117 #[doc = "0: ADC is enabled in low power mode."]
118 Enabled = 0,
119 #[doc = "1: ADC is disabled in low power mode."]
120 Disabled = 1,
121}
122impl From<Dozen> for bool {
123 #[inline(always)]
124 fn from(variant: Dozen) -> Self {
125 variant as u8 != 0
126 }
127}
128#[doc = "Field `DOZEN` reader - Doze Enable"]
129pub type DozenR = crate::BitReader<Dozen>;
130impl DozenR {
131 #[doc = "Get enumerated values variant"]
132 #[inline(always)]
133 pub const fn variant(&self) -> Dozen {
134 match self.bits {
135 false => Dozen::Enabled,
136 true => Dozen::Disabled,
137 }
138 }
139 #[doc = "ADC is enabled in low power mode."]
140 #[inline(always)]
141 pub fn is_enabled(&self) -> bool {
142 *self == Dozen::Enabled
143 }
144 #[doc = "ADC is disabled in low power mode."]
145 #[inline(always)]
146 pub fn is_disabled(&self) -> bool {
147 *self == Dozen::Disabled
148 }
149}
150#[doc = "Field `DOZEN` writer - Doze Enable"]
151pub type DozenW<'a, REG> = crate::BitWriter<'a, REG, Dozen>;
152impl<'a, REG> DozenW<'a, REG>
153where
154 REG: crate::Writable + crate::RegisterSpec,
155{
156 #[doc = "ADC is enabled in low power mode."]
157 #[inline(always)]
158 pub fn enabled(self) -> &'a mut crate::W<REG> {
159 self.variant(Dozen::Enabled)
160 }
161 #[doc = "ADC is disabled in low power mode."]
162 #[inline(always)]
163 pub fn disabled(self) -> &'a mut crate::W<REG> {
164 self.variant(Dozen::Disabled)
165 }
166}
167#[doc = "Auto-Calibration Request\n\nValue on reset: 0"]
168#[cfg_attr(feature = "defmt", derive(defmt::Format))]
169#[derive(Clone, Copy, Debug, PartialEq, Eq)]
170pub enum CalReq {
171 #[doc = "0: No request for hardware calibration has been made"]
172 NoCalibrationRequest = 0,
173 #[doc = "1: A request for hardware calibration has been made"]
174 CalibrationRequestPending = 1,
175}
176impl From<CalReq> for bool {
177 #[inline(always)]
178 fn from(variant: CalReq) -> Self {
179 variant as u8 != 0
180 }
181}
182#[doc = "Field `CAL_REQ` reader - Auto-Calibration Request"]
183pub type CalReqR = crate::BitReader<CalReq>;
184impl CalReqR {
185 #[doc = "Get enumerated values variant"]
186 #[inline(always)]
187 pub const fn variant(&self) -> CalReq {
188 match self.bits {
189 false => CalReq::NoCalibrationRequest,
190 true => CalReq::CalibrationRequestPending,
191 }
192 }
193 #[doc = "No request for hardware calibration has been made"]
194 #[inline(always)]
195 pub fn is_no_calibration_request(&self) -> bool {
196 *self == CalReq::NoCalibrationRequest
197 }
198 #[doc = "A request for hardware calibration has been made"]
199 #[inline(always)]
200 pub fn is_calibration_request_pending(&self) -> bool {
201 *self == CalReq::CalibrationRequestPending
202 }
203}
204#[doc = "Field `CAL_REQ` writer - Auto-Calibration Request"]
205pub type CalReqW<'a, REG> = crate::BitWriter<'a, REG, CalReq>;
206impl<'a, REG> CalReqW<'a, REG>
207where
208 REG: crate::Writable + crate::RegisterSpec,
209{
210 #[doc = "No request for hardware calibration has been made"]
211 #[inline(always)]
212 pub fn no_calibration_request(self) -> &'a mut crate::W<REG> {
213 self.variant(CalReq::NoCalibrationRequest)
214 }
215 #[doc = "A request for hardware calibration has been made"]
216 #[inline(always)]
217 pub fn calibration_request_pending(self) -> &'a mut crate::W<REG> {
218 self.variant(CalReq::CalibrationRequestPending)
219 }
220}
221#[doc = "Offset Calibration Request\n\nValue on reset: 0"]
222#[cfg_attr(feature = "defmt", derive(defmt::Format))]
223#[derive(Clone, Copy, Debug, PartialEq, Eq)]
224pub enum Calofs {
225 #[doc = "0: No request for offset calibration has been made"]
226 NoActiveOffsetCalibrationRequest = 0,
227 #[doc = "1: Request for offset calibration function"]
228 OffsetCalibrationRequestPending = 1,
229}
230impl From<Calofs> for bool {
231 #[inline(always)]
232 fn from(variant: Calofs) -> Self {
233 variant as u8 != 0
234 }
235}
236#[doc = "Field `CALOFS` reader - Offset Calibration Request"]
237pub type CalofsR = crate::BitReader<Calofs>;
238impl CalofsR {
239 #[doc = "Get enumerated values variant"]
240 #[inline(always)]
241 pub const fn variant(&self) -> Calofs {
242 match self.bits {
243 false => Calofs::NoActiveOffsetCalibrationRequest,
244 true => Calofs::OffsetCalibrationRequestPending,
245 }
246 }
247 #[doc = "No request for offset calibration has been made"]
248 #[inline(always)]
249 pub fn is_no_active_offset_calibration_request(&self) -> bool {
250 *self == Calofs::NoActiveOffsetCalibrationRequest
251 }
252 #[doc = "Request for offset calibration function"]
253 #[inline(always)]
254 pub fn is_offset_calibration_request_pending(&self) -> bool {
255 *self == Calofs::OffsetCalibrationRequestPending
256 }
257}
258#[doc = "Field `CALOFS` writer - Offset Calibration Request"]
259pub type CalofsW<'a, REG> = crate::BitWriter<'a, REG, Calofs>;
260impl<'a, REG> CalofsW<'a, REG>
261where
262 REG: crate::Writable + crate::RegisterSpec,
263{
264 #[doc = "No request for offset calibration has been made"]
265 #[inline(always)]
266 pub fn no_active_offset_calibration_request(self) -> &'a mut crate::W<REG> {
267 self.variant(Calofs::NoActiveOffsetCalibrationRequest)
268 }
269 #[doc = "Request for offset calibration function"]
270 #[inline(always)]
271 pub fn offset_calibration_request_pending(self) -> &'a mut crate::W<REG> {
272 self.variant(Calofs::OffsetCalibrationRequestPending)
273 }
274}
275#[doc = "High Speed Mode Trim Request\n\nValue on reset: 0"]
276#[cfg_attr(feature = "defmt", derive(defmt::Format))]
277#[derive(Clone, Copy, Debug, PartialEq, Eq)]
278pub enum Calhs {
279 #[doc = "0: No request for high speed mode trim has been made"]
280 NoActiveHsTrimRequest = 0,
281 #[doc = "1: Request for high speed mode trim has been made"]
282 HsTrimRequestPending = 1,
283}
284impl From<Calhs> for bool {
285 #[inline(always)]
286 fn from(variant: Calhs) -> Self {
287 variant as u8 != 0
288 }
289}
290#[doc = "Field `CALHS` reader - High Speed Mode Trim Request"]
291pub type CalhsR = crate::BitReader<Calhs>;
292impl CalhsR {
293 #[doc = "Get enumerated values variant"]
294 #[inline(always)]
295 pub const fn variant(&self) -> Calhs {
296 match self.bits {
297 false => Calhs::NoActiveHsTrimRequest,
298 true => Calhs::HsTrimRequestPending,
299 }
300 }
301 #[doc = "No request for high speed mode trim has been made"]
302 #[inline(always)]
303 pub fn is_no_active_hs_trim_request(&self) -> bool {
304 *self == Calhs::NoActiveHsTrimRequest
305 }
306 #[doc = "Request for high speed mode trim has been made"]
307 #[inline(always)]
308 pub fn is_hs_trim_request_pending(&self) -> bool {
309 *self == Calhs::HsTrimRequestPending
310 }
311}
312#[doc = "Field `CALHS` writer - High Speed Mode Trim Request"]
313pub type CalhsW<'a, REG> = crate::BitWriter<'a, REG, Calhs>;
314impl<'a, REG> CalhsW<'a, REG>
315where
316 REG: crate::Writable + crate::RegisterSpec,
317{
318 #[doc = "No request for high speed mode trim has been made"]
319 #[inline(always)]
320 pub fn no_active_hs_trim_request(self) -> &'a mut crate::W<REG> {
321 self.variant(Calhs::NoActiveHsTrimRequest)
322 }
323 #[doc = "Request for high speed mode trim has been made"]
324 #[inline(always)]
325 pub fn hs_trim_request_pending(self) -> &'a mut crate::W<REG> {
326 self.variant(Calhs::HsTrimRequestPending)
327 }
328}
329#[doc = "Reset FIFO 0\n\nValue on reset: 0"]
330#[cfg_attr(feature = "defmt", derive(defmt::Format))]
331#[derive(Clone, Copy, Debug, PartialEq, Eq)]
332pub enum Rstfifo0 {
333 #[doc = "0: No effect."]
334 NoAction = 0,
335 #[doc = "1: FIFO 0 is reset."]
336 TriggerReset = 1,
337}
338impl From<Rstfifo0> for bool {
339 #[inline(always)]
340 fn from(variant: Rstfifo0) -> Self {
341 variant as u8 != 0
342 }
343}
344#[doc = "Field `RSTFIFO0` reader - Reset FIFO 0"]
345pub type Rstfifo0R = crate::BitReader<Rstfifo0>;
346impl Rstfifo0R {
347 #[doc = "Get enumerated values variant"]
348 #[inline(always)]
349 pub const fn variant(&self) -> Rstfifo0 {
350 match self.bits {
351 false => Rstfifo0::NoAction,
352 true => Rstfifo0::TriggerReset,
353 }
354 }
355 #[doc = "No effect."]
356 #[inline(always)]
357 pub fn is_no_action(&self) -> bool {
358 *self == Rstfifo0::NoAction
359 }
360 #[doc = "FIFO 0 is reset."]
361 #[inline(always)]
362 pub fn is_trigger_reset(&self) -> bool {
363 *self == Rstfifo0::TriggerReset
364 }
365}
366#[doc = "Field `RSTFIFO0` writer - Reset FIFO 0"]
367pub type Rstfifo0W<'a, REG> = crate::BitWriter<'a, REG, Rstfifo0>;
368impl<'a, REG> Rstfifo0W<'a, REG>
369where
370 REG: crate::Writable + crate::RegisterSpec,
371{
372 #[doc = "No effect."]
373 #[inline(always)]
374 pub fn no_action(self) -> &'a mut crate::W<REG> {
375 self.variant(Rstfifo0::NoAction)
376 }
377 #[doc = "FIFO 0 is reset."]
378 #[inline(always)]
379 pub fn trigger_reset(self) -> &'a mut crate::W<REG> {
380 self.variant(Rstfifo0::TriggerReset)
381 }
382}
383#[doc = "Auto-Calibration Averages\n\nValue on reset: 0"]
384#[cfg_attr(feature = "defmt", derive(defmt::Format))]
385#[derive(Clone, Copy, Debug, PartialEq, Eq)]
386#[repr(u8)]
387pub enum CalAvgs {
388 #[doc = "0: Single conversion."]
389 NoAverage = 0,
390 #[doc = "1: 2 conversions averaged."]
391 Average2 = 1,
392 #[doc = "2: 4 conversions averaged."]
393 Average4 = 2,
394 #[doc = "3: 8 conversions averaged."]
395 Average8 = 3,
396 #[doc = "4: 16 conversions averaged."]
397 Average16 = 4,
398 #[doc = "5: 32 conversions averaged."]
399 Average32 = 5,
400 #[doc = "6: 64 conversions averaged."]
401 Average64 = 6,
402 #[doc = "7: 128 conversions averaged."]
403 Average128 = 7,
404 #[doc = "8: 256 conversions averaged."]
405 Average256 = 8,
406 #[doc = "9: 512 conversions averaged."]
407 Average512 = 9,
408 #[doc = "10: 1024 conversions averaged."]
409 Average1024 = 10,
410}
411impl From<CalAvgs> for u8 {
412 #[inline(always)]
413 fn from(variant: CalAvgs) -> Self {
414 variant as _
415 }
416}
417impl crate::FieldSpec for CalAvgs {
418 type Ux = u8;
419}
420impl crate::IsEnum for CalAvgs {}
421#[doc = "Field `CAL_AVGS` reader - Auto-Calibration Averages"]
422pub type CalAvgsR = crate::FieldReader<CalAvgs>;
423impl CalAvgsR {
424 #[doc = "Get enumerated values variant"]
425 #[inline(always)]
426 pub const fn variant(&self) -> Option<CalAvgs> {
427 match self.bits {
428 0 => Some(CalAvgs::NoAverage),
429 1 => Some(CalAvgs::Average2),
430 2 => Some(CalAvgs::Average4),
431 3 => Some(CalAvgs::Average8),
432 4 => Some(CalAvgs::Average16),
433 5 => Some(CalAvgs::Average32),
434 6 => Some(CalAvgs::Average64),
435 7 => Some(CalAvgs::Average128),
436 8 => Some(CalAvgs::Average256),
437 9 => Some(CalAvgs::Average512),
438 10 => Some(CalAvgs::Average1024),
439 _ => None,
440 }
441 }
442 #[doc = "Single conversion."]
443 #[inline(always)]
444 pub fn is_no_average(&self) -> bool {
445 *self == CalAvgs::NoAverage
446 }
447 #[doc = "2 conversions averaged."]
448 #[inline(always)]
449 pub fn is_average_2(&self) -> bool {
450 *self == CalAvgs::Average2
451 }
452 #[doc = "4 conversions averaged."]
453 #[inline(always)]
454 pub fn is_average_4(&self) -> bool {
455 *self == CalAvgs::Average4
456 }
457 #[doc = "8 conversions averaged."]
458 #[inline(always)]
459 pub fn is_average_8(&self) -> bool {
460 *self == CalAvgs::Average8
461 }
462 #[doc = "16 conversions averaged."]
463 #[inline(always)]
464 pub fn is_average_16(&self) -> bool {
465 *self == CalAvgs::Average16
466 }
467 #[doc = "32 conversions averaged."]
468 #[inline(always)]
469 pub fn is_average_32(&self) -> bool {
470 *self == CalAvgs::Average32
471 }
472 #[doc = "64 conversions averaged."]
473 #[inline(always)]
474 pub fn is_average_64(&self) -> bool {
475 *self == CalAvgs::Average64
476 }
477 #[doc = "128 conversions averaged."]
478 #[inline(always)]
479 pub fn is_average_128(&self) -> bool {
480 *self == CalAvgs::Average128
481 }
482 #[doc = "256 conversions averaged."]
483 #[inline(always)]
484 pub fn is_average_256(&self) -> bool {
485 *self == CalAvgs::Average256
486 }
487 #[doc = "512 conversions averaged."]
488 #[inline(always)]
489 pub fn is_average_512(&self) -> bool {
490 *self == CalAvgs::Average512
491 }
492 #[doc = "1024 conversions averaged."]
493 #[inline(always)]
494 pub fn is_average_1024(&self) -> bool {
495 *self == CalAvgs::Average1024
496 }
497}
498#[doc = "Field `CAL_AVGS` writer - Auto-Calibration Averages"]
499pub type CalAvgsW<'a, REG> = crate::FieldWriter<'a, REG, 4, CalAvgs>;
500impl<'a, REG> CalAvgsW<'a, REG>
501where
502 REG: crate::Writable + crate::RegisterSpec,
503 REG::Ux: From<u8>,
504{
505 #[doc = "Single conversion."]
506 #[inline(always)]
507 pub fn no_average(self) -> &'a mut crate::W<REG> {
508 self.variant(CalAvgs::NoAverage)
509 }
510 #[doc = "2 conversions averaged."]
511 #[inline(always)]
512 pub fn average_2(self) -> &'a mut crate::W<REG> {
513 self.variant(CalAvgs::Average2)
514 }
515 #[doc = "4 conversions averaged."]
516 #[inline(always)]
517 pub fn average_4(self) -> &'a mut crate::W<REG> {
518 self.variant(CalAvgs::Average4)
519 }
520 #[doc = "8 conversions averaged."]
521 #[inline(always)]
522 pub fn average_8(self) -> &'a mut crate::W<REG> {
523 self.variant(CalAvgs::Average8)
524 }
525 #[doc = "16 conversions averaged."]
526 #[inline(always)]
527 pub fn average_16(self) -> &'a mut crate::W<REG> {
528 self.variant(CalAvgs::Average16)
529 }
530 #[doc = "32 conversions averaged."]
531 #[inline(always)]
532 pub fn average_32(self) -> &'a mut crate::W<REG> {
533 self.variant(CalAvgs::Average32)
534 }
535 #[doc = "64 conversions averaged."]
536 #[inline(always)]
537 pub fn average_64(self) -> &'a mut crate::W<REG> {
538 self.variant(CalAvgs::Average64)
539 }
540 #[doc = "128 conversions averaged."]
541 #[inline(always)]
542 pub fn average_128(self) -> &'a mut crate::W<REG> {
543 self.variant(CalAvgs::Average128)
544 }
545 #[doc = "256 conversions averaged."]
546 #[inline(always)]
547 pub fn average_256(self) -> &'a mut crate::W<REG> {
548 self.variant(CalAvgs::Average256)
549 }
550 #[doc = "512 conversions averaged."]
551 #[inline(always)]
552 pub fn average_512(self) -> &'a mut crate::W<REG> {
553 self.variant(CalAvgs::Average512)
554 }
555 #[doc = "1024 conversions averaged."]
556 #[inline(always)]
557 pub fn average_1024(self) -> &'a mut crate::W<REG> {
558 self.variant(CalAvgs::Average1024)
559 }
560}
561impl R {
562 #[doc = "Bit 0 - ADC Enable"]
563 #[inline(always)]
564 pub fn adcen(&self) -> AdcenR {
565 AdcenR::new((self.bits & 1) != 0)
566 }
567 #[doc = "Bit 1 - Software Reset"]
568 #[inline(always)]
569 pub fn rst(&self) -> RstR {
570 RstR::new(((self.bits >> 1) & 1) != 0)
571 }
572 #[doc = "Bit 2 - Doze Enable"]
573 #[inline(always)]
574 pub fn dozen(&self) -> DozenR {
575 DozenR::new(((self.bits >> 2) & 1) != 0)
576 }
577 #[doc = "Bit 3 - Auto-Calibration Request"]
578 #[inline(always)]
579 pub fn cal_req(&self) -> CalReqR {
580 CalReqR::new(((self.bits >> 3) & 1) != 0)
581 }
582 #[doc = "Bit 4 - Offset Calibration Request"]
583 #[inline(always)]
584 pub fn calofs(&self) -> CalofsR {
585 CalofsR::new(((self.bits >> 4) & 1) != 0)
586 }
587 #[doc = "Bit 6 - High Speed Mode Trim Request"]
588 #[inline(always)]
589 pub fn calhs(&self) -> CalhsR {
590 CalhsR::new(((self.bits >> 6) & 1) != 0)
591 }
592 #[doc = "Bit 8 - Reset FIFO 0"]
593 #[inline(always)]
594 pub fn rstfifo0(&self) -> Rstfifo0R {
595 Rstfifo0R::new(((self.bits >> 8) & 1) != 0)
596 }
597 #[doc = "Bits 16:19 - Auto-Calibration Averages"]
598 #[inline(always)]
599 pub fn cal_avgs(&self) -> CalAvgsR {
600 CalAvgsR::new(((self.bits >> 16) & 0x0f) as u8)
601 }
602}
603#[cfg(feature = "debug")]
604impl core::fmt::Debug for R {
605 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
606 f.debug_struct("CTRL")
607 .field("adcen", &self.adcen())
608 .field("rst", &self.rst())
609 .field("dozen", &self.dozen())
610 .field("cal_req", &self.cal_req())
611 .field("calofs", &self.calofs())
612 .field("calhs", &self.calhs())
613 .field("rstfifo0", &self.rstfifo0())
614 .field("cal_avgs", &self.cal_avgs())
615 .finish()
616 }
617}
618impl W {
619 #[doc = "Bit 0 - ADC Enable"]
620 #[inline(always)]
621 pub fn adcen(&mut self) -> AdcenW<'_, CtrlSpec> {
622 AdcenW::new(self, 0)
623 }
624 #[doc = "Bit 1 - Software Reset"]
625 #[inline(always)]
626 pub fn rst(&mut self) -> RstW<'_, CtrlSpec> {
627 RstW::new(self, 1)
628 }
629 #[doc = "Bit 2 - Doze Enable"]
630 #[inline(always)]
631 pub fn dozen(&mut self) -> DozenW<'_, CtrlSpec> {
632 DozenW::new(self, 2)
633 }
634 #[doc = "Bit 3 - Auto-Calibration Request"]
635 #[inline(always)]
636 pub fn cal_req(&mut self) -> CalReqW<'_, CtrlSpec> {
637 CalReqW::new(self, 3)
638 }
639 #[doc = "Bit 4 - Offset Calibration Request"]
640 #[inline(always)]
641 pub fn calofs(&mut self) -> CalofsW<'_, CtrlSpec> {
642 CalofsW::new(self, 4)
643 }
644 #[doc = "Bit 6 - High Speed Mode Trim Request"]
645 #[inline(always)]
646 pub fn calhs(&mut self) -> CalhsW<'_, CtrlSpec> {
647 CalhsW::new(self, 6)
648 }
649 #[doc = "Bit 8 - Reset FIFO 0"]
650 #[inline(always)]
651 pub fn rstfifo0(&mut self) -> Rstfifo0W<'_, CtrlSpec> {
652 Rstfifo0W::new(self, 8)
653 }
654 #[doc = "Bits 16:19 - Auto-Calibration Averages"]
655 #[inline(always)]
656 pub fn cal_avgs(&mut self) -> CalAvgsW<'_, CtrlSpec> {
657 CalAvgsW::new(self, 16)
658 }
659}
660#[doc = "Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
661pub struct CtrlSpec;
662impl crate::RegisterSpec for CtrlSpec {
663 type Ux = u32;
664}
665#[doc = "`read()` method returns [`ctrl::R`](R) reader structure"]
666impl crate::Readable for CtrlSpec {}
667#[doc = "`write(|w| ..)` method takes [`ctrl::W`](W) writer structure"]
668impl crate::Writable for CtrlSpec {
669 type Safety = crate::Unsafe;
670}
671#[doc = "`reset()` method sets CTRL to value 0"]
672impl crate::Resettable for CtrlSpec {}