1#[doc = "Register `EVCTRL` reader"]
2pub type R = crate::R<EvctrlSpec>;
3#[doc = "Register `EVCTRL` writer"]
4pub type W = crate::W<EvctrlSpec>;
5#[doc = "Field `COMPEO0` reader - Comparator 0 Event Output Enable"]
6pub type Compeo0R = crate::BitReader;
7#[doc = "Field `COMPEO0` writer - Comparator 0 Event Output Enable"]
8pub type Compeo0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `COMPEO1` reader - Comparator 1 Event Output Enable"]
10pub type Compeo1R = crate::BitReader;
11#[doc = "Field `COMPEO1` writer - Comparator 1 Event Output Enable"]
12pub type Compeo1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `WINEO0` reader - Window 0 Event Output Enable"]
14pub type Wineo0R = crate::BitReader;
15#[doc = "Field `WINEO0` writer - Window 0 Event Output Enable"]
16pub type Wineo0W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `COMPEI0` reader - Comparator 0 Event Input Enable"]
18pub type Compei0R = crate::BitReader;
19#[doc = "Field `COMPEI0` writer - Comparator 0 Event Input Enable"]
20pub type Compei0W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `COMPEI1` reader - Comparator 1 Event Input Enable"]
22pub type Compei1R = crate::BitReader;
23#[doc = "Field `COMPEI1` writer - Comparator 1 Event Input Enable"]
24pub type Compei1W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `INVEI0` reader - Comparator 0 Input Event Invert Enable"]
26pub type Invei0R = crate::BitReader;
27#[doc = "Field `INVEI0` writer - Comparator 0 Input Event Invert Enable"]
28pub type Invei0W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `INVEI1` reader - Comparator 1 Input Event Invert Enable"]
30pub type Invei1R = crate::BitReader;
31#[doc = "Field `INVEI1` writer - Comparator 1 Input Event Invert Enable"]
32pub type Invei1W<'a, REG> = crate::BitWriter<'a, REG>;
33impl R {
34 #[doc = "Bit 0 - Comparator 0 Event Output Enable"]
35 #[inline(always)]
36 pub fn compeo0(&self) -> Compeo0R {
37 Compeo0R::new((self.bits & 1) != 0)
38 }
39 #[doc = "Bit 1 - Comparator 1 Event Output Enable"]
40 #[inline(always)]
41 pub fn compeo1(&self) -> Compeo1R {
42 Compeo1R::new(((self.bits >> 1) & 1) != 0)
43 }
44 #[doc = "Bit 4 - Window 0 Event Output Enable"]
45 #[inline(always)]
46 pub fn wineo0(&self) -> Wineo0R {
47 Wineo0R::new(((self.bits >> 4) & 1) != 0)
48 }
49 #[doc = "Bit 8 - Comparator 0 Event Input Enable"]
50 #[inline(always)]
51 pub fn compei0(&self) -> Compei0R {
52 Compei0R::new(((self.bits >> 8) & 1) != 0)
53 }
54 #[doc = "Bit 9 - Comparator 1 Event Input Enable"]
55 #[inline(always)]
56 pub fn compei1(&self) -> Compei1R {
57 Compei1R::new(((self.bits >> 9) & 1) != 0)
58 }
59 #[doc = "Bit 12 - Comparator 0 Input Event Invert Enable"]
60 #[inline(always)]
61 pub fn invei0(&self) -> Invei0R {
62 Invei0R::new(((self.bits >> 12) & 1) != 0)
63 }
64 #[doc = "Bit 13 - Comparator 1 Input Event Invert Enable"]
65 #[inline(always)]
66 pub fn invei1(&self) -> Invei1R {
67 Invei1R::new(((self.bits >> 13) & 1) != 0)
68 }
69}
70impl W {
71 #[doc = "Bit 0 - Comparator 0 Event Output Enable"]
72 #[inline(always)]
73 #[must_use]
74 pub fn compeo0(&mut self) -> Compeo0W<EvctrlSpec> {
75 Compeo0W::new(self, 0)
76 }
77 #[doc = "Bit 1 - Comparator 1 Event Output Enable"]
78 #[inline(always)]
79 #[must_use]
80 pub fn compeo1(&mut self) -> Compeo1W<EvctrlSpec> {
81 Compeo1W::new(self, 1)
82 }
83 #[doc = "Bit 4 - Window 0 Event Output Enable"]
84 #[inline(always)]
85 #[must_use]
86 pub fn wineo0(&mut self) -> Wineo0W<EvctrlSpec> {
87 Wineo0W::new(self, 4)
88 }
89 #[doc = "Bit 8 - Comparator 0 Event Input Enable"]
90 #[inline(always)]
91 #[must_use]
92 pub fn compei0(&mut self) -> Compei0W<EvctrlSpec> {
93 Compei0W::new(self, 8)
94 }
95 #[doc = "Bit 9 - Comparator 1 Event Input Enable"]
96 #[inline(always)]
97 #[must_use]
98 pub fn compei1(&mut self) -> Compei1W<EvctrlSpec> {
99 Compei1W::new(self, 9)
100 }
101 #[doc = "Bit 12 - Comparator 0 Input Event Invert Enable"]
102 #[inline(always)]
103 #[must_use]
104 pub fn invei0(&mut self) -> Invei0W<EvctrlSpec> {
105 Invei0W::new(self, 12)
106 }
107 #[doc = "Bit 13 - Comparator 1 Input Event Invert Enable"]
108 #[inline(always)]
109 #[must_use]
110 pub fn invei1(&mut self) -> Invei1W<EvctrlSpec> {
111 Invei1W::new(self, 13)
112 }
113}
114#[doc = "Event Control\n\nYou can [`read`](crate::Reg::read) this register and get [`evctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`evctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
115pub struct EvctrlSpec;
116impl crate::RegisterSpec for EvctrlSpec {
117 type Ux = u16;
118}
119#[doc = "`read()` method returns [`evctrl::R`](R) reader structure"]
120impl crate::Readable for EvctrlSpec {}
121#[doc = "`write(|w| ..)` method takes [`evctrl::W`](W) writer structure"]
122impl crate::Writable for EvctrlSpec {
123 type Safety = crate::Unsafe;
124 const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
125 const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
126}
127#[doc = "`reset()` method sets EVCTRL to value 0"]
128impl crate::Resettable for EvctrlSpec {
129 const RESET_VALUE: u16 = 0;
130}