1#[doc = "Register `EVFLAG` reader"]
2pub type R = crate::R<EVFLAG_SPEC>;
3#[doc = "Register `EVFLAG` writer"]
4pub type W = crate::W<EVFLAG_SPEC>;
5#[doc = "Result Event\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7pub enum RESEV0_A {
8 #[doc = "0: No result event"]
9 VALUE1 = 0,
10 #[doc = "1: A new result has been stored in register RESMx"]
11 VALUE2 = 1,
12}
13impl From<RESEV0_A> for bool {
14 #[inline(always)]
15 fn from(variant: RESEV0_A) -> Self {
16 variant as u8 != 0
17 }
18}
19#[doc = "Field `RESEV0` reader - Result Event"]
20pub type RESEV0_R = crate::BitReader<RESEV0_A>;
21impl RESEV0_R {
22 #[doc = "Get enumerated values variant"]
23 #[inline(always)]
24 pub const fn variant(&self) -> RESEV0_A {
25 match self.bits {
26 false => RESEV0_A::VALUE1,
27 true => RESEV0_A::VALUE2,
28 }
29 }
30 #[doc = "No result event"]
31 #[inline(always)]
32 pub fn is_value1(&self) -> bool {
33 *self == RESEV0_A::VALUE1
34 }
35 #[doc = "A new result has been stored in register RESMx"]
36 #[inline(always)]
37 pub fn is_value2(&self) -> bool {
38 *self == RESEV0_A::VALUE2
39 }
40}
41#[doc = "Field `RESEV0` writer - Result Event"]
42pub type RESEV0_W<'a, REG> = crate::BitWriter<'a, REG, RESEV0_A>;
43impl<'a, REG> RESEV0_W<'a, REG>
44where
45 REG: crate::Writable + crate::RegisterSpec,
46{
47 #[doc = "No result event"]
48 #[inline(always)]
49 pub fn value1(self) -> &'a mut crate::W<REG> {
50 self.variant(RESEV0_A::VALUE1)
51 }
52 #[doc = "A new result has been stored in register RESMx"]
53 #[inline(always)]
54 pub fn value2(self) -> &'a mut crate::W<REG> {
55 self.variant(RESEV0_A::VALUE2)
56 }
57}
58#[doc = "Result Event\n\nValue on reset: 0"]
59#[derive(Clone, Copy, Debug, PartialEq, Eq)]
60pub enum RESEV1_A {
61 #[doc = "0: No result event"]
62 VALUE1 = 0,
63 #[doc = "1: A new result has been stored in register RESMx"]
64 VALUE2 = 1,
65}
66impl From<RESEV1_A> for bool {
67 #[inline(always)]
68 fn from(variant: RESEV1_A) -> Self {
69 variant as u8 != 0
70 }
71}
72#[doc = "Field `RESEV1` reader - Result Event"]
73pub type RESEV1_R = crate::BitReader<RESEV1_A>;
74impl RESEV1_R {
75 #[doc = "Get enumerated values variant"]
76 #[inline(always)]
77 pub const fn variant(&self) -> RESEV1_A {
78 match self.bits {
79 false => RESEV1_A::VALUE1,
80 true => RESEV1_A::VALUE2,
81 }
82 }
83 #[doc = "No result event"]
84 #[inline(always)]
85 pub fn is_value1(&self) -> bool {
86 *self == RESEV1_A::VALUE1
87 }
88 #[doc = "A new result has been stored in register RESMx"]
89 #[inline(always)]
90 pub fn is_value2(&self) -> bool {
91 *self == RESEV1_A::VALUE2
92 }
93}
94#[doc = "Field `RESEV1` writer - Result Event"]
95pub type RESEV1_W<'a, REG> = crate::BitWriter<'a, REG, RESEV1_A>;
96impl<'a, REG> RESEV1_W<'a, REG>
97where
98 REG: crate::Writable + crate::RegisterSpec,
99{
100 #[doc = "No result event"]
101 #[inline(always)]
102 pub fn value1(self) -> &'a mut crate::W<REG> {
103 self.variant(RESEV1_A::VALUE1)
104 }
105 #[doc = "A new result has been stored in register RESMx"]
106 #[inline(always)]
107 pub fn value2(self) -> &'a mut crate::W<REG> {
108 self.variant(RESEV1_A::VALUE2)
109 }
110}
111#[doc = "Result Event\n\nValue on reset: 0"]
112#[derive(Clone, Copy, Debug, PartialEq, Eq)]
113pub enum RESEV2_A {
114 #[doc = "0: No result event"]
115 VALUE1 = 0,
116 #[doc = "1: A new result has been stored in register RESMx"]
117 VALUE2 = 1,
118}
119impl From<RESEV2_A> for bool {
120 #[inline(always)]
121 fn from(variant: RESEV2_A) -> Self {
122 variant as u8 != 0
123 }
124}
125#[doc = "Field `RESEV2` reader - Result Event"]
126pub type RESEV2_R = crate::BitReader<RESEV2_A>;
127impl RESEV2_R {
128 #[doc = "Get enumerated values variant"]
129 #[inline(always)]
130 pub const fn variant(&self) -> RESEV2_A {
131 match self.bits {
132 false => RESEV2_A::VALUE1,
133 true => RESEV2_A::VALUE2,
134 }
135 }
136 #[doc = "No result event"]
137 #[inline(always)]
138 pub fn is_value1(&self) -> bool {
139 *self == RESEV2_A::VALUE1
140 }
141 #[doc = "A new result has been stored in register RESMx"]
142 #[inline(always)]
143 pub fn is_value2(&self) -> bool {
144 *self == RESEV2_A::VALUE2
145 }
146}
147#[doc = "Field `RESEV2` writer - Result Event"]
148pub type RESEV2_W<'a, REG> = crate::BitWriter<'a, REG, RESEV2_A>;
149impl<'a, REG> RESEV2_W<'a, REG>
150where
151 REG: crate::Writable + crate::RegisterSpec,
152{
153 #[doc = "No result event"]
154 #[inline(always)]
155 pub fn value1(self) -> &'a mut crate::W<REG> {
156 self.variant(RESEV2_A::VALUE1)
157 }
158 #[doc = "A new result has been stored in register RESMx"]
159 #[inline(always)]
160 pub fn value2(self) -> &'a mut crate::W<REG> {
161 self.variant(RESEV2_A::VALUE2)
162 }
163}
164#[doc = "Result Event\n\nValue on reset: 0"]
165#[derive(Clone, Copy, Debug, PartialEq, Eq)]
166pub enum RESEV3_A {
167 #[doc = "0: No result event"]
168 VALUE1 = 0,
169 #[doc = "1: A new result has been stored in register RESMx"]
170 VALUE2 = 1,
171}
172impl From<RESEV3_A> for bool {
173 #[inline(always)]
174 fn from(variant: RESEV3_A) -> Self {
175 variant as u8 != 0
176 }
177}
178#[doc = "Field `RESEV3` reader - Result Event"]
179pub type RESEV3_R = crate::BitReader<RESEV3_A>;
180impl RESEV3_R {
181 #[doc = "Get enumerated values variant"]
182 #[inline(always)]
183 pub const fn variant(&self) -> RESEV3_A {
184 match self.bits {
185 false => RESEV3_A::VALUE1,
186 true => RESEV3_A::VALUE2,
187 }
188 }
189 #[doc = "No result event"]
190 #[inline(always)]
191 pub fn is_value1(&self) -> bool {
192 *self == RESEV3_A::VALUE1
193 }
194 #[doc = "A new result has been stored in register RESMx"]
195 #[inline(always)]
196 pub fn is_value2(&self) -> bool {
197 *self == RESEV3_A::VALUE2
198 }
199}
200#[doc = "Field `RESEV3` writer - Result Event"]
201pub type RESEV3_W<'a, REG> = crate::BitWriter<'a, REG, RESEV3_A>;
202impl<'a, REG> RESEV3_W<'a, REG>
203where
204 REG: crate::Writable + crate::RegisterSpec,
205{
206 #[doc = "No result event"]
207 #[inline(always)]
208 pub fn value1(self) -> &'a mut crate::W<REG> {
209 self.variant(RESEV3_A::VALUE1)
210 }
211 #[doc = "A new result has been stored in register RESMx"]
212 #[inline(always)]
213 pub fn value2(self) -> &'a mut crate::W<REG> {
214 self.variant(RESEV3_A::VALUE2)
215 }
216}
217#[doc = "Alarm Event\n\nValue on reset: 0"]
218#[derive(Clone, Copy, Debug, PartialEq, Eq)]
219pub enum ALEV0_A {
220 #[doc = "0: No alarm event"]
221 VALUE1 = 0,
222 #[doc = "1: An alarm event has occurred"]
223 VALUE2 = 1,
224}
225impl From<ALEV0_A> for bool {
226 #[inline(always)]
227 fn from(variant: ALEV0_A) -> Self {
228 variant as u8 != 0
229 }
230}
231#[doc = "Field `ALEV0` reader - Alarm Event"]
232pub type ALEV0_R = crate::BitReader<ALEV0_A>;
233impl ALEV0_R {
234 #[doc = "Get enumerated values variant"]
235 #[inline(always)]
236 pub const fn variant(&self) -> ALEV0_A {
237 match self.bits {
238 false => ALEV0_A::VALUE1,
239 true => ALEV0_A::VALUE2,
240 }
241 }
242 #[doc = "No alarm event"]
243 #[inline(always)]
244 pub fn is_value1(&self) -> bool {
245 *self == ALEV0_A::VALUE1
246 }
247 #[doc = "An alarm event has occurred"]
248 #[inline(always)]
249 pub fn is_value2(&self) -> bool {
250 *self == ALEV0_A::VALUE2
251 }
252}
253#[doc = "Field `ALEV0` writer - Alarm Event"]
254pub type ALEV0_W<'a, REG> = crate::BitWriter<'a, REG, ALEV0_A>;
255impl<'a, REG> ALEV0_W<'a, REG>
256where
257 REG: crate::Writable + crate::RegisterSpec,
258{
259 #[doc = "No alarm event"]
260 #[inline(always)]
261 pub fn value1(self) -> &'a mut crate::W<REG> {
262 self.variant(ALEV0_A::VALUE1)
263 }
264 #[doc = "An alarm event has occurred"]
265 #[inline(always)]
266 pub fn value2(self) -> &'a mut crate::W<REG> {
267 self.variant(ALEV0_A::VALUE2)
268 }
269}
270#[doc = "Alarm Event\n\nValue on reset: 0"]
271#[derive(Clone, Copy, Debug, PartialEq, Eq)]
272pub enum ALEV1_A {
273 #[doc = "0: No alarm event"]
274 VALUE1 = 0,
275 #[doc = "1: An alarm event has occurred"]
276 VALUE2 = 1,
277}
278impl From<ALEV1_A> for bool {
279 #[inline(always)]
280 fn from(variant: ALEV1_A) -> Self {
281 variant as u8 != 0
282 }
283}
284#[doc = "Field `ALEV1` reader - Alarm Event"]
285pub type ALEV1_R = crate::BitReader<ALEV1_A>;
286impl ALEV1_R {
287 #[doc = "Get enumerated values variant"]
288 #[inline(always)]
289 pub const fn variant(&self) -> ALEV1_A {
290 match self.bits {
291 false => ALEV1_A::VALUE1,
292 true => ALEV1_A::VALUE2,
293 }
294 }
295 #[doc = "No alarm event"]
296 #[inline(always)]
297 pub fn is_value1(&self) -> bool {
298 *self == ALEV1_A::VALUE1
299 }
300 #[doc = "An alarm event has occurred"]
301 #[inline(always)]
302 pub fn is_value2(&self) -> bool {
303 *self == ALEV1_A::VALUE2
304 }
305}
306#[doc = "Field `ALEV1` writer - Alarm Event"]
307pub type ALEV1_W<'a, REG> = crate::BitWriter<'a, REG, ALEV1_A>;
308impl<'a, REG> ALEV1_W<'a, REG>
309where
310 REG: crate::Writable + crate::RegisterSpec,
311{
312 #[doc = "No alarm event"]
313 #[inline(always)]
314 pub fn value1(self) -> &'a mut crate::W<REG> {
315 self.variant(ALEV1_A::VALUE1)
316 }
317 #[doc = "An alarm event has occurred"]
318 #[inline(always)]
319 pub fn value2(self) -> &'a mut crate::W<REG> {
320 self.variant(ALEV1_A::VALUE2)
321 }
322}
323#[doc = "Alarm Event\n\nValue on reset: 0"]
324#[derive(Clone, Copy, Debug, PartialEq, Eq)]
325pub enum ALEV2_A {
326 #[doc = "0: No alarm event"]
327 VALUE1 = 0,
328 #[doc = "1: An alarm event has occurred"]
329 VALUE2 = 1,
330}
331impl From<ALEV2_A> for bool {
332 #[inline(always)]
333 fn from(variant: ALEV2_A) -> Self {
334 variant as u8 != 0
335 }
336}
337#[doc = "Field `ALEV2` reader - Alarm Event"]
338pub type ALEV2_R = crate::BitReader<ALEV2_A>;
339impl ALEV2_R {
340 #[doc = "Get enumerated values variant"]
341 #[inline(always)]
342 pub const fn variant(&self) -> ALEV2_A {
343 match self.bits {
344 false => ALEV2_A::VALUE1,
345 true => ALEV2_A::VALUE2,
346 }
347 }
348 #[doc = "No alarm event"]
349 #[inline(always)]
350 pub fn is_value1(&self) -> bool {
351 *self == ALEV2_A::VALUE1
352 }
353 #[doc = "An alarm event has occurred"]
354 #[inline(always)]
355 pub fn is_value2(&self) -> bool {
356 *self == ALEV2_A::VALUE2
357 }
358}
359#[doc = "Field `ALEV2` writer - Alarm Event"]
360pub type ALEV2_W<'a, REG> = crate::BitWriter<'a, REG, ALEV2_A>;
361impl<'a, REG> ALEV2_W<'a, REG>
362where
363 REG: crate::Writable + crate::RegisterSpec,
364{
365 #[doc = "No alarm event"]
366 #[inline(always)]
367 pub fn value1(self) -> &'a mut crate::W<REG> {
368 self.variant(ALEV2_A::VALUE1)
369 }
370 #[doc = "An alarm event has occurred"]
371 #[inline(always)]
372 pub fn value2(self) -> &'a mut crate::W<REG> {
373 self.variant(ALEV2_A::VALUE2)
374 }
375}
376#[doc = "Alarm Event\n\nValue on reset: 0"]
377#[derive(Clone, Copy, Debug, PartialEq, Eq)]
378pub enum ALEV3_A {
379 #[doc = "0: No alarm event"]
380 VALUE1 = 0,
381 #[doc = "1: An alarm event has occurred"]
382 VALUE2 = 1,
383}
384impl From<ALEV3_A> for bool {
385 #[inline(always)]
386 fn from(variant: ALEV3_A) -> Self {
387 variant as u8 != 0
388 }
389}
390#[doc = "Field `ALEV3` reader - Alarm Event"]
391pub type ALEV3_R = crate::BitReader<ALEV3_A>;
392impl ALEV3_R {
393 #[doc = "Get enumerated values variant"]
394 #[inline(always)]
395 pub const fn variant(&self) -> ALEV3_A {
396 match self.bits {
397 false => ALEV3_A::VALUE1,
398 true => ALEV3_A::VALUE2,
399 }
400 }
401 #[doc = "No alarm event"]
402 #[inline(always)]
403 pub fn is_value1(&self) -> bool {
404 *self == ALEV3_A::VALUE1
405 }
406 #[doc = "An alarm event has occurred"]
407 #[inline(always)]
408 pub fn is_value2(&self) -> bool {
409 *self == ALEV3_A::VALUE2
410 }
411}
412#[doc = "Field `ALEV3` writer - Alarm Event"]
413pub type ALEV3_W<'a, REG> = crate::BitWriter<'a, REG, ALEV3_A>;
414impl<'a, REG> ALEV3_W<'a, REG>
415where
416 REG: crate::Writable + crate::RegisterSpec,
417{
418 #[doc = "No alarm event"]
419 #[inline(always)]
420 pub fn value1(self) -> &'a mut crate::W<REG> {
421 self.variant(ALEV3_A::VALUE1)
422 }
423 #[doc = "An alarm event has occurred"]
424 #[inline(always)]
425 pub fn value2(self) -> &'a mut crate::W<REG> {
426 self.variant(ALEV3_A::VALUE2)
427 }
428}
429#[doc = "Alarm Event\n\nValue on reset: 0"]
430#[derive(Clone, Copy, Debug, PartialEq, Eq)]
431pub enum ALEV4_A {
432 #[doc = "0: No alarm event"]
433 VALUE1 = 0,
434 #[doc = "1: An alarm event has occurred"]
435 VALUE2 = 1,
436}
437impl From<ALEV4_A> for bool {
438 #[inline(always)]
439 fn from(variant: ALEV4_A) -> Self {
440 variant as u8 != 0
441 }
442}
443#[doc = "Field `ALEV4` reader - Alarm Event"]
444pub type ALEV4_R = crate::BitReader<ALEV4_A>;
445impl ALEV4_R {
446 #[doc = "Get enumerated values variant"]
447 #[inline(always)]
448 pub const fn variant(&self) -> ALEV4_A {
449 match self.bits {
450 false => ALEV4_A::VALUE1,
451 true => ALEV4_A::VALUE2,
452 }
453 }
454 #[doc = "No alarm event"]
455 #[inline(always)]
456 pub fn is_value1(&self) -> bool {
457 *self == ALEV4_A::VALUE1
458 }
459 #[doc = "An alarm event has occurred"]
460 #[inline(always)]
461 pub fn is_value2(&self) -> bool {
462 *self == ALEV4_A::VALUE2
463 }
464}
465#[doc = "Field `ALEV4` writer - Alarm Event"]
466pub type ALEV4_W<'a, REG> = crate::BitWriter<'a, REG, ALEV4_A>;
467impl<'a, REG> ALEV4_W<'a, REG>
468where
469 REG: crate::Writable + crate::RegisterSpec,
470{
471 #[doc = "No alarm event"]
472 #[inline(always)]
473 pub fn value1(self) -> &'a mut crate::W<REG> {
474 self.variant(ALEV4_A::VALUE1)
475 }
476 #[doc = "An alarm event has occurred"]
477 #[inline(always)]
478 pub fn value2(self) -> &'a mut crate::W<REG> {
479 self.variant(ALEV4_A::VALUE2)
480 }
481}
482#[doc = "Alarm Event\n\nValue on reset: 0"]
483#[derive(Clone, Copy, Debug, PartialEq, Eq)]
484pub enum ALEV5_A {
485 #[doc = "0: No alarm event"]
486 VALUE1 = 0,
487 #[doc = "1: An alarm event has occurred"]
488 VALUE2 = 1,
489}
490impl From<ALEV5_A> for bool {
491 #[inline(always)]
492 fn from(variant: ALEV5_A) -> Self {
493 variant as u8 != 0
494 }
495}
496#[doc = "Field `ALEV5` reader - Alarm Event"]
497pub type ALEV5_R = crate::BitReader<ALEV5_A>;
498impl ALEV5_R {
499 #[doc = "Get enumerated values variant"]
500 #[inline(always)]
501 pub const fn variant(&self) -> ALEV5_A {
502 match self.bits {
503 false => ALEV5_A::VALUE1,
504 true => ALEV5_A::VALUE2,
505 }
506 }
507 #[doc = "No alarm event"]
508 #[inline(always)]
509 pub fn is_value1(&self) -> bool {
510 *self == ALEV5_A::VALUE1
511 }
512 #[doc = "An alarm event has occurred"]
513 #[inline(always)]
514 pub fn is_value2(&self) -> bool {
515 *self == ALEV5_A::VALUE2
516 }
517}
518#[doc = "Field `ALEV5` writer - Alarm Event"]
519pub type ALEV5_W<'a, REG> = crate::BitWriter<'a, REG, ALEV5_A>;
520impl<'a, REG> ALEV5_W<'a, REG>
521where
522 REG: crate::Writable + crate::RegisterSpec,
523{
524 #[doc = "No alarm event"]
525 #[inline(always)]
526 pub fn value1(self) -> &'a mut crate::W<REG> {
527 self.variant(ALEV5_A::VALUE1)
528 }
529 #[doc = "An alarm event has occurred"]
530 #[inline(always)]
531 pub fn value2(self) -> &'a mut crate::W<REG> {
532 self.variant(ALEV5_A::VALUE2)
533 }
534}
535#[doc = "Alarm Event\n\nValue on reset: 0"]
536#[derive(Clone, Copy, Debug, PartialEq, Eq)]
537pub enum ALEV6_A {
538 #[doc = "0: No alarm event"]
539 VALUE1 = 0,
540 #[doc = "1: An alarm event has occurred"]
541 VALUE2 = 1,
542}
543impl From<ALEV6_A> for bool {
544 #[inline(always)]
545 fn from(variant: ALEV6_A) -> Self {
546 variant as u8 != 0
547 }
548}
549#[doc = "Field `ALEV6` reader - Alarm Event"]
550pub type ALEV6_R = crate::BitReader<ALEV6_A>;
551impl ALEV6_R {
552 #[doc = "Get enumerated values variant"]
553 #[inline(always)]
554 pub const fn variant(&self) -> ALEV6_A {
555 match self.bits {
556 false => ALEV6_A::VALUE1,
557 true => ALEV6_A::VALUE2,
558 }
559 }
560 #[doc = "No alarm event"]
561 #[inline(always)]
562 pub fn is_value1(&self) -> bool {
563 *self == ALEV6_A::VALUE1
564 }
565 #[doc = "An alarm event has occurred"]
566 #[inline(always)]
567 pub fn is_value2(&self) -> bool {
568 *self == ALEV6_A::VALUE2
569 }
570}
571#[doc = "Field `ALEV6` writer - Alarm Event"]
572pub type ALEV6_W<'a, REG> = crate::BitWriter<'a, REG, ALEV6_A>;
573impl<'a, REG> ALEV6_W<'a, REG>
574where
575 REG: crate::Writable + crate::RegisterSpec,
576{
577 #[doc = "No alarm event"]
578 #[inline(always)]
579 pub fn value1(self) -> &'a mut crate::W<REG> {
580 self.variant(ALEV6_A::VALUE1)
581 }
582 #[doc = "An alarm event has occurred"]
583 #[inline(always)]
584 pub fn value2(self) -> &'a mut crate::W<REG> {
585 self.variant(ALEV6_A::VALUE2)
586 }
587}
588#[doc = "Alarm Event\n\nValue on reset: 0"]
589#[derive(Clone, Copy, Debug, PartialEq, Eq)]
590pub enum ALEV7_A {
591 #[doc = "0: No alarm event"]
592 VALUE1 = 0,
593 #[doc = "1: An alarm event has occurred"]
594 VALUE2 = 1,
595}
596impl From<ALEV7_A> for bool {
597 #[inline(always)]
598 fn from(variant: ALEV7_A) -> Self {
599 variant as u8 != 0
600 }
601}
602#[doc = "Field `ALEV7` reader - Alarm Event"]
603pub type ALEV7_R = crate::BitReader<ALEV7_A>;
604impl ALEV7_R {
605 #[doc = "Get enumerated values variant"]
606 #[inline(always)]
607 pub const fn variant(&self) -> ALEV7_A {
608 match self.bits {
609 false => ALEV7_A::VALUE1,
610 true => ALEV7_A::VALUE2,
611 }
612 }
613 #[doc = "No alarm event"]
614 #[inline(always)]
615 pub fn is_value1(&self) -> bool {
616 *self == ALEV7_A::VALUE1
617 }
618 #[doc = "An alarm event has occurred"]
619 #[inline(always)]
620 pub fn is_value2(&self) -> bool {
621 *self == ALEV7_A::VALUE2
622 }
623}
624#[doc = "Field `ALEV7` writer - Alarm Event"]
625pub type ALEV7_W<'a, REG> = crate::BitWriter<'a, REG, ALEV7_A>;
626impl<'a, REG> ALEV7_W<'a, REG>
627where
628 REG: crate::Writable + crate::RegisterSpec,
629{
630 #[doc = "No alarm event"]
631 #[inline(always)]
632 pub fn value1(self) -> &'a mut crate::W<REG> {
633 self.variant(ALEV7_A::VALUE1)
634 }
635 #[doc = "An alarm event has occurred"]
636 #[inline(always)]
637 pub fn value2(self) -> &'a mut crate::W<REG> {
638 self.variant(ALEV7_A::VALUE2)
639 }
640}
641#[doc = "Alarm Event\n\nValue on reset: 0"]
642#[derive(Clone, Copy, Debug, PartialEq, Eq)]
643pub enum ALEV8_A {
644 #[doc = "0: No alarm event"]
645 VALUE1 = 0,
646 #[doc = "1: An alarm event has occurred"]
647 VALUE2 = 1,
648}
649impl From<ALEV8_A> for bool {
650 #[inline(always)]
651 fn from(variant: ALEV8_A) -> Self {
652 variant as u8 != 0
653 }
654}
655#[doc = "Field `ALEV8` reader - Alarm Event"]
656pub type ALEV8_R = crate::BitReader<ALEV8_A>;
657impl ALEV8_R {
658 #[doc = "Get enumerated values variant"]
659 #[inline(always)]
660 pub const fn variant(&self) -> ALEV8_A {
661 match self.bits {
662 false => ALEV8_A::VALUE1,
663 true => ALEV8_A::VALUE2,
664 }
665 }
666 #[doc = "No alarm event"]
667 #[inline(always)]
668 pub fn is_value1(&self) -> bool {
669 *self == ALEV8_A::VALUE1
670 }
671 #[doc = "An alarm event has occurred"]
672 #[inline(always)]
673 pub fn is_value2(&self) -> bool {
674 *self == ALEV8_A::VALUE2
675 }
676}
677#[doc = "Field `ALEV8` writer - Alarm Event"]
678pub type ALEV8_W<'a, REG> = crate::BitWriter<'a, REG, ALEV8_A>;
679impl<'a, REG> ALEV8_W<'a, REG>
680where
681 REG: crate::Writable + crate::RegisterSpec,
682{
683 #[doc = "No alarm event"]
684 #[inline(always)]
685 pub fn value1(self) -> &'a mut crate::W<REG> {
686 self.variant(ALEV8_A::VALUE1)
687 }
688 #[doc = "An alarm event has occurred"]
689 #[inline(always)]
690 pub fn value2(self) -> &'a mut crate::W<REG> {
691 self.variant(ALEV8_A::VALUE2)
692 }
693}
694#[doc = "Alarm Event\n\nValue on reset: 0"]
695#[derive(Clone, Copy, Debug, PartialEq, Eq)]
696pub enum ALEV9_A {
697 #[doc = "0: No alarm event"]
698 VALUE1 = 0,
699 #[doc = "1: An alarm event has occurred"]
700 VALUE2 = 1,
701}
702impl From<ALEV9_A> for bool {
703 #[inline(always)]
704 fn from(variant: ALEV9_A) -> Self {
705 variant as u8 != 0
706 }
707}
708#[doc = "Field `ALEV9` reader - Alarm Event"]
709pub type ALEV9_R = crate::BitReader<ALEV9_A>;
710impl ALEV9_R {
711 #[doc = "Get enumerated values variant"]
712 #[inline(always)]
713 pub const fn variant(&self) -> ALEV9_A {
714 match self.bits {
715 false => ALEV9_A::VALUE1,
716 true => ALEV9_A::VALUE2,
717 }
718 }
719 #[doc = "No alarm event"]
720 #[inline(always)]
721 pub fn is_value1(&self) -> bool {
722 *self == ALEV9_A::VALUE1
723 }
724 #[doc = "An alarm event has occurred"]
725 #[inline(always)]
726 pub fn is_value2(&self) -> bool {
727 *self == ALEV9_A::VALUE2
728 }
729}
730#[doc = "Field `ALEV9` writer - Alarm Event"]
731pub type ALEV9_W<'a, REG> = crate::BitWriter<'a, REG, ALEV9_A>;
732impl<'a, REG> ALEV9_W<'a, REG>
733where
734 REG: crate::Writable + crate::RegisterSpec,
735{
736 #[doc = "No alarm event"]
737 #[inline(always)]
738 pub fn value1(self) -> &'a mut crate::W<REG> {
739 self.variant(ALEV9_A::VALUE1)
740 }
741 #[doc = "An alarm event has occurred"]
742 #[inline(always)]
743 pub fn value2(self) -> &'a mut crate::W<REG> {
744 self.variant(ALEV9_A::VALUE2)
745 }
746}
747impl R {
748 #[doc = "Bit 0 - Result Event"]
749 #[inline(always)]
750 pub fn resev0(&self) -> RESEV0_R {
751 RESEV0_R::new((self.bits & 1) != 0)
752 }
753 #[doc = "Bit 1 - Result Event"]
754 #[inline(always)]
755 pub fn resev1(&self) -> RESEV1_R {
756 RESEV1_R::new(((self.bits >> 1) & 1) != 0)
757 }
758 #[doc = "Bit 2 - Result Event"]
759 #[inline(always)]
760 pub fn resev2(&self) -> RESEV2_R {
761 RESEV2_R::new(((self.bits >> 2) & 1) != 0)
762 }
763 #[doc = "Bit 3 - Result Event"]
764 #[inline(always)]
765 pub fn resev3(&self) -> RESEV3_R {
766 RESEV3_R::new(((self.bits >> 3) & 1) != 0)
767 }
768 #[doc = "Bit 16 - Alarm Event"]
769 #[inline(always)]
770 pub fn alev0(&self) -> ALEV0_R {
771 ALEV0_R::new(((self.bits >> 16) & 1) != 0)
772 }
773 #[doc = "Bit 17 - Alarm Event"]
774 #[inline(always)]
775 pub fn alev1(&self) -> ALEV1_R {
776 ALEV1_R::new(((self.bits >> 17) & 1) != 0)
777 }
778 #[doc = "Bit 18 - Alarm Event"]
779 #[inline(always)]
780 pub fn alev2(&self) -> ALEV2_R {
781 ALEV2_R::new(((self.bits >> 18) & 1) != 0)
782 }
783 #[doc = "Bit 19 - Alarm Event"]
784 #[inline(always)]
785 pub fn alev3(&self) -> ALEV3_R {
786 ALEV3_R::new(((self.bits >> 19) & 1) != 0)
787 }
788 #[doc = "Bit 20 - Alarm Event"]
789 #[inline(always)]
790 pub fn alev4(&self) -> ALEV4_R {
791 ALEV4_R::new(((self.bits >> 20) & 1) != 0)
792 }
793 #[doc = "Bit 21 - Alarm Event"]
794 #[inline(always)]
795 pub fn alev5(&self) -> ALEV5_R {
796 ALEV5_R::new(((self.bits >> 21) & 1) != 0)
797 }
798 #[doc = "Bit 22 - Alarm Event"]
799 #[inline(always)]
800 pub fn alev6(&self) -> ALEV6_R {
801 ALEV6_R::new(((self.bits >> 22) & 1) != 0)
802 }
803 #[doc = "Bit 23 - Alarm Event"]
804 #[inline(always)]
805 pub fn alev7(&self) -> ALEV7_R {
806 ALEV7_R::new(((self.bits >> 23) & 1) != 0)
807 }
808 #[doc = "Bit 24 - Alarm Event"]
809 #[inline(always)]
810 pub fn alev8(&self) -> ALEV8_R {
811 ALEV8_R::new(((self.bits >> 24) & 1) != 0)
812 }
813 #[doc = "Bit 25 - Alarm Event"]
814 #[inline(always)]
815 pub fn alev9(&self) -> ALEV9_R {
816 ALEV9_R::new(((self.bits >> 25) & 1) != 0)
817 }
818}
819impl W {
820 #[doc = "Bit 0 - Result Event"]
821 #[inline(always)]
822 pub fn resev0(&mut self) -> RESEV0_W<EVFLAG_SPEC> {
823 RESEV0_W::new(self, 0)
824 }
825 #[doc = "Bit 1 - Result Event"]
826 #[inline(always)]
827 pub fn resev1(&mut self) -> RESEV1_W<EVFLAG_SPEC> {
828 RESEV1_W::new(self, 1)
829 }
830 #[doc = "Bit 2 - Result Event"]
831 #[inline(always)]
832 pub fn resev2(&mut self) -> RESEV2_W<EVFLAG_SPEC> {
833 RESEV2_W::new(self, 2)
834 }
835 #[doc = "Bit 3 - Result Event"]
836 #[inline(always)]
837 pub fn resev3(&mut self) -> RESEV3_W<EVFLAG_SPEC> {
838 RESEV3_W::new(self, 3)
839 }
840 #[doc = "Bit 16 - Alarm Event"]
841 #[inline(always)]
842 pub fn alev0(&mut self) -> ALEV0_W<EVFLAG_SPEC> {
843 ALEV0_W::new(self, 16)
844 }
845 #[doc = "Bit 17 - Alarm Event"]
846 #[inline(always)]
847 pub fn alev1(&mut self) -> ALEV1_W<EVFLAG_SPEC> {
848 ALEV1_W::new(self, 17)
849 }
850 #[doc = "Bit 18 - Alarm Event"]
851 #[inline(always)]
852 pub fn alev2(&mut self) -> ALEV2_W<EVFLAG_SPEC> {
853 ALEV2_W::new(self, 18)
854 }
855 #[doc = "Bit 19 - Alarm Event"]
856 #[inline(always)]
857 pub fn alev3(&mut self) -> ALEV3_W<EVFLAG_SPEC> {
858 ALEV3_W::new(self, 19)
859 }
860 #[doc = "Bit 20 - Alarm Event"]
861 #[inline(always)]
862 pub fn alev4(&mut self) -> ALEV4_W<EVFLAG_SPEC> {
863 ALEV4_W::new(self, 20)
864 }
865 #[doc = "Bit 21 - Alarm Event"]
866 #[inline(always)]
867 pub fn alev5(&mut self) -> ALEV5_W<EVFLAG_SPEC> {
868 ALEV5_W::new(self, 21)
869 }
870 #[doc = "Bit 22 - Alarm Event"]
871 #[inline(always)]
872 pub fn alev6(&mut self) -> ALEV6_W<EVFLAG_SPEC> {
873 ALEV6_W::new(self, 22)
874 }
875 #[doc = "Bit 23 - Alarm Event"]
876 #[inline(always)]
877 pub fn alev7(&mut self) -> ALEV7_W<EVFLAG_SPEC> {
878 ALEV7_W::new(self, 23)
879 }
880 #[doc = "Bit 24 - Alarm Event"]
881 #[inline(always)]
882 pub fn alev8(&mut self) -> ALEV8_W<EVFLAG_SPEC> {
883 ALEV8_W::new(self, 24)
884 }
885 #[doc = "Bit 25 - Alarm Event"]
886 #[inline(always)]
887 pub fn alev9(&mut self) -> ALEV9_W<EVFLAG_SPEC> {
888 ALEV9_W::new(self, 25)
889 }
890}
891#[doc = "Event Flag Register\n\nYou can [`read`](crate::Reg::read) this register and get [`evflag::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`evflag::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
892pub struct EVFLAG_SPEC;
893impl crate::RegisterSpec for EVFLAG_SPEC {
894 type Ux = u32;
895}
896#[doc = "`read()` method returns [`evflag::R`](R) reader structure"]
897impl crate::Readable for EVFLAG_SPEC {}
898#[doc = "`write(|w| ..)` method takes [`evflag::W`](W) writer structure"]
899impl crate::Writable for EVFLAG_SPEC {
900 type Safety = crate::Unsafe;
901 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
902 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
903}
904#[doc = "`reset()` method sets EVFLAG to value 0"]
905impl crate::Resettable for EVFLAG_SPEC {
906 const RESET_VALUE: u32 = 0;
907}