1#[doc = "Register `P108PFS` reader"]
2pub struct R(crate::R<P108PFS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<P108PFS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<P108PFS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<P108PFS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `P108PFS` writer"]
17pub struct W(crate::W<P108PFS_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<P108PFS_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<P108PFS_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<P108PFS_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `PODR` reader - Port Output Data"]
38pub type PODR_R = crate::BitReader<PODR_A>;
39#[doc = "Port Output Data\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum PODR_A {
42 #[doc = "0: Low output"]
43 _0 = 0,
44 #[doc = "1: High output"]
45 _1 = 1,
46}
47impl From<PODR_A> for bool {
48 #[inline(always)]
49 fn from(variant: PODR_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl PODR_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> PODR_A {
57 match self.bits {
58 false => PODR_A::_0,
59 true => PODR_A::_1,
60 }
61 }
62 #[doc = "Checks if the value of the field is `_0`"]
63 #[inline(always)]
64 pub fn is_0(&self) -> bool {
65 *self == PODR_A::_0
66 }
67 #[doc = "Checks if the value of the field is `_1`"]
68 #[inline(always)]
69 pub fn is_1(&self) -> bool {
70 *self == PODR_A::_1
71 }
72}
73#[doc = "Field `PODR` writer - Port Output Data"]
74pub type PODR_W<'a, const O: u8> = crate::BitWriter<'a, u32, P108PFS_SPEC, PODR_A, O>;
75impl<'a, const O: u8> PODR_W<'a, O> {
76 #[doc = "Low output"]
77 #[inline(always)]
78 pub fn _0(self) -> &'a mut W {
79 self.variant(PODR_A::_0)
80 }
81 #[doc = "High output"]
82 #[inline(always)]
83 pub fn _1(self) -> &'a mut W {
84 self.variant(PODR_A::_1)
85 }
86}
87#[doc = "Field `PIDR` reader - Port Input Data"]
88pub type PIDR_R = crate::BitReader<PIDR_A>;
89#[doc = "Port Input Data\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum PIDR_A {
92 #[doc = "0: Low input"]
93 _0 = 0,
94 #[doc = "1: High input"]
95 _1 = 1,
96}
97impl From<PIDR_A> for bool {
98 #[inline(always)]
99 fn from(variant: PIDR_A) -> Self {
100 variant as u8 != 0
101 }
102}
103impl PIDR_R {
104 #[doc = "Get enumerated values variant"]
105 #[inline(always)]
106 pub fn variant(&self) -> PIDR_A {
107 match self.bits {
108 false => PIDR_A::_0,
109 true => PIDR_A::_1,
110 }
111 }
112 #[doc = "Checks if the value of the field is `_0`"]
113 #[inline(always)]
114 pub fn is_0(&self) -> bool {
115 *self == PIDR_A::_0
116 }
117 #[doc = "Checks if the value of the field is `_1`"]
118 #[inline(always)]
119 pub fn is_1(&self) -> bool {
120 *self == PIDR_A::_1
121 }
122}
123#[doc = "Field `PDR` reader - Port Direction"]
124pub type PDR_R = crate::BitReader<PDR_A>;
125#[doc = "Port Direction\n\nValue on reset: 0"]
126#[derive(Clone, Copy, Debug, PartialEq, Eq)]
127pub enum PDR_A {
128 #[doc = "0: Input (Functions as an input pin.)"]
129 _0 = 0,
130 #[doc = "1: Output (Functions as an output pin.)"]
131 _1 = 1,
132}
133impl From<PDR_A> for bool {
134 #[inline(always)]
135 fn from(variant: PDR_A) -> Self {
136 variant as u8 != 0
137 }
138}
139impl PDR_R {
140 #[doc = "Get enumerated values variant"]
141 #[inline(always)]
142 pub fn variant(&self) -> PDR_A {
143 match self.bits {
144 false => PDR_A::_0,
145 true => PDR_A::_1,
146 }
147 }
148 #[doc = "Checks if the value of the field is `_0`"]
149 #[inline(always)]
150 pub fn is_0(&self) -> bool {
151 *self == PDR_A::_0
152 }
153 #[doc = "Checks if the value of the field is `_1`"]
154 #[inline(always)]
155 pub fn is_1(&self) -> bool {
156 *self == PDR_A::_1
157 }
158}
159#[doc = "Field `PDR` writer - Port Direction"]
160pub type PDR_W<'a, const O: u8> = crate::BitWriter<'a, u32, P108PFS_SPEC, PDR_A, O>;
161impl<'a, const O: u8> PDR_W<'a, O> {
162 #[doc = "Input (Functions as an input pin.)"]
163 #[inline(always)]
164 pub fn _0(self) -> &'a mut W {
165 self.variant(PDR_A::_0)
166 }
167 #[doc = "Output (Functions as an output pin.)"]
168 #[inline(always)]
169 pub fn _1(self) -> &'a mut W {
170 self.variant(PDR_A::_1)
171 }
172}
173#[doc = "Field `PCR` reader - Pull-up Control"]
174pub type PCR_R = crate::BitReader<PCR_A>;
175#[doc = "Pull-up Control\n\nValue on reset: 1"]
176#[derive(Clone, Copy, Debug, PartialEq, Eq)]
177pub enum PCR_A {
178 #[doc = "0: Disables an input pull-up."]
179 _0 = 0,
180 #[doc = "1: Enables an input pull-up."]
181 _1 = 1,
182}
183impl From<PCR_A> for bool {
184 #[inline(always)]
185 fn from(variant: PCR_A) -> Self {
186 variant as u8 != 0
187 }
188}
189impl PCR_R {
190 #[doc = "Get enumerated values variant"]
191 #[inline(always)]
192 pub fn variant(&self) -> PCR_A {
193 match self.bits {
194 false => PCR_A::_0,
195 true => PCR_A::_1,
196 }
197 }
198 #[doc = "Checks if the value of the field is `_0`"]
199 #[inline(always)]
200 pub fn is_0(&self) -> bool {
201 *self == PCR_A::_0
202 }
203 #[doc = "Checks if the value of the field is `_1`"]
204 #[inline(always)]
205 pub fn is_1(&self) -> bool {
206 *self == PCR_A::_1
207 }
208}
209#[doc = "Field `PCR` writer - Pull-up Control"]
210pub type PCR_W<'a, const O: u8> = crate::BitWriter<'a, u32, P108PFS_SPEC, PCR_A, O>;
211impl<'a, const O: u8> PCR_W<'a, O> {
212 #[doc = "Disables an input pull-up."]
213 #[inline(always)]
214 pub fn _0(self) -> &'a mut W {
215 self.variant(PCR_A::_0)
216 }
217 #[doc = "Enables an input pull-up."]
218 #[inline(always)]
219 pub fn _1(self) -> &'a mut W {
220 self.variant(PCR_A::_1)
221 }
222}
223#[doc = "Field `NCODR` reader - N-Channel Open Drain Control"]
224pub type NCODR_R = crate::BitReader<NCODR_A>;
225#[doc = "N-Channel Open Drain Control\n\nValue on reset: 0"]
226#[derive(Clone, Copy, Debug, PartialEq, Eq)]
227pub enum NCODR_A {
228 #[doc = "0: CMOS output"]
229 _0 = 0,
230 #[doc = "1: NMOS open-drain output"]
231 _1 = 1,
232}
233impl From<NCODR_A> for bool {
234 #[inline(always)]
235 fn from(variant: NCODR_A) -> Self {
236 variant as u8 != 0
237 }
238}
239impl NCODR_R {
240 #[doc = "Get enumerated values variant"]
241 #[inline(always)]
242 pub fn variant(&self) -> NCODR_A {
243 match self.bits {
244 false => NCODR_A::_0,
245 true => NCODR_A::_1,
246 }
247 }
248 #[doc = "Checks if the value of the field is `_0`"]
249 #[inline(always)]
250 pub fn is_0(&self) -> bool {
251 *self == NCODR_A::_0
252 }
253 #[doc = "Checks if the value of the field is `_1`"]
254 #[inline(always)]
255 pub fn is_1(&self) -> bool {
256 *self == NCODR_A::_1
257 }
258}
259#[doc = "Field `NCODR` writer - N-Channel Open Drain Control"]
260pub type NCODR_W<'a, const O: u8> = crate::BitWriter<'a, u32, P108PFS_SPEC, NCODR_A, O>;
261impl<'a, const O: u8> NCODR_W<'a, O> {
262 #[doc = "CMOS output"]
263 #[inline(always)]
264 pub fn _0(self) -> &'a mut W {
265 self.variant(NCODR_A::_0)
266 }
267 #[doc = "NMOS open-drain output"]
268 #[inline(always)]
269 pub fn _1(self) -> &'a mut W {
270 self.variant(NCODR_A::_1)
271 }
272}
273#[doc = "Field `DSCR` reader - Drive Strength Control Register"]
274pub type DSCR_R = crate::FieldReader<u8, DSCR_A>;
275#[doc = "Drive Strength Control Register\n\nValue on reset: 1"]
276#[derive(Clone, Copy, Debug, PartialEq, Eq)]
277#[repr(u8)]
278pub enum DSCR_A {
279 #[doc = "0: Normal drive output"]
280 _00 = 0,
281 #[doc = "1: Middle drive output"]
282 _01 = 1,
283 #[doc = "2: Setting prohibited"]
284 _10 = 2,
285 #[doc = "3: High-drive output"]
286 _11 = 3,
287}
288impl From<DSCR_A> for u8 {
289 #[inline(always)]
290 fn from(variant: DSCR_A) -> Self {
291 variant as _
292 }
293}
294impl DSCR_R {
295 #[doc = "Get enumerated values variant"]
296 #[inline(always)]
297 pub fn variant(&self) -> DSCR_A {
298 match self.bits {
299 0 => DSCR_A::_00,
300 1 => DSCR_A::_01,
301 2 => DSCR_A::_10,
302 3 => DSCR_A::_11,
303 _ => unreachable!(),
304 }
305 }
306 #[doc = "Checks if the value of the field is `_00`"]
307 #[inline(always)]
308 pub fn is_00(&self) -> bool {
309 *self == DSCR_A::_00
310 }
311 #[doc = "Checks if the value of the field is `_01`"]
312 #[inline(always)]
313 pub fn is_01(&self) -> bool {
314 *self == DSCR_A::_01
315 }
316 #[doc = "Checks if the value of the field is `_10`"]
317 #[inline(always)]
318 pub fn is_10(&self) -> bool {
319 *self == DSCR_A::_10
320 }
321 #[doc = "Checks if the value of the field is `_11`"]
322 #[inline(always)]
323 pub fn is_11(&self) -> bool {
324 *self == DSCR_A::_11
325 }
326}
327#[doc = "Field `DSCR` writer - Drive Strength Control Register"]
328pub type DSCR_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, P108PFS_SPEC, u8, DSCR_A, 2, O>;
329impl<'a, const O: u8> DSCR_W<'a, O> {
330 #[doc = "Normal drive output"]
331 #[inline(always)]
332 pub fn _00(self) -> &'a mut W {
333 self.variant(DSCR_A::_00)
334 }
335 #[doc = "Middle drive output"]
336 #[inline(always)]
337 pub fn _01(self) -> &'a mut W {
338 self.variant(DSCR_A::_01)
339 }
340 #[doc = "Setting prohibited"]
341 #[inline(always)]
342 pub fn _10(self) -> &'a mut W {
343 self.variant(DSCR_A::_10)
344 }
345 #[doc = "High-drive output"]
346 #[inline(always)]
347 pub fn _11(self) -> &'a mut W {
348 self.variant(DSCR_A::_11)
349 }
350}
351#[doc = "Field `EOR` reader - Event on Rising"]
352pub type EOR_R = crate::BitReader<EOR_A>;
353#[doc = "Event on Rising\n\nValue on reset: 0"]
354#[derive(Clone, Copy, Debug, PartialEq, Eq)]
355pub enum EOR_A {
356 #[doc = "0: Do not care"]
357 _0 = 0,
358 #[doc = "1: Detect rising edge"]
359 _1 = 1,
360}
361impl From<EOR_A> for bool {
362 #[inline(always)]
363 fn from(variant: EOR_A) -> Self {
364 variant as u8 != 0
365 }
366}
367impl EOR_R {
368 #[doc = "Get enumerated values variant"]
369 #[inline(always)]
370 pub fn variant(&self) -> EOR_A {
371 match self.bits {
372 false => EOR_A::_0,
373 true => EOR_A::_1,
374 }
375 }
376 #[doc = "Checks if the value of the field is `_0`"]
377 #[inline(always)]
378 pub fn is_0(&self) -> bool {
379 *self == EOR_A::_0
380 }
381 #[doc = "Checks if the value of the field is `_1`"]
382 #[inline(always)]
383 pub fn is_1(&self) -> bool {
384 *self == EOR_A::_1
385 }
386}
387#[doc = "Field `EOR` writer - Event on Rising"]
388pub type EOR_W<'a, const O: u8> = crate::BitWriter<'a, u32, P108PFS_SPEC, EOR_A, O>;
389impl<'a, const O: u8> EOR_W<'a, O> {
390 #[doc = "Do not care"]
391 #[inline(always)]
392 pub fn _0(self) -> &'a mut W {
393 self.variant(EOR_A::_0)
394 }
395 #[doc = "Detect rising edge"]
396 #[inline(always)]
397 pub fn _1(self) -> &'a mut W {
398 self.variant(EOR_A::_1)
399 }
400}
401#[doc = "Field `EOF` reader - Event on Falling"]
402pub type EOF_R = crate::BitReader<EOF_A>;
403#[doc = "Event on Falling\n\nValue on reset: 0"]
404#[derive(Clone, Copy, Debug, PartialEq, Eq)]
405pub enum EOF_A {
406 #[doc = "0: Do not care"]
407 _0 = 0,
408 #[doc = "1: Detect falling edge"]
409 _1 = 1,
410}
411impl From<EOF_A> for bool {
412 #[inline(always)]
413 fn from(variant: EOF_A) -> Self {
414 variant as u8 != 0
415 }
416}
417impl EOF_R {
418 #[doc = "Get enumerated values variant"]
419 #[inline(always)]
420 pub fn variant(&self) -> EOF_A {
421 match self.bits {
422 false => EOF_A::_0,
423 true => EOF_A::_1,
424 }
425 }
426 #[doc = "Checks if the value of the field is `_0`"]
427 #[inline(always)]
428 pub fn is_0(&self) -> bool {
429 *self == EOF_A::_0
430 }
431 #[doc = "Checks if the value of the field is `_1`"]
432 #[inline(always)]
433 pub fn is_1(&self) -> bool {
434 *self == EOF_A::_1
435 }
436}
437#[doc = "Field `EOF` writer - Event on Falling"]
438pub type EOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, P108PFS_SPEC, EOF_A, O>;
439impl<'a, const O: u8> EOF_W<'a, O> {
440 #[doc = "Do not care"]
441 #[inline(always)]
442 pub fn _0(self) -> &'a mut W {
443 self.variant(EOF_A::_0)
444 }
445 #[doc = "Detect falling edge"]
446 #[inline(always)]
447 pub fn _1(self) -> &'a mut W {
448 self.variant(EOF_A::_1)
449 }
450}
451#[doc = "Field `ISEL` reader - IRQ input enable"]
452pub type ISEL_R = crate::BitReader<ISEL_A>;
453#[doc = "IRQ input enable\n\nValue on reset: 0"]
454#[derive(Clone, Copy, Debug, PartialEq, Eq)]
455pub enum ISEL_A {
456 #[doc = "0: Not used as IRQn input pin"]
457 _0 = 0,
458 #[doc = "1: Used as IRQn input pin"]
459 _1 = 1,
460}
461impl From<ISEL_A> for bool {
462 #[inline(always)]
463 fn from(variant: ISEL_A) -> Self {
464 variant as u8 != 0
465 }
466}
467impl ISEL_R {
468 #[doc = "Get enumerated values variant"]
469 #[inline(always)]
470 pub fn variant(&self) -> ISEL_A {
471 match self.bits {
472 false => ISEL_A::_0,
473 true => ISEL_A::_1,
474 }
475 }
476 #[doc = "Checks if the value of the field is `_0`"]
477 #[inline(always)]
478 pub fn is_0(&self) -> bool {
479 *self == ISEL_A::_0
480 }
481 #[doc = "Checks if the value of the field is `_1`"]
482 #[inline(always)]
483 pub fn is_1(&self) -> bool {
484 *self == ISEL_A::_1
485 }
486}
487#[doc = "Field `ISEL` writer - IRQ input enable"]
488pub type ISEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, P108PFS_SPEC, ISEL_A, O>;
489impl<'a, const O: u8> ISEL_W<'a, O> {
490 #[doc = "Not used as IRQn input pin"]
491 #[inline(always)]
492 pub fn _0(self) -> &'a mut W {
493 self.variant(ISEL_A::_0)
494 }
495 #[doc = "Used as IRQn input pin"]
496 #[inline(always)]
497 pub fn _1(self) -> &'a mut W {
498 self.variant(ISEL_A::_1)
499 }
500}
501#[doc = "Field `ASEL` reader - Analog Input enable"]
502pub type ASEL_R = crate::BitReader<ASEL_A>;
503#[doc = "Analog Input enable\n\nValue on reset: 0"]
504#[derive(Clone, Copy, Debug, PartialEq, Eq)]
505pub enum ASEL_A {
506 #[doc = "0: Used other than as analog pin"]
507 _0 = 0,
508 #[doc = "1: Used as analog pin"]
509 _1 = 1,
510}
511impl From<ASEL_A> for bool {
512 #[inline(always)]
513 fn from(variant: ASEL_A) -> Self {
514 variant as u8 != 0
515 }
516}
517impl ASEL_R {
518 #[doc = "Get enumerated values variant"]
519 #[inline(always)]
520 pub fn variant(&self) -> ASEL_A {
521 match self.bits {
522 false => ASEL_A::_0,
523 true => ASEL_A::_1,
524 }
525 }
526 #[doc = "Checks if the value of the field is `_0`"]
527 #[inline(always)]
528 pub fn is_0(&self) -> bool {
529 *self == ASEL_A::_0
530 }
531 #[doc = "Checks if the value of the field is `_1`"]
532 #[inline(always)]
533 pub fn is_1(&self) -> bool {
534 *self == ASEL_A::_1
535 }
536}
537#[doc = "Field `ASEL` writer - Analog Input enable"]
538pub type ASEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, P108PFS_SPEC, ASEL_A, O>;
539impl<'a, const O: u8> ASEL_W<'a, O> {
540 #[doc = "Used other than as analog pin"]
541 #[inline(always)]
542 pub fn _0(self) -> &'a mut W {
543 self.variant(ASEL_A::_0)
544 }
545 #[doc = "Used as analog pin"]
546 #[inline(always)]
547 pub fn _1(self) -> &'a mut W {
548 self.variant(ASEL_A::_1)
549 }
550}
551#[doc = "Field `PMR` reader - Port Mode Control"]
552pub type PMR_R = crate::BitReader<PMR_A>;
553#[doc = "Port Mode Control\n\nValue on reset: 1"]
554#[derive(Clone, Copy, Debug, PartialEq, Eq)]
555pub enum PMR_A {
556 #[doc = "0: Uses the pin as a general I/O pin."]
557 _0 = 0,
558 #[doc = "1: Uses the pin as an I/O port for peripheral functions."]
559 _1 = 1,
560}
561impl From<PMR_A> for bool {
562 #[inline(always)]
563 fn from(variant: PMR_A) -> Self {
564 variant as u8 != 0
565 }
566}
567impl PMR_R {
568 #[doc = "Get enumerated values variant"]
569 #[inline(always)]
570 pub fn variant(&self) -> PMR_A {
571 match self.bits {
572 false => PMR_A::_0,
573 true => PMR_A::_1,
574 }
575 }
576 #[doc = "Checks if the value of the field is `_0`"]
577 #[inline(always)]
578 pub fn is_0(&self) -> bool {
579 *self == PMR_A::_0
580 }
581 #[doc = "Checks if the value of the field is `_1`"]
582 #[inline(always)]
583 pub fn is_1(&self) -> bool {
584 *self == PMR_A::_1
585 }
586}
587#[doc = "Field `PMR` writer - Port Mode Control"]
588pub type PMR_W<'a, const O: u8> = crate::BitWriter<'a, u32, P108PFS_SPEC, PMR_A, O>;
589impl<'a, const O: u8> PMR_W<'a, O> {
590 #[doc = "Uses the pin as a general I/O pin."]
591 #[inline(always)]
592 pub fn _0(self) -> &'a mut W {
593 self.variant(PMR_A::_0)
594 }
595 #[doc = "Uses the pin as an I/O port for peripheral functions."]
596 #[inline(always)]
597 pub fn _1(self) -> &'a mut W {
598 self.variant(PMR_A::_1)
599 }
600}
601#[doc = "Field `PSEL` reader - Port Function Select These bits select the peripheral function. For individual pin functions, see the MPC table"]
602pub type PSEL_R = crate::FieldReader<u8, u8>;
603#[doc = "Field `PSEL` writer - Port Function Select These bits select the peripheral function. For individual pin functions, see the MPC table"]
604pub type PSEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, P108PFS_SPEC, u8, u8, 5, O>;
605impl R {
606 #[doc = "Bit 0 - Port Output Data"]
607 #[inline(always)]
608 pub fn podr(&self) -> PODR_R {
609 PODR_R::new((self.bits & 1) != 0)
610 }
611 #[doc = "Bit 1 - Port Input Data"]
612 #[inline(always)]
613 pub fn pidr(&self) -> PIDR_R {
614 PIDR_R::new(((self.bits >> 1) & 1) != 0)
615 }
616 #[doc = "Bit 2 - Port Direction"]
617 #[inline(always)]
618 pub fn pdr(&self) -> PDR_R {
619 PDR_R::new(((self.bits >> 2) & 1) != 0)
620 }
621 #[doc = "Bit 4 - Pull-up Control"]
622 #[inline(always)]
623 pub fn pcr(&self) -> PCR_R {
624 PCR_R::new(((self.bits >> 4) & 1) != 0)
625 }
626 #[doc = "Bit 6 - N-Channel Open Drain Control"]
627 #[inline(always)]
628 pub fn ncodr(&self) -> NCODR_R {
629 NCODR_R::new(((self.bits >> 6) & 1) != 0)
630 }
631 #[doc = "Bits 10:11 - Drive Strength Control Register"]
632 #[inline(always)]
633 pub fn dscr(&self) -> DSCR_R {
634 DSCR_R::new(((self.bits >> 10) & 3) as u8)
635 }
636 #[doc = "Bit 12 - Event on Rising"]
637 #[inline(always)]
638 pub fn eor(&self) -> EOR_R {
639 EOR_R::new(((self.bits >> 12) & 1) != 0)
640 }
641 #[doc = "Bit 13 - Event on Falling"]
642 #[inline(always)]
643 pub fn eof(&self) -> EOF_R {
644 EOF_R::new(((self.bits >> 13) & 1) != 0)
645 }
646 #[doc = "Bit 14 - IRQ input enable"]
647 #[inline(always)]
648 pub fn isel(&self) -> ISEL_R {
649 ISEL_R::new(((self.bits >> 14) & 1) != 0)
650 }
651 #[doc = "Bit 15 - Analog Input enable"]
652 #[inline(always)]
653 pub fn asel(&self) -> ASEL_R {
654 ASEL_R::new(((self.bits >> 15) & 1) != 0)
655 }
656 #[doc = "Bit 16 - Port Mode Control"]
657 #[inline(always)]
658 pub fn pmr(&self) -> PMR_R {
659 PMR_R::new(((self.bits >> 16) & 1) != 0)
660 }
661 #[doc = "Bits 24:28 - Port Function Select These bits select the peripheral function. For individual pin functions, see the MPC table"]
662 #[inline(always)]
663 pub fn psel(&self) -> PSEL_R {
664 PSEL_R::new(((self.bits >> 24) & 0x1f) as u8)
665 }
666}
667impl W {
668 #[doc = "Bit 0 - Port Output Data"]
669 #[inline(always)]
670 #[must_use]
671 pub fn podr(&mut self) -> PODR_W<0> {
672 PODR_W::new(self)
673 }
674 #[doc = "Bit 2 - Port Direction"]
675 #[inline(always)]
676 #[must_use]
677 pub fn pdr(&mut self) -> PDR_W<2> {
678 PDR_W::new(self)
679 }
680 #[doc = "Bit 4 - Pull-up Control"]
681 #[inline(always)]
682 #[must_use]
683 pub fn pcr(&mut self) -> PCR_W<4> {
684 PCR_W::new(self)
685 }
686 #[doc = "Bit 6 - N-Channel Open Drain Control"]
687 #[inline(always)]
688 #[must_use]
689 pub fn ncodr(&mut self) -> NCODR_W<6> {
690 NCODR_W::new(self)
691 }
692 #[doc = "Bits 10:11 - Drive Strength Control Register"]
693 #[inline(always)]
694 #[must_use]
695 pub fn dscr(&mut self) -> DSCR_W<10> {
696 DSCR_W::new(self)
697 }
698 #[doc = "Bit 12 - Event on Rising"]
699 #[inline(always)]
700 #[must_use]
701 pub fn eor(&mut self) -> EOR_W<12> {
702 EOR_W::new(self)
703 }
704 #[doc = "Bit 13 - Event on Falling"]
705 #[inline(always)]
706 #[must_use]
707 pub fn eof(&mut self) -> EOF_W<13> {
708 EOF_W::new(self)
709 }
710 #[doc = "Bit 14 - IRQ input enable"]
711 #[inline(always)]
712 #[must_use]
713 pub fn isel(&mut self) -> ISEL_W<14> {
714 ISEL_W::new(self)
715 }
716 #[doc = "Bit 15 - Analog Input enable"]
717 #[inline(always)]
718 #[must_use]
719 pub fn asel(&mut self) -> ASEL_W<15> {
720 ASEL_W::new(self)
721 }
722 #[doc = "Bit 16 - Port Mode Control"]
723 #[inline(always)]
724 #[must_use]
725 pub fn pmr(&mut self) -> PMR_W<16> {
726 PMR_W::new(self)
727 }
728 #[doc = "Bits 24:28 - Port Function Select These bits select the peripheral function. For individual pin functions, see the MPC table"]
729 #[inline(always)]
730 #[must_use]
731 pub fn psel(&mut self) -> PSEL_W<24> {
732 PSEL_W::new(self)
733 }
734 #[doc = "Writes raw bits to the register."]
735 #[inline(always)]
736 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
737 self.0.bits(bits);
738 self
739 }
740}
741#[doc = "P108 Pin Function Control Register\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 [p108pfs](index.html) module"]
742pub struct P108PFS_SPEC;
743impl crate::RegisterSpec for P108PFS_SPEC {
744 type Ux = u32;
745}
746#[doc = "`read()` method returns [p108pfs::R](R) reader structure"]
747impl crate::Readable for P108PFS_SPEC {
748 type Reader = R;
749}
750#[doc = "`write(|w| ..)` method takes [p108pfs::W](W) writer structure"]
751impl crate::Writable for P108PFS_SPEC {
752 type Writer = W;
753 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
754 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
755}
756#[doc = "`reset()` method sets P108PFS to value 0x0001_0410"]
757impl crate::Resettable for P108PFS_SPEC {
758 const RESET_VALUE: Self::Ux = 0x0001_0410;
759}