1#[doc = "Register `GPIO_INT_MODE_SET2` reader"]
2pub struct R(crate::R<GPIO_INT_MODE_SET2_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<GPIO_INT_MODE_SET2_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<GPIO_INT_MODE_SET2_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<GPIO_INT_MODE_SET2_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `GPIO_INT_MODE_SET2` writer"]
17pub struct W(crate::W<GPIO_INT_MODE_SET2_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<GPIO_INT_MODE_SET2_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<GPIO_INT_MODE_SET2_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<GPIO_INT_MODE_SET2_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `reg_gpio_10_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO10."]
38pub type REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO10TRIGGER_MODE_A>;
39#[doc = "Interrupt trigger mode register for GPIO10.\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum GPIO10TRIGGER_MODE_A {
43 #[doc = "0: `0`"]
44 NEGATIVE_PULSE = 0,
45 #[doc = "1: `1`"]
46 POSITIVE_PULSE = 1,
47 #[doc = "2: `10`"]
48 NEGATIVE_LEVEL = 2,
49 #[doc = "3: `11`"]
50 POSITIVE_LEVEL = 3,
51}
52impl From<GPIO10TRIGGER_MODE_A> for u8 {
53 #[inline(always)]
54 fn from(variant: GPIO10TRIGGER_MODE_A) -> Self {
55 variant as _
56 }
57}
58impl REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R {
59 #[doc = "Get enumerated values variant"]
60 #[inline(always)]
61 pub fn variant(&self) -> GPIO10TRIGGER_MODE_A {
62 match self.bits {
63 0 => GPIO10TRIGGER_MODE_A::NEGATIVE_PULSE,
64 1 => GPIO10TRIGGER_MODE_A::POSITIVE_PULSE,
65 2 => GPIO10TRIGGER_MODE_A::NEGATIVE_LEVEL,
66 3 => GPIO10TRIGGER_MODE_A::POSITIVE_LEVEL,
67 _ => unreachable!(),
68 }
69 }
70 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
71 #[inline(always)]
72 pub fn is_negative_pulse(&self) -> bool {
73 *self == GPIO10TRIGGER_MODE_A::NEGATIVE_PULSE
74 }
75 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
76 #[inline(always)]
77 pub fn is_positive_pulse(&self) -> bool {
78 *self == GPIO10TRIGGER_MODE_A::POSITIVE_PULSE
79 }
80 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
81 #[inline(always)]
82 pub fn is_negative_level(&self) -> bool {
83 *self == GPIO10TRIGGER_MODE_A::NEGATIVE_LEVEL
84 }
85 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
86 #[inline(always)]
87 pub fn is_positive_level(&self) -> bool {
88 *self == GPIO10TRIGGER_MODE_A::POSITIVE_LEVEL
89 }
90}
91#[doc = "Field `reg_gpio_10_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO10."]
92pub type REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
93 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO10TRIGGER_MODE_A, 2, O>;
94impl<'a, const O: u8> REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W<'a, O> {
95 #[doc = "`0`"]
96 #[inline(always)]
97 pub fn negative_pulse(self) -> &'a mut W {
98 self.variant(GPIO10TRIGGER_MODE_A::NEGATIVE_PULSE)
99 }
100 #[doc = "`1`"]
101 #[inline(always)]
102 pub fn positive_pulse(self) -> &'a mut W {
103 self.variant(GPIO10TRIGGER_MODE_A::POSITIVE_PULSE)
104 }
105 #[doc = "`10`"]
106 #[inline(always)]
107 pub fn negative_level(self) -> &'a mut W {
108 self.variant(GPIO10TRIGGER_MODE_A::NEGATIVE_LEVEL)
109 }
110 #[doc = "`11`"]
111 #[inline(always)]
112 pub fn positive_level(self) -> &'a mut W {
113 self.variant(GPIO10TRIGGER_MODE_A::POSITIVE_LEVEL)
114 }
115}
116#[doc = "Field `reg_gpio_10_interrupt_control_mode` reader - Interrupt control mode register for GPIO10."]
117pub type REG_GPIO_10_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO10CONTROL_MODE_A>;
118#[doc = "Interrupt control mode register for GPIO10.\n\nValue on reset: 0"]
119#[derive(Clone, Copy, Debug, PartialEq, Eq)]
120pub enum GPIO10CONTROL_MODE_A {
121 #[doc = "0: `0`"]
122 SYNCHRONOUS = 0,
123 #[doc = "1: `1`"]
124 ASYNCHRONOUS = 1,
125}
126impl From<GPIO10CONTROL_MODE_A> for bool {
127 #[inline(always)]
128 fn from(variant: GPIO10CONTROL_MODE_A) -> Self {
129 variant as u8 != 0
130 }
131}
132impl REG_GPIO_10_INTERRUPT_CONTROL_MODE_R {
133 #[doc = "Get enumerated values variant"]
134 #[inline(always)]
135 pub fn variant(&self) -> GPIO10CONTROL_MODE_A {
136 match self.bits {
137 false => GPIO10CONTROL_MODE_A::SYNCHRONOUS,
138 true => GPIO10CONTROL_MODE_A::ASYNCHRONOUS,
139 }
140 }
141 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
142 #[inline(always)]
143 pub fn is_synchronous(&self) -> bool {
144 *self == GPIO10CONTROL_MODE_A::SYNCHRONOUS
145 }
146 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
147 #[inline(always)]
148 pub fn is_asynchronous(&self) -> bool {
149 *self == GPIO10CONTROL_MODE_A::ASYNCHRONOUS
150 }
151}
152#[doc = "Field `reg_gpio_10_interrupt_control_mode` writer - Interrupt control mode register for GPIO10."]
153pub type REG_GPIO_10_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
154 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO10CONTROL_MODE_A, O>;
155impl<'a, const O: u8> REG_GPIO_10_INTERRUPT_CONTROL_MODE_W<'a, O> {
156 #[doc = "`0`"]
157 #[inline(always)]
158 pub fn synchronous(self) -> &'a mut W {
159 self.variant(GPIO10CONTROL_MODE_A::SYNCHRONOUS)
160 }
161 #[doc = "`1`"]
162 #[inline(always)]
163 pub fn asynchronous(self) -> &'a mut W {
164 self.variant(GPIO10CONTROL_MODE_A::ASYNCHRONOUS)
165 }
166}
167#[doc = "Field `reg_gpio_11_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO11."]
168pub type REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO11TRIGGER_MODE_A>;
169#[doc = "Interrupt trigger mode register for GPIO11.\n\nValue on reset: 0"]
170#[derive(Clone, Copy, Debug, PartialEq, Eq)]
171#[repr(u8)]
172pub enum GPIO11TRIGGER_MODE_A {
173 #[doc = "0: `0`"]
174 NEGATIVE_PULSE = 0,
175 #[doc = "1: `1`"]
176 POSITIVE_PULSE = 1,
177 #[doc = "2: `10`"]
178 NEGATIVE_LEVEL = 2,
179 #[doc = "3: `11`"]
180 POSITIVE_LEVEL = 3,
181}
182impl From<GPIO11TRIGGER_MODE_A> for u8 {
183 #[inline(always)]
184 fn from(variant: GPIO11TRIGGER_MODE_A) -> Self {
185 variant as _
186 }
187}
188impl REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R {
189 #[doc = "Get enumerated values variant"]
190 #[inline(always)]
191 pub fn variant(&self) -> GPIO11TRIGGER_MODE_A {
192 match self.bits {
193 0 => GPIO11TRIGGER_MODE_A::NEGATIVE_PULSE,
194 1 => GPIO11TRIGGER_MODE_A::POSITIVE_PULSE,
195 2 => GPIO11TRIGGER_MODE_A::NEGATIVE_LEVEL,
196 3 => GPIO11TRIGGER_MODE_A::POSITIVE_LEVEL,
197 _ => unreachable!(),
198 }
199 }
200 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
201 #[inline(always)]
202 pub fn is_negative_pulse(&self) -> bool {
203 *self == GPIO11TRIGGER_MODE_A::NEGATIVE_PULSE
204 }
205 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
206 #[inline(always)]
207 pub fn is_positive_pulse(&self) -> bool {
208 *self == GPIO11TRIGGER_MODE_A::POSITIVE_PULSE
209 }
210 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
211 #[inline(always)]
212 pub fn is_negative_level(&self) -> bool {
213 *self == GPIO11TRIGGER_MODE_A::NEGATIVE_LEVEL
214 }
215 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
216 #[inline(always)]
217 pub fn is_positive_level(&self) -> bool {
218 *self == GPIO11TRIGGER_MODE_A::POSITIVE_LEVEL
219 }
220}
221#[doc = "Field `reg_gpio_11_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO11."]
222pub type REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
223 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO11TRIGGER_MODE_A, 2, O>;
224impl<'a, const O: u8> REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W<'a, O> {
225 #[doc = "`0`"]
226 #[inline(always)]
227 pub fn negative_pulse(self) -> &'a mut W {
228 self.variant(GPIO11TRIGGER_MODE_A::NEGATIVE_PULSE)
229 }
230 #[doc = "`1`"]
231 #[inline(always)]
232 pub fn positive_pulse(self) -> &'a mut W {
233 self.variant(GPIO11TRIGGER_MODE_A::POSITIVE_PULSE)
234 }
235 #[doc = "`10`"]
236 #[inline(always)]
237 pub fn negative_level(self) -> &'a mut W {
238 self.variant(GPIO11TRIGGER_MODE_A::NEGATIVE_LEVEL)
239 }
240 #[doc = "`11`"]
241 #[inline(always)]
242 pub fn positive_level(self) -> &'a mut W {
243 self.variant(GPIO11TRIGGER_MODE_A::POSITIVE_LEVEL)
244 }
245}
246#[doc = "Field `reg_gpio_11_interrupt_control_mode` reader - Interrupt control mode register for GPIO11."]
247pub type REG_GPIO_11_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO11CONTROL_MODE_A>;
248#[doc = "Interrupt control mode register for GPIO11.\n\nValue on reset: 0"]
249#[derive(Clone, Copy, Debug, PartialEq, Eq)]
250pub enum GPIO11CONTROL_MODE_A {
251 #[doc = "0: `0`"]
252 SYNCHRONOUS = 0,
253 #[doc = "1: `1`"]
254 ASYNCHRONOUS = 1,
255}
256impl From<GPIO11CONTROL_MODE_A> for bool {
257 #[inline(always)]
258 fn from(variant: GPIO11CONTROL_MODE_A) -> Self {
259 variant as u8 != 0
260 }
261}
262impl REG_GPIO_11_INTERRUPT_CONTROL_MODE_R {
263 #[doc = "Get enumerated values variant"]
264 #[inline(always)]
265 pub fn variant(&self) -> GPIO11CONTROL_MODE_A {
266 match self.bits {
267 false => GPIO11CONTROL_MODE_A::SYNCHRONOUS,
268 true => GPIO11CONTROL_MODE_A::ASYNCHRONOUS,
269 }
270 }
271 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
272 #[inline(always)]
273 pub fn is_synchronous(&self) -> bool {
274 *self == GPIO11CONTROL_MODE_A::SYNCHRONOUS
275 }
276 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
277 #[inline(always)]
278 pub fn is_asynchronous(&self) -> bool {
279 *self == GPIO11CONTROL_MODE_A::ASYNCHRONOUS
280 }
281}
282#[doc = "Field `reg_gpio_11_interrupt_control_mode` writer - Interrupt control mode register for GPIO11."]
283pub type REG_GPIO_11_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
284 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO11CONTROL_MODE_A, O>;
285impl<'a, const O: u8> REG_GPIO_11_INTERRUPT_CONTROL_MODE_W<'a, O> {
286 #[doc = "`0`"]
287 #[inline(always)]
288 pub fn synchronous(self) -> &'a mut W {
289 self.variant(GPIO11CONTROL_MODE_A::SYNCHRONOUS)
290 }
291 #[doc = "`1`"]
292 #[inline(always)]
293 pub fn asynchronous(self) -> &'a mut W {
294 self.variant(GPIO11CONTROL_MODE_A::ASYNCHRONOUS)
295 }
296}
297#[doc = "Field `reg_gpio_12_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO12."]
298pub type REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO12TRIGGER_MODE_A>;
299#[doc = "Interrupt trigger mode register for GPIO12.\n\nValue on reset: 0"]
300#[derive(Clone, Copy, Debug, PartialEq, Eq)]
301#[repr(u8)]
302pub enum GPIO12TRIGGER_MODE_A {
303 #[doc = "0: `0`"]
304 NEGATIVE_PULSE = 0,
305 #[doc = "1: `1`"]
306 POSITIVE_PULSE = 1,
307 #[doc = "2: `10`"]
308 NEGATIVE_LEVEL = 2,
309 #[doc = "3: `11`"]
310 POSITIVE_LEVEL = 3,
311}
312impl From<GPIO12TRIGGER_MODE_A> for u8 {
313 #[inline(always)]
314 fn from(variant: GPIO12TRIGGER_MODE_A) -> Self {
315 variant as _
316 }
317}
318impl REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R {
319 #[doc = "Get enumerated values variant"]
320 #[inline(always)]
321 pub fn variant(&self) -> GPIO12TRIGGER_MODE_A {
322 match self.bits {
323 0 => GPIO12TRIGGER_MODE_A::NEGATIVE_PULSE,
324 1 => GPIO12TRIGGER_MODE_A::POSITIVE_PULSE,
325 2 => GPIO12TRIGGER_MODE_A::NEGATIVE_LEVEL,
326 3 => GPIO12TRIGGER_MODE_A::POSITIVE_LEVEL,
327 _ => unreachable!(),
328 }
329 }
330 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
331 #[inline(always)]
332 pub fn is_negative_pulse(&self) -> bool {
333 *self == GPIO12TRIGGER_MODE_A::NEGATIVE_PULSE
334 }
335 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
336 #[inline(always)]
337 pub fn is_positive_pulse(&self) -> bool {
338 *self == GPIO12TRIGGER_MODE_A::POSITIVE_PULSE
339 }
340 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
341 #[inline(always)]
342 pub fn is_negative_level(&self) -> bool {
343 *self == GPIO12TRIGGER_MODE_A::NEGATIVE_LEVEL
344 }
345 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
346 #[inline(always)]
347 pub fn is_positive_level(&self) -> bool {
348 *self == GPIO12TRIGGER_MODE_A::POSITIVE_LEVEL
349 }
350}
351#[doc = "Field `reg_gpio_12_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO12."]
352pub type REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
353 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO12TRIGGER_MODE_A, 2, O>;
354impl<'a, const O: u8> REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W<'a, O> {
355 #[doc = "`0`"]
356 #[inline(always)]
357 pub fn negative_pulse(self) -> &'a mut W {
358 self.variant(GPIO12TRIGGER_MODE_A::NEGATIVE_PULSE)
359 }
360 #[doc = "`1`"]
361 #[inline(always)]
362 pub fn positive_pulse(self) -> &'a mut W {
363 self.variant(GPIO12TRIGGER_MODE_A::POSITIVE_PULSE)
364 }
365 #[doc = "`10`"]
366 #[inline(always)]
367 pub fn negative_level(self) -> &'a mut W {
368 self.variant(GPIO12TRIGGER_MODE_A::NEGATIVE_LEVEL)
369 }
370 #[doc = "`11`"]
371 #[inline(always)]
372 pub fn positive_level(self) -> &'a mut W {
373 self.variant(GPIO12TRIGGER_MODE_A::POSITIVE_LEVEL)
374 }
375}
376#[doc = "Field `reg_gpio_12_interrupt_control_mode` reader - Interrupt control mode register for GPIO12."]
377pub type REG_GPIO_12_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO12CONTROL_MODE_A>;
378#[doc = "Interrupt control mode register for GPIO12.\n\nValue on reset: 0"]
379#[derive(Clone, Copy, Debug, PartialEq, Eq)]
380pub enum GPIO12CONTROL_MODE_A {
381 #[doc = "0: `0`"]
382 SYNCHRONOUS = 0,
383 #[doc = "1: `1`"]
384 ASYNCHRONOUS = 1,
385}
386impl From<GPIO12CONTROL_MODE_A> for bool {
387 #[inline(always)]
388 fn from(variant: GPIO12CONTROL_MODE_A) -> Self {
389 variant as u8 != 0
390 }
391}
392impl REG_GPIO_12_INTERRUPT_CONTROL_MODE_R {
393 #[doc = "Get enumerated values variant"]
394 #[inline(always)]
395 pub fn variant(&self) -> GPIO12CONTROL_MODE_A {
396 match self.bits {
397 false => GPIO12CONTROL_MODE_A::SYNCHRONOUS,
398 true => GPIO12CONTROL_MODE_A::ASYNCHRONOUS,
399 }
400 }
401 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
402 #[inline(always)]
403 pub fn is_synchronous(&self) -> bool {
404 *self == GPIO12CONTROL_MODE_A::SYNCHRONOUS
405 }
406 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
407 #[inline(always)]
408 pub fn is_asynchronous(&self) -> bool {
409 *self == GPIO12CONTROL_MODE_A::ASYNCHRONOUS
410 }
411}
412#[doc = "Field `reg_gpio_12_interrupt_control_mode` writer - Interrupt control mode register for GPIO12."]
413pub type REG_GPIO_12_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
414 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO12CONTROL_MODE_A, O>;
415impl<'a, const O: u8> REG_GPIO_12_INTERRUPT_CONTROL_MODE_W<'a, O> {
416 #[doc = "`0`"]
417 #[inline(always)]
418 pub fn synchronous(self) -> &'a mut W {
419 self.variant(GPIO12CONTROL_MODE_A::SYNCHRONOUS)
420 }
421 #[doc = "`1`"]
422 #[inline(always)]
423 pub fn asynchronous(self) -> &'a mut W {
424 self.variant(GPIO12CONTROL_MODE_A::ASYNCHRONOUS)
425 }
426}
427#[doc = "Field `reg_gpio_13_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO13."]
428pub type REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO13TRIGGER_MODE_A>;
429#[doc = "Interrupt trigger mode register for GPIO13.\n\nValue on reset: 0"]
430#[derive(Clone, Copy, Debug, PartialEq, Eq)]
431#[repr(u8)]
432pub enum GPIO13TRIGGER_MODE_A {
433 #[doc = "0: `0`"]
434 NEGATIVE_PULSE = 0,
435 #[doc = "1: `1`"]
436 POSITIVE_PULSE = 1,
437 #[doc = "2: `10`"]
438 NEGATIVE_LEVEL = 2,
439 #[doc = "3: `11`"]
440 POSITIVE_LEVEL = 3,
441}
442impl From<GPIO13TRIGGER_MODE_A> for u8 {
443 #[inline(always)]
444 fn from(variant: GPIO13TRIGGER_MODE_A) -> Self {
445 variant as _
446 }
447}
448impl REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R {
449 #[doc = "Get enumerated values variant"]
450 #[inline(always)]
451 pub fn variant(&self) -> GPIO13TRIGGER_MODE_A {
452 match self.bits {
453 0 => GPIO13TRIGGER_MODE_A::NEGATIVE_PULSE,
454 1 => GPIO13TRIGGER_MODE_A::POSITIVE_PULSE,
455 2 => GPIO13TRIGGER_MODE_A::NEGATIVE_LEVEL,
456 3 => GPIO13TRIGGER_MODE_A::POSITIVE_LEVEL,
457 _ => unreachable!(),
458 }
459 }
460 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
461 #[inline(always)]
462 pub fn is_negative_pulse(&self) -> bool {
463 *self == GPIO13TRIGGER_MODE_A::NEGATIVE_PULSE
464 }
465 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
466 #[inline(always)]
467 pub fn is_positive_pulse(&self) -> bool {
468 *self == GPIO13TRIGGER_MODE_A::POSITIVE_PULSE
469 }
470 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
471 #[inline(always)]
472 pub fn is_negative_level(&self) -> bool {
473 *self == GPIO13TRIGGER_MODE_A::NEGATIVE_LEVEL
474 }
475 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
476 #[inline(always)]
477 pub fn is_positive_level(&self) -> bool {
478 *self == GPIO13TRIGGER_MODE_A::POSITIVE_LEVEL
479 }
480}
481#[doc = "Field `reg_gpio_13_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO13."]
482pub type REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
483 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO13TRIGGER_MODE_A, 2, O>;
484impl<'a, const O: u8> REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W<'a, O> {
485 #[doc = "`0`"]
486 #[inline(always)]
487 pub fn negative_pulse(self) -> &'a mut W {
488 self.variant(GPIO13TRIGGER_MODE_A::NEGATIVE_PULSE)
489 }
490 #[doc = "`1`"]
491 #[inline(always)]
492 pub fn positive_pulse(self) -> &'a mut W {
493 self.variant(GPIO13TRIGGER_MODE_A::POSITIVE_PULSE)
494 }
495 #[doc = "`10`"]
496 #[inline(always)]
497 pub fn negative_level(self) -> &'a mut W {
498 self.variant(GPIO13TRIGGER_MODE_A::NEGATIVE_LEVEL)
499 }
500 #[doc = "`11`"]
501 #[inline(always)]
502 pub fn positive_level(self) -> &'a mut W {
503 self.variant(GPIO13TRIGGER_MODE_A::POSITIVE_LEVEL)
504 }
505}
506#[doc = "Field `reg_gpio_13_interrupt_control_mode` reader - Interrupt control mode register for GPIO13."]
507pub type REG_GPIO_13_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO13CONTROL_MODE_A>;
508#[doc = "Interrupt control mode register for GPIO13.\n\nValue on reset: 0"]
509#[derive(Clone, Copy, Debug, PartialEq, Eq)]
510pub enum GPIO13CONTROL_MODE_A {
511 #[doc = "0: `0`"]
512 SYNCHRONOUS = 0,
513 #[doc = "1: `1`"]
514 ASYNCHRONOUS = 1,
515}
516impl From<GPIO13CONTROL_MODE_A> for bool {
517 #[inline(always)]
518 fn from(variant: GPIO13CONTROL_MODE_A) -> Self {
519 variant as u8 != 0
520 }
521}
522impl REG_GPIO_13_INTERRUPT_CONTROL_MODE_R {
523 #[doc = "Get enumerated values variant"]
524 #[inline(always)]
525 pub fn variant(&self) -> GPIO13CONTROL_MODE_A {
526 match self.bits {
527 false => GPIO13CONTROL_MODE_A::SYNCHRONOUS,
528 true => GPIO13CONTROL_MODE_A::ASYNCHRONOUS,
529 }
530 }
531 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
532 #[inline(always)]
533 pub fn is_synchronous(&self) -> bool {
534 *self == GPIO13CONTROL_MODE_A::SYNCHRONOUS
535 }
536 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
537 #[inline(always)]
538 pub fn is_asynchronous(&self) -> bool {
539 *self == GPIO13CONTROL_MODE_A::ASYNCHRONOUS
540 }
541}
542#[doc = "Field `reg_gpio_13_interrupt_control_mode` writer - Interrupt control mode register for GPIO13."]
543pub type REG_GPIO_13_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
544 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO13CONTROL_MODE_A, O>;
545impl<'a, const O: u8> REG_GPIO_13_INTERRUPT_CONTROL_MODE_W<'a, O> {
546 #[doc = "`0`"]
547 #[inline(always)]
548 pub fn synchronous(self) -> &'a mut W {
549 self.variant(GPIO13CONTROL_MODE_A::SYNCHRONOUS)
550 }
551 #[doc = "`1`"]
552 #[inline(always)]
553 pub fn asynchronous(self) -> &'a mut W {
554 self.variant(GPIO13CONTROL_MODE_A::ASYNCHRONOUS)
555 }
556}
557#[doc = "Field `reg_gpio_14_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO14."]
558pub type REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO14TRIGGER_MODE_A>;
559#[doc = "Interrupt trigger mode register for GPIO14.\n\nValue on reset: 0"]
560#[derive(Clone, Copy, Debug, PartialEq, Eq)]
561#[repr(u8)]
562pub enum GPIO14TRIGGER_MODE_A {
563 #[doc = "0: `0`"]
564 NEGATIVE_PULSE = 0,
565 #[doc = "1: `1`"]
566 POSITIVE_PULSE = 1,
567 #[doc = "2: `10`"]
568 NEGATIVE_LEVEL = 2,
569 #[doc = "3: `11`"]
570 POSITIVE_LEVEL = 3,
571}
572impl From<GPIO14TRIGGER_MODE_A> for u8 {
573 #[inline(always)]
574 fn from(variant: GPIO14TRIGGER_MODE_A) -> Self {
575 variant as _
576 }
577}
578impl REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R {
579 #[doc = "Get enumerated values variant"]
580 #[inline(always)]
581 pub fn variant(&self) -> GPIO14TRIGGER_MODE_A {
582 match self.bits {
583 0 => GPIO14TRIGGER_MODE_A::NEGATIVE_PULSE,
584 1 => GPIO14TRIGGER_MODE_A::POSITIVE_PULSE,
585 2 => GPIO14TRIGGER_MODE_A::NEGATIVE_LEVEL,
586 3 => GPIO14TRIGGER_MODE_A::POSITIVE_LEVEL,
587 _ => unreachable!(),
588 }
589 }
590 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
591 #[inline(always)]
592 pub fn is_negative_pulse(&self) -> bool {
593 *self == GPIO14TRIGGER_MODE_A::NEGATIVE_PULSE
594 }
595 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
596 #[inline(always)]
597 pub fn is_positive_pulse(&self) -> bool {
598 *self == GPIO14TRIGGER_MODE_A::POSITIVE_PULSE
599 }
600 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
601 #[inline(always)]
602 pub fn is_negative_level(&self) -> bool {
603 *self == GPIO14TRIGGER_MODE_A::NEGATIVE_LEVEL
604 }
605 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
606 #[inline(always)]
607 pub fn is_positive_level(&self) -> bool {
608 *self == GPIO14TRIGGER_MODE_A::POSITIVE_LEVEL
609 }
610}
611#[doc = "Field `reg_gpio_14_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO14."]
612pub type REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
613 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO14TRIGGER_MODE_A, 2, O>;
614impl<'a, const O: u8> REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W<'a, O> {
615 #[doc = "`0`"]
616 #[inline(always)]
617 pub fn negative_pulse(self) -> &'a mut W {
618 self.variant(GPIO14TRIGGER_MODE_A::NEGATIVE_PULSE)
619 }
620 #[doc = "`1`"]
621 #[inline(always)]
622 pub fn positive_pulse(self) -> &'a mut W {
623 self.variant(GPIO14TRIGGER_MODE_A::POSITIVE_PULSE)
624 }
625 #[doc = "`10`"]
626 #[inline(always)]
627 pub fn negative_level(self) -> &'a mut W {
628 self.variant(GPIO14TRIGGER_MODE_A::NEGATIVE_LEVEL)
629 }
630 #[doc = "`11`"]
631 #[inline(always)]
632 pub fn positive_level(self) -> &'a mut W {
633 self.variant(GPIO14TRIGGER_MODE_A::POSITIVE_LEVEL)
634 }
635}
636#[doc = "Field `reg_gpio_14_interrupt_control_mode` reader - Interrupt control mode register for GPIO14."]
637pub type REG_GPIO_14_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO14CONTROL_MODE_A>;
638#[doc = "Interrupt control mode register for GPIO14.\n\nValue on reset: 0"]
639#[derive(Clone, Copy, Debug, PartialEq, Eq)]
640pub enum GPIO14CONTROL_MODE_A {
641 #[doc = "0: `0`"]
642 SYNCHRONOUS = 0,
643 #[doc = "1: `1`"]
644 ASYNCHRONOUS = 1,
645}
646impl From<GPIO14CONTROL_MODE_A> for bool {
647 #[inline(always)]
648 fn from(variant: GPIO14CONTROL_MODE_A) -> Self {
649 variant as u8 != 0
650 }
651}
652impl REG_GPIO_14_INTERRUPT_CONTROL_MODE_R {
653 #[doc = "Get enumerated values variant"]
654 #[inline(always)]
655 pub fn variant(&self) -> GPIO14CONTROL_MODE_A {
656 match self.bits {
657 false => GPIO14CONTROL_MODE_A::SYNCHRONOUS,
658 true => GPIO14CONTROL_MODE_A::ASYNCHRONOUS,
659 }
660 }
661 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
662 #[inline(always)]
663 pub fn is_synchronous(&self) -> bool {
664 *self == GPIO14CONTROL_MODE_A::SYNCHRONOUS
665 }
666 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
667 #[inline(always)]
668 pub fn is_asynchronous(&self) -> bool {
669 *self == GPIO14CONTROL_MODE_A::ASYNCHRONOUS
670 }
671}
672#[doc = "Field `reg_gpio_14_interrupt_control_mode` writer - Interrupt control mode register for GPIO14."]
673pub type REG_GPIO_14_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
674 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO14CONTROL_MODE_A, O>;
675impl<'a, const O: u8> REG_GPIO_14_INTERRUPT_CONTROL_MODE_W<'a, O> {
676 #[doc = "`0`"]
677 #[inline(always)]
678 pub fn synchronous(self) -> &'a mut W {
679 self.variant(GPIO14CONTROL_MODE_A::SYNCHRONOUS)
680 }
681 #[doc = "`1`"]
682 #[inline(always)]
683 pub fn asynchronous(self) -> &'a mut W {
684 self.variant(GPIO14CONTROL_MODE_A::ASYNCHRONOUS)
685 }
686}
687#[doc = "Field `reg_gpio_15_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO15."]
688pub type REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO15TRIGGER_MODE_A>;
689#[doc = "Interrupt trigger mode register for GPIO15.\n\nValue on reset: 0"]
690#[derive(Clone, Copy, Debug, PartialEq, Eq)]
691#[repr(u8)]
692pub enum GPIO15TRIGGER_MODE_A {
693 #[doc = "0: `0`"]
694 NEGATIVE_PULSE = 0,
695 #[doc = "1: `1`"]
696 POSITIVE_PULSE = 1,
697 #[doc = "2: `10`"]
698 NEGATIVE_LEVEL = 2,
699 #[doc = "3: `11`"]
700 POSITIVE_LEVEL = 3,
701}
702impl From<GPIO15TRIGGER_MODE_A> for u8 {
703 #[inline(always)]
704 fn from(variant: GPIO15TRIGGER_MODE_A) -> Self {
705 variant as _
706 }
707}
708impl REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R {
709 #[doc = "Get enumerated values variant"]
710 #[inline(always)]
711 pub fn variant(&self) -> GPIO15TRIGGER_MODE_A {
712 match self.bits {
713 0 => GPIO15TRIGGER_MODE_A::NEGATIVE_PULSE,
714 1 => GPIO15TRIGGER_MODE_A::POSITIVE_PULSE,
715 2 => GPIO15TRIGGER_MODE_A::NEGATIVE_LEVEL,
716 3 => GPIO15TRIGGER_MODE_A::POSITIVE_LEVEL,
717 _ => unreachable!(),
718 }
719 }
720 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
721 #[inline(always)]
722 pub fn is_negative_pulse(&self) -> bool {
723 *self == GPIO15TRIGGER_MODE_A::NEGATIVE_PULSE
724 }
725 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
726 #[inline(always)]
727 pub fn is_positive_pulse(&self) -> bool {
728 *self == GPIO15TRIGGER_MODE_A::POSITIVE_PULSE
729 }
730 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
731 #[inline(always)]
732 pub fn is_negative_level(&self) -> bool {
733 *self == GPIO15TRIGGER_MODE_A::NEGATIVE_LEVEL
734 }
735 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
736 #[inline(always)]
737 pub fn is_positive_level(&self) -> bool {
738 *self == GPIO15TRIGGER_MODE_A::POSITIVE_LEVEL
739 }
740}
741#[doc = "Field `reg_gpio_15_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO15."]
742pub type REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
743 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO15TRIGGER_MODE_A, 2, O>;
744impl<'a, const O: u8> REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W<'a, O> {
745 #[doc = "`0`"]
746 #[inline(always)]
747 pub fn negative_pulse(self) -> &'a mut W {
748 self.variant(GPIO15TRIGGER_MODE_A::NEGATIVE_PULSE)
749 }
750 #[doc = "`1`"]
751 #[inline(always)]
752 pub fn positive_pulse(self) -> &'a mut W {
753 self.variant(GPIO15TRIGGER_MODE_A::POSITIVE_PULSE)
754 }
755 #[doc = "`10`"]
756 #[inline(always)]
757 pub fn negative_level(self) -> &'a mut W {
758 self.variant(GPIO15TRIGGER_MODE_A::NEGATIVE_LEVEL)
759 }
760 #[doc = "`11`"]
761 #[inline(always)]
762 pub fn positive_level(self) -> &'a mut W {
763 self.variant(GPIO15TRIGGER_MODE_A::POSITIVE_LEVEL)
764 }
765}
766#[doc = "Field `reg_gpio_15_interrupt_control_mode` reader - Interrupt control mode register for GPIO15."]
767pub type REG_GPIO_15_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO15CONTROL_MODE_A>;
768#[doc = "Interrupt control mode register for GPIO15.\n\nValue on reset: 0"]
769#[derive(Clone, Copy, Debug, PartialEq, Eq)]
770pub enum GPIO15CONTROL_MODE_A {
771 #[doc = "0: `0`"]
772 SYNCHRONOUS = 0,
773 #[doc = "1: `1`"]
774 ASYNCHRONOUS = 1,
775}
776impl From<GPIO15CONTROL_MODE_A> for bool {
777 #[inline(always)]
778 fn from(variant: GPIO15CONTROL_MODE_A) -> Self {
779 variant as u8 != 0
780 }
781}
782impl REG_GPIO_15_INTERRUPT_CONTROL_MODE_R {
783 #[doc = "Get enumerated values variant"]
784 #[inline(always)]
785 pub fn variant(&self) -> GPIO15CONTROL_MODE_A {
786 match self.bits {
787 false => GPIO15CONTROL_MODE_A::SYNCHRONOUS,
788 true => GPIO15CONTROL_MODE_A::ASYNCHRONOUS,
789 }
790 }
791 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
792 #[inline(always)]
793 pub fn is_synchronous(&self) -> bool {
794 *self == GPIO15CONTROL_MODE_A::SYNCHRONOUS
795 }
796 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
797 #[inline(always)]
798 pub fn is_asynchronous(&self) -> bool {
799 *self == GPIO15CONTROL_MODE_A::ASYNCHRONOUS
800 }
801}
802#[doc = "Field `reg_gpio_15_interrupt_control_mode` writer - Interrupt control mode register for GPIO15."]
803pub type REG_GPIO_15_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
804 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO15CONTROL_MODE_A, O>;
805impl<'a, const O: u8> REG_GPIO_15_INTERRUPT_CONTROL_MODE_W<'a, O> {
806 #[doc = "`0`"]
807 #[inline(always)]
808 pub fn synchronous(self) -> &'a mut W {
809 self.variant(GPIO15CONTROL_MODE_A::SYNCHRONOUS)
810 }
811 #[doc = "`1`"]
812 #[inline(always)]
813 pub fn asynchronous(self) -> &'a mut W {
814 self.variant(GPIO15CONTROL_MODE_A::ASYNCHRONOUS)
815 }
816}
817#[doc = "Field `reg_gpio_16_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO16."]
818pub type REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO16TRIGGER_MODE_A>;
819#[doc = "Interrupt trigger mode register for GPIO16.\n\nValue on reset: 0"]
820#[derive(Clone, Copy, Debug, PartialEq, Eq)]
821#[repr(u8)]
822pub enum GPIO16TRIGGER_MODE_A {
823 #[doc = "0: `0`"]
824 NEGATIVE_PULSE = 0,
825 #[doc = "1: `1`"]
826 POSITIVE_PULSE = 1,
827 #[doc = "2: `10`"]
828 NEGATIVE_LEVEL = 2,
829 #[doc = "3: `11`"]
830 POSITIVE_LEVEL = 3,
831}
832impl From<GPIO16TRIGGER_MODE_A> for u8 {
833 #[inline(always)]
834 fn from(variant: GPIO16TRIGGER_MODE_A) -> Self {
835 variant as _
836 }
837}
838impl REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R {
839 #[doc = "Get enumerated values variant"]
840 #[inline(always)]
841 pub fn variant(&self) -> GPIO16TRIGGER_MODE_A {
842 match self.bits {
843 0 => GPIO16TRIGGER_MODE_A::NEGATIVE_PULSE,
844 1 => GPIO16TRIGGER_MODE_A::POSITIVE_PULSE,
845 2 => GPIO16TRIGGER_MODE_A::NEGATIVE_LEVEL,
846 3 => GPIO16TRIGGER_MODE_A::POSITIVE_LEVEL,
847 _ => unreachable!(),
848 }
849 }
850 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
851 #[inline(always)]
852 pub fn is_negative_pulse(&self) -> bool {
853 *self == GPIO16TRIGGER_MODE_A::NEGATIVE_PULSE
854 }
855 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
856 #[inline(always)]
857 pub fn is_positive_pulse(&self) -> bool {
858 *self == GPIO16TRIGGER_MODE_A::POSITIVE_PULSE
859 }
860 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
861 #[inline(always)]
862 pub fn is_negative_level(&self) -> bool {
863 *self == GPIO16TRIGGER_MODE_A::NEGATIVE_LEVEL
864 }
865 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
866 #[inline(always)]
867 pub fn is_positive_level(&self) -> bool {
868 *self == GPIO16TRIGGER_MODE_A::POSITIVE_LEVEL
869 }
870}
871#[doc = "Field `reg_gpio_16_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO16."]
872pub type REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
873 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO16TRIGGER_MODE_A, 2, O>;
874impl<'a, const O: u8> REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W<'a, O> {
875 #[doc = "`0`"]
876 #[inline(always)]
877 pub fn negative_pulse(self) -> &'a mut W {
878 self.variant(GPIO16TRIGGER_MODE_A::NEGATIVE_PULSE)
879 }
880 #[doc = "`1`"]
881 #[inline(always)]
882 pub fn positive_pulse(self) -> &'a mut W {
883 self.variant(GPIO16TRIGGER_MODE_A::POSITIVE_PULSE)
884 }
885 #[doc = "`10`"]
886 #[inline(always)]
887 pub fn negative_level(self) -> &'a mut W {
888 self.variant(GPIO16TRIGGER_MODE_A::NEGATIVE_LEVEL)
889 }
890 #[doc = "`11`"]
891 #[inline(always)]
892 pub fn positive_level(self) -> &'a mut W {
893 self.variant(GPIO16TRIGGER_MODE_A::POSITIVE_LEVEL)
894 }
895}
896#[doc = "Field `reg_gpio_16_interrupt_control_mode` reader - Interrupt control mode register for GPIO16."]
897pub type REG_GPIO_16_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO16CONTROL_MODE_A>;
898#[doc = "Interrupt control mode register for GPIO16.\n\nValue on reset: 0"]
899#[derive(Clone, Copy, Debug, PartialEq, Eq)]
900pub enum GPIO16CONTROL_MODE_A {
901 #[doc = "0: `0`"]
902 SYNCHRONOUS = 0,
903 #[doc = "1: `1`"]
904 ASYNCHRONOUS = 1,
905}
906impl From<GPIO16CONTROL_MODE_A> for bool {
907 #[inline(always)]
908 fn from(variant: GPIO16CONTROL_MODE_A) -> Self {
909 variant as u8 != 0
910 }
911}
912impl REG_GPIO_16_INTERRUPT_CONTROL_MODE_R {
913 #[doc = "Get enumerated values variant"]
914 #[inline(always)]
915 pub fn variant(&self) -> GPIO16CONTROL_MODE_A {
916 match self.bits {
917 false => GPIO16CONTROL_MODE_A::SYNCHRONOUS,
918 true => GPIO16CONTROL_MODE_A::ASYNCHRONOUS,
919 }
920 }
921 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
922 #[inline(always)]
923 pub fn is_synchronous(&self) -> bool {
924 *self == GPIO16CONTROL_MODE_A::SYNCHRONOUS
925 }
926 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
927 #[inline(always)]
928 pub fn is_asynchronous(&self) -> bool {
929 *self == GPIO16CONTROL_MODE_A::ASYNCHRONOUS
930 }
931}
932#[doc = "Field `reg_gpio_16_interrupt_control_mode` writer - Interrupt control mode register for GPIO16."]
933pub type REG_GPIO_16_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
934 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO16CONTROL_MODE_A, O>;
935impl<'a, const O: u8> REG_GPIO_16_INTERRUPT_CONTROL_MODE_W<'a, O> {
936 #[doc = "`0`"]
937 #[inline(always)]
938 pub fn synchronous(self) -> &'a mut W {
939 self.variant(GPIO16CONTROL_MODE_A::SYNCHRONOUS)
940 }
941 #[doc = "`1`"]
942 #[inline(always)]
943 pub fn asynchronous(self) -> &'a mut W {
944 self.variant(GPIO16CONTROL_MODE_A::ASYNCHRONOUS)
945 }
946}
947#[doc = "Field `reg_gpio_17_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO17."]
948pub type REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO17TRIGGER_MODE_A>;
949#[doc = "Interrupt trigger mode register for GPIO17.\n\nValue on reset: 0"]
950#[derive(Clone, Copy, Debug, PartialEq, Eq)]
951#[repr(u8)]
952pub enum GPIO17TRIGGER_MODE_A {
953 #[doc = "0: `0`"]
954 NEGATIVE_PULSE = 0,
955 #[doc = "1: `1`"]
956 POSITIVE_PULSE = 1,
957 #[doc = "2: `10`"]
958 NEGATIVE_LEVEL = 2,
959 #[doc = "3: `11`"]
960 POSITIVE_LEVEL = 3,
961}
962impl From<GPIO17TRIGGER_MODE_A> for u8 {
963 #[inline(always)]
964 fn from(variant: GPIO17TRIGGER_MODE_A) -> Self {
965 variant as _
966 }
967}
968impl REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R {
969 #[doc = "Get enumerated values variant"]
970 #[inline(always)]
971 pub fn variant(&self) -> GPIO17TRIGGER_MODE_A {
972 match self.bits {
973 0 => GPIO17TRIGGER_MODE_A::NEGATIVE_PULSE,
974 1 => GPIO17TRIGGER_MODE_A::POSITIVE_PULSE,
975 2 => GPIO17TRIGGER_MODE_A::NEGATIVE_LEVEL,
976 3 => GPIO17TRIGGER_MODE_A::POSITIVE_LEVEL,
977 _ => unreachable!(),
978 }
979 }
980 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
981 #[inline(always)]
982 pub fn is_negative_pulse(&self) -> bool {
983 *self == GPIO17TRIGGER_MODE_A::NEGATIVE_PULSE
984 }
985 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
986 #[inline(always)]
987 pub fn is_positive_pulse(&self) -> bool {
988 *self == GPIO17TRIGGER_MODE_A::POSITIVE_PULSE
989 }
990 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
991 #[inline(always)]
992 pub fn is_negative_level(&self) -> bool {
993 *self == GPIO17TRIGGER_MODE_A::NEGATIVE_LEVEL
994 }
995 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
996 #[inline(always)]
997 pub fn is_positive_level(&self) -> bool {
998 *self == GPIO17TRIGGER_MODE_A::POSITIVE_LEVEL
999 }
1000}
1001#[doc = "Field `reg_gpio_17_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO17."]
1002pub type REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
1003 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO17TRIGGER_MODE_A, 2, O>;
1004impl<'a, const O: u8> REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W<'a, O> {
1005 #[doc = "`0`"]
1006 #[inline(always)]
1007 pub fn negative_pulse(self) -> &'a mut W {
1008 self.variant(GPIO17TRIGGER_MODE_A::NEGATIVE_PULSE)
1009 }
1010 #[doc = "`1`"]
1011 #[inline(always)]
1012 pub fn positive_pulse(self) -> &'a mut W {
1013 self.variant(GPIO17TRIGGER_MODE_A::POSITIVE_PULSE)
1014 }
1015 #[doc = "`10`"]
1016 #[inline(always)]
1017 pub fn negative_level(self) -> &'a mut W {
1018 self.variant(GPIO17TRIGGER_MODE_A::NEGATIVE_LEVEL)
1019 }
1020 #[doc = "`11`"]
1021 #[inline(always)]
1022 pub fn positive_level(self) -> &'a mut W {
1023 self.variant(GPIO17TRIGGER_MODE_A::POSITIVE_LEVEL)
1024 }
1025}
1026#[doc = "Field `reg_gpio_17_interrupt_control_mode` reader - Interrupt control mode register for GPIO17."]
1027pub type REG_GPIO_17_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO17CONTROL_MODE_A>;
1028#[doc = "Interrupt control mode register for GPIO17.\n\nValue on reset: 0"]
1029#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1030pub enum GPIO17CONTROL_MODE_A {
1031 #[doc = "0: `0`"]
1032 SYNCHRONOUS = 0,
1033 #[doc = "1: `1`"]
1034 ASYNCHRONOUS = 1,
1035}
1036impl From<GPIO17CONTROL_MODE_A> for bool {
1037 #[inline(always)]
1038 fn from(variant: GPIO17CONTROL_MODE_A) -> Self {
1039 variant as u8 != 0
1040 }
1041}
1042impl REG_GPIO_17_INTERRUPT_CONTROL_MODE_R {
1043 #[doc = "Get enumerated values variant"]
1044 #[inline(always)]
1045 pub fn variant(&self) -> GPIO17CONTROL_MODE_A {
1046 match self.bits {
1047 false => GPIO17CONTROL_MODE_A::SYNCHRONOUS,
1048 true => GPIO17CONTROL_MODE_A::ASYNCHRONOUS,
1049 }
1050 }
1051 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
1052 #[inline(always)]
1053 pub fn is_synchronous(&self) -> bool {
1054 *self == GPIO17CONTROL_MODE_A::SYNCHRONOUS
1055 }
1056 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
1057 #[inline(always)]
1058 pub fn is_asynchronous(&self) -> bool {
1059 *self == GPIO17CONTROL_MODE_A::ASYNCHRONOUS
1060 }
1061}
1062#[doc = "Field `reg_gpio_17_interrupt_control_mode` writer - Interrupt control mode register for GPIO17."]
1063pub type REG_GPIO_17_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
1064 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO17CONTROL_MODE_A, O>;
1065impl<'a, const O: u8> REG_GPIO_17_INTERRUPT_CONTROL_MODE_W<'a, O> {
1066 #[doc = "`0`"]
1067 #[inline(always)]
1068 pub fn synchronous(self) -> &'a mut W {
1069 self.variant(GPIO17CONTROL_MODE_A::SYNCHRONOUS)
1070 }
1071 #[doc = "`1`"]
1072 #[inline(always)]
1073 pub fn asynchronous(self) -> &'a mut W {
1074 self.variant(GPIO17CONTROL_MODE_A::ASYNCHRONOUS)
1075 }
1076}
1077#[doc = "Field `reg_gpio_18_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO18."]
1078pub type REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO18TRIGGER_MODE_A>;
1079#[doc = "Interrupt trigger mode register for GPIO18.\n\nValue on reset: 0"]
1080#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1081#[repr(u8)]
1082pub enum GPIO18TRIGGER_MODE_A {
1083 #[doc = "0: `0`"]
1084 NEGATIVE_PULSE = 0,
1085 #[doc = "1: `1`"]
1086 POSITIVE_PULSE = 1,
1087 #[doc = "2: `10`"]
1088 NEGATIVE_LEVEL = 2,
1089 #[doc = "3: `11`"]
1090 POSITIVE_LEVEL = 3,
1091}
1092impl From<GPIO18TRIGGER_MODE_A> for u8 {
1093 #[inline(always)]
1094 fn from(variant: GPIO18TRIGGER_MODE_A) -> Self {
1095 variant as _
1096 }
1097}
1098impl REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R {
1099 #[doc = "Get enumerated values variant"]
1100 #[inline(always)]
1101 pub fn variant(&self) -> GPIO18TRIGGER_MODE_A {
1102 match self.bits {
1103 0 => GPIO18TRIGGER_MODE_A::NEGATIVE_PULSE,
1104 1 => GPIO18TRIGGER_MODE_A::POSITIVE_PULSE,
1105 2 => GPIO18TRIGGER_MODE_A::NEGATIVE_LEVEL,
1106 3 => GPIO18TRIGGER_MODE_A::POSITIVE_LEVEL,
1107 _ => unreachable!(),
1108 }
1109 }
1110 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
1111 #[inline(always)]
1112 pub fn is_negative_pulse(&self) -> bool {
1113 *self == GPIO18TRIGGER_MODE_A::NEGATIVE_PULSE
1114 }
1115 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
1116 #[inline(always)]
1117 pub fn is_positive_pulse(&self) -> bool {
1118 *self == GPIO18TRIGGER_MODE_A::POSITIVE_PULSE
1119 }
1120 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
1121 #[inline(always)]
1122 pub fn is_negative_level(&self) -> bool {
1123 *self == GPIO18TRIGGER_MODE_A::NEGATIVE_LEVEL
1124 }
1125 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
1126 #[inline(always)]
1127 pub fn is_positive_level(&self) -> bool {
1128 *self == GPIO18TRIGGER_MODE_A::POSITIVE_LEVEL
1129 }
1130}
1131#[doc = "Field `reg_gpio_18_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO18."]
1132pub type REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
1133 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO18TRIGGER_MODE_A, 2, O>;
1134impl<'a, const O: u8> REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W<'a, O> {
1135 #[doc = "`0`"]
1136 #[inline(always)]
1137 pub fn negative_pulse(self) -> &'a mut W {
1138 self.variant(GPIO18TRIGGER_MODE_A::NEGATIVE_PULSE)
1139 }
1140 #[doc = "`1`"]
1141 #[inline(always)]
1142 pub fn positive_pulse(self) -> &'a mut W {
1143 self.variant(GPIO18TRIGGER_MODE_A::POSITIVE_PULSE)
1144 }
1145 #[doc = "`10`"]
1146 #[inline(always)]
1147 pub fn negative_level(self) -> &'a mut W {
1148 self.variant(GPIO18TRIGGER_MODE_A::NEGATIVE_LEVEL)
1149 }
1150 #[doc = "`11`"]
1151 #[inline(always)]
1152 pub fn positive_level(self) -> &'a mut W {
1153 self.variant(GPIO18TRIGGER_MODE_A::POSITIVE_LEVEL)
1154 }
1155}
1156#[doc = "Field `reg_gpio_18_interrupt_control_mode` reader - Interrupt control mode register for GPIO18."]
1157pub type REG_GPIO_18_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO18CONTROL_MODE_A>;
1158#[doc = "Interrupt control mode register for GPIO18.\n\nValue on reset: 0"]
1159#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1160pub enum GPIO18CONTROL_MODE_A {
1161 #[doc = "0: `0`"]
1162 SYNCHRONOUS = 0,
1163 #[doc = "1: `1`"]
1164 ASYNCHRONOUS = 1,
1165}
1166impl From<GPIO18CONTROL_MODE_A> for bool {
1167 #[inline(always)]
1168 fn from(variant: GPIO18CONTROL_MODE_A) -> Self {
1169 variant as u8 != 0
1170 }
1171}
1172impl REG_GPIO_18_INTERRUPT_CONTROL_MODE_R {
1173 #[doc = "Get enumerated values variant"]
1174 #[inline(always)]
1175 pub fn variant(&self) -> GPIO18CONTROL_MODE_A {
1176 match self.bits {
1177 false => GPIO18CONTROL_MODE_A::SYNCHRONOUS,
1178 true => GPIO18CONTROL_MODE_A::ASYNCHRONOUS,
1179 }
1180 }
1181 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
1182 #[inline(always)]
1183 pub fn is_synchronous(&self) -> bool {
1184 *self == GPIO18CONTROL_MODE_A::SYNCHRONOUS
1185 }
1186 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
1187 #[inline(always)]
1188 pub fn is_asynchronous(&self) -> bool {
1189 *self == GPIO18CONTROL_MODE_A::ASYNCHRONOUS
1190 }
1191}
1192#[doc = "Field `reg_gpio_18_interrupt_control_mode` writer - Interrupt control mode register for GPIO18."]
1193pub type REG_GPIO_18_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
1194 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO18CONTROL_MODE_A, O>;
1195impl<'a, const O: u8> REG_GPIO_18_INTERRUPT_CONTROL_MODE_W<'a, O> {
1196 #[doc = "`0`"]
1197 #[inline(always)]
1198 pub fn synchronous(self) -> &'a mut W {
1199 self.variant(GPIO18CONTROL_MODE_A::SYNCHRONOUS)
1200 }
1201 #[doc = "`1`"]
1202 #[inline(always)]
1203 pub fn asynchronous(self) -> &'a mut W {
1204 self.variant(GPIO18CONTROL_MODE_A::ASYNCHRONOUS)
1205 }
1206}
1207#[doc = "Field `reg_gpio_19_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO19."]
1208pub type REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader<u8, GPIO19TRIGGER_MODE_A>;
1209#[doc = "Interrupt trigger mode register for GPIO19.\n\nValue on reset: 0"]
1210#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1211#[repr(u8)]
1212pub enum GPIO19TRIGGER_MODE_A {
1213 #[doc = "0: `0`"]
1214 NEGATIVE_PULSE = 0,
1215 #[doc = "1: `1`"]
1216 POSITIVE_PULSE = 1,
1217 #[doc = "2: `10`"]
1218 NEGATIVE_LEVEL = 2,
1219 #[doc = "3: `11`"]
1220 POSITIVE_LEVEL = 3,
1221}
1222impl From<GPIO19TRIGGER_MODE_A> for u8 {
1223 #[inline(always)]
1224 fn from(variant: GPIO19TRIGGER_MODE_A) -> Self {
1225 variant as _
1226 }
1227}
1228impl REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R {
1229 #[doc = "Get enumerated values variant"]
1230 #[inline(always)]
1231 pub fn variant(&self) -> GPIO19TRIGGER_MODE_A {
1232 match self.bits {
1233 0 => GPIO19TRIGGER_MODE_A::NEGATIVE_PULSE,
1234 1 => GPIO19TRIGGER_MODE_A::POSITIVE_PULSE,
1235 2 => GPIO19TRIGGER_MODE_A::NEGATIVE_LEVEL,
1236 3 => GPIO19TRIGGER_MODE_A::POSITIVE_LEVEL,
1237 _ => unreachable!(),
1238 }
1239 }
1240 #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"]
1241 #[inline(always)]
1242 pub fn is_negative_pulse(&self) -> bool {
1243 *self == GPIO19TRIGGER_MODE_A::NEGATIVE_PULSE
1244 }
1245 #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"]
1246 #[inline(always)]
1247 pub fn is_positive_pulse(&self) -> bool {
1248 *self == GPIO19TRIGGER_MODE_A::POSITIVE_PULSE
1249 }
1250 #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"]
1251 #[inline(always)]
1252 pub fn is_negative_level(&self) -> bool {
1253 *self == GPIO19TRIGGER_MODE_A::NEGATIVE_LEVEL
1254 }
1255 #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"]
1256 #[inline(always)]
1257 pub fn is_positive_level(&self) -> bool {
1258 *self == GPIO19TRIGGER_MODE_A::POSITIVE_LEVEL
1259 }
1260}
1261#[doc = "Field `reg_gpio_19_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO19."]
1262pub type REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> =
1263 crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO19TRIGGER_MODE_A, 2, O>;
1264impl<'a, const O: u8> REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W<'a, O> {
1265 #[doc = "`0`"]
1266 #[inline(always)]
1267 pub fn negative_pulse(self) -> &'a mut W {
1268 self.variant(GPIO19TRIGGER_MODE_A::NEGATIVE_PULSE)
1269 }
1270 #[doc = "`1`"]
1271 #[inline(always)]
1272 pub fn positive_pulse(self) -> &'a mut W {
1273 self.variant(GPIO19TRIGGER_MODE_A::POSITIVE_PULSE)
1274 }
1275 #[doc = "`10`"]
1276 #[inline(always)]
1277 pub fn negative_level(self) -> &'a mut W {
1278 self.variant(GPIO19TRIGGER_MODE_A::NEGATIVE_LEVEL)
1279 }
1280 #[doc = "`11`"]
1281 #[inline(always)]
1282 pub fn positive_level(self) -> &'a mut W {
1283 self.variant(GPIO19TRIGGER_MODE_A::POSITIVE_LEVEL)
1284 }
1285}
1286#[doc = "Field `reg_gpio_19_interrupt_control_mode` reader - Interrupt control mode register for GPIO19."]
1287pub type REG_GPIO_19_INTERRUPT_CONTROL_MODE_R = crate::BitReader<GPIO19CONTROL_MODE_A>;
1288#[doc = "Interrupt control mode register for GPIO19.\n\nValue on reset: 0"]
1289#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1290pub enum GPIO19CONTROL_MODE_A {
1291 #[doc = "0: `0`"]
1292 SYNCHRONOUS = 0,
1293 #[doc = "1: `1`"]
1294 ASYNCHRONOUS = 1,
1295}
1296impl From<GPIO19CONTROL_MODE_A> for bool {
1297 #[inline(always)]
1298 fn from(variant: GPIO19CONTROL_MODE_A) -> Self {
1299 variant as u8 != 0
1300 }
1301}
1302impl REG_GPIO_19_INTERRUPT_CONTROL_MODE_R {
1303 #[doc = "Get enumerated values variant"]
1304 #[inline(always)]
1305 pub fn variant(&self) -> GPIO19CONTROL_MODE_A {
1306 match self.bits {
1307 false => GPIO19CONTROL_MODE_A::SYNCHRONOUS,
1308 true => GPIO19CONTROL_MODE_A::ASYNCHRONOUS,
1309 }
1310 }
1311 #[doc = "Checks if the value of the field is `SYNCHRONOUS`"]
1312 #[inline(always)]
1313 pub fn is_synchronous(&self) -> bool {
1314 *self == GPIO19CONTROL_MODE_A::SYNCHRONOUS
1315 }
1316 #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"]
1317 #[inline(always)]
1318 pub fn is_asynchronous(&self) -> bool {
1319 *self == GPIO19CONTROL_MODE_A::ASYNCHRONOUS
1320 }
1321}
1322#[doc = "Field `reg_gpio_19_interrupt_control_mode` writer - Interrupt control mode register for GPIO19."]
1323pub type REG_GPIO_19_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> =
1324 crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO19CONTROL_MODE_A, O>;
1325impl<'a, const O: u8> REG_GPIO_19_INTERRUPT_CONTROL_MODE_W<'a, O> {
1326 #[doc = "`0`"]
1327 #[inline(always)]
1328 pub fn synchronous(self) -> &'a mut W {
1329 self.variant(GPIO19CONTROL_MODE_A::SYNCHRONOUS)
1330 }
1331 #[doc = "`1`"]
1332 #[inline(always)]
1333 pub fn asynchronous(self) -> &'a mut W {
1334 self.variant(GPIO19CONTROL_MODE_A::ASYNCHRONOUS)
1335 }
1336}
1337impl R {
1338 #[doc = "Bits 0:1 - Interrupt trigger mode register for GPIO10."]
1339 #[inline(always)]
1340 pub fn reg_gpio_10_interrupt_trigger_mode(&self) -> REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R {
1341 REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R::new((self.bits & 3) as u8)
1342 }
1343 #[doc = "Bit 2 - Interrupt control mode register for GPIO10."]
1344 #[inline(always)]
1345 pub fn reg_gpio_10_interrupt_control_mode(&self) -> REG_GPIO_10_INTERRUPT_CONTROL_MODE_R {
1346 REG_GPIO_10_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 2) & 1) != 0)
1347 }
1348 #[doc = "Bits 3:4 - Interrupt trigger mode register for GPIO11."]
1349 #[inline(always)]
1350 pub fn reg_gpio_11_interrupt_trigger_mode(&self) -> REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R {
1351 REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 3) & 3) as u8)
1352 }
1353 #[doc = "Bit 5 - Interrupt control mode register for GPIO11."]
1354 #[inline(always)]
1355 pub fn reg_gpio_11_interrupt_control_mode(&self) -> REG_GPIO_11_INTERRUPT_CONTROL_MODE_R {
1356 REG_GPIO_11_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 5) & 1) != 0)
1357 }
1358 #[doc = "Bits 6:7 - Interrupt trigger mode register for GPIO12."]
1359 #[inline(always)]
1360 pub fn reg_gpio_12_interrupt_trigger_mode(&self) -> REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R {
1361 REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 6) & 3) as u8)
1362 }
1363 #[doc = "Bit 8 - Interrupt control mode register for GPIO12."]
1364 #[inline(always)]
1365 pub fn reg_gpio_12_interrupt_control_mode(&self) -> REG_GPIO_12_INTERRUPT_CONTROL_MODE_R {
1366 REG_GPIO_12_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 8) & 1) != 0)
1367 }
1368 #[doc = "Bits 9:10 - Interrupt trigger mode register for GPIO13."]
1369 #[inline(always)]
1370 pub fn reg_gpio_13_interrupt_trigger_mode(&self) -> REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R {
1371 REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 9) & 3) as u8)
1372 }
1373 #[doc = "Bit 11 - Interrupt control mode register for GPIO13."]
1374 #[inline(always)]
1375 pub fn reg_gpio_13_interrupt_control_mode(&self) -> REG_GPIO_13_INTERRUPT_CONTROL_MODE_R {
1376 REG_GPIO_13_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 11) & 1) != 0)
1377 }
1378 #[doc = "Bits 12:13 - Interrupt trigger mode register for GPIO14."]
1379 #[inline(always)]
1380 pub fn reg_gpio_14_interrupt_trigger_mode(&self) -> REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R {
1381 REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 12) & 3) as u8)
1382 }
1383 #[doc = "Bit 14 - Interrupt control mode register for GPIO14."]
1384 #[inline(always)]
1385 pub fn reg_gpio_14_interrupt_control_mode(&self) -> REG_GPIO_14_INTERRUPT_CONTROL_MODE_R {
1386 REG_GPIO_14_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 14) & 1) != 0)
1387 }
1388 #[doc = "Bits 15:16 - Interrupt trigger mode register for GPIO15."]
1389 #[inline(always)]
1390 pub fn reg_gpio_15_interrupt_trigger_mode(&self) -> REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R {
1391 REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 15) & 3) as u8)
1392 }
1393 #[doc = "Bit 17 - Interrupt control mode register for GPIO15."]
1394 #[inline(always)]
1395 pub fn reg_gpio_15_interrupt_control_mode(&self) -> REG_GPIO_15_INTERRUPT_CONTROL_MODE_R {
1396 REG_GPIO_15_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 17) & 1) != 0)
1397 }
1398 #[doc = "Bits 18:19 - Interrupt trigger mode register for GPIO16."]
1399 #[inline(always)]
1400 pub fn reg_gpio_16_interrupt_trigger_mode(&self) -> REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R {
1401 REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 18) & 3) as u8)
1402 }
1403 #[doc = "Bit 20 - Interrupt control mode register for GPIO16."]
1404 #[inline(always)]
1405 pub fn reg_gpio_16_interrupt_control_mode(&self) -> REG_GPIO_16_INTERRUPT_CONTROL_MODE_R {
1406 REG_GPIO_16_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 20) & 1) != 0)
1407 }
1408 #[doc = "Bits 21:22 - Interrupt trigger mode register for GPIO17."]
1409 #[inline(always)]
1410 pub fn reg_gpio_17_interrupt_trigger_mode(&self) -> REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R {
1411 REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 21) & 3) as u8)
1412 }
1413 #[doc = "Bit 23 - Interrupt control mode register for GPIO17."]
1414 #[inline(always)]
1415 pub fn reg_gpio_17_interrupt_control_mode(&self) -> REG_GPIO_17_INTERRUPT_CONTROL_MODE_R {
1416 REG_GPIO_17_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 23) & 1) != 0)
1417 }
1418 #[doc = "Bits 24:25 - Interrupt trigger mode register for GPIO18."]
1419 #[inline(always)]
1420 pub fn reg_gpio_18_interrupt_trigger_mode(&self) -> REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R {
1421 REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 24) & 3) as u8)
1422 }
1423 #[doc = "Bit 26 - Interrupt control mode register for GPIO18."]
1424 #[inline(always)]
1425 pub fn reg_gpio_18_interrupt_control_mode(&self) -> REG_GPIO_18_INTERRUPT_CONTROL_MODE_R {
1426 REG_GPIO_18_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 26) & 1) != 0)
1427 }
1428 #[doc = "Bits 27:28 - Interrupt trigger mode register for GPIO19."]
1429 #[inline(always)]
1430 pub fn reg_gpio_19_interrupt_trigger_mode(&self) -> REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R {
1431 REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 27) & 3) as u8)
1432 }
1433 #[doc = "Bit 29 - Interrupt control mode register for GPIO19."]
1434 #[inline(always)]
1435 pub fn reg_gpio_19_interrupt_control_mode(&self) -> REG_GPIO_19_INTERRUPT_CONTROL_MODE_R {
1436 REG_GPIO_19_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 29) & 1) != 0)
1437 }
1438}
1439impl W {
1440 #[doc = "Bits 0:1 - Interrupt trigger mode register for GPIO10."]
1441 #[inline(always)]
1442 #[must_use]
1443 pub fn reg_gpio_10_interrupt_trigger_mode(
1444 &mut self,
1445 ) -> REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W<0> {
1446 REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W::new(self)
1447 }
1448 #[doc = "Bit 2 - Interrupt control mode register for GPIO10."]
1449 #[inline(always)]
1450 #[must_use]
1451 pub fn reg_gpio_10_interrupt_control_mode(
1452 &mut self,
1453 ) -> REG_GPIO_10_INTERRUPT_CONTROL_MODE_W<2> {
1454 REG_GPIO_10_INTERRUPT_CONTROL_MODE_W::new(self)
1455 }
1456 #[doc = "Bits 3:4 - Interrupt trigger mode register for GPIO11."]
1457 #[inline(always)]
1458 #[must_use]
1459 pub fn reg_gpio_11_interrupt_trigger_mode(
1460 &mut self,
1461 ) -> REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W<3> {
1462 REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W::new(self)
1463 }
1464 #[doc = "Bit 5 - Interrupt control mode register for GPIO11."]
1465 #[inline(always)]
1466 #[must_use]
1467 pub fn reg_gpio_11_interrupt_control_mode(
1468 &mut self,
1469 ) -> REG_GPIO_11_INTERRUPT_CONTROL_MODE_W<5> {
1470 REG_GPIO_11_INTERRUPT_CONTROL_MODE_W::new(self)
1471 }
1472 #[doc = "Bits 6:7 - Interrupt trigger mode register for GPIO12."]
1473 #[inline(always)]
1474 #[must_use]
1475 pub fn reg_gpio_12_interrupt_trigger_mode(
1476 &mut self,
1477 ) -> REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W<6> {
1478 REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W::new(self)
1479 }
1480 #[doc = "Bit 8 - Interrupt control mode register for GPIO12."]
1481 #[inline(always)]
1482 #[must_use]
1483 pub fn reg_gpio_12_interrupt_control_mode(
1484 &mut self,
1485 ) -> REG_GPIO_12_INTERRUPT_CONTROL_MODE_W<8> {
1486 REG_GPIO_12_INTERRUPT_CONTROL_MODE_W::new(self)
1487 }
1488 #[doc = "Bits 9:10 - Interrupt trigger mode register for GPIO13."]
1489 #[inline(always)]
1490 #[must_use]
1491 pub fn reg_gpio_13_interrupt_trigger_mode(
1492 &mut self,
1493 ) -> REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W<9> {
1494 REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W::new(self)
1495 }
1496 #[doc = "Bit 11 - Interrupt control mode register for GPIO13."]
1497 #[inline(always)]
1498 #[must_use]
1499 pub fn reg_gpio_13_interrupt_control_mode(
1500 &mut self,
1501 ) -> REG_GPIO_13_INTERRUPT_CONTROL_MODE_W<11> {
1502 REG_GPIO_13_INTERRUPT_CONTROL_MODE_W::new(self)
1503 }
1504 #[doc = "Bits 12:13 - Interrupt trigger mode register for GPIO14."]
1505 #[inline(always)]
1506 #[must_use]
1507 pub fn reg_gpio_14_interrupt_trigger_mode(
1508 &mut self,
1509 ) -> REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W<12> {
1510 REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W::new(self)
1511 }
1512 #[doc = "Bit 14 - Interrupt control mode register for GPIO14."]
1513 #[inline(always)]
1514 #[must_use]
1515 pub fn reg_gpio_14_interrupt_control_mode(
1516 &mut self,
1517 ) -> REG_GPIO_14_INTERRUPT_CONTROL_MODE_W<14> {
1518 REG_GPIO_14_INTERRUPT_CONTROL_MODE_W::new(self)
1519 }
1520 #[doc = "Bits 15:16 - Interrupt trigger mode register for GPIO15."]
1521 #[inline(always)]
1522 #[must_use]
1523 pub fn reg_gpio_15_interrupt_trigger_mode(
1524 &mut self,
1525 ) -> REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W<15> {
1526 REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W::new(self)
1527 }
1528 #[doc = "Bit 17 - Interrupt control mode register for GPIO15."]
1529 #[inline(always)]
1530 #[must_use]
1531 pub fn reg_gpio_15_interrupt_control_mode(
1532 &mut self,
1533 ) -> REG_GPIO_15_INTERRUPT_CONTROL_MODE_W<17> {
1534 REG_GPIO_15_INTERRUPT_CONTROL_MODE_W::new(self)
1535 }
1536 #[doc = "Bits 18:19 - Interrupt trigger mode register for GPIO16."]
1537 #[inline(always)]
1538 #[must_use]
1539 pub fn reg_gpio_16_interrupt_trigger_mode(
1540 &mut self,
1541 ) -> REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W<18> {
1542 REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W::new(self)
1543 }
1544 #[doc = "Bit 20 - Interrupt control mode register for GPIO16."]
1545 #[inline(always)]
1546 #[must_use]
1547 pub fn reg_gpio_16_interrupt_control_mode(
1548 &mut self,
1549 ) -> REG_GPIO_16_INTERRUPT_CONTROL_MODE_W<20> {
1550 REG_GPIO_16_INTERRUPT_CONTROL_MODE_W::new(self)
1551 }
1552 #[doc = "Bits 21:22 - Interrupt trigger mode register for GPIO17."]
1553 #[inline(always)]
1554 #[must_use]
1555 pub fn reg_gpio_17_interrupt_trigger_mode(
1556 &mut self,
1557 ) -> REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W<21> {
1558 REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W::new(self)
1559 }
1560 #[doc = "Bit 23 - Interrupt control mode register for GPIO17."]
1561 #[inline(always)]
1562 #[must_use]
1563 pub fn reg_gpio_17_interrupt_control_mode(
1564 &mut self,
1565 ) -> REG_GPIO_17_INTERRUPT_CONTROL_MODE_W<23> {
1566 REG_GPIO_17_INTERRUPT_CONTROL_MODE_W::new(self)
1567 }
1568 #[doc = "Bits 24:25 - Interrupt trigger mode register for GPIO18."]
1569 #[inline(always)]
1570 #[must_use]
1571 pub fn reg_gpio_18_interrupt_trigger_mode(
1572 &mut self,
1573 ) -> REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W<24> {
1574 REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W::new(self)
1575 }
1576 #[doc = "Bit 26 - Interrupt control mode register for GPIO18."]
1577 #[inline(always)]
1578 #[must_use]
1579 pub fn reg_gpio_18_interrupt_control_mode(
1580 &mut self,
1581 ) -> REG_GPIO_18_INTERRUPT_CONTROL_MODE_W<26> {
1582 REG_GPIO_18_INTERRUPT_CONTROL_MODE_W::new(self)
1583 }
1584 #[doc = "Bits 27:28 - Interrupt trigger mode register for GPIO19."]
1585 #[inline(always)]
1586 #[must_use]
1587 pub fn reg_gpio_19_interrupt_trigger_mode(
1588 &mut self,
1589 ) -> REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W<27> {
1590 REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W::new(self)
1591 }
1592 #[doc = "Bit 29 - Interrupt control mode register for GPIO19."]
1593 #[inline(always)]
1594 #[must_use]
1595 pub fn reg_gpio_19_interrupt_control_mode(
1596 &mut self,
1597 ) -> REG_GPIO_19_INTERRUPT_CONTROL_MODE_W<29> {
1598 REG_GPIO_19_INTERRUPT_CONTROL_MODE_W::new(self)
1599 }
1600 #[doc = "Writes raw bits to the register."]
1601 #[inline(always)]
1602 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1603 self.0.bits(bits);
1604 self
1605 }
1606}
1607#[doc = "GPIO interrupt trigger and control register for GPIO10-GPIO19.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [gpio_int_mode_set2](index.html) module"]
1608pub struct GPIO_INT_MODE_SET2_SPEC;
1609impl crate::RegisterSpec for GPIO_INT_MODE_SET2_SPEC {
1610 type Ux = u32;
1611}
1612#[doc = "`read()` method returns [gpio_int_mode_set2::R](R) reader structure"]
1613impl crate::Readable for GPIO_INT_MODE_SET2_SPEC {
1614 type Reader = R;
1615}
1616#[doc = "`write(|w| ..)` method takes [gpio_int_mode_set2::W](W) writer structure"]
1617impl crate::Writable for GPIO_INT_MODE_SET2_SPEC {
1618 type Writer = W;
1619 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1620 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1621}
1622#[doc = "`reset()` method sets GPIO_INT_MODE_SET2 to value 0"]
1623impl crate::Resettable for GPIO_INT_MODE_SET2_SPEC {
1624 const RESET_VALUE: Self::Ux = 0;
1625}