rp2040_pac/io_bank0/
intr.rs
1#[doc = "Register `INTR%s` reader"]
2pub type R = crate::R<INTR_SPEC>;
3#[doc = "Register `INTR%s` writer"]
4pub type W = crate::W<INTR_SPEC>;
5#[doc = "Field `GPIO0_LEVEL_LOW` reader - "]
6pub type GPIO0_LEVEL_LOW_R = crate::BitReader;
7#[doc = "Field `GPIO0_LEVEL_HIGH` reader - "]
8pub type GPIO0_LEVEL_HIGH_R = crate::BitReader;
9#[doc = "Field `GPIO0_EDGE_LOW` reader - "]
10pub type GPIO0_EDGE_LOW_R = crate::BitReader;
11#[doc = "Field `GPIO0_EDGE_LOW` writer - "]
12pub type GPIO0_EDGE_LOW_W<'a, REG> = crate::BitWriter1C<'a, REG>;
13#[doc = "Field `GPIO0_EDGE_HIGH` reader - "]
14pub type GPIO0_EDGE_HIGH_R = crate::BitReader;
15#[doc = "Field `GPIO0_EDGE_HIGH` writer - "]
16pub type GPIO0_EDGE_HIGH_W<'a, REG> = crate::BitWriter1C<'a, REG>;
17#[doc = "Field `GPIO1_LEVEL_LOW` reader - "]
18pub type GPIO1_LEVEL_LOW_R = crate::BitReader;
19#[doc = "Field `GPIO1_LEVEL_HIGH` reader - "]
20pub type GPIO1_LEVEL_HIGH_R = crate::BitReader;
21#[doc = "Field `GPIO1_EDGE_LOW` reader - "]
22pub type GPIO1_EDGE_LOW_R = crate::BitReader;
23#[doc = "Field `GPIO1_EDGE_LOW` writer - "]
24pub type GPIO1_EDGE_LOW_W<'a, REG> = crate::BitWriter1C<'a, REG>;
25#[doc = "Field `GPIO1_EDGE_HIGH` reader - "]
26pub type GPIO1_EDGE_HIGH_R = crate::BitReader;
27#[doc = "Field `GPIO1_EDGE_HIGH` writer - "]
28pub type GPIO1_EDGE_HIGH_W<'a, REG> = crate::BitWriter1C<'a, REG>;
29#[doc = "Field `GPIO2_LEVEL_LOW` reader - "]
30pub type GPIO2_LEVEL_LOW_R = crate::BitReader;
31#[doc = "Field `GPIO2_LEVEL_HIGH` reader - "]
32pub type GPIO2_LEVEL_HIGH_R = crate::BitReader;
33#[doc = "Field `GPIO2_EDGE_LOW` reader - "]
34pub type GPIO2_EDGE_LOW_R = crate::BitReader;
35#[doc = "Field `GPIO2_EDGE_LOW` writer - "]
36pub type GPIO2_EDGE_LOW_W<'a, REG> = crate::BitWriter1C<'a, REG>;
37#[doc = "Field `GPIO2_EDGE_HIGH` reader - "]
38pub type GPIO2_EDGE_HIGH_R = crate::BitReader;
39#[doc = "Field `GPIO2_EDGE_HIGH` writer - "]
40pub type GPIO2_EDGE_HIGH_W<'a, REG> = crate::BitWriter1C<'a, REG>;
41#[doc = "Field `GPIO3_LEVEL_LOW` reader - "]
42pub type GPIO3_LEVEL_LOW_R = crate::BitReader;
43#[doc = "Field `GPIO3_LEVEL_HIGH` reader - "]
44pub type GPIO3_LEVEL_HIGH_R = crate::BitReader;
45#[doc = "Field `GPIO3_EDGE_LOW` reader - "]
46pub type GPIO3_EDGE_LOW_R = crate::BitReader;
47#[doc = "Field `GPIO3_EDGE_LOW` writer - "]
48pub type GPIO3_EDGE_LOW_W<'a, REG> = crate::BitWriter1C<'a, REG>;
49#[doc = "Field `GPIO3_EDGE_HIGH` reader - "]
50pub type GPIO3_EDGE_HIGH_R = crate::BitReader;
51#[doc = "Field `GPIO3_EDGE_HIGH` writer - "]
52pub type GPIO3_EDGE_HIGH_W<'a, REG> = crate::BitWriter1C<'a, REG>;
53#[doc = "Field `GPIO4_LEVEL_LOW` reader - "]
54pub type GPIO4_LEVEL_LOW_R = crate::BitReader;
55#[doc = "Field `GPIO4_LEVEL_HIGH` reader - "]
56pub type GPIO4_LEVEL_HIGH_R = crate::BitReader;
57#[doc = "Field `GPIO4_EDGE_LOW` reader - "]
58pub type GPIO4_EDGE_LOW_R = crate::BitReader;
59#[doc = "Field `GPIO4_EDGE_LOW` writer - "]
60pub type GPIO4_EDGE_LOW_W<'a, REG> = crate::BitWriter1C<'a, REG>;
61#[doc = "Field `GPIO4_EDGE_HIGH` reader - "]
62pub type GPIO4_EDGE_HIGH_R = crate::BitReader;
63#[doc = "Field `GPIO4_EDGE_HIGH` writer - "]
64pub type GPIO4_EDGE_HIGH_W<'a, REG> = crate::BitWriter1C<'a, REG>;
65#[doc = "Field `GPIO5_LEVEL_LOW` reader - "]
66pub type GPIO5_LEVEL_LOW_R = crate::BitReader;
67#[doc = "Field `GPIO5_LEVEL_HIGH` reader - "]
68pub type GPIO5_LEVEL_HIGH_R = crate::BitReader;
69#[doc = "Field `GPIO5_EDGE_LOW` reader - "]
70pub type GPIO5_EDGE_LOW_R = crate::BitReader;
71#[doc = "Field `GPIO5_EDGE_LOW` writer - "]
72pub type GPIO5_EDGE_LOW_W<'a, REG> = crate::BitWriter1C<'a, REG>;
73#[doc = "Field `GPIO5_EDGE_HIGH` reader - "]
74pub type GPIO5_EDGE_HIGH_R = crate::BitReader;
75#[doc = "Field `GPIO5_EDGE_HIGH` writer - "]
76pub type GPIO5_EDGE_HIGH_W<'a, REG> = crate::BitWriter1C<'a, REG>;
77#[doc = "Field `GPIO6_LEVEL_LOW` reader - "]
78pub type GPIO6_LEVEL_LOW_R = crate::BitReader;
79#[doc = "Field `GPIO6_LEVEL_HIGH` reader - "]
80pub type GPIO6_LEVEL_HIGH_R = crate::BitReader;
81#[doc = "Field `GPIO6_EDGE_LOW` reader - "]
82pub type GPIO6_EDGE_LOW_R = crate::BitReader;
83#[doc = "Field `GPIO6_EDGE_LOW` writer - "]
84pub type GPIO6_EDGE_LOW_W<'a, REG> = crate::BitWriter1C<'a, REG>;
85#[doc = "Field `GPIO6_EDGE_HIGH` reader - "]
86pub type GPIO6_EDGE_HIGH_R = crate::BitReader;
87#[doc = "Field `GPIO6_EDGE_HIGH` writer - "]
88pub type GPIO6_EDGE_HIGH_W<'a, REG> = crate::BitWriter1C<'a, REG>;
89#[doc = "Field `GPIO7_LEVEL_LOW` reader - "]
90pub type GPIO7_LEVEL_LOW_R = crate::BitReader;
91#[doc = "Field `GPIO7_LEVEL_HIGH` reader - "]
92pub type GPIO7_LEVEL_HIGH_R = crate::BitReader;
93#[doc = "Field `GPIO7_EDGE_LOW` reader - "]
94pub type GPIO7_EDGE_LOW_R = crate::BitReader;
95#[doc = "Field `GPIO7_EDGE_LOW` writer - "]
96pub type GPIO7_EDGE_LOW_W<'a, REG> = crate::BitWriter1C<'a, REG>;
97#[doc = "Field `GPIO7_EDGE_HIGH` reader - "]
98pub type GPIO7_EDGE_HIGH_R = crate::BitReader;
99#[doc = "Field `GPIO7_EDGE_HIGH` writer - "]
100pub type GPIO7_EDGE_HIGH_W<'a, REG> = crate::BitWriter1C<'a, REG>;
101impl R {
102 #[doc = "Bit 0"]
103 #[inline(always)]
104 pub fn gpio0_level_low(&self) -> GPIO0_LEVEL_LOW_R {
105 GPIO0_LEVEL_LOW_R::new((self.bits & 1) != 0)
106 }
107 #[doc = "Bit 1"]
108 #[inline(always)]
109 pub fn gpio0_level_high(&self) -> GPIO0_LEVEL_HIGH_R {
110 GPIO0_LEVEL_HIGH_R::new(((self.bits >> 1) & 1) != 0)
111 }
112 #[doc = "Bit 2"]
113 #[inline(always)]
114 pub fn gpio0_edge_low(&self) -> GPIO0_EDGE_LOW_R {
115 GPIO0_EDGE_LOW_R::new(((self.bits >> 2) & 1) != 0)
116 }
117 #[doc = "Bit 3"]
118 #[inline(always)]
119 pub fn gpio0_edge_high(&self) -> GPIO0_EDGE_HIGH_R {
120 GPIO0_EDGE_HIGH_R::new(((self.bits >> 3) & 1) != 0)
121 }
122 #[doc = "Bit 4"]
123 #[inline(always)]
124 pub fn gpio1_level_low(&self) -> GPIO1_LEVEL_LOW_R {
125 GPIO1_LEVEL_LOW_R::new(((self.bits >> 4) & 1) != 0)
126 }
127 #[doc = "Bit 5"]
128 #[inline(always)]
129 pub fn gpio1_level_high(&self) -> GPIO1_LEVEL_HIGH_R {
130 GPIO1_LEVEL_HIGH_R::new(((self.bits >> 5) & 1) != 0)
131 }
132 #[doc = "Bit 6"]
133 #[inline(always)]
134 pub fn gpio1_edge_low(&self) -> GPIO1_EDGE_LOW_R {
135 GPIO1_EDGE_LOW_R::new(((self.bits >> 6) & 1) != 0)
136 }
137 #[doc = "Bit 7"]
138 #[inline(always)]
139 pub fn gpio1_edge_high(&self) -> GPIO1_EDGE_HIGH_R {
140 GPIO1_EDGE_HIGH_R::new(((self.bits >> 7) & 1) != 0)
141 }
142 #[doc = "Bit 8"]
143 #[inline(always)]
144 pub fn gpio2_level_low(&self) -> GPIO2_LEVEL_LOW_R {
145 GPIO2_LEVEL_LOW_R::new(((self.bits >> 8) & 1) != 0)
146 }
147 #[doc = "Bit 9"]
148 #[inline(always)]
149 pub fn gpio2_level_high(&self) -> GPIO2_LEVEL_HIGH_R {
150 GPIO2_LEVEL_HIGH_R::new(((self.bits >> 9) & 1) != 0)
151 }
152 #[doc = "Bit 10"]
153 #[inline(always)]
154 pub fn gpio2_edge_low(&self) -> GPIO2_EDGE_LOW_R {
155 GPIO2_EDGE_LOW_R::new(((self.bits >> 10) & 1) != 0)
156 }
157 #[doc = "Bit 11"]
158 #[inline(always)]
159 pub fn gpio2_edge_high(&self) -> GPIO2_EDGE_HIGH_R {
160 GPIO2_EDGE_HIGH_R::new(((self.bits >> 11) & 1) != 0)
161 }
162 #[doc = "Bit 12"]
163 #[inline(always)]
164 pub fn gpio3_level_low(&self) -> GPIO3_LEVEL_LOW_R {
165 GPIO3_LEVEL_LOW_R::new(((self.bits >> 12) & 1) != 0)
166 }
167 #[doc = "Bit 13"]
168 #[inline(always)]
169 pub fn gpio3_level_high(&self) -> GPIO3_LEVEL_HIGH_R {
170 GPIO3_LEVEL_HIGH_R::new(((self.bits >> 13) & 1) != 0)
171 }
172 #[doc = "Bit 14"]
173 #[inline(always)]
174 pub fn gpio3_edge_low(&self) -> GPIO3_EDGE_LOW_R {
175 GPIO3_EDGE_LOW_R::new(((self.bits >> 14) & 1) != 0)
176 }
177 #[doc = "Bit 15"]
178 #[inline(always)]
179 pub fn gpio3_edge_high(&self) -> GPIO3_EDGE_HIGH_R {
180 GPIO3_EDGE_HIGH_R::new(((self.bits >> 15) & 1) != 0)
181 }
182 #[doc = "Bit 16"]
183 #[inline(always)]
184 pub fn gpio4_level_low(&self) -> GPIO4_LEVEL_LOW_R {
185 GPIO4_LEVEL_LOW_R::new(((self.bits >> 16) & 1) != 0)
186 }
187 #[doc = "Bit 17"]
188 #[inline(always)]
189 pub fn gpio4_level_high(&self) -> GPIO4_LEVEL_HIGH_R {
190 GPIO4_LEVEL_HIGH_R::new(((self.bits >> 17) & 1) != 0)
191 }
192 #[doc = "Bit 18"]
193 #[inline(always)]
194 pub fn gpio4_edge_low(&self) -> GPIO4_EDGE_LOW_R {
195 GPIO4_EDGE_LOW_R::new(((self.bits >> 18) & 1) != 0)
196 }
197 #[doc = "Bit 19"]
198 #[inline(always)]
199 pub fn gpio4_edge_high(&self) -> GPIO4_EDGE_HIGH_R {
200 GPIO4_EDGE_HIGH_R::new(((self.bits >> 19) & 1) != 0)
201 }
202 #[doc = "Bit 20"]
203 #[inline(always)]
204 pub fn gpio5_level_low(&self) -> GPIO5_LEVEL_LOW_R {
205 GPIO5_LEVEL_LOW_R::new(((self.bits >> 20) & 1) != 0)
206 }
207 #[doc = "Bit 21"]
208 #[inline(always)]
209 pub fn gpio5_level_high(&self) -> GPIO5_LEVEL_HIGH_R {
210 GPIO5_LEVEL_HIGH_R::new(((self.bits >> 21) & 1) != 0)
211 }
212 #[doc = "Bit 22"]
213 #[inline(always)]
214 pub fn gpio5_edge_low(&self) -> GPIO5_EDGE_LOW_R {
215 GPIO5_EDGE_LOW_R::new(((self.bits >> 22) & 1) != 0)
216 }
217 #[doc = "Bit 23"]
218 #[inline(always)]
219 pub fn gpio5_edge_high(&self) -> GPIO5_EDGE_HIGH_R {
220 GPIO5_EDGE_HIGH_R::new(((self.bits >> 23) & 1) != 0)
221 }
222 #[doc = "Bit 24"]
223 #[inline(always)]
224 pub fn gpio6_level_low(&self) -> GPIO6_LEVEL_LOW_R {
225 GPIO6_LEVEL_LOW_R::new(((self.bits >> 24) & 1) != 0)
226 }
227 #[doc = "Bit 25"]
228 #[inline(always)]
229 pub fn gpio6_level_high(&self) -> GPIO6_LEVEL_HIGH_R {
230 GPIO6_LEVEL_HIGH_R::new(((self.bits >> 25) & 1) != 0)
231 }
232 #[doc = "Bit 26"]
233 #[inline(always)]
234 pub fn gpio6_edge_low(&self) -> GPIO6_EDGE_LOW_R {
235 GPIO6_EDGE_LOW_R::new(((self.bits >> 26) & 1) != 0)
236 }
237 #[doc = "Bit 27"]
238 #[inline(always)]
239 pub fn gpio6_edge_high(&self) -> GPIO6_EDGE_HIGH_R {
240 GPIO6_EDGE_HIGH_R::new(((self.bits >> 27) & 1) != 0)
241 }
242 #[doc = "Bit 28"]
243 #[inline(always)]
244 pub fn gpio7_level_low(&self) -> GPIO7_LEVEL_LOW_R {
245 GPIO7_LEVEL_LOW_R::new(((self.bits >> 28) & 1) != 0)
246 }
247 #[doc = "Bit 29"]
248 #[inline(always)]
249 pub fn gpio7_level_high(&self) -> GPIO7_LEVEL_HIGH_R {
250 GPIO7_LEVEL_HIGH_R::new(((self.bits >> 29) & 1) != 0)
251 }
252 #[doc = "Bit 30"]
253 #[inline(always)]
254 pub fn gpio7_edge_low(&self) -> GPIO7_EDGE_LOW_R {
255 GPIO7_EDGE_LOW_R::new(((self.bits >> 30) & 1) != 0)
256 }
257 #[doc = "Bit 31"]
258 #[inline(always)]
259 pub fn gpio7_edge_high(&self) -> GPIO7_EDGE_HIGH_R {
260 GPIO7_EDGE_HIGH_R::new(((self.bits >> 31) & 1) != 0)
261 }
262}
263impl W {
264 #[doc = "Bit 2"]
265 #[inline(always)]
266 #[must_use]
267 pub fn gpio0_edge_low(&mut self) -> GPIO0_EDGE_LOW_W<INTR_SPEC> {
268 GPIO0_EDGE_LOW_W::new(self, 2)
269 }
270 #[doc = "Bit 3"]
271 #[inline(always)]
272 #[must_use]
273 pub fn gpio0_edge_high(&mut self) -> GPIO0_EDGE_HIGH_W<INTR_SPEC> {
274 GPIO0_EDGE_HIGH_W::new(self, 3)
275 }
276 #[doc = "Bit 6"]
277 #[inline(always)]
278 #[must_use]
279 pub fn gpio1_edge_low(&mut self) -> GPIO1_EDGE_LOW_W<INTR_SPEC> {
280 GPIO1_EDGE_LOW_W::new(self, 6)
281 }
282 #[doc = "Bit 7"]
283 #[inline(always)]
284 #[must_use]
285 pub fn gpio1_edge_high(&mut self) -> GPIO1_EDGE_HIGH_W<INTR_SPEC> {
286 GPIO1_EDGE_HIGH_W::new(self, 7)
287 }
288 #[doc = "Bit 10"]
289 #[inline(always)]
290 #[must_use]
291 pub fn gpio2_edge_low(&mut self) -> GPIO2_EDGE_LOW_W<INTR_SPEC> {
292 GPIO2_EDGE_LOW_W::new(self, 10)
293 }
294 #[doc = "Bit 11"]
295 #[inline(always)]
296 #[must_use]
297 pub fn gpio2_edge_high(&mut self) -> GPIO2_EDGE_HIGH_W<INTR_SPEC> {
298 GPIO2_EDGE_HIGH_W::new(self, 11)
299 }
300 #[doc = "Bit 14"]
301 #[inline(always)]
302 #[must_use]
303 pub fn gpio3_edge_low(&mut self) -> GPIO3_EDGE_LOW_W<INTR_SPEC> {
304 GPIO3_EDGE_LOW_W::new(self, 14)
305 }
306 #[doc = "Bit 15"]
307 #[inline(always)]
308 #[must_use]
309 pub fn gpio3_edge_high(&mut self) -> GPIO3_EDGE_HIGH_W<INTR_SPEC> {
310 GPIO3_EDGE_HIGH_W::new(self, 15)
311 }
312 #[doc = "Bit 18"]
313 #[inline(always)]
314 #[must_use]
315 pub fn gpio4_edge_low(&mut self) -> GPIO4_EDGE_LOW_W<INTR_SPEC> {
316 GPIO4_EDGE_LOW_W::new(self, 18)
317 }
318 #[doc = "Bit 19"]
319 #[inline(always)]
320 #[must_use]
321 pub fn gpio4_edge_high(&mut self) -> GPIO4_EDGE_HIGH_W<INTR_SPEC> {
322 GPIO4_EDGE_HIGH_W::new(self, 19)
323 }
324 #[doc = "Bit 22"]
325 #[inline(always)]
326 #[must_use]
327 pub fn gpio5_edge_low(&mut self) -> GPIO5_EDGE_LOW_W<INTR_SPEC> {
328 GPIO5_EDGE_LOW_W::new(self, 22)
329 }
330 #[doc = "Bit 23"]
331 #[inline(always)]
332 #[must_use]
333 pub fn gpio5_edge_high(&mut self) -> GPIO5_EDGE_HIGH_W<INTR_SPEC> {
334 GPIO5_EDGE_HIGH_W::new(self, 23)
335 }
336 #[doc = "Bit 26"]
337 #[inline(always)]
338 #[must_use]
339 pub fn gpio6_edge_low(&mut self) -> GPIO6_EDGE_LOW_W<INTR_SPEC> {
340 GPIO6_EDGE_LOW_W::new(self, 26)
341 }
342 #[doc = "Bit 27"]
343 #[inline(always)]
344 #[must_use]
345 pub fn gpio6_edge_high(&mut self) -> GPIO6_EDGE_HIGH_W<INTR_SPEC> {
346 GPIO6_EDGE_HIGH_W::new(self, 27)
347 }
348 #[doc = "Bit 30"]
349 #[inline(always)]
350 #[must_use]
351 pub fn gpio7_edge_low(&mut self) -> GPIO7_EDGE_LOW_W<INTR_SPEC> {
352 GPIO7_EDGE_LOW_W::new(self, 30)
353 }
354 #[doc = "Bit 31"]
355 #[inline(always)]
356 #[must_use]
357 pub fn gpio7_edge_high(&mut self) -> GPIO7_EDGE_HIGH_W<INTR_SPEC> {
358 GPIO7_EDGE_HIGH_W::new(self, 31)
359 }
360 #[doc = r" Writes raw bits to the register."]
361 #[doc = r""]
362 #[doc = r" # Safety"]
363 #[doc = r""]
364 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
365 #[inline(always)]
366 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
367 self.bits = bits;
368 self
369 }
370}
371#[doc = "Raw Interrupts
372
373You can [`read`](crate::generic::Reg::read) this register and get [`intr::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`intr::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
374pub struct INTR_SPEC;
375impl crate::RegisterSpec for INTR_SPEC {
376 type Ux = u32;
377}
378#[doc = "`read()` method returns [`intr::R`](R) reader structure"]
379impl crate::Readable for INTR_SPEC {}
380#[doc = "`write(|w| ..)` method takes [`intr::W`](W) writer structure"]
381impl crate::Writable for INTR_SPEC {
382 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
383 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0xcccc_cccc;
384}
385#[doc = "`reset()` method sets INTR%s to value 0"]
386impl crate::Resettable for INTR_SPEC {
387 const RESET_VALUE: u32 = 0;
388}