1#[doc = "Register `MCR` reader"]
2pub type R = crate::R<McrSpec>;
3#[doc = "Register `MCR` writer"]
4pub type W = crate::W<McrSpec>;
5#[doc = "Interrupt on MR0\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum Mr0i {
9 #[doc = "0: Does not generate"]
10 Mr0i0 = 0,
11 #[doc = "1: Generates"]
12 Mr0i1 = 1,
13}
14impl From<Mr0i> for bool {
15 #[inline(always)]
16 fn from(variant: Mr0i) -> Self {
17 variant as u8 != 0
18 }
19}
20#[doc = "Field `MR0I` reader - Interrupt on MR0"]
21pub type Mr0iR = crate::BitReader<Mr0i>;
22impl Mr0iR {
23 #[doc = "Get enumerated values variant"]
24 #[inline(always)]
25 pub const fn variant(&self) -> Mr0i {
26 match self.bits {
27 false => Mr0i::Mr0i0,
28 true => Mr0i::Mr0i1,
29 }
30 }
31 #[doc = "Does not generate"]
32 #[inline(always)]
33 pub fn is_mr0i_0(&self) -> bool {
34 *self == Mr0i::Mr0i0
35 }
36 #[doc = "Generates"]
37 #[inline(always)]
38 pub fn is_mr0i_1(&self) -> bool {
39 *self == Mr0i::Mr0i1
40 }
41}
42#[doc = "Field `MR0I` writer - Interrupt on MR0"]
43pub type Mr0iW<'a, REG> = crate::BitWriter<'a, REG, Mr0i>;
44impl<'a, REG> Mr0iW<'a, REG>
45where
46 REG: crate::Writable + crate::RegisterSpec,
47{
48 #[doc = "Does not generate"]
49 #[inline(always)]
50 pub fn mr0i_0(self) -> &'a mut crate::W<REG> {
51 self.variant(Mr0i::Mr0i0)
52 }
53 #[doc = "Generates"]
54 #[inline(always)]
55 pub fn mr0i_1(self) -> &'a mut crate::W<REG> {
56 self.variant(Mr0i::Mr0i1)
57 }
58}
59#[doc = "Reset on MR0\n\nValue on reset: 0"]
60#[cfg_attr(feature = "defmt", derive(defmt::Format))]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum Mr0r {
63 #[doc = "0: Does not reset"]
64 Mr0r0 = 0,
65 #[doc = "1: Resets"]
66 Mr0r1 = 1,
67}
68impl From<Mr0r> for bool {
69 #[inline(always)]
70 fn from(variant: Mr0r) -> Self {
71 variant as u8 != 0
72 }
73}
74#[doc = "Field `MR0R` reader - Reset on MR0"]
75pub type Mr0rR = crate::BitReader<Mr0r>;
76impl Mr0rR {
77 #[doc = "Get enumerated values variant"]
78 #[inline(always)]
79 pub const fn variant(&self) -> Mr0r {
80 match self.bits {
81 false => Mr0r::Mr0r0,
82 true => Mr0r::Mr0r1,
83 }
84 }
85 #[doc = "Does not reset"]
86 #[inline(always)]
87 pub fn is_mr0r_0(&self) -> bool {
88 *self == Mr0r::Mr0r0
89 }
90 #[doc = "Resets"]
91 #[inline(always)]
92 pub fn is_mr0r_1(&self) -> bool {
93 *self == Mr0r::Mr0r1
94 }
95}
96#[doc = "Field `MR0R` writer - Reset on MR0"]
97pub type Mr0rW<'a, REG> = crate::BitWriter<'a, REG, Mr0r>;
98impl<'a, REG> Mr0rW<'a, REG>
99where
100 REG: crate::Writable + crate::RegisterSpec,
101{
102 #[doc = "Does not reset"]
103 #[inline(always)]
104 pub fn mr0r_0(self) -> &'a mut crate::W<REG> {
105 self.variant(Mr0r::Mr0r0)
106 }
107 #[doc = "Resets"]
108 #[inline(always)]
109 pub fn mr0r_1(self) -> &'a mut crate::W<REG> {
110 self.variant(Mr0r::Mr0r1)
111 }
112}
113#[doc = "Stop on MR0\n\nValue on reset: 0"]
114#[cfg_attr(feature = "defmt", derive(defmt::Format))]
115#[derive(Clone, Copy, Debug, PartialEq, Eq)]
116pub enum Mr0s {
117 #[doc = "0: Does not stop"]
118 Mr0s0 = 0,
119 #[doc = "1: Stops"]
120 Mr0s1 = 1,
121}
122impl From<Mr0s> for bool {
123 #[inline(always)]
124 fn from(variant: Mr0s) -> Self {
125 variant as u8 != 0
126 }
127}
128#[doc = "Field `MR0S` reader - Stop on MR0"]
129pub type Mr0sR = crate::BitReader<Mr0s>;
130impl Mr0sR {
131 #[doc = "Get enumerated values variant"]
132 #[inline(always)]
133 pub const fn variant(&self) -> Mr0s {
134 match self.bits {
135 false => Mr0s::Mr0s0,
136 true => Mr0s::Mr0s1,
137 }
138 }
139 #[doc = "Does not stop"]
140 #[inline(always)]
141 pub fn is_mr0s_0(&self) -> bool {
142 *self == Mr0s::Mr0s0
143 }
144 #[doc = "Stops"]
145 #[inline(always)]
146 pub fn is_mr0s_1(&self) -> bool {
147 *self == Mr0s::Mr0s1
148 }
149}
150#[doc = "Field `MR0S` writer - Stop on MR0"]
151pub type Mr0sW<'a, REG> = crate::BitWriter<'a, REG, Mr0s>;
152impl<'a, REG> Mr0sW<'a, REG>
153where
154 REG: crate::Writable + crate::RegisterSpec,
155{
156 #[doc = "Does not stop"]
157 #[inline(always)]
158 pub fn mr0s_0(self) -> &'a mut crate::W<REG> {
159 self.variant(Mr0s::Mr0s0)
160 }
161 #[doc = "Stops"]
162 #[inline(always)]
163 pub fn mr0s_1(self) -> &'a mut crate::W<REG> {
164 self.variant(Mr0s::Mr0s1)
165 }
166}
167#[doc = "Interrupt on MR1\n\nValue on reset: 0"]
168#[cfg_attr(feature = "defmt", derive(defmt::Format))]
169#[derive(Clone, Copy, Debug, PartialEq, Eq)]
170pub enum Mr1i {
171 #[doc = "0: Does not generate"]
172 Mr1i0 = 0,
173 #[doc = "1: Generates"]
174 Mr1i1 = 1,
175}
176impl From<Mr1i> for bool {
177 #[inline(always)]
178 fn from(variant: Mr1i) -> Self {
179 variant as u8 != 0
180 }
181}
182#[doc = "Field `MR1I` reader - Interrupt on MR1"]
183pub type Mr1iR = crate::BitReader<Mr1i>;
184impl Mr1iR {
185 #[doc = "Get enumerated values variant"]
186 #[inline(always)]
187 pub const fn variant(&self) -> Mr1i {
188 match self.bits {
189 false => Mr1i::Mr1i0,
190 true => Mr1i::Mr1i1,
191 }
192 }
193 #[doc = "Does not generate"]
194 #[inline(always)]
195 pub fn is_mr1i_0(&self) -> bool {
196 *self == Mr1i::Mr1i0
197 }
198 #[doc = "Generates"]
199 #[inline(always)]
200 pub fn is_mr1i_1(&self) -> bool {
201 *self == Mr1i::Mr1i1
202 }
203}
204#[doc = "Field `MR1I` writer - Interrupt on MR1"]
205pub type Mr1iW<'a, REG> = crate::BitWriter<'a, REG, Mr1i>;
206impl<'a, REG> Mr1iW<'a, REG>
207where
208 REG: crate::Writable + crate::RegisterSpec,
209{
210 #[doc = "Does not generate"]
211 #[inline(always)]
212 pub fn mr1i_0(self) -> &'a mut crate::W<REG> {
213 self.variant(Mr1i::Mr1i0)
214 }
215 #[doc = "Generates"]
216 #[inline(always)]
217 pub fn mr1i_1(self) -> &'a mut crate::W<REG> {
218 self.variant(Mr1i::Mr1i1)
219 }
220}
221#[doc = "Reset on MR1\n\nValue on reset: 0"]
222#[cfg_attr(feature = "defmt", derive(defmt::Format))]
223#[derive(Clone, Copy, Debug, PartialEq, Eq)]
224pub enum Mr1r {
225 #[doc = "0: Does not reset"]
226 Mr1r0 = 0,
227 #[doc = "1: Resets"]
228 Mr1r1 = 1,
229}
230impl From<Mr1r> for bool {
231 #[inline(always)]
232 fn from(variant: Mr1r) -> Self {
233 variant as u8 != 0
234 }
235}
236#[doc = "Field `MR1R` reader - Reset on MR1"]
237pub type Mr1rR = crate::BitReader<Mr1r>;
238impl Mr1rR {
239 #[doc = "Get enumerated values variant"]
240 #[inline(always)]
241 pub const fn variant(&self) -> Mr1r {
242 match self.bits {
243 false => Mr1r::Mr1r0,
244 true => Mr1r::Mr1r1,
245 }
246 }
247 #[doc = "Does not reset"]
248 #[inline(always)]
249 pub fn is_mr1r_0(&self) -> bool {
250 *self == Mr1r::Mr1r0
251 }
252 #[doc = "Resets"]
253 #[inline(always)]
254 pub fn is_mr1r_1(&self) -> bool {
255 *self == Mr1r::Mr1r1
256 }
257}
258#[doc = "Field `MR1R` writer - Reset on MR1"]
259pub type Mr1rW<'a, REG> = crate::BitWriter<'a, REG, Mr1r>;
260impl<'a, REG> Mr1rW<'a, REG>
261where
262 REG: crate::Writable + crate::RegisterSpec,
263{
264 #[doc = "Does not reset"]
265 #[inline(always)]
266 pub fn mr1r_0(self) -> &'a mut crate::W<REG> {
267 self.variant(Mr1r::Mr1r0)
268 }
269 #[doc = "Resets"]
270 #[inline(always)]
271 pub fn mr1r_1(self) -> &'a mut crate::W<REG> {
272 self.variant(Mr1r::Mr1r1)
273 }
274}
275#[doc = "Stop on MR1\n\nValue on reset: 0"]
276#[cfg_attr(feature = "defmt", derive(defmt::Format))]
277#[derive(Clone, Copy, Debug, PartialEq, Eq)]
278pub enum Mr1s {
279 #[doc = "0: Does not stop"]
280 Mris0 = 0,
281 #[doc = "1: Stops"]
282 Mris1 = 1,
283}
284impl From<Mr1s> for bool {
285 #[inline(always)]
286 fn from(variant: Mr1s) -> Self {
287 variant as u8 != 0
288 }
289}
290#[doc = "Field `MR1S` reader - Stop on MR1"]
291pub type Mr1sR = crate::BitReader<Mr1s>;
292impl Mr1sR {
293 #[doc = "Get enumerated values variant"]
294 #[inline(always)]
295 pub const fn variant(&self) -> Mr1s {
296 match self.bits {
297 false => Mr1s::Mris0,
298 true => Mr1s::Mris1,
299 }
300 }
301 #[doc = "Does not stop"]
302 #[inline(always)]
303 pub fn is_mris_0(&self) -> bool {
304 *self == Mr1s::Mris0
305 }
306 #[doc = "Stops"]
307 #[inline(always)]
308 pub fn is_mris_1(&self) -> bool {
309 *self == Mr1s::Mris1
310 }
311}
312#[doc = "Field `MR1S` writer - Stop on MR1"]
313pub type Mr1sW<'a, REG> = crate::BitWriter<'a, REG, Mr1s>;
314impl<'a, REG> Mr1sW<'a, REG>
315where
316 REG: crate::Writable + crate::RegisterSpec,
317{
318 #[doc = "Does not stop"]
319 #[inline(always)]
320 pub fn mris_0(self) -> &'a mut crate::W<REG> {
321 self.variant(Mr1s::Mris0)
322 }
323 #[doc = "Stops"]
324 #[inline(always)]
325 pub fn mris_1(self) -> &'a mut crate::W<REG> {
326 self.variant(Mr1s::Mris1)
327 }
328}
329#[doc = "Interrupt on MR2\n\nValue on reset: 0"]
330#[cfg_attr(feature = "defmt", derive(defmt::Format))]
331#[derive(Clone, Copy, Debug, PartialEq, Eq)]
332pub enum Mr2i {
333 #[doc = "0: Does not generate"]
334 Mr2i0 = 0,
335 #[doc = "1: Generates"]
336 Mr2i1 = 1,
337}
338impl From<Mr2i> for bool {
339 #[inline(always)]
340 fn from(variant: Mr2i) -> Self {
341 variant as u8 != 0
342 }
343}
344#[doc = "Field `MR2I` reader - Interrupt on MR2"]
345pub type Mr2iR = crate::BitReader<Mr2i>;
346impl Mr2iR {
347 #[doc = "Get enumerated values variant"]
348 #[inline(always)]
349 pub const fn variant(&self) -> Mr2i {
350 match self.bits {
351 false => Mr2i::Mr2i0,
352 true => Mr2i::Mr2i1,
353 }
354 }
355 #[doc = "Does not generate"]
356 #[inline(always)]
357 pub fn is_mr2i_0(&self) -> bool {
358 *self == Mr2i::Mr2i0
359 }
360 #[doc = "Generates"]
361 #[inline(always)]
362 pub fn is_mr2i_1(&self) -> bool {
363 *self == Mr2i::Mr2i1
364 }
365}
366#[doc = "Field `MR2I` writer - Interrupt on MR2"]
367pub type Mr2iW<'a, REG> = crate::BitWriter<'a, REG, Mr2i>;
368impl<'a, REG> Mr2iW<'a, REG>
369where
370 REG: crate::Writable + crate::RegisterSpec,
371{
372 #[doc = "Does not generate"]
373 #[inline(always)]
374 pub fn mr2i_0(self) -> &'a mut crate::W<REG> {
375 self.variant(Mr2i::Mr2i0)
376 }
377 #[doc = "Generates"]
378 #[inline(always)]
379 pub fn mr2i_1(self) -> &'a mut crate::W<REG> {
380 self.variant(Mr2i::Mr2i1)
381 }
382}
383#[doc = "Reset on MR2\n\nValue on reset: 0"]
384#[cfg_attr(feature = "defmt", derive(defmt::Format))]
385#[derive(Clone, Copy, Debug, PartialEq, Eq)]
386pub enum Mr2r {
387 #[doc = "0: Does not reset"]
388 Mr2r0 = 0,
389 #[doc = "1: Resets"]
390 Mr2r1 = 1,
391}
392impl From<Mr2r> for bool {
393 #[inline(always)]
394 fn from(variant: Mr2r) -> Self {
395 variant as u8 != 0
396 }
397}
398#[doc = "Field `MR2R` reader - Reset on MR2"]
399pub type Mr2rR = crate::BitReader<Mr2r>;
400impl Mr2rR {
401 #[doc = "Get enumerated values variant"]
402 #[inline(always)]
403 pub const fn variant(&self) -> Mr2r {
404 match self.bits {
405 false => Mr2r::Mr2r0,
406 true => Mr2r::Mr2r1,
407 }
408 }
409 #[doc = "Does not reset"]
410 #[inline(always)]
411 pub fn is_mr2r_0(&self) -> bool {
412 *self == Mr2r::Mr2r0
413 }
414 #[doc = "Resets"]
415 #[inline(always)]
416 pub fn is_mr2r_1(&self) -> bool {
417 *self == Mr2r::Mr2r1
418 }
419}
420#[doc = "Field `MR2R` writer - Reset on MR2"]
421pub type Mr2rW<'a, REG> = crate::BitWriter<'a, REG, Mr2r>;
422impl<'a, REG> Mr2rW<'a, REG>
423where
424 REG: crate::Writable + crate::RegisterSpec,
425{
426 #[doc = "Does not reset"]
427 #[inline(always)]
428 pub fn mr2r_0(self) -> &'a mut crate::W<REG> {
429 self.variant(Mr2r::Mr2r0)
430 }
431 #[doc = "Resets"]
432 #[inline(always)]
433 pub fn mr2r_1(self) -> &'a mut crate::W<REG> {
434 self.variant(Mr2r::Mr2r1)
435 }
436}
437#[doc = "Stop on MR2\n\nValue on reset: 0"]
438#[cfg_attr(feature = "defmt", derive(defmt::Format))]
439#[derive(Clone, Copy, Debug, PartialEq, Eq)]
440pub enum Mr2s {
441 #[doc = "0: Does not stop"]
442 Mr2s0 = 0,
443 #[doc = "1: Stops"]
444 Mr2s1 = 1,
445}
446impl From<Mr2s> for bool {
447 #[inline(always)]
448 fn from(variant: Mr2s) -> Self {
449 variant as u8 != 0
450 }
451}
452#[doc = "Field `MR2S` reader - Stop on MR2"]
453pub type Mr2sR = crate::BitReader<Mr2s>;
454impl Mr2sR {
455 #[doc = "Get enumerated values variant"]
456 #[inline(always)]
457 pub const fn variant(&self) -> Mr2s {
458 match self.bits {
459 false => Mr2s::Mr2s0,
460 true => Mr2s::Mr2s1,
461 }
462 }
463 #[doc = "Does not stop"]
464 #[inline(always)]
465 pub fn is_mr2s_0(&self) -> bool {
466 *self == Mr2s::Mr2s0
467 }
468 #[doc = "Stops"]
469 #[inline(always)]
470 pub fn is_mr2s_1(&self) -> bool {
471 *self == Mr2s::Mr2s1
472 }
473}
474#[doc = "Field `MR2S` writer - Stop on MR2"]
475pub type Mr2sW<'a, REG> = crate::BitWriter<'a, REG, Mr2s>;
476impl<'a, REG> Mr2sW<'a, REG>
477where
478 REG: crate::Writable + crate::RegisterSpec,
479{
480 #[doc = "Does not stop"]
481 #[inline(always)]
482 pub fn mr2s_0(self) -> &'a mut crate::W<REG> {
483 self.variant(Mr2s::Mr2s0)
484 }
485 #[doc = "Stops"]
486 #[inline(always)]
487 pub fn mr2s_1(self) -> &'a mut crate::W<REG> {
488 self.variant(Mr2s::Mr2s1)
489 }
490}
491#[doc = "Interrupt on MR3\n\nValue on reset: 0"]
492#[cfg_attr(feature = "defmt", derive(defmt::Format))]
493#[derive(Clone, Copy, Debug, PartialEq, Eq)]
494pub enum Mr3i {
495 #[doc = "0: Does not generate"]
496 Mr3i0 = 0,
497 #[doc = "1: Generates"]
498 Mr3i1 = 1,
499}
500impl From<Mr3i> for bool {
501 #[inline(always)]
502 fn from(variant: Mr3i) -> Self {
503 variant as u8 != 0
504 }
505}
506#[doc = "Field `MR3I` reader - Interrupt on MR3"]
507pub type Mr3iR = crate::BitReader<Mr3i>;
508impl Mr3iR {
509 #[doc = "Get enumerated values variant"]
510 #[inline(always)]
511 pub const fn variant(&self) -> Mr3i {
512 match self.bits {
513 false => Mr3i::Mr3i0,
514 true => Mr3i::Mr3i1,
515 }
516 }
517 #[doc = "Does not generate"]
518 #[inline(always)]
519 pub fn is_mr3i_0(&self) -> bool {
520 *self == Mr3i::Mr3i0
521 }
522 #[doc = "Generates"]
523 #[inline(always)]
524 pub fn is_mr3i_1(&self) -> bool {
525 *self == Mr3i::Mr3i1
526 }
527}
528#[doc = "Field `MR3I` writer - Interrupt on MR3"]
529pub type Mr3iW<'a, REG> = crate::BitWriter<'a, REG, Mr3i>;
530impl<'a, REG> Mr3iW<'a, REG>
531where
532 REG: crate::Writable + crate::RegisterSpec,
533{
534 #[doc = "Does not generate"]
535 #[inline(always)]
536 pub fn mr3i_0(self) -> &'a mut crate::W<REG> {
537 self.variant(Mr3i::Mr3i0)
538 }
539 #[doc = "Generates"]
540 #[inline(always)]
541 pub fn mr3i_1(self) -> &'a mut crate::W<REG> {
542 self.variant(Mr3i::Mr3i1)
543 }
544}
545#[doc = "Reset on MR3\n\nValue on reset: 0"]
546#[cfg_attr(feature = "defmt", derive(defmt::Format))]
547#[derive(Clone, Copy, Debug, PartialEq, Eq)]
548pub enum Mr3r {
549 #[doc = "0: Does not reset"]
550 Mr3r0 = 0,
551 #[doc = "1: Resets"]
552 Mr3r1 = 1,
553}
554impl From<Mr3r> for bool {
555 #[inline(always)]
556 fn from(variant: Mr3r) -> Self {
557 variant as u8 != 0
558 }
559}
560#[doc = "Field `MR3R` reader - Reset on MR3"]
561pub type Mr3rR = crate::BitReader<Mr3r>;
562impl Mr3rR {
563 #[doc = "Get enumerated values variant"]
564 #[inline(always)]
565 pub const fn variant(&self) -> Mr3r {
566 match self.bits {
567 false => Mr3r::Mr3r0,
568 true => Mr3r::Mr3r1,
569 }
570 }
571 #[doc = "Does not reset"]
572 #[inline(always)]
573 pub fn is_mr3r_0(&self) -> bool {
574 *self == Mr3r::Mr3r0
575 }
576 #[doc = "Resets"]
577 #[inline(always)]
578 pub fn is_mr3r_1(&self) -> bool {
579 *self == Mr3r::Mr3r1
580 }
581}
582#[doc = "Field `MR3R` writer - Reset on MR3"]
583pub type Mr3rW<'a, REG> = crate::BitWriter<'a, REG, Mr3r>;
584impl<'a, REG> Mr3rW<'a, REG>
585where
586 REG: crate::Writable + crate::RegisterSpec,
587{
588 #[doc = "Does not reset"]
589 #[inline(always)]
590 pub fn mr3r_0(self) -> &'a mut crate::W<REG> {
591 self.variant(Mr3r::Mr3r0)
592 }
593 #[doc = "Resets"]
594 #[inline(always)]
595 pub fn mr3r_1(self) -> &'a mut crate::W<REG> {
596 self.variant(Mr3r::Mr3r1)
597 }
598}
599#[doc = "Stop on MR3\n\nValue on reset: 0"]
600#[cfg_attr(feature = "defmt", derive(defmt::Format))]
601#[derive(Clone, Copy, Debug, PartialEq, Eq)]
602pub enum Mr3s {
603 #[doc = "0: Does not stop"]
604 Mr3s0 = 0,
605 #[doc = "1: Stops"]
606 Mr3s1 = 1,
607}
608impl From<Mr3s> for bool {
609 #[inline(always)]
610 fn from(variant: Mr3s) -> Self {
611 variant as u8 != 0
612 }
613}
614#[doc = "Field `MR3S` reader - Stop on MR3"]
615pub type Mr3sR = crate::BitReader<Mr3s>;
616impl Mr3sR {
617 #[doc = "Get enumerated values variant"]
618 #[inline(always)]
619 pub const fn variant(&self) -> Mr3s {
620 match self.bits {
621 false => Mr3s::Mr3s0,
622 true => Mr3s::Mr3s1,
623 }
624 }
625 #[doc = "Does not stop"]
626 #[inline(always)]
627 pub fn is_mr3s_0(&self) -> bool {
628 *self == Mr3s::Mr3s0
629 }
630 #[doc = "Stops"]
631 #[inline(always)]
632 pub fn is_mr3s_1(&self) -> bool {
633 *self == Mr3s::Mr3s1
634 }
635}
636#[doc = "Field `MR3S` writer - Stop on MR3"]
637pub type Mr3sW<'a, REG> = crate::BitWriter<'a, REG, Mr3s>;
638impl<'a, REG> Mr3sW<'a, REG>
639where
640 REG: crate::Writable + crate::RegisterSpec,
641{
642 #[doc = "Does not stop"]
643 #[inline(always)]
644 pub fn mr3s_0(self) -> &'a mut crate::W<REG> {
645 self.variant(Mr3s::Mr3s0)
646 }
647 #[doc = "Stops"]
648 #[inline(always)]
649 pub fn mr3s_1(self) -> &'a mut crate::W<REG> {
650 self.variant(Mr3s::Mr3s1)
651 }
652}
653#[doc = "Reload MR\n\nValue on reset: 0"]
654#[cfg_attr(feature = "defmt", derive(defmt::Format))]
655#[derive(Clone, Copy, Debug, PartialEq, Eq)]
656pub enum Mr0rl {
657 #[doc = "0: Does not reload"]
658 Mr0rl0 = 0,
659 #[doc = "1: Reloads"]
660 Mr0rl1 = 1,
661}
662impl From<Mr0rl> for bool {
663 #[inline(always)]
664 fn from(variant: Mr0rl) -> Self {
665 variant as u8 != 0
666 }
667}
668#[doc = "Field `MR0RL` reader - Reload MR"]
669pub type Mr0rlR = crate::BitReader<Mr0rl>;
670impl Mr0rlR {
671 #[doc = "Get enumerated values variant"]
672 #[inline(always)]
673 pub const fn variant(&self) -> Mr0rl {
674 match self.bits {
675 false => Mr0rl::Mr0rl0,
676 true => Mr0rl::Mr0rl1,
677 }
678 }
679 #[doc = "Does not reload"]
680 #[inline(always)]
681 pub fn is_mr0rl_0(&self) -> bool {
682 *self == Mr0rl::Mr0rl0
683 }
684 #[doc = "Reloads"]
685 #[inline(always)]
686 pub fn is_mr0rl_1(&self) -> bool {
687 *self == Mr0rl::Mr0rl1
688 }
689}
690#[doc = "Field `MR0RL` writer - Reload MR"]
691pub type Mr0rlW<'a, REG> = crate::BitWriter<'a, REG, Mr0rl>;
692impl<'a, REG> Mr0rlW<'a, REG>
693where
694 REG: crate::Writable + crate::RegisterSpec,
695{
696 #[doc = "Does not reload"]
697 #[inline(always)]
698 pub fn mr0rl_0(self) -> &'a mut crate::W<REG> {
699 self.variant(Mr0rl::Mr0rl0)
700 }
701 #[doc = "Reloads"]
702 #[inline(always)]
703 pub fn mr0rl_1(self) -> &'a mut crate::W<REG> {
704 self.variant(Mr0rl::Mr0rl1)
705 }
706}
707#[doc = "Reload MR\n\nValue on reset: 0"]
708#[cfg_attr(feature = "defmt", derive(defmt::Format))]
709#[derive(Clone, Copy, Debug, PartialEq, Eq)]
710pub enum Mr1rl {
711 #[doc = "0: Does not reload"]
712 Mr1rl0 = 0,
713 #[doc = "1: Reloads"]
714 Mr1rl1 = 1,
715}
716impl From<Mr1rl> for bool {
717 #[inline(always)]
718 fn from(variant: Mr1rl) -> Self {
719 variant as u8 != 0
720 }
721}
722#[doc = "Field `MR1RL` reader - Reload MR"]
723pub type Mr1rlR = crate::BitReader<Mr1rl>;
724impl Mr1rlR {
725 #[doc = "Get enumerated values variant"]
726 #[inline(always)]
727 pub const fn variant(&self) -> Mr1rl {
728 match self.bits {
729 false => Mr1rl::Mr1rl0,
730 true => Mr1rl::Mr1rl1,
731 }
732 }
733 #[doc = "Does not reload"]
734 #[inline(always)]
735 pub fn is_mr1rl_0(&self) -> bool {
736 *self == Mr1rl::Mr1rl0
737 }
738 #[doc = "Reloads"]
739 #[inline(always)]
740 pub fn is_mr1rl_1(&self) -> bool {
741 *self == Mr1rl::Mr1rl1
742 }
743}
744#[doc = "Field `MR1RL` writer - Reload MR"]
745pub type Mr1rlW<'a, REG> = crate::BitWriter<'a, REG, Mr1rl>;
746impl<'a, REG> Mr1rlW<'a, REG>
747where
748 REG: crate::Writable + crate::RegisterSpec,
749{
750 #[doc = "Does not reload"]
751 #[inline(always)]
752 pub fn mr1rl_0(self) -> &'a mut crate::W<REG> {
753 self.variant(Mr1rl::Mr1rl0)
754 }
755 #[doc = "Reloads"]
756 #[inline(always)]
757 pub fn mr1rl_1(self) -> &'a mut crate::W<REG> {
758 self.variant(Mr1rl::Mr1rl1)
759 }
760}
761#[doc = "Reload MR\n\nValue on reset: 0"]
762#[cfg_attr(feature = "defmt", derive(defmt::Format))]
763#[derive(Clone, Copy, Debug, PartialEq, Eq)]
764pub enum Mr2rl {
765 #[doc = "0: Does not reload"]
766 Mr2rl0 = 0,
767 #[doc = "1: Reloads"]
768 Mr2rl1 = 1,
769}
770impl From<Mr2rl> for bool {
771 #[inline(always)]
772 fn from(variant: Mr2rl) -> Self {
773 variant as u8 != 0
774 }
775}
776#[doc = "Field `MR2RL` reader - Reload MR"]
777pub type Mr2rlR = crate::BitReader<Mr2rl>;
778impl Mr2rlR {
779 #[doc = "Get enumerated values variant"]
780 #[inline(always)]
781 pub const fn variant(&self) -> Mr2rl {
782 match self.bits {
783 false => Mr2rl::Mr2rl0,
784 true => Mr2rl::Mr2rl1,
785 }
786 }
787 #[doc = "Does not reload"]
788 #[inline(always)]
789 pub fn is_mr2rl_0(&self) -> bool {
790 *self == Mr2rl::Mr2rl0
791 }
792 #[doc = "Reloads"]
793 #[inline(always)]
794 pub fn is_mr2rl_1(&self) -> bool {
795 *self == Mr2rl::Mr2rl1
796 }
797}
798#[doc = "Field `MR2RL` writer - Reload MR"]
799pub type Mr2rlW<'a, REG> = crate::BitWriter<'a, REG, Mr2rl>;
800impl<'a, REG> Mr2rlW<'a, REG>
801where
802 REG: crate::Writable + crate::RegisterSpec,
803{
804 #[doc = "Does not reload"]
805 #[inline(always)]
806 pub fn mr2rl_0(self) -> &'a mut crate::W<REG> {
807 self.variant(Mr2rl::Mr2rl0)
808 }
809 #[doc = "Reloads"]
810 #[inline(always)]
811 pub fn mr2rl_1(self) -> &'a mut crate::W<REG> {
812 self.variant(Mr2rl::Mr2rl1)
813 }
814}
815#[doc = "Reload MR\n\nValue on reset: 0"]
816#[cfg_attr(feature = "defmt", derive(defmt::Format))]
817#[derive(Clone, Copy, Debug, PartialEq, Eq)]
818pub enum Mr3rl {
819 #[doc = "0: Does not reload"]
820 Mr3rl0 = 0,
821 #[doc = "1: Reloads"]
822 Mr3rl1 = 1,
823}
824impl From<Mr3rl> for bool {
825 #[inline(always)]
826 fn from(variant: Mr3rl) -> Self {
827 variant as u8 != 0
828 }
829}
830#[doc = "Field `MR3RL` reader - Reload MR"]
831pub type Mr3rlR = crate::BitReader<Mr3rl>;
832impl Mr3rlR {
833 #[doc = "Get enumerated values variant"]
834 #[inline(always)]
835 pub const fn variant(&self) -> Mr3rl {
836 match self.bits {
837 false => Mr3rl::Mr3rl0,
838 true => Mr3rl::Mr3rl1,
839 }
840 }
841 #[doc = "Does not reload"]
842 #[inline(always)]
843 pub fn is_mr3rl_0(&self) -> bool {
844 *self == Mr3rl::Mr3rl0
845 }
846 #[doc = "Reloads"]
847 #[inline(always)]
848 pub fn is_mr3rl_1(&self) -> bool {
849 *self == Mr3rl::Mr3rl1
850 }
851}
852#[doc = "Field `MR3RL` writer - Reload MR"]
853pub type Mr3rlW<'a, REG> = crate::BitWriter<'a, REG, Mr3rl>;
854impl<'a, REG> Mr3rlW<'a, REG>
855where
856 REG: crate::Writable + crate::RegisterSpec,
857{
858 #[doc = "Does not reload"]
859 #[inline(always)]
860 pub fn mr3rl_0(self) -> &'a mut crate::W<REG> {
861 self.variant(Mr3rl::Mr3rl0)
862 }
863 #[doc = "Reloads"]
864 #[inline(always)]
865 pub fn mr3rl_1(self) -> &'a mut crate::W<REG> {
866 self.variant(Mr3rl::Mr3rl1)
867 }
868}
869impl R {
870 #[doc = "Bit 0 - Interrupt on MR0"]
871 #[inline(always)]
872 pub fn mr0i(&self) -> Mr0iR {
873 Mr0iR::new((self.bits & 1) != 0)
874 }
875 #[doc = "Bit 1 - Reset on MR0"]
876 #[inline(always)]
877 pub fn mr0r(&self) -> Mr0rR {
878 Mr0rR::new(((self.bits >> 1) & 1) != 0)
879 }
880 #[doc = "Bit 2 - Stop on MR0"]
881 #[inline(always)]
882 pub fn mr0s(&self) -> Mr0sR {
883 Mr0sR::new(((self.bits >> 2) & 1) != 0)
884 }
885 #[doc = "Bit 3 - Interrupt on MR1"]
886 #[inline(always)]
887 pub fn mr1i(&self) -> Mr1iR {
888 Mr1iR::new(((self.bits >> 3) & 1) != 0)
889 }
890 #[doc = "Bit 4 - Reset on MR1"]
891 #[inline(always)]
892 pub fn mr1r(&self) -> Mr1rR {
893 Mr1rR::new(((self.bits >> 4) & 1) != 0)
894 }
895 #[doc = "Bit 5 - Stop on MR1"]
896 #[inline(always)]
897 pub fn mr1s(&self) -> Mr1sR {
898 Mr1sR::new(((self.bits >> 5) & 1) != 0)
899 }
900 #[doc = "Bit 6 - Interrupt on MR2"]
901 #[inline(always)]
902 pub fn mr2i(&self) -> Mr2iR {
903 Mr2iR::new(((self.bits >> 6) & 1) != 0)
904 }
905 #[doc = "Bit 7 - Reset on MR2"]
906 #[inline(always)]
907 pub fn mr2r(&self) -> Mr2rR {
908 Mr2rR::new(((self.bits >> 7) & 1) != 0)
909 }
910 #[doc = "Bit 8 - Stop on MR2"]
911 #[inline(always)]
912 pub fn mr2s(&self) -> Mr2sR {
913 Mr2sR::new(((self.bits >> 8) & 1) != 0)
914 }
915 #[doc = "Bit 9 - Interrupt on MR3"]
916 #[inline(always)]
917 pub fn mr3i(&self) -> Mr3iR {
918 Mr3iR::new(((self.bits >> 9) & 1) != 0)
919 }
920 #[doc = "Bit 10 - Reset on MR3"]
921 #[inline(always)]
922 pub fn mr3r(&self) -> Mr3rR {
923 Mr3rR::new(((self.bits >> 10) & 1) != 0)
924 }
925 #[doc = "Bit 11 - Stop on MR3"]
926 #[inline(always)]
927 pub fn mr3s(&self) -> Mr3sR {
928 Mr3sR::new(((self.bits >> 11) & 1) != 0)
929 }
930 #[doc = "Bit 24 - Reload MR"]
931 #[inline(always)]
932 pub fn mr0rl(&self) -> Mr0rlR {
933 Mr0rlR::new(((self.bits >> 24) & 1) != 0)
934 }
935 #[doc = "Bit 25 - Reload MR"]
936 #[inline(always)]
937 pub fn mr1rl(&self) -> Mr1rlR {
938 Mr1rlR::new(((self.bits >> 25) & 1) != 0)
939 }
940 #[doc = "Bit 26 - Reload MR"]
941 #[inline(always)]
942 pub fn mr2rl(&self) -> Mr2rlR {
943 Mr2rlR::new(((self.bits >> 26) & 1) != 0)
944 }
945 #[doc = "Bit 27 - Reload MR"]
946 #[inline(always)]
947 pub fn mr3rl(&self) -> Mr3rlR {
948 Mr3rlR::new(((self.bits >> 27) & 1) != 0)
949 }
950}
951#[cfg(feature = "debug")]
952impl core::fmt::Debug for R {
953 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
954 f.debug_struct("MCR")
955 .field("mr0i", &self.mr0i())
956 .field("mr0r", &self.mr0r())
957 .field("mr0s", &self.mr0s())
958 .field("mr1i", &self.mr1i())
959 .field("mr1r", &self.mr1r())
960 .field("mr1s", &self.mr1s())
961 .field("mr2i", &self.mr2i())
962 .field("mr2r", &self.mr2r())
963 .field("mr2s", &self.mr2s())
964 .field("mr3i", &self.mr3i())
965 .field("mr3r", &self.mr3r())
966 .field("mr3s", &self.mr3s())
967 .field("mr0rl", &self.mr0rl())
968 .field("mr1rl", &self.mr1rl())
969 .field("mr2rl", &self.mr2rl())
970 .field("mr3rl", &self.mr3rl())
971 .finish()
972 }
973}
974impl W {
975 #[doc = "Bit 0 - Interrupt on MR0"]
976 #[inline(always)]
977 pub fn mr0i(&mut self) -> Mr0iW<'_, McrSpec> {
978 Mr0iW::new(self, 0)
979 }
980 #[doc = "Bit 1 - Reset on MR0"]
981 #[inline(always)]
982 pub fn mr0r(&mut self) -> Mr0rW<'_, McrSpec> {
983 Mr0rW::new(self, 1)
984 }
985 #[doc = "Bit 2 - Stop on MR0"]
986 #[inline(always)]
987 pub fn mr0s(&mut self) -> Mr0sW<'_, McrSpec> {
988 Mr0sW::new(self, 2)
989 }
990 #[doc = "Bit 3 - Interrupt on MR1"]
991 #[inline(always)]
992 pub fn mr1i(&mut self) -> Mr1iW<'_, McrSpec> {
993 Mr1iW::new(self, 3)
994 }
995 #[doc = "Bit 4 - Reset on MR1"]
996 #[inline(always)]
997 pub fn mr1r(&mut self) -> Mr1rW<'_, McrSpec> {
998 Mr1rW::new(self, 4)
999 }
1000 #[doc = "Bit 5 - Stop on MR1"]
1001 #[inline(always)]
1002 pub fn mr1s(&mut self) -> Mr1sW<'_, McrSpec> {
1003 Mr1sW::new(self, 5)
1004 }
1005 #[doc = "Bit 6 - Interrupt on MR2"]
1006 #[inline(always)]
1007 pub fn mr2i(&mut self) -> Mr2iW<'_, McrSpec> {
1008 Mr2iW::new(self, 6)
1009 }
1010 #[doc = "Bit 7 - Reset on MR2"]
1011 #[inline(always)]
1012 pub fn mr2r(&mut self) -> Mr2rW<'_, McrSpec> {
1013 Mr2rW::new(self, 7)
1014 }
1015 #[doc = "Bit 8 - Stop on MR2"]
1016 #[inline(always)]
1017 pub fn mr2s(&mut self) -> Mr2sW<'_, McrSpec> {
1018 Mr2sW::new(self, 8)
1019 }
1020 #[doc = "Bit 9 - Interrupt on MR3"]
1021 #[inline(always)]
1022 pub fn mr3i(&mut self) -> Mr3iW<'_, McrSpec> {
1023 Mr3iW::new(self, 9)
1024 }
1025 #[doc = "Bit 10 - Reset on MR3"]
1026 #[inline(always)]
1027 pub fn mr3r(&mut self) -> Mr3rW<'_, McrSpec> {
1028 Mr3rW::new(self, 10)
1029 }
1030 #[doc = "Bit 11 - Stop on MR3"]
1031 #[inline(always)]
1032 pub fn mr3s(&mut self) -> Mr3sW<'_, McrSpec> {
1033 Mr3sW::new(self, 11)
1034 }
1035 #[doc = "Bit 24 - Reload MR"]
1036 #[inline(always)]
1037 pub fn mr0rl(&mut self) -> Mr0rlW<'_, McrSpec> {
1038 Mr0rlW::new(self, 24)
1039 }
1040 #[doc = "Bit 25 - Reload MR"]
1041 #[inline(always)]
1042 pub fn mr1rl(&mut self) -> Mr1rlW<'_, McrSpec> {
1043 Mr1rlW::new(self, 25)
1044 }
1045 #[doc = "Bit 26 - Reload MR"]
1046 #[inline(always)]
1047 pub fn mr2rl(&mut self) -> Mr2rlW<'_, McrSpec> {
1048 Mr2rlW::new(self, 26)
1049 }
1050 #[doc = "Bit 27 - Reload MR"]
1051 #[inline(always)]
1052 pub fn mr3rl(&mut self) -> Mr3rlW<'_, McrSpec> {
1053 Mr3rlW::new(self, 27)
1054 }
1055}
1056#[doc = "Match Control\n\nYou can [`read`](crate::Reg::read) this register and get [`mcr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mcr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1057pub struct McrSpec;
1058impl crate::RegisterSpec for McrSpec {
1059 type Ux = u32;
1060}
1061#[doc = "`read()` method returns [`mcr::R`](R) reader structure"]
1062impl crate::Readable for McrSpec {}
1063#[doc = "`write(|w| ..)` method takes [`mcr::W`](W) writer structure"]
1064impl crate::Writable for McrSpec {
1065 type Safety = crate::Unsafe;
1066}
1067#[doc = "`reset()` method sets MCR to value 0"]
1068impl crate::Resettable for McrSpec {}