atsamd11d/rtc/mode1/
evctrl.rs
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 `PEREO0` reader - Periodic Interval 0 Event Output Enable"]
6pub type Pereo0R = crate::BitReader;
7#[doc = "Field `PEREO0` writer - Periodic Interval 0 Event Output Enable"]
8pub type Pereo0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `PEREO1` reader - Periodic Interval 1 Event Output Enable"]
10pub type Pereo1R = crate::BitReader;
11#[doc = "Field `PEREO1` writer - Periodic Interval 1 Event Output Enable"]
12pub type Pereo1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `PEREO2` reader - Periodic Interval 2 Event Output Enable"]
14pub type Pereo2R = crate::BitReader;
15#[doc = "Field `PEREO2` writer - Periodic Interval 2 Event Output Enable"]
16pub type Pereo2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `PEREO3` reader - Periodic Interval 3 Event Output Enable"]
18pub type Pereo3R = crate::BitReader;
19#[doc = "Field `PEREO3` writer - Periodic Interval 3 Event Output Enable"]
20pub type Pereo3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `PEREO4` reader - Periodic Interval 4 Event Output Enable"]
22pub type Pereo4R = crate::BitReader;
23#[doc = "Field `PEREO4` writer - Periodic Interval 4 Event Output Enable"]
24pub type Pereo4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `PEREO5` reader - Periodic Interval 5 Event Output Enable"]
26pub type Pereo5R = crate::BitReader;
27#[doc = "Field `PEREO5` writer - Periodic Interval 5 Event Output Enable"]
28pub type Pereo5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `PEREO6` reader - Periodic Interval 6 Event Output Enable"]
30pub type Pereo6R = crate::BitReader;
31#[doc = "Field `PEREO6` writer - Periodic Interval 6 Event Output Enable"]
32pub type Pereo6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `PEREO7` reader - Periodic Interval 7 Event Output Enable"]
34pub type Pereo7R = crate::BitReader;
35#[doc = "Field `PEREO7` writer - Periodic Interval 7 Event Output Enable"]
36pub type Pereo7W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `CMPEO0` reader - Compare 0 Event Output Enable"]
38pub type Cmpeo0R = crate::BitReader;
39#[doc = "Field `CMPEO0` writer - Compare 0 Event Output Enable"]
40pub type Cmpeo0W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `CMPEO1` reader - Compare 1 Event Output Enable"]
42pub type Cmpeo1R = crate::BitReader;
43#[doc = "Field `CMPEO1` writer - Compare 1 Event Output Enable"]
44pub type Cmpeo1W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `OVFEO` reader - Overflow Event Output Enable"]
46pub type OvfeoR = crate::BitReader;
47#[doc = "Field `OVFEO` writer - Overflow Event Output Enable"]
48pub type OvfeoW<'a, REG> = crate::BitWriter<'a, REG>;
49impl R {
50 #[doc = "Bit 0 - Periodic Interval 0 Event Output Enable"]
51 #[inline(always)]
52 pub fn pereo0(&self) -> Pereo0R {
53 Pereo0R::new((self.bits & 1) != 0)
54 }
55 #[doc = "Bit 1 - Periodic Interval 1 Event Output Enable"]
56 #[inline(always)]
57 pub fn pereo1(&self) -> Pereo1R {
58 Pereo1R::new(((self.bits >> 1) & 1) != 0)
59 }
60 #[doc = "Bit 2 - Periodic Interval 2 Event Output Enable"]
61 #[inline(always)]
62 pub fn pereo2(&self) -> Pereo2R {
63 Pereo2R::new(((self.bits >> 2) & 1) != 0)
64 }
65 #[doc = "Bit 3 - Periodic Interval 3 Event Output Enable"]
66 #[inline(always)]
67 pub fn pereo3(&self) -> Pereo3R {
68 Pereo3R::new(((self.bits >> 3) & 1) != 0)
69 }
70 #[doc = "Bit 4 - Periodic Interval 4 Event Output Enable"]
71 #[inline(always)]
72 pub fn pereo4(&self) -> Pereo4R {
73 Pereo4R::new(((self.bits >> 4) & 1) != 0)
74 }
75 #[doc = "Bit 5 - Periodic Interval 5 Event Output Enable"]
76 #[inline(always)]
77 pub fn pereo5(&self) -> Pereo5R {
78 Pereo5R::new(((self.bits >> 5) & 1) != 0)
79 }
80 #[doc = "Bit 6 - Periodic Interval 6 Event Output Enable"]
81 #[inline(always)]
82 pub fn pereo6(&self) -> Pereo6R {
83 Pereo6R::new(((self.bits >> 6) & 1) != 0)
84 }
85 #[doc = "Bit 7 - Periodic Interval 7 Event Output Enable"]
86 #[inline(always)]
87 pub fn pereo7(&self) -> Pereo7R {
88 Pereo7R::new(((self.bits >> 7) & 1) != 0)
89 }
90 #[doc = "Bit 8 - Compare 0 Event Output Enable"]
91 #[inline(always)]
92 pub fn cmpeo0(&self) -> Cmpeo0R {
93 Cmpeo0R::new(((self.bits >> 8) & 1) != 0)
94 }
95 #[doc = "Bit 9 - Compare 1 Event Output Enable"]
96 #[inline(always)]
97 pub fn cmpeo1(&self) -> Cmpeo1R {
98 Cmpeo1R::new(((self.bits >> 9) & 1) != 0)
99 }
100 #[doc = "Bit 15 - Overflow Event Output Enable"]
101 #[inline(always)]
102 pub fn ovfeo(&self) -> OvfeoR {
103 OvfeoR::new(((self.bits >> 15) & 1) != 0)
104 }
105}
106impl W {
107 #[doc = "Bit 0 - Periodic Interval 0 Event Output Enable"]
108 #[inline(always)]
109 #[must_use]
110 pub fn pereo0(&mut self) -> Pereo0W<EvctrlSpec> {
111 Pereo0W::new(self, 0)
112 }
113 #[doc = "Bit 1 - Periodic Interval 1 Event Output Enable"]
114 #[inline(always)]
115 #[must_use]
116 pub fn pereo1(&mut self) -> Pereo1W<EvctrlSpec> {
117 Pereo1W::new(self, 1)
118 }
119 #[doc = "Bit 2 - Periodic Interval 2 Event Output Enable"]
120 #[inline(always)]
121 #[must_use]
122 pub fn pereo2(&mut self) -> Pereo2W<EvctrlSpec> {
123 Pereo2W::new(self, 2)
124 }
125 #[doc = "Bit 3 - Periodic Interval 3 Event Output Enable"]
126 #[inline(always)]
127 #[must_use]
128 pub fn pereo3(&mut self) -> Pereo3W<EvctrlSpec> {
129 Pereo3W::new(self, 3)
130 }
131 #[doc = "Bit 4 - Periodic Interval 4 Event Output Enable"]
132 #[inline(always)]
133 #[must_use]
134 pub fn pereo4(&mut self) -> Pereo4W<EvctrlSpec> {
135 Pereo4W::new(self, 4)
136 }
137 #[doc = "Bit 5 - Periodic Interval 5 Event Output Enable"]
138 #[inline(always)]
139 #[must_use]
140 pub fn pereo5(&mut self) -> Pereo5W<EvctrlSpec> {
141 Pereo5W::new(self, 5)
142 }
143 #[doc = "Bit 6 - Periodic Interval 6 Event Output Enable"]
144 #[inline(always)]
145 #[must_use]
146 pub fn pereo6(&mut self) -> Pereo6W<EvctrlSpec> {
147 Pereo6W::new(self, 6)
148 }
149 #[doc = "Bit 7 - Periodic Interval 7 Event Output Enable"]
150 #[inline(always)]
151 #[must_use]
152 pub fn pereo7(&mut self) -> Pereo7W<EvctrlSpec> {
153 Pereo7W::new(self, 7)
154 }
155 #[doc = "Bit 8 - Compare 0 Event Output Enable"]
156 #[inline(always)]
157 #[must_use]
158 pub fn cmpeo0(&mut self) -> Cmpeo0W<EvctrlSpec> {
159 Cmpeo0W::new(self, 8)
160 }
161 #[doc = "Bit 9 - Compare 1 Event Output Enable"]
162 #[inline(always)]
163 #[must_use]
164 pub fn cmpeo1(&mut self) -> Cmpeo1W<EvctrlSpec> {
165 Cmpeo1W::new(self, 9)
166 }
167 #[doc = "Bit 15 - Overflow Event Output Enable"]
168 #[inline(always)]
169 #[must_use]
170 pub fn ovfeo(&mut self) -> OvfeoW<EvctrlSpec> {
171 OvfeoW::new(self, 15)
172 }
173}
174#[doc = "MODE1 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)."]
175pub struct EvctrlSpec;
176impl crate::RegisterSpec for EvctrlSpec {
177 type Ux = u16;
178}
179#[doc = "`read()` method returns [`evctrl::R`](R) reader structure"]
180impl crate::Readable for EvctrlSpec {}
181#[doc = "`write(|w| ..)` method takes [`evctrl::W`](W) writer structure"]
182impl crate::Writable for EvctrlSpec {
183 type Safety = crate::Unsafe;
184 const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
185 const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
186}
187#[doc = "`reset()` method sets EVCTRL to value 0"]
188impl crate::Resettable for EvctrlSpec {
189 const RESET_VALUE: u16 = 0;
190}