1#[doc = "Reader of register PCR24"]
2pub type R = crate::R<u32, super::PCR24>;
3#[doc = "Writer for register PCR24"]
4pub type W = crate::W<u32, super::PCR24>;
5#[doc = "Register PCR24 `reset()`'s with value 0"]
6impl crate::ResetValue for super::PCR24 {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Pull Select\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15pub enum PS_A {
16 #[doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set."]
17 _0,
18 #[doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set."]
19 _1,
20}
21impl From<PS_A> for bool {
22 #[inline(always)]
23 fn from(variant: PS_A) -> Self {
24 match variant {
25 PS_A::_0 => false,
26 PS_A::_1 => true,
27 }
28 }
29}
30#[doc = "Reader of field `PS`"]
31pub type PS_R = crate::R<bool, PS_A>;
32impl PS_R {
33 #[doc = r"Get enumerated values variant"]
34 #[inline(always)]
35 pub fn variant(&self) -> PS_A {
36 match self.bits {
37 false => PS_A::_0,
38 true => PS_A::_1,
39 }
40 }
41 #[doc = "Checks if the value of the field is `_0`"]
42 #[inline(always)]
43 pub fn is_0(&self) -> bool {
44 *self == PS_A::_0
45 }
46 #[doc = "Checks if the value of the field is `_1`"]
47 #[inline(always)]
48 pub fn is_1(&self) -> bool {
49 *self == PS_A::_1
50 }
51}
52#[doc = "Pull Enable\n\nValue on reset: 0"]
53#[derive(Clone, Copy, Debug, PartialEq)]
54pub enum PE_A {
55 #[doc = "0: Internal pullup or pulldown resistor is not enabled on the corresponding pin."]
56 _0,
57 #[doc = "1: Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input."]
58 _1,
59}
60impl From<PE_A> for bool {
61 #[inline(always)]
62 fn from(variant: PE_A) -> Self {
63 match variant {
64 PE_A::_0 => false,
65 PE_A::_1 => true,
66 }
67 }
68}
69#[doc = "Reader of field `PE`"]
70pub type PE_R = crate::R<bool, PE_A>;
71impl PE_R {
72 #[doc = r"Get enumerated values variant"]
73 #[inline(always)]
74 pub fn variant(&self) -> PE_A {
75 match self.bits {
76 false => PE_A::_0,
77 true => PE_A::_1,
78 }
79 }
80 #[doc = "Checks if the value of the field is `_0`"]
81 #[inline(always)]
82 pub fn is_0(&self) -> bool {
83 *self == PE_A::_0
84 }
85 #[doc = "Checks if the value of the field is `_1`"]
86 #[inline(always)]
87 pub fn is_1(&self) -> bool {
88 *self == PE_A::_1
89 }
90}
91#[doc = "Slew Rate Enable\n\nValue on reset: 0"]
92#[derive(Clone, Copy, Debug, PartialEq)]
93pub enum SRE_A {
94 #[doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output."]
95 _0,
96 #[doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output."]
97 _1,
98}
99impl From<SRE_A> for bool {
100 #[inline(always)]
101 fn from(variant: SRE_A) -> Self {
102 match variant {
103 SRE_A::_0 => false,
104 SRE_A::_1 => true,
105 }
106 }
107}
108#[doc = "Reader of field `SRE`"]
109pub type SRE_R = crate::R<bool, SRE_A>;
110impl SRE_R {
111 #[doc = r"Get enumerated values variant"]
112 #[inline(always)]
113 pub fn variant(&self) -> SRE_A {
114 match self.bits {
115 false => SRE_A::_0,
116 true => SRE_A::_1,
117 }
118 }
119 #[doc = "Checks if the value of the field is `_0`"]
120 #[inline(always)]
121 pub fn is_0(&self) -> bool {
122 *self == SRE_A::_0
123 }
124 #[doc = "Checks if the value of the field is `_1`"]
125 #[inline(always)]
126 pub fn is_1(&self) -> bool {
127 *self == SRE_A::_1
128 }
129}
130#[doc = "Passive Filter Enable\n\nValue on reset: 0"]
131#[derive(Clone, Copy, Debug, PartialEq)]
132pub enum PFE_A {
133 #[doc = "0: Passive input filter is disabled on the corresponding pin."]
134 _0,
135 #[doc = "1: Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics."]
136 _1,
137}
138impl From<PFE_A> for bool {
139 #[inline(always)]
140 fn from(variant: PFE_A) -> Self {
141 match variant {
142 PFE_A::_0 => false,
143 PFE_A::_1 => true,
144 }
145 }
146}
147#[doc = "Reader of field `PFE`"]
148pub type PFE_R = crate::R<bool, PFE_A>;
149impl PFE_R {
150 #[doc = r"Get enumerated values variant"]
151 #[inline(always)]
152 pub fn variant(&self) -> PFE_A {
153 match self.bits {
154 false => PFE_A::_0,
155 true => PFE_A::_1,
156 }
157 }
158 #[doc = "Checks if the value of the field is `_0`"]
159 #[inline(always)]
160 pub fn is_0(&self) -> bool {
161 *self == PFE_A::_0
162 }
163 #[doc = "Checks if the value of the field is `_1`"]
164 #[inline(always)]
165 pub fn is_1(&self) -> bool {
166 *self == PFE_A::_1
167 }
168}
169#[doc = "Open Drain Enable\n\nValue on reset: 0"]
170#[derive(Clone, Copy, Debug, PartialEq)]
171pub enum ODE_A {
172 #[doc = "0: Open drain output is disabled on the corresponding pin."]
173 _0,
174 #[doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output."]
175 _1,
176}
177impl From<ODE_A> for bool {
178 #[inline(always)]
179 fn from(variant: ODE_A) -> Self {
180 match variant {
181 ODE_A::_0 => false,
182 ODE_A::_1 => true,
183 }
184 }
185}
186#[doc = "Reader of field `ODE`"]
187pub type ODE_R = crate::R<bool, ODE_A>;
188impl ODE_R {
189 #[doc = r"Get enumerated values variant"]
190 #[inline(always)]
191 pub fn variant(&self) -> ODE_A {
192 match self.bits {
193 false => ODE_A::_0,
194 true => ODE_A::_1,
195 }
196 }
197 #[doc = "Checks if the value of the field is `_0`"]
198 #[inline(always)]
199 pub fn is_0(&self) -> bool {
200 *self == ODE_A::_0
201 }
202 #[doc = "Checks if the value of the field is `_1`"]
203 #[inline(always)]
204 pub fn is_1(&self) -> bool {
205 *self == ODE_A::_1
206 }
207}
208#[doc = "Drive Strength Enable\n\nValue on reset: 0"]
209#[derive(Clone, Copy, Debug, PartialEq)]
210pub enum DSE_A {
211 #[doc = "0: Low drive strength is configured on the corresponding pin, if pin is configured as a digital output."]
212 _0,
213 #[doc = "1: High drive strength is configured on the corresponding pin, if pin is configured as a digital output."]
214 _1,
215}
216impl From<DSE_A> for bool {
217 #[inline(always)]
218 fn from(variant: DSE_A) -> Self {
219 match variant {
220 DSE_A::_0 => false,
221 DSE_A::_1 => true,
222 }
223 }
224}
225#[doc = "Reader of field `DSE`"]
226pub type DSE_R = crate::R<bool, DSE_A>;
227impl DSE_R {
228 #[doc = r"Get enumerated values variant"]
229 #[inline(always)]
230 pub fn variant(&self) -> DSE_A {
231 match self.bits {
232 false => DSE_A::_0,
233 true => DSE_A::_1,
234 }
235 }
236 #[doc = "Checks if the value of the field is `_0`"]
237 #[inline(always)]
238 pub fn is_0(&self) -> bool {
239 *self == DSE_A::_0
240 }
241 #[doc = "Checks if the value of the field is `_1`"]
242 #[inline(always)]
243 pub fn is_1(&self) -> bool {
244 *self == DSE_A::_1
245 }
246}
247#[doc = "Pin Mux Control\n\nValue on reset: 0"]
248#[derive(Clone, Copy, Debug, PartialEq)]
249pub enum MUX_A {
250 #[doc = "0: Pin disabled (analog)."]
251 _000,
252 #[doc = "1: Alternative 1 (GPIO)."]
253 _001,
254 #[doc = "2: Alternative 2 (chip-specific)."]
255 _010,
256 #[doc = "3: Alternative 3 (chip-specific)."]
257 _011,
258 #[doc = "4: Alternative 4 (chip-specific)."]
259 _100,
260 #[doc = "5: Alternative 5 (chip-specific)."]
261 _101,
262 #[doc = "6: Alternative 6 (chip-specific)."]
263 _110,
264 #[doc = "7: Alternative 7 (chip-specific)."]
265 _111,
266}
267impl From<MUX_A> for u8 {
268 #[inline(always)]
269 fn from(variant: MUX_A) -> Self {
270 match variant {
271 MUX_A::_000 => 0,
272 MUX_A::_001 => 1,
273 MUX_A::_010 => 2,
274 MUX_A::_011 => 3,
275 MUX_A::_100 => 4,
276 MUX_A::_101 => 5,
277 MUX_A::_110 => 6,
278 MUX_A::_111 => 7,
279 }
280 }
281}
282#[doc = "Reader of field `MUX`"]
283pub type MUX_R = crate::R<u8, MUX_A>;
284impl MUX_R {
285 #[doc = r"Get enumerated values variant"]
286 #[inline(always)]
287 pub fn variant(&self) -> MUX_A {
288 match self.bits {
289 0 => MUX_A::_000,
290 1 => MUX_A::_001,
291 2 => MUX_A::_010,
292 3 => MUX_A::_011,
293 4 => MUX_A::_100,
294 5 => MUX_A::_101,
295 6 => MUX_A::_110,
296 7 => MUX_A::_111,
297 _ => unreachable!(),
298 }
299 }
300 #[doc = "Checks if the value of the field is `_000`"]
301 #[inline(always)]
302 pub fn is_000(&self) -> bool {
303 *self == MUX_A::_000
304 }
305 #[doc = "Checks if the value of the field is `_001`"]
306 #[inline(always)]
307 pub fn is_001(&self) -> bool {
308 *self == MUX_A::_001
309 }
310 #[doc = "Checks if the value of the field is `_010`"]
311 #[inline(always)]
312 pub fn is_010(&self) -> bool {
313 *self == MUX_A::_010
314 }
315 #[doc = "Checks if the value of the field is `_011`"]
316 #[inline(always)]
317 pub fn is_011(&self) -> bool {
318 *self == MUX_A::_011
319 }
320 #[doc = "Checks if the value of the field is `_100`"]
321 #[inline(always)]
322 pub fn is_100(&self) -> bool {
323 *self == MUX_A::_100
324 }
325 #[doc = "Checks if the value of the field is `_101`"]
326 #[inline(always)]
327 pub fn is_101(&self) -> bool {
328 *self == MUX_A::_101
329 }
330 #[doc = "Checks if the value of the field is `_110`"]
331 #[inline(always)]
332 pub fn is_110(&self) -> bool {
333 *self == MUX_A::_110
334 }
335 #[doc = "Checks if the value of the field is `_111`"]
336 #[inline(always)]
337 pub fn is_111(&self) -> bool {
338 *self == MUX_A::_111
339 }
340}
341#[doc = "Write proxy for field `MUX`"]
342pub struct MUX_W<'a> {
343 w: &'a mut W,
344}
345impl<'a> MUX_W<'a> {
346 #[doc = r"Writes `variant` to the field"]
347 #[inline(always)]
348 pub fn variant(self, variant: MUX_A) -> &'a mut W {
349 {
350 self.bits(variant.into())
351 }
352 }
353 #[doc = "Pin disabled (analog)."]
354 #[inline(always)]
355 pub fn _000(self) -> &'a mut W {
356 self.variant(MUX_A::_000)
357 }
358 #[doc = "Alternative 1 (GPIO)."]
359 #[inline(always)]
360 pub fn _001(self) -> &'a mut W {
361 self.variant(MUX_A::_001)
362 }
363 #[doc = "Alternative 2 (chip-specific)."]
364 #[inline(always)]
365 pub fn _010(self) -> &'a mut W {
366 self.variant(MUX_A::_010)
367 }
368 #[doc = "Alternative 3 (chip-specific)."]
369 #[inline(always)]
370 pub fn _011(self) -> &'a mut W {
371 self.variant(MUX_A::_011)
372 }
373 #[doc = "Alternative 4 (chip-specific)."]
374 #[inline(always)]
375 pub fn _100(self) -> &'a mut W {
376 self.variant(MUX_A::_100)
377 }
378 #[doc = "Alternative 5 (chip-specific)."]
379 #[inline(always)]
380 pub fn _101(self) -> &'a mut W {
381 self.variant(MUX_A::_101)
382 }
383 #[doc = "Alternative 6 (chip-specific)."]
384 #[inline(always)]
385 pub fn _110(self) -> &'a mut W {
386 self.variant(MUX_A::_110)
387 }
388 #[doc = "Alternative 7 (chip-specific)."]
389 #[inline(always)]
390 pub fn _111(self) -> &'a mut W {
391 self.variant(MUX_A::_111)
392 }
393 #[doc = r"Writes raw bits to the field"]
394 #[inline(always)]
395 pub fn bits(self, value: u8) -> &'a mut W {
396 self.w.bits = (self.w.bits & !(0x07 << 8)) | (((value as u32) & 0x07) << 8);
397 self.w
398 }
399}
400#[doc = "Lock Register\n\nValue on reset: 0"]
401#[derive(Clone, Copy, Debug, PartialEq)]
402pub enum LK_A {
403 #[doc = "0: Pin Control Register fields \\[15:0\\] are not locked."]
404 _0,
405 #[doc = "1: Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset."]
406 _1,
407}
408impl From<LK_A> for bool {
409 #[inline(always)]
410 fn from(variant: LK_A) -> Self {
411 match variant {
412 LK_A::_0 => false,
413 LK_A::_1 => true,
414 }
415 }
416}
417#[doc = "Reader of field `LK`"]
418pub type LK_R = crate::R<bool, LK_A>;
419impl LK_R {
420 #[doc = r"Get enumerated values variant"]
421 #[inline(always)]
422 pub fn variant(&self) -> LK_A {
423 match self.bits {
424 false => LK_A::_0,
425 true => LK_A::_1,
426 }
427 }
428 #[doc = "Checks if the value of the field is `_0`"]
429 #[inline(always)]
430 pub fn is_0(&self) -> bool {
431 *self == LK_A::_0
432 }
433 #[doc = "Checks if the value of the field is `_1`"]
434 #[inline(always)]
435 pub fn is_1(&self) -> bool {
436 *self == LK_A::_1
437 }
438}
439#[doc = "Write proxy for field `LK`"]
440pub struct LK_W<'a> {
441 w: &'a mut W,
442}
443impl<'a> LK_W<'a> {
444 #[doc = r"Writes `variant` to the field"]
445 #[inline(always)]
446 pub fn variant(self, variant: LK_A) -> &'a mut W {
447 {
448 self.bit(variant.into())
449 }
450 }
451 #[doc = "Pin Control Register fields \\[15:0\\] are not locked."]
452 #[inline(always)]
453 pub fn _0(self) -> &'a mut W {
454 self.variant(LK_A::_0)
455 }
456 #[doc = "Pin Control Register fields \\[15:0\\] are locked and cannot be updated until the next system reset."]
457 #[inline(always)]
458 pub fn _1(self) -> &'a mut W {
459 self.variant(LK_A::_1)
460 }
461 #[doc = r"Sets the field bit"]
462 #[inline(always)]
463 pub fn set_bit(self) -> &'a mut W {
464 self.bit(true)
465 }
466 #[doc = r"Clears the field bit"]
467 #[inline(always)]
468 pub fn clear_bit(self) -> &'a mut W {
469 self.bit(false)
470 }
471 #[doc = r"Writes raw bits to the field"]
472 #[inline(always)]
473 pub fn bit(self, value: bool) -> &'a mut W {
474 self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
475 self.w
476 }
477}
478#[doc = "Interrupt Configuration\n\nValue on reset: 0"]
479#[derive(Clone, Copy, Debug, PartialEq)]
480pub enum IRQC_A {
481 #[doc = "0: Interrupt Status Flag (ISF) is disabled."]
482 _0000,
483 #[doc = "1: ISF flag and DMA request on rising edge."]
484 _0001,
485 #[doc = "2: ISF flag and DMA request on falling edge."]
486 _0010,
487 #[doc = "3: ISF flag and DMA request on either edge."]
488 _0011,
489 #[doc = "8: ISF flag and Interrupt when logic 0."]
490 _1000,
491 #[doc = "9: ISF flag and Interrupt on rising-edge."]
492 _1001,
493 #[doc = "10: ISF flag and Interrupt on falling-edge."]
494 _1010,
495 #[doc = "11: ISF flag and Interrupt on either edge."]
496 _1011,
497 #[doc = "12: ISF flag and Interrupt when logic 1."]
498 _1100,
499}
500impl From<IRQC_A> for u8 {
501 #[inline(always)]
502 fn from(variant: IRQC_A) -> Self {
503 match variant {
504 IRQC_A::_0000 => 0,
505 IRQC_A::_0001 => 1,
506 IRQC_A::_0010 => 2,
507 IRQC_A::_0011 => 3,
508 IRQC_A::_1000 => 8,
509 IRQC_A::_1001 => 9,
510 IRQC_A::_1010 => 10,
511 IRQC_A::_1011 => 11,
512 IRQC_A::_1100 => 12,
513 }
514 }
515}
516#[doc = "Reader of field `IRQC`"]
517pub type IRQC_R = crate::R<u8, IRQC_A>;
518impl IRQC_R {
519 #[doc = r"Get enumerated values variant"]
520 #[inline(always)]
521 pub fn variant(&self) -> crate::Variant<u8, IRQC_A> {
522 use crate::Variant::*;
523 match self.bits {
524 0 => Val(IRQC_A::_0000),
525 1 => Val(IRQC_A::_0001),
526 2 => Val(IRQC_A::_0010),
527 3 => Val(IRQC_A::_0011),
528 8 => Val(IRQC_A::_1000),
529 9 => Val(IRQC_A::_1001),
530 10 => Val(IRQC_A::_1010),
531 11 => Val(IRQC_A::_1011),
532 12 => Val(IRQC_A::_1100),
533 i => Res(i),
534 }
535 }
536 #[doc = "Checks if the value of the field is `_0000`"]
537 #[inline(always)]
538 pub fn is_0000(&self) -> bool {
539 *self == IRQC_A::_0000
540 }
541 #[doc = "Checks if the value of the field is `_0001`"]
542 #[inline(always)]
543 pub fn is_0001(&self) -> bool {
544 *self == IRQC_A::_0001
545 }
546 #[doc = "Checks if the value of the field is `_0010`"]
547 #[inline(always)]
548 pub fn is_0010(&self) -> bool {
549 *self == IRQC_A::_0010
550 }
551 #[doc = "Checks if the value of the field is `_0011`"]
552 #[inline(always)]
553 pub fn is_0011(&self) -> bool {
554 *self == IRQC_A::_0011
555 }
556 #[doc = "Checks if the value of the field is `_1000`"]
557 #[inline(always)]
558 pub fn is_1000(&self) -> bool {
559 *self == IRQC_A::_1000
560 }
561 #[doc = "Checks if the value of the field is `_1001`"]
562 #[inline(always)]
563 pub fn is_1001(&self) -> bool {
564 *self == IRQC_A::_1001
565 }
566 #[doc = "Checks if the value of the field is `_1010`"]
567 #[inline(always)]
568 pub fn is_1010(&self) -> bool {
569 *self == IRQC_A::_1010
570 }
571 #[doc = "Checks if the value of the field is `_1011`"]
572 #[inline(always)]
573 pub fn is_1011(&self) -> bool {
574 *self == IRQC_A::_1011
575 }
576 #[doc = "Checks if the value of the field is `_1100`"]
577 #[inline(always)]
578 pub fn is_1100(&self) -> bool {
579 *self == IRQC_A::_1100
580 }
581}
582#[doc = "Write proxy for field `IRQC`"]
583pub struct IRQC_W<'a> {
584 w: &'a mut W,
585}
586impl<'a> IRQC_W<'a> {
587 #[doc = r"Writes `variant` to the field"]
588 #[inline(always)]
589 pub fn variant(self, variant: IRQC_A) -> &'a mut W {
590 unsafe { self.bits(variant.into()) }
591 }
592 #[doc = "Interrupt Status Flag (ISF) is disabled."]
593 #[inline(always)]
594 pub fn _0000(self) -> &'a mut W {
595 self.variant(IRQC_A::_0000)
596 }
597 #[doc = "ISF flag and DMA request on rising edge."]
598 #[inline(always)]
599 pub fn _0001(self) -> &'a mut W {
600 self.variant(IRQC_A::_0001)
601 }
602 #[doc = "ISF flag and DMA request on falling edge."]
603 #[inline(always)]
604 pub fn _0010(self) -> &'a mut W {
605 self.variant(IRQC_A::_0010)
606 }
607 #[doc = "ISF flag and DMA request on either edge."]
608 #[inline(always)]
609 pub fn _0011(self) -> &'a mut W {
610 self.variant(IRQC_A::_0011)
611 }
612 #[doc = "ISF flag and Interrupt when logic 0."]
613 #[inline(always)]
614 pub fn _1000(self) -> &'a mut W {
615 self.variant(IRQC_A::_1000)
616 }
617 #[doc = "ISF flag and Interrupt on rising-edge."]
618 #[inline(always)]
619 pub fn _1001(self) -> &'a mut W {
620 self.variant(IRQC_A::_1001)
621 }
622 #[doc = "ISF flag and Interrupt on falling-edge."]
623 #[inline(always)]
624 pub fn _1010(self) -> &'a mut W {
625 self.variant(IRQC_A::_1010)
626 }
627 #[doc = "ISF flag and Interrupt on either edge."]
628 #[inline(always)]
629 pub fn _1011(self) -> &'a mut W {
630 self.variant(IRQC_A::_1011)
631 }
632 #[doc = "ISF flag and Interrupt when logic 1."]
633 #[inline(always)]
634 pub fn _1100(self) -> &'a mut W {
635 self.variant(IRQC_A::_1100)
636 }
637 #[doc = r"Writes raw bits to the field"]
638 #[inline(always)]
639 pub unsafe fn bits(self, value: u8) -> &'a mut W {
640 self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16);
641 self.w
642 }
643}
644#[doc = "Interrupt Status Flag\n\nValue on reset: 0"]
645#[derive(Clone, Copy, Debug, PartialEq)]
646pub enum ISF_A {
647 #[doc = "0: Configured interrupt is not detected."]
648 _0,
649 #[doc = "1: Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared."]
650 _1,
651}
652impl From<ISF_A> for bool {
653 #[inline(always)]
654 fn from(variant: ISF_A) -> Self {
655 match variant {
656 ISF_A::_0 => false,
657 ISF_A::_1 => true,
658 }
659 }
660}
661#[doc = "Reader of field `ISF`"]
662pub type ISF_R = crate::R<bool, ISF_A>;
663impl ISF_R {
664 #[doc = r"Get enumerated values variant"]
665 #[inline(always)]
666 pub fn variant(&self) -> ISF_A {
667 match self.bits {
668 false => ISF_A::_0,
669 true => ISF_A::_1,
670 }
671 }
672 #[doc = "Checks if the value of the field is `_0`"]
673 #[inline(always)]
674 pub fn is_0(&self) -> bool {
675 *self == ISF_A::_0
676 }
677 #[doc = "Checks if the value of the field is `_1`"]
678 #[inline(always)]
679 pub fn is_1(&self) -> bool {
680 *self == ISF_A::_1
681 }
682}
683#[doc = "Write proxy for field `ISF`"]
684pub struct ISF_W<'a> {
685 w: &'a mut W,
686}
687impl<'a> ISF_W<'a> {
688 #[doc = r"Writes `variant` to the field"]
689 #[inline(always)]
690 pub fn variant(self, variant: ISF_A) -> &'a mut W {
691 {
692 self.bit(variant.into())
693 }
694 }
695 #[doc = "Configured interrupt is not detected."]
696 #[inline(always)]
697 pub fn _0(self) -> &'a mut W {
698 self.variant(ISF_A::_0)
699 }
700 #[doc = "Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared."]
701 #[inline(always)]
702 pub fn _1(self) -> &'a mut W {
703 self.variant(ISF_A::_1)
704 }
705 #[doc = r"Sets the field bit"]
706 #[inline(always)]
707 pub fn set_bit(self) -> &'a mut W {
708 self.bit(true)
709 }
710 #[doc = r"Clears the field bit"]
711 #[inline(always)]
712 pub fn clear_bit(self) -> &'a mut W {
713 self.bit(false)
714 }
715 #[doc = r"Writes raw bits to the field"]
716 #[inline(always)]
717 pub fn bit(self, value: bool) -> &'a mut W {
718 self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
719 self.w
720 }
721}
722impl R {
723 #[doc = "Bit 0 - Pull Select"]
724 #[inline(always)]
725 pub fn ps(&self) -> PS_R {
726 PS_R::new((self.bits & 0x01) != 0)
727 }
728 #[doc = "Bit 1 - Pull Enable"]
729 #[inline(always)]
730 pub fn pe(&self) -> PE_R {
731 PE_R::new(((self.bits >> 1) & 0x01) != 0)
732 }
733 #[doc = "Bit 2 - Slew Rate Enable"]
734 #[inline(always)]
735 pub fn sre(&self) -> SRE_R {
736 SRE_R::new(((self.bits >> 2) & 0x01) != 0)
737 }
738 #[doc = "Bit 4 - Passive Filter Enable"]
739 #[inline(always)]
740 pub fn pfe(&self) -> PFE_R {
741 PFE_R::new(((self.bits >> 4) & 0x01) != 0)
742 }
743 #[doc = "Bit 5 - Open Drain Enable"]
744 #[inline(always)]
745 pub fn ode(&self) -> ODE_R {
746 ODE_R::new(((self.bits >> 5) & 0x01) != 0)
747 }
748 #[doc = "Bit 6 - Drive Strength Enable"]
749 #[inline(always)]
750 pub fn dse(&self) -> DSE_R {
751 DSE_R::new(((self.bits >> 6) & 0x01) != 0)
752 }
753 #[doc = "Bits 8:10 - Pin Mux Control"]
754 #[inline(always)]
755 pub fn mux(&self) -> MUX_R {
756 MUX_R::new(((self.bits >> 8) & 0x07) as u8)
757 }
758 #[doc = "Bit 15 - Lock Register"]
759 #[inline(always)]
760 pub fn lk(&self) -> LK_R {
761 LK_R::new(((self.bits >> 15) & 0x01) != 0)
762 }
763 #[doc = "Bits 16:19 - Interrupt Configuration"]
764 #[inline(always)]
765 pub fn irqc(&self) -> IRQC_R {
766 IRQC_R::new(((self.bits >> 16) & 0x0f) as u8)
767 }
768 #[doc = "Bit 24 - Interrupt Status Flag"]
769 #[inline(always)]
770 pub fn isf(&self) -> ISF_R {
771 ISF_R::new(((self.bits >> 24) & 0x01) != 0)
772 }
773}
774impl W {
775 #[doc = "Bits 8:10 - Pin Mux Control"]
776 #[inline(always)]
777 pub fn mux(&mut self) -> MUX_W {
778 MUX_W { w: self }
779 }
780 #[doc = "Bit 15 - Lock Register"]
781 #[inline(always)]
782 pub fn lk(&mut self) -> LK_W {
783 LK_W { w: self }
784 }
785 #[doc = "Bits 16:19 - Interrupt Configuration"]
786 #[inline(always)]
787 pub fn irqc(&mut self) -> IRQC_W {
788 IRQC_W { w: self }
789 }
790 #[doc = "Bit 24 - Interrupt Status Flag"]
791 #[inline(always)]
792 pub fn isf(&mut self) -> ISF_W {
793 ISF_W { w: self }
794 }
795}