atsamd21g/eic/
intflag.rs
1#[doc = "Register `INTFLAG` reader"]
2pub type R = crate::R<IntflagSpec>;
3#[doc = "Register `INTFLAG` writer"]
4pub type W = crate::W<IntflagSpec>;
5#[doc = "Field `EXTINT0` reader - External Interrupt 0"]
6pub type Extint0R = crate::BitReader;
7#[doc = "Field `EXTINT0` writer - External Interrupt 0"]
8pub type Extint0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `EXTINT1` reader - External Interrupt 1"]
10pub type Extint1R = crate::BitReader;
11#[doc = "Field `EXTINT1` writer - External Interrupt 1"]
12pub type Extint1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `EXTINT2` reader - External Interrupt 2"]
14pub type Extint2R = crate::BitReader;
15#[doc = "Field `EXTINT2` writer - External Interrupt 2"]
16pub type Extint2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `EXTINT3` reader - External Interrupt 3"]
18pub type Extint3R = crate::BitReader;
19#[doc = "Field `EXTINT3` writer - External Interrupt 3"]
20pub type Extint3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `EXTINT4` reader - External Interrupt 4"]
22pub type Extint4R = crate::BitReader;
23#[doc = "Field `EXTINT4` writer - External Interrupt 4"]
24pub type Extint4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `EXTINT5` reader - External Interrupt 5"]
26pub type Extint5R = crate::BitReader;
27#[doc = "Field `EXTINT5` writer - External Interrupt 5"]
28pub type Extint5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `EXTINT6` reader - External Interrupt 6"]
30pub type Extint6R = crate::BitReader;
31#[doc = "Field `EXTINT6` writer - External Interrupt 6"]
32pub type Extint6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `EXTINT7` reader - External Interrupt 7"]
34pub type Extint7R = crate::BitReader;
35#[doc = "Field `EXTINT7` writer - External Interrupt 7"]
36pub type Extint7W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `EXTINT8` reader - External Interrupt 8"]
38pub type Extint8R = crate::BitReader;
39#[doc = "Field `EXTINT8` writer - External Interrupt 8"]
40pub type Extint8W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `EXTINT9` reader - External Interrupt 9"]
42pub type Extint9R = crate::BitReader;
43#[doc = "Field `EXTINT9` writer - External Interrupt 9"]
44pub type Extint9W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `EXTINT10` reader - External Interrupt 10"]
46pub type Extint10R = crate::BitReader;
47#[doc = "Field `EXTINT10` writer - External Interrupt 10"]
48pub type Extint10W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `EXTINT11` reader - External Interrupt 11"]
50pub type Extint11R = crate::BitReader;
51#[doc = "Field `EXTINT11` writer - External Interrupt 11"]
52pub type Extint11W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `EXTINT12` reader - External Interrupt 12"]
54pub type Extint12R = crate::BitReader;
55#[doc = "Field `EXTINT12` writer - External Interrupt 12"]
56pub type Extint12W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `EXTINT13` reader - External Interrupt 13"]
58pub type Extint13R = crate::BitReader;
59#[doc = "Field `EXTINT13` writer - External Interrupt 13"]
60pub type Extint13W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `EXTINT14` reader - External Interrupt 14"]
62pub type Extint14R = crate::BitReader;
63#[doc = "Field `EXTINT14` writer - External Interrupt 14"]
64pub type Extint14W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `EXTINT15` reader - External Interrupt 15"]
66pub type Extint15R = crate::BitReader;
67#[doc = "Field `EXTINT15` writer - External Interrupt 15"]
68pub type Extint15W<'a, REG> = crate::BitWriter<'a, REG>;
69impl R {
70 #[doc = "Bit 0 - External Interrupt 0"]
71 #[inline(always)]
72 pub fn extint0(&self) -> Extint0R {
73 Extint0R::new((self.bits & 1) != 0)
74 }
75 #[doc = "Bit 1 - External Interrupt 1"]
76 #[inline(always)]
77 pub fn extint1(&self) -> Extint1R {
78 Extint1R::new(((self.bits >> 1) & 1) != 0)
79 }
80 #[doc = "Bit 2 - External Interrupt 2"]
81 #[inline(always)]
82 pub fn extint2(&self) -> Extint2R {
83 Extint2R::new(((self.bits >> 2) & 1) != 0)
84 }
85 #[doc = "Bit 3 - External Interrupt 3"]
86 #[inline(always)]
87 pub fn extint3(&self) -> Extint3R {
88 Extint3R::new(((self.bits >> 3) & 1) != 0)
89 }
90 #[doc = "Bit 4 - External Interrupt 4"]
91 #[inline(always)]
92 pub fn extint4(&self) -> Extint4R {
93 Extint4R::new(((self.bits >> 4) & 1) != 0)
94 }
95 #[doc = "Bit 5 - External Interrupt 5"]
96 #[inline(always)]
97 pub fn extint5(&self) -> Extint5R {
98 Extint5R::new(((self.bits >> 5) & 1) != 0)
99 }
100 #[doc = "Bit 6 - External Interrupt 6"]
101 #[inline(always)]
102 pub fn extint6(&self) -> Extint6R {
103 Extint6R::new(((self.bits >> 6) & 1) != 0)
104 }
105 #[doc = "Bit 7 - External Interrupt 7"]
106 #[inline(always)]
107 pub fn extint7(&self) -> Extint7R {
108 Extint7R::new(((self.bits >> 7) & 1) != 0)
109 }
110 #[doc = "Bit 8 - External Interrupt 8"]
111 #[inline(always)]
112 pub fn extint8(&self) -> Extint8R {
113 Extint8R::new(((self.bits >> 8) & 1) != 0)
114 }
115 #[doc = "Bit 9 - External Interrupt 9"]
116 #[inline(always)]
117 pub fn extint9(&self) -> Extint9R {
118 Extint9R::new(((self.bits >> 9) & 1) != 0)
119 }
120 #[doc = "Bit 10 - External Interrupt 10"]
121 #[inline(always)]
122 pub fn extint10(&self) -> Extint10R {
123 Extint10R::new(((self.bits >> 10) & 1) != 0)
124 }
125 #[doc = "Bit 11 - External Interrupt 11"]
126 #[inline(always)]
127 pub fn extint11(&self) -> Extint11R {
128 Extint11R::new(((self.bits >> 11) & 1) != 0)
129 }
130 #[doc = "Bit 12 - External Interrupt 12"]
131 #[inline(always)]
132 pub fn extint12(&self) -> Extint12R {
133 Extint12R::new(((self.bits >> 12) & 1) != 0)
134 }
135 #[doc = "Bit 13 - External Interrupt 13"]
136 #[inline(always)]
137 pub fn extint13(&self) -> Extint13R {
138 Extint13R::new(((self.bits >> 13) & 1) != 0)
139 }
140 #[doc = "Bit 14 - External Interrupt 14"]
141 #[inline(always)]
142 pub fn extint14(&self) -> Extint14R {
143 Extint14R::new(((self.bits >> 14) & 1) != 0)
144 }
145 #[doc = "Bit 15 - External Interrupt 15"]
146 #[inline(always)]
147 pub fn extint15(&self) -> Extint15R {
148 Extint15R::new(((self.bits >> 15) & 1) != 0)
149 }
150}
151impl W {
152 #[doc = "Bit 0 - External Interrupt 0"]
153 #[inline(always)]
154 #[must_use]
155 pub fn extint0(&mut self) -> Extint0W<IntflagSpec> {
156 Extint0W::new(self, 0)
157 }
158 #[doc = "Bit 1 - External Interrupt 1"]
159 #[inline(always)]
160 #[must_use]
161 pub fn extint1(&mut self) -> Extint1W<IntflagSpec> {
162 Extint1W::new(self, 1)
163 }
164 #[doc = "Bit 2 - External Interrupt 2"]
165 #[inline(always)]
166 #[must_use]
167 pub fn extint2(&mut self) -> Extint2W<IntflagSpec> {
168 Extint2W::new(self, 2)
169 }
170 #[doc = "Bit 3 - External Interrupt 3"]
171 #[inline(always)]
172 #[must_use]
173 pub fn extint3(&mut self) -> Extint3W<IntflagSpec> {
174 Extint3W::new(self, 3)
175 }
176 #[doc = "Bit 4 - External Interrupt 4"]
177 #[inline(always)]
178 #[must_use]
179 pub fn extint4(&mut self) -> Extint4W<IntflagSpec> {
180 Extint4W::new(self, 4)
181 }
182 #[doc = "Bit 5 - External Interrupt 5"]
183 #[inline(always)]
184 #[must_use]
185 pub fn extint5(&mut self) -> Extint5W<IntflagSpec> {
186 Extint5W::new(self, 5)
187 }
188 #[doc = "Bit 6 - External Interrupt 6"]
189 #[inline(always)]
190 #[must_use]
191 pub fn extint6(&mut self) -> Extint6W<IntflagSpec> {
192 Extint6W::new(self, 6)
193 }
194 #[doc = "Bit 7 - External Interrupt 7"]
195 #[inline(always)]
196 #[must_use]
197 pub fn extint7(&mut self) -> Extint7W<IntflagSpec> {
198 Extint7W::new(self, 7)
199 }
200 #[doc = "Bit 8 - External Interrupt 8"]
201 #[inline(always)]
202 #[must_use]
203 pub fn extint8(&mut self) -> Extint8W<IntflagSpec> {
204 Extint8W::new(self, 8)
205 }
206 #[doc = "Bit 9 - External Interrupt 9"]
207 #[inline(always)]
208 #[must_use]
209 pub fn extint9(&mut self) -> Extint9W<IntflagSpec> {
210 Extint9W::new(self, 9)
211 }
212 #[doc = "Bit 10 - External Interrupt 10"]
213 #[inline(always)]
214 #[must_use]
215 pub fn extint10(&mut self) -> Extint10W<IntflagSpec> {
216 Extint10W::new(self, 10)
217 }
218 #[doc = "Bit 11 - External Interrupt 11"]
219 #[inline(always)]
220 #[must_use]
221 pub fn extint11(&mut self) -> Extint11W<IntflagSpec> {
222 Extint11W::new(self, 11)
223 }
224 #[doc = "Bit 12 - External Interrupt 12"]
225 #[inline(always)]
226 #[must_use]
227 pub fn extint12(&mut self) -> Extint12W<IntflagSpec> {
228 Extint12W::new(self, 12)
229 }
230 #[doc = "Bit 13 - External Interrupt 13"]
231 #[inline(always)]
232 #[must_use]
233 pub fn extint13(&mut self) -> Extint13W<IntflagSpec> {
234 Extint13W::new(self, 13)
235 }
236 #[doc = "Bit 14 - External Interrupt 14"]
237 #[inline(always)]
238 #[must_use]
239 pub fn extint14(&mut self) -> Extint14W<IntflagSpec> {
240 Extint14W::new(self, 14)
241 }
242 #[doc = "Bit 15 - External Interrupt 15"]
243 #[inline(always)]
244 #[must_use]
245 pub fn extint15(&mut self) -> Extint15W<IntflagSpec> {
246 Extint15W::new(self, 15)
247 }
248}
249#[doc = "Interrupt Flag Status and Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intflag::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intflag::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
250pub struct IntflagSpec;
251impl crate::RegisterSpec for IntflagSpec {
252 type Ux = u32;
253}
254#[doc = "`read()` method returns [`intflag::R`](R) reader structure"]
255impl crate::Readable for IntflagSpec {}
256#[doc = "`write(|w| ..)` method takes [`intflag::W`](W) writer structure"]
257impl crate::Writable for IntflagSpec {
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 INTFLAG to value 0"]
263impl crate::Resettable for IntflagSpec {
264 const RESET_VALUE: u32 = 0;
265}