1pub type R = crate::R<CR1rs>;
3pub type W = crate::W<CR1rs>;
5pub type AWDCH_R = crate::FieldReader;
7pub type AWDCH_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
9#[cfg_attr(feature = "defmt", derive(defmt::Format))]
13#[derive(Clone, Copy, Debug, PartialEq, Eq)]
14pub enum EOCIE {
15 Disabled = 0,
17 Enabled = 1,
19}
20impl From<EOCIE> for bool {
21 #[inline(always)]
22 fn from(variant: EOCIE) -> Self {
23 variant as u8 != 0
24 }
25}
26pub type EOCIE_R = crate::BitReader<EOCIE>;
28impl EOCIE_R {
29 #[inline(always)]
31 pub const fn variant(&self) -> EOCIE {
32 match self.bits {
33 false => EOCIE::Disabled,
34 true => EOCIE::Enabled,
35 }
36 }
37 #[inline(always)]
39 pub fn is_disabled(&self) -> bool {
40 *self == EOCIE::Disabled
41 }
42 #[inline(always)]
44 pub fn is_enabled(&self) -> bool {
45 *self == EOCIE::Enabled
46 }
47}
48pub type EOCIE_W<'a, REG> = crate::BitWriter<'a, REG, EOCIE>;
50impl<'a, REG> EOCIE_W<'a, REG>
51where
52 REG: crate::Writable + crate::RegisterSpec,
53{
54 #[inline(always)]
56 pub fn disabled(self) -> &'a mut crate::W<REG> {
57 self.variant(EOCIE::Disabled)
58 }
59 #[inline(always)]
61 pub fn enabled(self) -> &'a mut crate::W<REG> {
62 self.variant(EOCIE::Enabled)
63 }
64}
65#[cfg_attr(feature = "defmt", derive(defmt::Format))]
69#[derive(Clone, Copy, Debug, PartialEq, Eq)]
70pub enum AWDIE {
71 Disabled = 0,
73 Enabled = 1,
75}
76impl From<AWDIE> for bool {
77 #[inline(always)]
78 fn from(variant: AWDIE) -> Self {
79 variant as u8 != 0
80 }
81}
82pub type AWDIE_R = crate::BitReader<AWDIE>;
84impl AWDIE_R {
85 #[inline(always)]
87 pub const fn variant(&self) -> AWDIE {
88 match self.bits {
89 false => AWDIE::Disabled,
90 true => AWDIE::Enabled,
91 }
92 }
93 #[inline(always)]
95 pub fn is_disabled(&self) -> bool {
96 *self == AWDIE::Disabled
97 }
98 #[inline(always)]
100 pub fn is_enabled(&self) -> bool {
101 *self == AWDIE::Enabled
102 }
103}
104pub type AWDIE_W<'a, REG> = crate::BitWriter<'a, REG, AWDIE>;
106impl<'a, REG> AWDIE_W<'a, REG>
107where
108 REG: crate::Writable + crate::RegisterSpec,
109{
110 #[inline(always)]
112 pub fn disabled(self) -> &'a mut crate::W<REG> {
113 self.variant(AWDIE::Disabled)
114 }
115 #[inline(always)]
117 pub fn enabled(self) -> &'a mut crate::W<REG> {
118 self.variant(AWDIE::Enabled)
119 }
120}
121#[cfg_attr(feature = "defmt", derive(defmt::Format))]
125#[derive(Clone, Copy, Debug, PartialEq, Eq)]
126pub enum JEOCIE {
127 Disabled = 0,
129 Enabled = 1,
131}
132impl From<JEOCIE> for bool {
133 #[inline(always)]
134 fn from(variant: JEOCIE) -> Self {
135 variant as u8 != 0
136 }
137}
138pub type JEOCIE_R = crate::BitReader<JEOCIE>;
140impl JEOCIE_R {
141 #[inline(always)]
143 pub const fn variant(&self) -> JEOCIE {
144 match self.bits {
145 false => JEOCIE::Disabled,
146 true => JEOCIE::Enabled,
147 }
148 }
149 #[inline(always)]
151 pub fn is_disabled(&self) -> bool {
152 *self == JEOCIE::Disabled
153 }
154 #[inline(always)]
156 pub fn is_enabled(&self) -> bool {
157 *self == JEOCIE::Enabled
158 }
159}
160pub type JEOCIE_W<'a, REG> = crate::BitWriter<'a, REG, JEOCIE>;
162impl<'a, REG> JEOCIE_W<'a, REG>
163where
164 REG: crate::Writable + crate::RegisterSpec,
165{
166 #[inline(always)]
168 pub fn disabled(self) -> &'a mut crate::W<REG> {
169 self.variant(JEOCIE::Disabled)
170 }
171 #[inline(always)]
173 pub fn enabled(self) -> &'a mut crate::W<REG> {
174 self.variant(JEOCIE::Enabled)
175 }
176}
177#[cfg_attr(feature = "defmt", derive(defmt::Format))]
181#[derive(Clone, Copy, Debug, PartialEq, Eq)]
182pub enum SCAN {
183 Disabled = 0,
185 Enabled = 1,
187}
188impl From<SCAN> for bool {
189 #[inline(always)]
190 fn from(variant: SCAN) -> Self {
191 variant as u8 != 0
192 }
193}
194pub type SCAN_R = crate::BitReader<SCAN>;
196impl SCAN_R {
197 #[inline(always)]
199 pub const fn variant(&self) -> SCAN {
200 match self.bits {
201 false => SCAN::Disabled,
202 true => SCAN::Enabled,
203 }
204 }
205 #[inline(always)]
207 pub fn is_disabled(&self) -> bool {
208 *self == SCAN::Disabled
209 }
210 #[inline(always)]
212 pub fn is_enabled(&self) -> bool {
213 *self == SCAN::Enabled
214 }
215}
216pub type SCAN_W<'a, REG> = crate::BitWriter<'a, REG, SCAN>;
218impl<'a, REG> SCAN_W<'a, REG>
219where
220 REG: crate::Writable + crate::RegisterSpec,
221{
222 #[inline(always)]
224 pub fn disabled(self) -> &'a mut crate::W<REG> {
225 self.variant(SCAN::Disabled)
226 }
227 #[inline(always)]
229 pub fn enabled(self) -> &'a mut crate::W<REG> {
230 self.variant(SCAN::Enabled)
231 }
232}
233#[cfg_attr(feature = "defmt", derive(defmt::Format))]
237#[derive(Clone, Copy, Debug, PartialEq, Eq)]
238pub enum AWDSGL {
239 All = 0,
241 Single = 1,
243}
244impl From<AWDSGL> for bool {
245 #[inline(always)]
246 fn from(variant: AWDSGL) -> Self {
247 variant as u8 != 0
248 }
249}
250pub type AWDSGL_R = crate::BitReader<AWDSGL>;
252impl AWDSGL_R {
253 #[inline(always)]
255 pub const fn variant(&self) -> AWDSGL {
256 match self.bits {
257 false => AWDSGL::All,
258 true => AWDSGL::Single,
259 }
260 }
261 #[inline(always)]
263 pub fn is_all(&self) -> bool {
264 *self == AWDSGL::All
265 }
266 #[inline(always)]
268 pub fn is_single(&self) -> bool {
269 *self == AWDSGL::Single
270 }
271}
272pub type AWDSGL_W<'a, REG> = crate::BitWriter<'a, REG, AWDSGL>;
274impl<'a, REG> AWDSGL_W<'a, REG>
275where
276 REG: crate::Writable + crate::RegisterSpec,
277{
278 #[inline(always)]
280 pub fn all(self) -> &'a mut crate::W<REG> {
281 self.variant(AWDSGL::All)
282 }
283 #[inline(always)]
285 pub fn single(self) -> &'a mut crate::W<REG> {
286 self.variant(AWDSGL::Single)
287 }
288}
289#[cfg_attr(feature = "defmt", derive(defmt::Format))]
293#[derive(Clone, Copy, Debug, PartialEq, Eq)]
294pub enum JAUTO {
295 Disabled = 0,
297 Enabled = 1,
299}
300impl From<JAUTO> for bool {
301 #[inline(always)]
302 fn from(variant: JAUTO) -> Self {
303 variant as u8 != 0
304 }
305}
306pub type JAUTO_R = crate::BitReader<JAUTO>;
308impl JAUTO_R {
309 #[inline(always)]
311 pub const fn variant(&self) -> JAUTO {
312 match self.bits {
313 false => JAUTO::Disabled,
314 true => JAUTO::Enabled,
315 }
316 }
317 #[inline(always)]
319 pub fn is_disabled(&self) -> bool {
320 *self == JAUTO::Disabled
321 }
322 #[inline(always)]
324 pub fn is_enabled(&self) -> bool {
325 *self == JAUTO::Enabled
326 }
327}
328pub type JAUTO_W<'a, REG> = crate::BitWriter<'a, REG, JAUTO>;
330impl<'a, REG> JAUTO_W<'a, REG>
331where
332 REG: crate::Writable + crate::RegisterSpec,
333{
334 #[inline(always)]
336 pub fn disabled(self) -> &'a mut crate::W<REG> {
337 self.variant(JAUTO::Disabled)
338 }
339 #[inline(always)]
341 pub fn enabled(self) -> &'a mut crate::W<REG> {
342 self.variant(JAUTO::Enabled)
343 }
344}
345#[cfg_attr(feature = "defmt", derive(defmt::Format))]
349#[derive(Clone, Copy, Debug, PartialEq, Eq)]
350pub enum DISCEN {
351 Disabled = 0,
353 Enabled = 1,
355}
356impl From<DISCEN> for bool {
357 #[inline(always)]
358 fn from(variant: DISCEN) -> Self {
359 variant as u8 != 0
360 }
361}
362pub type DISCEN_R = crate::BitReader<DISCEN>;
364impl DISCEN_R {
365 #[inline(always)]
367 pub const fn variant(&self) -> DISCEN {
368 match self.bits {
369 false => DISCEN::Disabled,
370 true => DISCEN::Enabled,
371 }
372 }
373 #[inline(always)]
375 pub fn is_disabled(&self) -> bool {
376 *self == DISCEN::Disabled
377 }
378 #[inline(always)]
380 pub fn is_enabled(&self) -> bool {
381 *self == DISCEN::Enabled
382 }
383}
384pub type DISCEN_W<'a, REG> = crate::BitWriter<'a, REG, DISCEN>;
386impl<'a, REG> DISCEN_W<'a, REG>
387where
388 REG: crate::Writable + crate::RegisterSpec,
389{
390 #[inline(always)]
392 pub fn disabled(self) -> &'a mut crate::W<REG> {
393 self.variant(DISCEN::Disabled)
394 }
395 #[inline(always)]
397 pub fn enabled(self) -> &'a mut crate::W<REG> {
398 self.variant(DISCEN::Enabled)
399 }
400}
401#[cfg_attr(feature = "defmt", derive(defmt::Format))]
405#[derive(Clone, Copy, Debug, PartialEq, Eq)]
406pub enum JDISCEN {
407 Disabled = 0,
409 Enabled = 1,
411}
412impl From<JDISCEN> for bool {
413 #[inline(always)]
414 fn from(variant: JDISCEN) -> Self {
415 variant as u8 != 0
416 }
417}
418pub type JDISCEN_R = crate::BitReader<JDISCEN>;
420impl JDISCEN_R {
421 #[inline(always)]
423 pub const fn variant(&self) -> JDISCEN {
424 match self.bits {
425 false => JDISCEN::Disabled,
426 true => JDISCEN::Enabled,
427 }
428 }
429 #[inline(always)]
431 pub fn is_disabled(&self) -> bool {
432 *self == JDISCEN::Disabled
433 }
434 #[inline(always)]
436 pub fn is_enabled(&self) -> bool {
437 *self == JDISCEN::Enabled
438 }
439}
440pub type JDISCEN_W<'a, REG> = crate::BitWriter<'a, REG, JDISCEN>;
442impl<'a, REG> JDISCEN_W<'a, REG>
443where
444 REG: crate::Writable + crate::RegisterSpec,
445{
446 #[inline(always)]
448 pub fn disabled(self) -> &'a mut crate::W<REG> {
449 self.variant(JDISCEN::Disabled)
450 }
451 #[inline(always)]
453 pub fn enabled(self) -> &'a mut crate::W<REG> {
454 self.variant(JDISCEN::Enabled)
455 }
456}
457pub type DISCNUM_R = crate::FieldReader;
459pub type DISCNUM_W<'a, REG> = crate::FieldWriter<'a, REG, 3, u8, crate::Safe>;
461#[cfg_attr(feature = "defmt", derive(defmt::Format))]
465#[derive(Clone, Copy, Debug, PartialEq, Eq)]
466pub enum JAWDEN {
467 Disabled = 0,
469 Enabled = 1,
471}
472impl From<JAWDEN> for bool {
473 #[inline(always)]
474 fn from(variant: JAWDEN) -> Self {
475 variant as u8 != 0
476 }
477}
478pub type JAWDEN_R = crate::BitReader<JAWDEN>;
480impl JAWDEN_R {
481 #[inline(always)]
483 pub const fn variant(&self) -> JAWDEN {
484 match self.bits {
485 false => JAWDEN::Disabled,
486 true => JAWDEN::Enabled,
487 }
488 }
489 #[inline(always)]
491 pub fn is_disabled(&self) -> bool {
492 *self == JAWDEN::Disabled
493 }
494 #[inline(always)]
496 pub fn is_enabled(&self) -> bool {
497 *self == JAWDEN::Enabled
498 }
499}
500pub type JAWDEN_W<'a, REG> = crate::BitWriter<'a, REG, JAWDEN>;
502impl<'a, REG> JAWDEN_W<'a, REG>
503where
504 REG: crate::Writable + crate::RegisterSpec,
505{
506 #[inline(always)]
508 pub fn disabled(self) -> &'a mut crate::W<REG> {
509 self.variant(JAWDEN::Disabled)
510 }
511 #[inline(always)]
513 pub fn enabled(self) -> &'a mut crate::W<REG> {
514 self.variant(JAWDEN::Enabled)
515 }
516}
517#[cfg_attr(feature = "defmt", derive(defmt::Format))]
521#[derive(Clone, Copy, Debug, PartialEq, Eq)]
522pub enum AWDEN {
523 Disabled = 0,
525 Enabled = 1,
527}
528impl From<AWDEN> for bool {
529 #[inline(always)]
530 fn from(variant: AWDEN) -> Self {
531 variant as u8 != 0
532 }
533}
534pub type AWDEN_R = crate::BitReader<AWDEN>;
536impl AWDEN_R {
537 #[inline(always)]
539 pub const fn variant(&self) -> AWDEN {
540 match self.bits {
541 false => AWDEN::Disabled,
542 true => AWDEN::Enabled,
543 }
544 }
545 #[inline(always)]
547 pub fn is_disabled(&self) -> bool {
548 *self == AWDEN::Disabled
549 }
550 #[inline(always)]
552 pub fn is_enabled(&self) -> bool {
553 *self == AWDEN::Enabled
554 }
555}
556pub type AWDEN_W<'a, REG> = crate::BitWriter<'a, REG, AWDEN>;
558impl<'a, REG> AWDEN_W<'a, REG>
559where
560 REG: crate::Writable + crate::RegisterSpec,
561{
562 #[inline(always)]
564 pub fn disabled(self) -> &'a mut crate::W<REG> {
565 self.variant(AWDEN::Disabled)
566 }
567 #[inline(always)]
569 pub fn enabled(self) -> &'a mut crate::W<REG> {
570 self.variant(AWDEN::Enabled)
571 }
572}
573impl R {
574 #[inline(always)]
576 pub fn awdch(&self) -> AWDCH_R {
577 AWDCH_R::new((self.bits & 0x1f) as u8)
578 }
579 #[inline(always)]
581 pub fn eocie(&self) -> EOCIE_R {
582 EOCIE_R::new(((self.bits >> 5) & 1) != 0)
583 }
584 #[inline(always)]
586 pub fn awdie(&self) -> AWDIE_R {
587 AWDIE_R::new(((self.bits >> 6) & 1) != 0)
588 }
589 #[inline(always)]
591 pub fn jeocie(&self) -> JEOCIE_R {
592 JEOCIE_R::new(((self.bits >> 7) & 1) != 0)
593 }
594 #[inline(always)]
596 pub fn scan(&self) -> SCAN_R {
597 SCAN_R::new(((self.bits >> 8) & 1) != 0)
598 }
599 #[inline(always)]
601 pub fn awdsgl(&self) -> AWDSGL_R {
602 AWDSGL_R::new(((self.bits >> 9) & 1) != 0)
603 }
604 #[inline(always)]
606 pub fn jauto(&self) -> JAUTO_R {
607 JAUTO_R::new(((self.bits >> 10) & 1) != 0)
608 }
609 #[inline(always)]
611 pub fn discen(&self) -> DISCEN_R {
612 DISCEN_R::new(((self.bits >> 11) & 1) != 0)
613 }
614 #[inline(always)]
616 pub fn jdiscen(&self) -> JDISCEN_R {
617 JDISCEN_R::new(((self.bits >> 12) & 1) != 0)
618 }
619 #[inline(always)]
621 pub fn discnum(&self) -> DISCNUM_R {
622 DISCNUM_R::new(((self.bits >> 13) & 7) as u8)
623 }
624 #[inline(always)]
626 pub fn jawden(&self) -> JAWDEN_R {
627 JAWDEN_R::new(((self.bits >> 22) & 1) != 0)
628 }
629 #[inline(always)]
631 pub fn awden(&self) -> AWDEN_R {
632 AWDEN_R::new(((self.bits >> 23) & 1) != 0)
633 }
634}
635impl core::fmt::Debug for R {
636 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
637 f.debug_struct("CR1")
638 .field("awden", &self.awden())
639 .field("jawden", &self.jawden())
640 .field("discnum", &self.discnum())
641 .field("jdiscen", &self.jdiscen())
642 .field("discen", &self.discen())
643 .field("jauto", &self.jauto())
644 .field("awdsgl", &self.awdsgl())
645 .field("scan", &self.scan())
646 .field("jeocie", &self.jeocie())
647 .field("awdie", &self.awdie())
648 .field("eocie", &self.eocie())
649 .field("awdch", &self.awdch())
650 .finish()
651 }
652}
653impl W {
654 #[inline(always)]
656 pub fn awdch(&mut self) -> AWDCH_W<CR1rs> {
657 AWDCH_W::new(self, 0)
658 }
659 #[inline(always)]
661 pub fn eocie(&mut self) -> EOCIE_W<CR1rs> {
662 EOCIE_W::new(self, 5)
663 }
664 #[inline(always)]
666 pub fn awdie(&mut self) -> AWDIE_W<CR1rs> {
667 AWDIE_W::new(self, 6)
668 }
669 #[inline(always)]
671 pub fn jeocie(&mut self) -> JEOCIE_W<CR1rs> {
672 JEOCIE_W::new(self, 7)
673 }
674 #[inline(always)]
676 pub fn scan(&mut self) -> SCAN_W<CR1rs> {
677 SCAN_W::new(self, 8)
678 }
679 #[inline(always)]
681 pub fn awdsgl(&mut self) -> AWDSGL_W<CR1rs> {
682 AWDSGL_W::new(self, 9)
683 }
684 #[inline(always)]
686 pub fn jauto(&mut self) -> JAUTO_W<CR1rs> {
687 JAUTO_W::new(self, 10)
688 }
689 #[inline(always)]
691 pub fn discen(&mut self) -> DISCEN_W<CR1rs> {
692 DISCEN_W::new(self, 11)
693 }
694 #[inline(always)]
696 pub fn jdiscen(&mut self) -> JDISCEN_W<CR1rs> {
697 JDISCEN_W::new(self, 12)
698 }
699 #[inline(always)]
701 pub fn discnum(&mut self) -> DISCNUM_W<CR1rs> {
702 DISCNUM_W::new(self, 13)
703 }
704 #[inline(always)]
706 pub fn jawden(&mut self) -> JAWDEN_W<CR1rs> {
707 JAWDEN_W::new(self, 22)
708 }
709 #[inline(always)]
711 pub fn awden(&mut self) -> AWDEN_W<CR1rs> {
712 AWDEN_W::new(self, 23)
713 }
714}
715pub struct CR1rs;
721impl crate::RegisterSpec for CR1rs {
722 type Ux = u32;
723}
724impl crate::Readable for CR1rs {}
726impl crate::Writable for CR1rs {
728 type Safety = crate::Unsafe;
729}
730impl crate::Resettable for CR1rs {}