atsamd21g/eic/
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 `EXTINTEO0` reader - External Interrupt 0 Event Output Enable"]
6pub type Extinteo0R = crate::BitReader;
7#[doc = "Field `EXTINTEO0` writer - External Interrupt 0 Event Output Enable"]
8pub type Extinteo0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `EXTINTEO1` reader - External Interrupt 1 Event Output Enable"]
10pub type Extinteo1R = crate::BitReader;
11#[doc = "Field `EXTINTEO1` writer - External Interrupt 1 Event Output Enable"]
12pub type Extinteo1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `EXTINTEO2` reader - External Interrupt 2 Event Output Enable"]
14pub type Extinteo2R = crate::BitReader;
15#[doc = "Field `EXTINTEO2` writer - External Interrupt 2 Event Output Enable"]
16pub type Extinteo2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `EXTINTEO3` reader - External Interrupt 3 Event Output Enable"]
18pub type Extinteo3R = crate::BitReader;
19#[doc = "Field `EXTINTEO3` writer - External Interrupt 3 Event Output Enable"]
20pub type Extinteo3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `EXTINTEO4` reader - External Interrupt 4 Event Output Enable"]
22pub type Extinteo4R = crate::BitReader;
23#[doc = "Field `EXTINTEO4` writer - External Interrupt 4 Event Output Enable"]
24pub type Extinteo4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `EXTINTEO5` reader - External Interrupt 5 Event Output Enable"]
26pub type Extinteo5R = crate::BitReader;
27#[doc = "Field `EXTINTEO5` writer - External Interrupt 5 Event Output Enable"]
28pub type Extinteo5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `EXTINTEO6` reader - External Interrupt 6 Event Output Enable"]
30pub type Extinteo6R = crate::BitReader;
31#[doc = "Field `EXTINTEO6` writer - External Interrupt 6 Event Output Enable"]
32pub type Extinteo6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `EXTINTEO7` reader - External Interrupt 7 Event Output Enable"]
34pub type Extinteo7R = crate::BitReader;
35#[doc = "Field `EXTINTEO7` writer - External Interrupt 7 Event Output Enable"]
36pub type Extinteo7W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `EXTINTEO8` reader - External Interrupt 8 Event Output Enable"]
38pub type Extinteo8R = crate::BitReader;
39#[doc = "Field `EXTINTEO8` writer - External Interrupt 8 Event Output Enable"]
40pub type Extinteo8W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `EXTINTEO9` reader - External Interrupt 9 Event Output Enable"]
42pub type Extinteo9R = crate::BitReader;
43#[doc = "Field `EXTINTEO9` writer - External Interrupt 9 Event Output Enable"]
44pub type Extinteo9W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `EXTINTEO10` reader - External Interrupt 10 Event Output Enable"]
46pub type Extinteo10R = crate::BitReader;
47#[doc = "Field `EXTINTEO10` writer - External Interrupt 10 Event Output Enable"]
48pub type Extinteo10W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `EXTINTEO11` reader - External Interrupt 11 Event Output Enable"]
50pub type Extinteo11R = crate::BitReader;
51#[doc = "Field `EXTINTEO11` writer - External Interrupt 11 Event Output Enable"]
52pub type Extinteo11W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `EXTINTEO12` reader - External Interrupt 12 Event Output Enable"]
54pub type Extinteo12R = crate::BitReader;
55#[doc = "Field `EXTINTEO12` writer - External Interrupt 12 Event Output Enable"]
56pub type Extinteo12W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `EXTINTEO13` reader - External Interrupt 13 Event Output Enable"]
58pub type Extinteo13R = crate::BitReader;
59#[doc = "Field `EXTINTEO13` writer - External Interrupt 13 Event Output Enable"]
60pub type Extinteo13W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `EXTINTEO14` reader - External Interrupt 14 Event Output Enable"]
62pub type Extinteo14R = crate::BitReader;
63#[doc = "Field `EXTINTEO14` writer - External Interrupt 14 Event Output Enable"]
64pub type Extinteo14W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `EXTINTEO15` reader - External Interrupt 15 Event Output Enable"]
66pub type Extinteo15R = crate::BitReader;
67#[doc = "Field `EXTINTEO15` writer - External Interrupt 15 Event Output Enable"]
68pub type Extinteo15W<'a, REG> = crate::BitWriter<'a, REG>;
69impl R {
70 #[doc = "Bit 0 - External Interrupt 0 Event Output Enable"]
71 #[inline(always)]
72 pub fn extinteo0(&self) -> Extinteo0R {
73 Extinteo0R::new((self.bits & 1) != 0)
74 }
75 #[doc = "Bit 1 - External Interrupt 1 Event Output Enable"]
76 #[inline(always)]
77 pub fn extinteo1(&self) -> Extinteo1R {
78 Extinteo1R::new(((self.bits >> 1) & 1) != 0)
79 }
80 #[doc = "Bit 2 - External Interrupt 2 Event Output Enable"]
81 #[inline(always)]
82 pub fn extinteo2(&self) -> Extinteo2R {
83 Extinteo2R::new(((self.bits >> 2) & 1) != 0)
84 }
85 #[doc = "Bit 3 - External Interrupt 3 Event Output Enable"]
86 #[inline(always)]
87 pub fn extinteo3(&self) -> Extinteo3R {
88 Extinteo3R::new(((self.bits >> 3) & 1) != 0)
89 }
90 #[doc = "Bit 4 - External Interrupt 4 Event Output Enable"]
91 #[inline(always)]
92 pub fn extinteo4(&self) -> Extinteo4R {
93 Extinteo4R::new(((self.bits >> 4) & 1) != 0)
94 }
95 #[doc = "Bit 5 - External Interrupt 5 Event Output Enable"]
96 #[inline(always)]
97 pub fn extinteo5(&self) -> Extinteo5R {
98 Extinteo5R::new(((self.bits >> 5) & 1) != 0)
99 }
100 #[doc = "Bit 6 - External Interrupt 6 Event Output Enable"]
101 #[inline(always)]
102 pub fn extinteo6(&self) -> Extinteo6R {
103 Extinteo6R::new(((self.bits >> 6) & 1) != 0)
104 }
105 #[doc = "Bit 7 - External Interrupt 7 Event Output Enable"]
106 #[inline(always)]
107 pub fn extinteo7(&self) -> Extinteo7R {
108 Extinteo7R::new(((self.bits >> 7) & 1) != 0)
109 }
110 #[doc = "Bit 8 - External Interrupt 8 Event Output Enable"]
111 #[inline(always)]
112 pub fn extinteo8(&self) -> Extinteo8R {
113 Extinteo8R::new(((self.bits >> 8) & 1) != 0)
114 }
115 #[doc = "Bit 9 - External Interrupt 9 Event Output Enable"]
116 #[inline(always)]
117 pub fn extinteo9(&self) -> Extinteo9R {
118 Extinteo9R::new(((self.bits >> 9) & 1) != 0)
119 }
120 #[doc = "Bit 10 - External Interrupt 10 Event Output Enable"]
121 #[inline(always)]
122 pub fn extinteo10(&self) -> Extinteo10R {
123 Extinteo10R::new(((self.bits >> 10) & 1) != 0)
124 }
125 #[doc = "Bit 11 - External Interrupt 11 Event Output Enable"]
126 #[inline(always)]
127 pub fn extinteo11(&self) -> Extinteo11R {
128 Extinteo11R::new(((self.bits >> 11) & 1) != 0)
129 }
130 #[doc = "Bit 12 - External Interrupt 12 Event Output Enable"]
131 #[inline(always)]
132 pub fn extinteo12(&self) -> Extinteo12R {
133 Extinteo12R::new(((self.bits >> 12) & 1) != 0)
134 }
135 #[doc = "Bit 13 - External Interrupt 13 Event Output Enable"]
136 #[inline(always)]
137 pub fn extinteo13(&self) -> Extinteo13R {
138 Extinteo13R::new(((self.bits >> 13) & 1) != 0)
139 }
140 #[doc = "Bit 14 - External Interrupt 14 Event Output Enable"]
141 #[inline(always)]
142 pub fn extinteo14(&self) -> Extinteo14R {
143 Extinteo14R::new(((self.bits >> 14) & 1) != 0)
144 }
145 #[doc = "Bit 15 - External Interrupt 15 Event Output Enable"]
146 #[inline(always)]
147 pub fn extinteo15(&self) -> Extinteo15R {
148 Extinteo15R::new(((self.bits >> 15) & 1) != 0)
149 }
150}
151impl W {
152 #[doc = "Bit 0 - External Interrupt 0 Event Output Enable"]
153 #[inline(always)]
154 #[must_use]
155 pub fn extinteo0(&mut self) -> Extinteo0W<EvctrlSpec> {
156 Extinteo0W::new(self, 0)
157 }
158 #[doc = "Bit 1 - External Interrupt 1 Event Output Enable"]
159 #[inline(always)]
160 #[must_use]
161 pub fn extinteo1(&mut self) -> Extinteo1W<EvctrlSpec> {
162 Extinteo1W::new(self, 1)
163 }
164 #[doc = "Bit 2 - External Interrupt 2 Event Output Enable"]
165 #[inline(always)]
166 #[must_use]
167 pub fn extinteo2(&mut self) -> Extinteo2W<EvctrlSpec> {
168 Extinteo2W::new(self, 2)
169 }
170 #[doc = "Bit 3 - External Interrupt 3 Event Output Enable"]
171 #[inline(always)]
172 #[must_use]
173 pub fn extinteo3(&mut self) -> Extinteo3W<EvctrlSpec> {
174 Extinteo3W::new(self, 3)
175 }
176 #[doc = "Bit 4 - External Interrupt 4 Event Output Enable"]
177 #[inline(always)]
178 #[must_use]
179 pub fn extinteo4(&mut self) -> Extinteo4W<EvctrlSpec> {
180 Extinteo4W::new(self, 4)
181 }
182 #[doc = "Bit 5 - External Interrupt 5 Event Output Enable"]
183 #[inline(always)]
184 #[must_use]
185 pub fn extinteo5(&mut self) -> Extinteo5W<EvctrlSpec> {
186 Extinteo5W::new(self, 5)
187 }
188 #[doc = "Bit 6 - External Interrupt 6 Event Output Enable"]
189 #[inline(always)]
190 #[must_use]
191 pub fn extinteo6(&mut self) -> Extinteo6W<EvctrlSpec> {
192 Extinteo6W::new(self, 6)
193 }
194 #[doc = "Bit 7 - External Interrupt 7 Event Output Enable"]
195 #[inline(always)]
196 #[must_use]
197 pub fn extinteo7(&mut self) -> Extinteo7W<EvctrlSpec> {
198 Extinteo7W::new(self, 7)
199 }
200 #[doc = "Bit 8 - External Interrupt 8 Event Output Enable"]
201 #[inline(always)]
202 #[must_use]
203 pub fn extinteo8(&mut self) -> Extinteo8W<EvctrlSpec> {
204 Extinteo8W::new(self, 8)
205 }
206 #[doc = "Bit 9 - External Interrupt 9 Event Output Enable"]
207 #[inline(always)]
208 #[must_use]
209 pub fn extinteo9(&mut self) -> Extinteo9W<EvctrlSpec> {
210 Extinteo9W::new(self, 9)
211 }
212 #[doc = "Bit 10 - External Interrupt 10 Event Output Enable"]
213 #[inline(always)]
214 #[must_use]
215 pub fn extinteo10(&mut self) -> Extinteo10W<EvctrlSpec> {
216 Extinteo10W::new(self, 10)
217 }
218 #[doc = "Bit 11 - External Interrupt 11 Event Output Enable"]
219 #[inline(always)]
220 #[must_use]
221 pub fn extinteo11(&mut self) -> Extinteo11W<EvctrlSpec> {
222 Extinteo11W::new(self, 11)
223 }
224 #[doc = "Bit 12 - External Interrupt 12 Event Output Enable"]
225 #[inline(always)]
226 #[must_use]
227 pub fn extinteo12(&mut self) -> Extinteo12W<EvctrlSpec> {
228 Extinteo12W::new(self, 12)
229 }
230 #[doc = "Bit 13 - External Interrupt 13 Event Output Enable"]
231 #[inline(always)]
232 #[must_use]
233 pub fn extinteo13(&mut self) -> Extinteo13W<EvctrlSpec> {
234 Extinteo13W::new(self, 13)
235 }
236 #[doc = "Bit 14 - External Interrupt 14 Event Output Enable"]
237 #[inline(always)]
238 #[must_use]
239 pub fn extinteo14(&mut self) -> Extinteo14W<EvctrlSpec> {
240 Extinteo14W::new(self, 14)
241 }
242 #[doc = "Bit 15 - External Interrupt 15 Event Output Enable"]
243 #[inline(always)]
244 #[must_use]
245 pub fn extinteo15(&mut self) -> Extinteo15W<EvctrlSpec> {
246 Extinteo15W::new(self, 15)
247 }
248}
249#[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)."]
250pub struct EvctrlSpec;
251impl crate::RegisterSpec for EvctrlSpec {
252 type Ux = u32;
253}
254#[doc = "`read()` method returns [`evctrl::R`](R) reader structure"]
255impl crate::Readable for EvctrlSpec {}
256#[doc = "`write(|w| ..)` method takes [`evctrl::W`](W) writer structure"]
257impl crate::Writable for EvctrlSpec {
258 type Safety = crate::Unsafe;
259 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
260 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
261}
262#[doc = "`reset()` method sets EVCTRL to value 0"]
263impl crate::Resettable for EvctrlSpec {
264 const RESET_VALUE: u32 = 0;
265}