ra4m1/adc140/
adcmpsr0.rs

1#[doc = "Register `ADCMPSR0` reader"]
2pub struct R(crate::R<ADCMPSR0_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<ADCMPSR0_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<ADCMPSR0_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<ADCMPSR0_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `ADCMPSR0` writer"]
17pub struct W(crate::W<ADCMPSR0_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<ADCMPSR0_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<ADCMPSR0_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<ADCMPSR0_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `CMPSTCHA00` reader - Compare window A flag of AN000\n\nThe field is **modified** in some way after a read operation."]
38pub type CMPSTCHA00_R = crate::BitReader<CMPSTCHA00_A>;
39#[doc = "Compare window A flag of AN000\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum CMPSTCHA00_A {
42    #[doc = "0: Comparison conditions are not met."]
43    _0 = 0,
44    #[doc = "1: Comparison conditions are met."]
45    _1 = 1,
46}
47impl From<CMPSTCHA00_A> for bool {
48    #[inline(always)]
49    fn from(variant: CMPSTCHA00_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl CMPSTCHA00_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> CMPSTCHA00_A {
57        match self.bits {
58            false => CMPSTCHA00_A::_0,
59            true => CMPSTCHA00_A::_1,
60        }
61    }
62    #[doc = "Checks if the value of the field is `_0`"]
63    #[inline(always)]
64    pub fn is_0(&self) -> bool {
65        *self == CMPSTCHA00_A::_0
66    }
67    #[doc = "Checks if the value of the field is `_1`"]
68    #[inline(always)]
69    pub fn is_1(&self) -> bool {
70        *self == CMPSTCHA00_A::_1
71    }
72}
73#[doc = "Field `CMPSTCHA00` writer - Compare window A flag of AN000"]
74pub type CMPSTCHA00_W<'a, const O: u8> =
75    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA00_A, O>;
76impl<'a, const O: u8> CMPSTCHA00_W<'a, O> {
77    #[doc = "Comparison conditions are not met."]
78    #[inline(always)]
79    pub fn _0(self) -> &'a mut W {
80        self.variant(CMPSTCHA00_A::_0)
81    }
82    #[doc = "Comparison conditions are met."]
83    #[inline(always)]
84    pub fn _1(self) -> &'a mut W {
85        self.variant(CMPSTCHA00_A::_1)
86    }
87}
88#[doc = "Field `CMPSTCHA01` reader - Compare window A flag of AN001\n\nThe field is **modified** in some way after a read operation."]
89pub type CMPSTCHA01_R = crate::BitReader<CMPSTCHA01_A>;
90#[doc = "Compare window A flag of AN001\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum CMPSTCHA01_A {
93    #[doc = "0: Comparison conditions are not met."]
94    _0 = 0,
95    #[doc = "1: Comparison conditions are met."]
96    _1 = 1,
97}
98impl From<CMPSTCHA01_A> for bool {
99    #[inline(always)]
100    fn from(variant: CMPSTCHA01_A) -> Self {
101        variant as u8 != 0
102    }
103}
104impl CMPSTCHA01_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> CMPSTCHA01_A {
108        match self.bits {
109            false => CMPSTCHA01_A::_0,
110            true => CMPSTCHA01_A::_1,
111        }
112    }
113    #[doc = "Checks if the value of the field is `_0`"]
114    #[inline(always)]
115    pub fn is_0(&self) -> bool {
116        *self == CMPSTCHA01_A::_0
117    }
118    #[doc = "Checks if the value of the field is `_1`"]
119    #[inline(always)]
120    pub fn is_1(&self) -> bool {
121        *self == CMPSTCHA01_A::_1
122    }
123}
124#[doc = "Field `CMPSTCHA01` writer - Compare window A flag of AN001"]
125pub type CMPSTCHA01_W<'a, const O: u8> =
126    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA01_A, O>;
127impl<'a, const O: u8> CMPSTCHA01_W<'a, O> {
128    #[doc = "Comparison conditions are not met."]
129    #[inline(always)]
130    pub fn _0(self) -> &'a mut W {
131        self.variant(CMPSTCHA01_A::_0)
132    }
133    #[doc = "Comparison conditions are met."]
134    #[inline(always)]
135    pub fn _1(self) -> &'a mut W {
136        self.variant(CMPSTCHA01_A::_1)
137    }
138}
139#[doc = "Field `CMPSTCHA02` reader - Compare window A flag of AN002\n\nThe field is **modified** in some way after a read operation."]
140pub type CMPSTCHA02_R = crate::BitReader<CMPSTCHA02_A>;
141#[doc = "Compare window A flag of AN002\n\nValue on reset: 0"]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143pub enum CMPSTCHA02_A {
144    #[doc = "0: Comparison conditions are not met."]
145    _0 = 0,
146    #[doc = "1: Comparison conditions are met."]
147    _1 = 1,
148}
149impl From<CMPSTCHA02_A> for bool {
150    #[inline(always)]
151    fn from(variant: CMPSTCHA02_A) -> Self {
152        variant as u8 != 0
153    }
154}
155impl CMPSTCHA02_R {
156    #[doc = "Get enumerated values variant"]
157    #[inline(always)]
158    pub fn variant(&self) -> CMPSTCHA02_A {
159        match self.bits {
160            false => CMPSTCHA02_A::_0,
161            true => CMPSTCHA02_A::_1,
162        }
163    }
164    #[doc = "Checks if the value of the field is `_0`"]
165    #[inline(always)]
166    pub fn is_0(&self) -> bool {
167        *self == CMPSTCHA02_A::_0
168    }
169    #[doc = "Checks if the value of the field is `_1`"]
170    #[inline(always)]
171    pub fn is_1(&self) -> bool {
172        *self == CMPSTCHA02_A::_1
173    }
174}
175#[doc = "Field `CMPSTCHA02` writer - Compare window A flag of AN002"]
176pub type CMPSTCHA02_W<'a, const O: u8> =
177    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA02_A, O>;
178impl<'a, const O: u8> CMPSTCHA02_W<'a, O> {
179    #[doc = "Comparison conditions are not met."]
180    #[inline(always)]
181    pub fn _0(self) -> &'a mut W {
182        self.variant(CMPSTCHA02_A::_0)
183    }
184    #[doc = "Comparison conditions are met."]
185    #[inline(always)]
186    pub fn _1(self) -> &'a mut W {
187        self.variant(CMPSTCHA02_A::_1)
188    }
189}
190#[doc = "Field `CMPSTCHA03` reader - Compare window A flag of AN003\n\nThe field is **modified** in some way after a read operation."]
191pub type CMPSTCHA03_R = crate::BitReader<CMPSTCHA03_A>;
192#[doc = "Compare window A flag of AN003\n\nValue on reset: 0"]
193#[derive(Clone, Copy, Debug, PartialEq, Eq)]
194pub enum CMPSTCHA03_A {
195    #[doc = "0: Comparison conditions are not met."]
196    _0 = 0,
197    #[doc = "1: Comparison conditions are met."]
198    _1 = 1,
199}
200impl From<CMPSTCHA03_A> for bool {
201    #[inline(always)]
202    fn from(variant: CMPSTCHA03_A) -> Self {
203        variant as u8 != 0
204    }
205}
206impl CMPSTCHA03_R {
207    #[doc = "Get enumerated values variant"]
208    #[inline(always)]
209    pub fn variant(&self) -> CMPSTCHA03_A {
210        match self.bits {
211            false => CMPSTCHA03_A::_0,
212            true => CMPSTCHA03_A::_1,
213        }
214    }
215    #[doc = "Checks if the value of the field is `_0`"]
216    #[inline(always)]
217    pub fn is_0(&self) -> bool {
218        *self == CMPSTCHA03_A::_0
219    }
220    #[doc = "Checks if the value of the field is `_1`"]
221    #[inline(always)]
222    pub fn is_1(&self) -> bool {
223        *self == CMPSTCHA03_A::_1
224    }
225}
226#[doc = "Field `CMPSTCHA03` writer - Compare window A flag of AN003"]
227pub type CMPSTCHA03_W<'a, const O: u8> =
228    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA03_A, O>;
229impl<'a, const O: u8> CMPSTCHA03_W<'a, O> {
230    #[doc = "Comparison conditions are not met."]
231    #[inline(always)]
232    pub fn _0(self) -> &'a mut W {
233        self.variant(CMPSTCHA03_A::_0)
234    }
235    #[doc = "Comparison conditions are met."]
236    #[inline(always)]
237    pub fn _1(self) -> &'a mut W {
238        self.variant(CMPSTCHA03_A::_1)
239    }
240}
241#[doc = "Field `CMPSTCHA04` reader - Compare window A flag of AN004\n\nThe field is **modified** in some way after a read operation."]
242pub type CMPSTCHA04_R = crate::BitReader<CMPSTCHA04_A>;
243#[doc = "Compare window A flag of AN004\n\nValue on reset: 0"]
244#[derive(Clone, Copy, Debug, PartialEq, Eq)]
245pub enum CMPSTCHA04_A {
246    #[doc = "0: Comparison conditions are not met."]
247    _0 = 0,
248    #[doc = "1: Comparison conditions are met."]
249    _1 = 1,
250}
251impl From<CMPSTCHA04_A> for bool {
252    #[inline(always)]
253    fn from(variant: CMPSTCHA04_A) -> Self {
254        variant as u8 != 0
255    }
256}
257impl CMPSTCHA04_R {
258    #[doc = "Get enumerated values variant"]
259    #[inline(always)]
260    pub fn variant(&self) -> CMPSTCHA04_A {
261        match self.bits {
262            false => CMPSTCHA04_A::_0,
263            true => CMPSTCHA04_A::_1,
264        }
265    }
266    #[doc = "Checks if the value of the field is `_0`"]
267    #[inline(always)]
268    pub fn is_0(&self) -> bool {
269        *self == CMPSTCHA04_A::_0
270    }
271    #[doc = "Checks if the value of the field is `_1`"]
272    #[inline(always)]
273    pub fn is_1(&self) -> bool {
274        *self == CMPSTCHA04_A::_1
275    }
276}
277#[doc = "Field `CMPSTCHA04` writer - Compare window A flag of AN004"]
278pub type CMPSTCHA04_W<'a, const O: u8> =
279    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA04_A, O>;
280impl<'a, const O: u8> CMPSTCHA04_W<'a, O> {
281    #[doc = "Comparison conditions are not met."]
282    #[inline(always)]
283    pub fn _0(self) -> &'a mut W {
284        self.variant(CMPSTCHA04_A::_0)
285    }
286    #[doc = "Comparison conditions are met."]
287    #[inline(always)]
288    pub fn _1(self) -> &'a mut W {
289        self.variant(CMPSTCHA04_A::_1)
290    }
291}
292#[doc = "Field `CMPSTCHA05` reader - Compare window A flag of AN005\n\nThe field is **modified** in some way after a read operation."]
293pub type CMPSTCHA05_R = crate::BitReader<CMPSTCHA05_A>;
294#[doc = "Compare window A flag of AN005\n\nValue on reset: 0"]
295#[derive(Clone, Copy, Debug, PartialEq, Eq)]
296pub enum CMPSTCHA05_A {
297    #[doc = "0: Comparison conditions are not met."]
298    _0 = 0,
299    #[doc = "1: Comparison conditions are met."]
300    _1 = 1,
301}
302impl From<CMPSTCHA05_A> for bool {
303    #[inline(always)]
304    fn from(variant: CMPSTCHA05_A) -> Self {
305        variant as u8 != 0
306    }
307}
308impl CMPSTCHA05_R {
309    #[doc = "Get enumerated values variant"]
310    #[inline(always)]
311    pub fn variant(&self) -> CMPSTCHA05_A {
312        match self.bits {
313            false => CMPSTCHA05_A::_0,
314            true => CMPSTCHA05_A::_1,
315        }
316    }
317    #[doc = "Checks if the value of the field is `_0`"]
318    #[inline(always)]
319    pub fn is_0(&self) -> bool {
320        *self == CMPSTCHA05_A::_0
321    }
322    #[doc = "Checks if the value of the field is `_1`"]
323    #[inline(always)]
324    pub fn is_1(&self) -> bool {
325        *self == CMPSTCHA05_A::_1
326    }
327}
328#[doc = "Field `CMPSTCHA05` writer - Compare window A flag of AN005"]
329pub type CMPSTCHA05_W<'a, const O: u8> =
330    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA05_A, O>;
331impl<'a, const O: u8> CMPSTCHA05_W<'a, O> {
332    #[doc = "Comparison conditions are not met."]
333    #[inline(always)]
334    pub fn _0(self) -> &'a mut W {
335        self.variant(CMPSTCHA05_A::_0)
336    }
337    #[doc = "Comparison conditions are met."]
338    #[inline(always)]
339    pub fn _1(self) -> &'a mut W {
340        self.variant(CMPSTCHA05_A::_1)
341    }
342}
343#[doc = "Field `CMPSTCHA06` reader - Compare window A flag of AN006\n\nThe field is **modified** in some way after a read operation."]
344pub type CMPSTCHA06_R = crate::BitReader<CMPSTCHA06_A>;
345#[doc = "Compare window A flag of AN006\n\nValue on reset: 0"]
346#[derive(Clone, Copy, Debug, PartialEq, Eq)]
347pub enum CMPSTCHA06_A {
348    #[doc = "0: Comparison conditions are not met."]
349    _0 = 0,
350    #[doc = "1: Comparison conditions are met."]
351    _1 = 1,
352}
353impl From<CMPSTCHA06_A> for bool {
354    #[inline(always)]
355    fn from(variant: CMPSTCHA06_A) -> Self {
356        variant as u8 != 0
357    }
358}
359impl CMPSTCHA06_R {
360    #[doc = "Get enumerated values variant"]
361    #[inline(always)]
362    pub fn variant(&self) -> CMPSTCHA06_A {
363        match self.bits {
364            false => CMPSTCHA06_A::_0,
365            true => CMPSTCHA06_A::_1,
366        }
367    }
368    #[doc = "Checks if the value of the field is `_0`"]
369    #[inline(always)]
370    pub fn is_0(&self) -> bool {
371        *self == CMPSTCHA06_A::_0
372    }
373    #[doc = "Checks if the value of the field is `_1`"]
374    #[inline(always)]
375    pub fn is_1(&self) -> bool {
376        *self == CMPSTCHA06_A::_1
377    }
378}
379#[doc = "Field `CMPSTCHA06` writer - Compare window A flag of AN006"]
380pub type CMPSTCHA06_W<'a, const O: u8> =
381    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA06_A, O>;
382impl<'a, const O: u8> CMPSTCHA06_W<'a, O> {
383    #[doc = "Comparison conditions are not met."]
384    #[inline(always)]
385    pub fn _0(self) -> &'a mut W {
386        self.variant(CMPSTCHA06_A::_0)
387    }
388    #[doc = "Comparison conditions are met."]
389    #[inline(always)]
390    pub fn _1(self) -> &'a mut W {
391        self.variant(CMPSTCHA06_A::_1)
392    }
393}
394#[doc = "Field `CMPSTCHA07` reader - Compare window A flag of AN007\n\nThe field is **modified** in some way after a read operation."]
395pub type CMPSTCHA07_R = crate::BitReader<CMPSTCHA07_A>;
396#[doc = "Compare window A flag of AN007\n\nValue on reset: 0"]
397#[derive(Clone, Copy, Debug, PartialEq, Eq)]
398pub enum CMPSTCHA07_A {
399    #[doc = "0: Comparison conditions are not met."]
400    _0 = 0,
401    #[doc = "1: Comparison conditions are met."]
402    _1 = 1,
403}
404impl From<CMPSTCHA07_A> for bool {
405    #[inline(always)]
406    fn from(variant: CMPSTCHA07_A) -> Self {
407        variant as u8 != 0
408    }
409}
410impl CMPSTCHA07_R {
411    #[doc = "Get enumerated values variant"]
412    #[inline(always)]
413    pub fn variant(&self) -> CMPSTCHA07_A {
414        match self.bits {
415            false => CMPSTCHA07_A::_0,
416            true => CMPSTCHA07_A::_1,
417        }
418    }
419    #[doc = "Checks if the value of the field is `_0`"]
420    #[inline(always)]
421    pub fn is_0(&self) -> bool {
422        *self == CMPSTCHA07_A::_0
423    }
424    #[doc = "Checks if the value of the field is `_1`"]
425    #[inline(always)]
426    pub fn is_1(&self) -> bool {
427        *self == CMPSTCHA07_A::_1
428    }
429}
430#[doc = "Field `CMPSTCHA07` writer - Compare window A flag of AN007"]
431pub type CMPSTCHA07_W<'a, const O: u8> =
432    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA07_A, O>;
433impl<'a, const O: u8> CMPSTCHA07_W<'a, O> {
434    #[doc = "Comparison conditions are not met."]
435    #[inline(always)]
436    pub fn _0(self) -> &'a mut W {
437        self.variant(CMPSTCHA07_A::_0)
438    }
439    #[doc = "Comparison conditions are met."]
440    #[inline(always)]
441    pub fn _1(self) -> &'a mut W {
442        self.variant(CMPSTCHA07_A::_1)
443    }
444}
445#[doc = "Field `CMPSTCHA08` reader - Compare window A flag of AN008\n\nThe field is **modified** in some way after a read operation."]
446pub type CMPSTCHA08_R = crate::BitReader<CMPSTCHA08_A>;
447#[doc = "Compare window A flag of AN008\n\nValue on reset: 0"]
448#[derive(Clone, Copy, Debug, PartialEq, Eq)]
449pub enum CMPSTCHA08_A {
450    #[doc = "0: Comparison conditions are not met."]
451    _0 = 0,
452    #[doc = "1: Comparison conditions are met."]
453    _1 = 1,
454}
455impl From<CMPSTCHA08_A> for bool {
456    #[inline(always)]
457    fn from(variant: CMPSTCHA08_A) -> Self {
458        variant as u8 != 0
459    }
460}
461impl CMPSTCHA08_R {
462    #[doc = "Get enumerated values variant"]
463    #[inline(always)]
464    pub fn variant(&self) -> CMPSTCHA08_A {
465        match self.bits {
466            false => CMPSTCHA08_A::_0,
467            true => CMPSTCHA08_A::_1,
468        }
469    }
470    #[doc = "Checks if the value of the field is `_0`"]
471    #[inline(always)]
472    pub fn is_0(&self) -> bool {
473        *self == CMPSTCHA08_A::_0
474    }
475    #[doc = "Checks if the value of the field is `_1`"]
476    #[inline(always)]
477    pub fn is_1(&self) -> bool {
478        *self == CMPSTCHA08_A::_1
479    }
480}
481#[doc = "Field `CMPSTCHA08` writer - Compare window A flag of AN008"]
482pub type CMPSTCHA08_W<'a, const O: u8> =
483    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA08_A, O>;
484impl<'a, const O: u8> CMPSTCHA08_W<'a, O> {
485    #[doc = "Comparison conditions are not met."]
486    #[inline(always)]
487    pub fn _0(self) -> &'a mut W {
488        self.variant(CMPSTCHA08_A::_0)
489    }
490    #[doc = "Comparison conditions are met."]
491    #[inline(always)]
492    pub fn _1(self) -> &'a mut W {
493        self.variant(CMPSTCHA08_A::_1)
494    }
495}
496#[doc = "Field `CMPSTCHA09` reader - Compare window A flag of AN009\n\nThe field is **modified** in some way after a read operation."]
497pub type CMPSTCHA09_R = crate::BitReader<CMPSTCHA09_A>;
498#[doc = "Compare window A flag of AN009\n\nValue on reset: 0"]
499#[derive(Clone, Copy, Debug, PartialEq, Eq)]
500pub enum CMPSTCHA09_A {
501    #[doc = "0: Comparison conditions are not met."]
502    _0 = 0,
503    #[doc = "1: Comparison conditions are met."]
504    _1 = 1,
505}
506impl From<CMPSTCHA09_A> for bool {
507    #[inline(always)]
508    fn from(variant: CMPSTCHA09_A) -> Self {
509        variant as u8 != 0
510    }
511}
512impl CMPSTCHA09_R {
513    #[doc = "Get enumerated values variant"]
514    #[inline(always)]
515    pub fn variant(&self) -> CMPSTCHA09_A {
516        match self.bits {
517            false => CMPSTCHA09_A::_0,
518            true => CMPSTCHA09_A::_1,
519        }
520    }
521    #[doc = "Checks if the value of the field is `_0`"]
522    #[inline(always)]
523    pub fn is_0(&self) -> bool {
524        *self == CMPSTCHA09_A::_0
525    }
526    #[doc = "Checks if the value of the field is `_1`"]
527    #[inline(always)]
528    pub fn is_1(&self) -> bool {
529        *self == CMPSTCHA09_A::_1
530    }
531}
532#[doc = "Field `CMPSTCHA09` writer - Compare window A flag of AN009"]
533pub type CMPSTCHA09_W<'a, const O: u8> =
534    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA09_A, O>;
535impl<'a, const O: u8> CMPSTCHA09_W<'a, O> {
536    #[doc = "Comparison conditions are not met."]
537    #[inline(always)]
538    pub fn _0(self) -> &'a mut W {
539        self.variant(CMPSTCHA09_A::_0)
540    }
541    #[doc = "Comparison conditions are met."]
542    #[inline(always)]
543    pub fn _1(self) -> &'a mut W {
544        self.variant(CMPSTCHA09_A::_1)
545    }
546}
547#[doc = "Field `CMPSTCHA10` reader - Compare window A flag of AN010\n\nThe field is **modified** in some way after a read operation."]
548pub type CMPSTCHA10_R = crate::BitReader<CMPSTCHA10_A>;
549#[doc = "Compare window A flag of AN010\n\nValue on reset: 0"]
550#[derive(Clone, Copy, Debug, PartialEq, Eq)]
551pub enum CMPSTCHA10_A {
552    #[doc = "0: Comparison conditions are not met."]
553    _0 = 0,
554    #[doc = "1: Comparison conditions are met."]
555    _1 = 1,
556}
557impl From<CMPSTCHA10_A> for bool {
558    #[inline(always)]
559    fn from(variant: CMPSTCHA10_A) -> Self {
560        variant as u8 != 0
561    }
562}
563impl CMPSTCHA10_R {
564    #[doc = "Get enumerated values variant"]
565    #[inline(always)]
566    pub fn variant(&self) -> CMPSTCHA10_A {
567        match self.bits {
568            false => CMPSTCHA10_A::_0,
569            true => CMPSTCHA10_A::_1,
570        }
571    }
572    #[doc = "Checks if the value of the field is `_0`"]
573    #[inline(always)]
574    pub fn is_0(&self) -> bool {
575        *self == CMPSTCHA10_A::_0
576    }
577    #[doc = "Checks if the value of the field is `_1`"]
578    #[inline(always)]
579    pub fn is_1(&self) -> bool {
580        *self == CMPSTCHA10_A::_1
581    }
582}
583#[doc = "Field `CMPSTCHA10` writer - Compare window A flag of AN010"]
584pub type CMPSTCHA10_W<'a, const O: u8> =
585    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA10_A, O>;
586impl<'a, const O: u8> CMPSTCHA10_W<'a, O> {
587    #[doc = "Comparison conditions are not met."]
588    #[inline(always)]
589    pub fn _0(self) -> &'a mut W {
590        self.variant(CMPSTCHA10_A::_0)
591    }
592    #[doc = "Comparison conditions are met."]
593    #[inline(always)]
594    pub fn _1(self) -> &'a mut W {
595        self.variant(CMPSTCHA10_A::_1)
596    }
597}
598#[doc = "Field `CMPSTCHA11` reader - Compare window A flag of AN011\n\nThe field is **modified** in some way after a read operation."]
599pub type CMPSTCHA11_R = crate::BitReader<CMPSTCHA11_A>;
600#[doc = "Compare window A flag of AN011\n\nValue on reset: 0"]
601#[derive(Clone, Copy, Debug, PartialEq, Eq)]
602pub enum CMPSTCHA11_A {
603    #[doc = "0: Comparison conditions are not met."]
604    _0 = 0,
605    #[doc = "1: Comparison conditions are met."]
606    _1 = 1,
607}
608impl From<CMPSTCHA11_A> for bool {
609    #[inline(always)]
610    fn from(variant: CMPSTCHA11_A) -> Self {
611        variant as u8 != 0
612    }
613}
614impl CMPSTCHA11_R {
615    #[doc = "Get enumerated values variant"]
616    #[inline(always)]
617    pub fn variant(&self) -> CMPSTCHA11_A {
618        match self.bits {
619            false => CMPSTCHA11_A::_0,
620            true => CMPSTCHA11_A::_1,
621        }
622    }
623    #[doc = "Checks if the value of the field is `_0`"]
624    #[inline(always)]
625    pub fn is_0(&self) -> bool {
626        *self == CMPSTCHA11_A::_0
627    }
628    #[doc = "Checks if the value of the field is `_1`"]
629    #[inline(always)]
630    pub fn is_1(&self) -> bool {
631        *self == CMPSTCHA11_A::_1
632    }
633}
634#[doc = "Field `CMPSTCHA11` writer - Compare window A flag of AN011"]
635pub type CMPSTCHA11_W<'a, const O: u8> =
636    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA11_A, O>;
637impl<'a, const O: u8> CMPSTCHA11_W<'a, O> {
638    #[doc = "Comparison conditions are not met."]
639    #[inline(always)]
640    pub fn _0(self) -> &'a mut W {
641        self.variant(CMPSTCHA11_A::_0)
642    }
643    #[doc = "Comparison conditions are met."]
644    #[inline(always)]
645    pub fn _1(self) -> &'a mut W {
646        self.variant(CMPSTCHA11_A::_1)
647    }
648}
649#[doc = "Field `CMPSTCHA12` reader - Compare window A flag of AN012\n\nThe field is **modified** in some way after a read operation."]
650pub type CMPSTCHA12_R = crate::BitReader<CMPSTCHA12_A>;
651#[doc = "Compare window A flag of AN012\n\nValue on reset: 0"]
652#[derive(Clone, Copy, Debug, PartialEq, Eq)]
653pub enum CMPSTCHA12_A {
654    #[doc = "0: Comparison conditions are not met."]
655    _0 = 0,
656    #[doc = "1: Comparison conditions are met."]
657    _1 = 1,
658}
659impl From<CMPSTCHA12_A> for bool {
660    #[inline(always)]
661    fn from(variant: CMPSTCHA12_A) -> Self {
662        variant as u8 != 0
663    }
664}
665impl CMPSTCHA12_R {
666    #[doc = "Get enumerated values variant"]
667    #[inline(always)]
668    pub fn variant(&self) -> CMPSTCHA12_A {
669        match self.bits {
670            false => CMPSTCHA12_A::_0,
671            true => CMPSTCHA12_A::_1,
672        }
673    }
674    #[doc = "Checks if the value of the field is `_0`"]
675    #[inline(always)]
676    pub fn is_0(&self) -> bool {
677        *self == CMPSTCHA12_A::_0
678    }
679    #[doc = "Checks if the value of the field is `_1`"]
680    #[inline(always)]
681    pub fn is_1(&self) -> bool {
682        *self == CMPSTCHA12_A::_1
683    }
684}
685#[doc = "Field `CMPSTCHA12` writer - Compare window A flag of AN012"]
686pub type CMPSTCHA12_W<'a, const O: u8> =
687    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA12_A, O>;
688impl<'a, const O: u8> CMPSTCHA12_W<'a, O> {
689    #[doc = "Comparison conditions are not met."]
690    #[inline(always)]
691    pub fn _0(self) -> &'a mut W {
692        self.variant(CMPSTCHA12_A::_0)
693    }
694    #[doc = "Comparison conditions are met."]
695    #[inline(always)]
696    pub fn _1(self) -> &'a mut W {
697        self.variant(CMPSTCHA12_A::_1)
698    }
699}
700#[doc = "Field `CMPSTCHA13` reader - Compare window A flag of AN013\n\nThe field is **modified** in some way after a read operation."]
701pub type CMPSTCHA13_R = crate::BitReader<CMPSTCHA13_A>;
702#[doc = "Compare window A flag of AN013\n\nValue on reset: 0"]
703#[derive(Clone, Copy, Debug, PartialEq, Eq)]
704pub enum CMPSTCHA13_A {
705    #[doc = "0: Comparison conditions are not met."]
706    _0 = 0,
707    #[doc = "1: Comparison conditions are met."]
708    _1 = 1,
709}
710impl From<CMPSTCHA13_A> for bool {
711    #[inline(always)]
712    fn from(variant: CMPSTCHA13_A) -> Self {
713        variant as u8 != 0
714    }
715}
716impl CMPSTCHA13_R {
717    #[doc = "Get enumerated values variant"]
718    #[inline(always)]
719    pub fn variant(&self) -> CMPSTCHA13_A {
720        match self.bits {
721            false => CMPSTCHA13_A::_0,
722            true => CMPSTCHA13_A::_1,
723        }
724    }
725    #[doc = "Checks if the value of the field is `_0`"]
726    #[inline(always)]
727    pub fn is_0(&self) -> bool {
728        *self == CMPSTCHA13_A::_0
729    }
730    #[doc = "Checks if the value of the field is `_1`"]
731    #[inline(always)]
732    pub fn is_1(&self) -> bool {
733        *self == CMPSTCHA13_A::_1
734    }
735}
736#[doc = "Field `CMPSTCHA13` writer - Compare window A flag of AN013"]
737pub type CMPSTCHA13_W<'a, const O: u8> =
738    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA13_A, O>;
739impl<'a, const O: u8> CMPSTCHA13_W<'a, O> {
740    #[doc = "Comparison conditions are not met."]
741    #[inline(always)]
742    pub fn _0(self) -> &'a mut W {
743        self.variant(CMPSTCHA13_A::_0)
744    }
745    #[doc = "Comparison conditions are met."]
746    #[inline(always)]
747    pub fn _1(self) -> &'a mut W {
748        self.variant(CMPSTCHA13_A::_1)
749    }
750}
751#[doc = "Field `CMPSTCHA14` reader - Compare window A flag of AN014\n\nThe field is **modified** in some way after a read operation."]
752pub type CMPSTCHA14_R = crate::BitReader<CMPSTCHA14_A>;
753#[doc = "Compare window A flag of AN014\n\nValue on reset: 0"]
754#[derive(Clone, Copy, Debug, PartialEq, Eq)]
755pub enum CMPSTCHA14_A {
756    #[doc = "0: Comparison conditions are not met."]
757    _0 = 0,
758    #[doc = "1: Comparison conditions are met."]
759    _1 = 1,
760}
761impl From<CMPSTCHA14_A> for bool {
762    #[inline(always)]
763    fn from(variant: CMPSTCHA14_A) -> Self {
764        variant as u8 != 0
765    }
766}
767impl CMPSTCHA14_R {
768    #[doc = "Get enumerated values variant"]
769    #[inline(always)]
770    pub fn variant(&self) -> CMPSTCHA14_A {
771        match self.bits {
772            false => CMPSTCHA14_A::_0,
773            true => CMPSTCHA14_A::_1,
774        }
775    }
776    #[doc = "Checks if the value of the field is `_0`"]
777    #[inline(always)]
778    pub fn is_0(&self) -> bool {
779        *self == CMPSTCHA14_A::_0
780    }
781    #[doc = "Checks if the value of the field is `_1`"]
782    #[inline(always)]
783    pub fn is_1(&self) -> bool {
784        *self == CMPSTCHA14_A::_1
785    }
786}
787#[doc = "Field `CMPSTCHA14` writer - Compare window A flag of AN014"]
788pub type CMPSTCHA14_W<'a, const O: u8> =
789    crate::BitWriter0C<'a, u16, ADCMPSR0_SPEC, CMPSTCHA14_A, O>;
790impl<'a, const O: u8> CMPSTCHA14_W<'a, O> {
791    #[doc = "Comparison conditions are not met."]
792    #[inline(always)]
793    pub fn _0(self) -> &'a mut W {
794        self.variant(CMPSTCHA14_A::_0)
795    }
796    #[doc = "Comparison conditions are met."]
797    #[inline(always)]
798    pub fn _1(self) -> &'a mut W {
799        self.variant(CMPSTCHA14_A::_1)
800    }
801}
802impl R {
803    #[doc = "Bit 0 - Compare window A flag of AN000"]
804    #[inline(always)]
805    pub fn cmpstcha00(&self) -> CMPSTCHA00_R {
806        CMPSTCHA00_R::new((self.bits & 1) != 0)
807    }
808    #[doc = "Bit 1 - Compare window A flag of AN001"]
809    #[inline(always)]
810    pub fn cmpstcha01(&self) -> CMPSTCHA01_R {
811        CMPSTCHA01_R::new(((self.bits >> 1) & 1) != 0)
812    }
813    #[doc = "Bit 2 - Compare window A flag of AN002"]
814    #[inline(always)]
815    pub fn cmpstcha02(&self) -> CMPSTCHA02_R {
816        CMPSTCHA02_R::new(((self.bits >> 2) & 1) != 0)
817    }
818    #[doc = "Bit 3 - Compare window A flag of AN003"]
819    #[inline(always)]
820    pub fn cmpstcha03(&self) -> CMPSTCHA03_R {
821        CMPSTCHA03_R::new(((self.bits >> 3) & 1) != 0)
822    }
823    #[doc = "Bit 4 - Compare window A flag of AN004"]
824    #[inline(always)]
825    pub fn cmpstcha04(&self) -> CMPSTCHA04_R {
826        CMPSTCHA04_R::new(((self.bits >> 4) & 1) != 0)
827    }
828    #[doc = "Bit 5 - Compare window A flag of AN005"]
829    #[inline(always)]
830    pub fn cmpstcha05(&self) -> CMPSTCHA05_R {
831        CMPSTCHA05_R::new(((self.bits >> 5) & 1) != 0)
832    }
833    #[doc = "Bit 6 - Compare window A flag of AN006"]
834    #[inline(always)]
835    pub fn cmpstcha06(&self) -> CMPSTCHA06_R {
836        CMPSTCHA06_R::new(((self.bits >> 6) & 1) != 0)
837    }
838    #[doc = "Bit 7 - Compare window A flag of AN007"]
839    #[inline(always)]
840    pub fn cmpstcha07(&self) -> CMPSTCHA07_R {
841        CMPSTCHA07_R::new(((self.bits >> 7) & 1) != 0)
842    }
843    #[doc = "Bit 8 - Compare window A flag of AN008"]
844    #[inline(always)]
845    pub fn cmpstcha08(&self) -> CMPSTCHA08_R {
846        CMPSTCHA08_R::new(((self.bits >> 8) & 1) != 0)
847    }
848    #[doc = "Bit 9 - Compare window A flag of AN009"]
849    #[inline(always)]
850    pub fn cmpstcha09(&self) -> CMPSTCHA09_R {
851        CMPSTCHA09_R::new(((self.bits >> 9) & 1) != 0)
852    }
853    #[doc = "Bit 10 - Compare window A flag of AN010"]
854    #[inline(always)]
855    pub fn cmpstcha10(&self) -> CMPSTCHA10_R {
856        CMPSTCHA10_R::new(((self.bits >> 10) & 1) != 0)
857    }
858    #[doc = "Bit 11 - Compare window A flag of AN011"]
859    #[inline(always)]
860    pub fn cmpstcha11(&self) -> CMPSTCHA11_R {
861        CMPSTCHA11_R::new(((self.bits >> 11) & 1) != 0)
862    }
863    #[doc = "Bit 12 - Compare window A flag of AN012"]
864    #[inline(always)]
865    pub fn cmpstcha12(&self) -> CMPSTCHA12_R {
866        CMPSTCHA12_R::new(((self.bits >> 12) & 1) != 0)
867    }
868    #[doc = "Bit 13 - Compare window A flag of AN013"]
869    #[inline(always)]
870    pub fn cmpstcha13(&self) -> CMPSTCHA13_R {
871        CMPSTCHA13_R::new(((self.bits >> 13) & 1) != 0)
872    }
873    #[doc = "Bit 14 - Compare window A flag of AN014"]
874    #[inline(always)]
875    pub fn cmpstcha14(&self) -> CMPSTCHA14_R {
876        CMPSTCHA14_R::new(((self.bits >> 14) & 1) != 0)
877    }
878}
879impl W {
880    #[doc = "Bit 0 - Compare window A flag of AN000"]
881    #[inline(always)]
882    #[must_use]
883    pub fn cmpstcha00(&mut self) -> CMPSTCHA00_W<0> {
884        CMPSTCHA00_W::new(self)
885    }
886    #[doc = "Bit 1 - Compare window A flag of AN001"]
887    #[inline(always)]
888    #[must_use]
889    pub fn cmpstcha01(&mut self) -> CMPSTCHA01_W<1> {
890        CMPSTCHA01_W::new(self)
891    }
892    #[doc = "Bit 2 - Compare window A flag of AN002"]
893    #[inline(always)]
894    #[must_use]
895    pub fn cmpstcha02(&mut self) -> CMPSTCHA02_W<2> {
896        CMPSTCHA02_W::new(self)
897    }
898    #[doc = "Bit 3 - Compare window A flag of AN003"]
899    #[inline(always)]
900    #[must_use]
901    pub fn cmpstcha03(&mut self) -> CMPSTCHA03_W<3> {
902        CMPSTCHA03_W::new(self)
903    }
904    #[doc = "Bit 4 - Compare window A flag of AN004"]
905    #[inline(always)]
906    #[must_use]
907    pub fn cmpstcha04(&mut self) -> CMPSTCHA04_W<4> {
908        CMPSTCHA04_W::new(self)
909    }
910    #[doc = "Bit 5 - Compare window A flag of AN005"]
911    #[inline(always)]
912    #[must_use]
913    pub fn cmpstcha05(&mut self) -> CMPSTCHA05_W<5> {
914        CMPSTCHA05_W::new(self)
915    }
916    #[doc = "Bit 6 - Compare window A flag of AN006"]
917    #[inline(always)]
918    #[must_use]
919    pub fn cmpstcha06(&mut self) -> CMPSTCHA06_W<6> {
920        CMPSTCHA06_W::new(self)
921    }
922    #[doc = "Bit 7 - Compare window A flag of AN007"]
923    #[inline(always)]
924    #[must_use]
925    pub fn cmpstcha07(&mut self) -> CMPSTCHA07_W<7> {
926        CMPSTCHA07_W::new(self)
927    }
928    #[doc = "Bit 8 - Compare window A flag of AN008"]
929    #[inline(always)]
930    #[must_use]
931    pub fn cmpstcha08(&mut self) -> CMPSTCHA08_W<8> {
932        CMPSTCHA08_W::new(self)
933    }
934    #[doc = "Bit 9 - Compare window A flag of AN009"]
935    #[inline(always)]
936    #[must_use]
937    pub fn cmpstcha09(&mut self) -> CMPSTCHA09_W<9> {
938        CMPSTCHA09_W::new(self)
939    }
940    #[doc = "Bit 10 - Compare window A flag of AN010"]
941    #[inline(always)]
942    #[must_use]
943    pub fn cmpstcha10(&mut self) -> CMPSTCHA10_W<10> {
944        CMPSTCHA10_W::new(self)
945    }
946    #[doc = "Bit 11 - Compare window A flag of AN011"]
947    #[inline(always)]
948    #[must_use]
949    pub fn cmpstcha11(&mut self) -> CMPSTCHA11_W<11> {
950        CMPSTCHA11_W::new(self)
951    }
952    #[doc = "Bit 12 - Compare window A flag of AN012"]
953    #[inline(always)]
954    #[must_use]
955    pub fn cmpstcha12(&mut self) -> CMPSTCHA12_W<12> {
956        CMPSTCHA12_W::new(self)
957    }
958    #[doc = "Bit 13 - Compare window A flag of AN013"]
959    #[inline(always)]
960    #[must_use]
961    pub fn cmpstcha13(&mut self) -> CMPSTCHA13_W<13> {
962        CMPSTCHA13_W::new(self)
963    }
964    #[doc = "Bit 14 - Compare window A flag of AN014"]
965    #[inline(always)]
966    #[must_use]
967    pub fn cmpstcha14(&mut self) -> CMPSTCHA14_W<14> {
968        CMPSTCHA14_W::new(self)
969    }
970    #[doc = "Writes raw bits to the register."]
971    #[inline(always)]
972    pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
973        self.0.bits(bits);
974        self
975    }
976}
977#[doc = "A/D Compare Function Window A Channel Status Register 0\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 [adcmpsr0](index.html) module"]
978pub struct ADCMPSR0_SPEC;
979impl crate::RegisterSpec for ADCMPSR0_SPEC {
980    type Ux = u16;
981}
982#[doc = "`read()` method returns [adcmpsr0::R](R) reader structure"]
983impl crate::Readable for ADCMPSR0_SPEC {
984    type Reader = R;
985}
986#[doc = "`write(|w| ..)` method takes [adcmpsr0::W](W) writer structure"]
987impl crate::Writable for ADCMPSR0_SPEC {
988    type Writer = W;
989    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x7fff;
990    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
991}
992#[doc = "`reset()` method sets ADCMPSR0 to value 0"]
993impl crate::Resettable for ADCMPSR0_SPEC {
994    const RESET_VALUE: Self::Ux = 0;
995}