1#[doc = "Register `P408PFS_HA` reader"]
2pub struct R(crate::R<P408PFS_HA_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<P408PFS_HA_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<P408PFS_HA_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<P408PFS_HA_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `P408PFS_HA` writer"]
17pub struct W(crate::W<P408PFS_HA_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<P408PFS_HA_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<P408PFS_HA_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<P408PFS_HA_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, u16, P408PFS_HA_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, u16, P408PFS_HA_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: 0"]
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, u16, P408PFS_HA_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, u16, P408PFS_HA_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::BitReader<DSCR_A>;
275#[doc = "Drive Strength Control Register\n\nValue on reset: 0"]
276#[derive(Clone, Copy, Debug, PartialEq, Eq)]
277pub enum DSCR_A {
278 #[doc = "0: Low drive(DSCR1 = 0)/Middle drive for llC Fast-mode(DSCR1 = 1)"]
279 _0 = 0,
280 #[doc = "1: Middle drive(DSCR1 = 0)/Setting prohibited(DSCR1 = 1)"]
281 _1 = 1,
282}
283impl From<DSCR_A> for bool {
284 #[inline(always)]
285 fn from(variant: DSCR_A) -> Self {
286 variant as u8 != 0
287 }
288}
289impl DSCR_R {
290 #[doc = "Get enumerated values variant"]
291 #[inline(always)]
292 pub fn variant(&self) -> DSCR_A {
293 match self.bits {
294 false => DSCR_A::_0,
295 true => DSCR_A::_1,
296 }
297 }
298 #[doc = "Checks if the value of the field is `_0`"]
299 #[inline(always)]
300 pub fn is_0(&self) -> bool {
301 *self == DSCR_A::_0
302 }
303 #[doc = "Checks if the value of the field is `_1`"]
304 #[inline(always)]
305 pub fn is_1(&self) -> bool {
306 *self == DSCR_A::_1
307 }
308}
309#[doc = "Field `DSCR` writer - Drive Strength Control Register"]
310pub type DSCR_W<'a, const O: u8> = crate::BitWriter<'a, u16, P408PFS_HA_SPEC, DSCR_A, O>;
311impl<'a, const O: u8> DSCR_W<'a, O> {
312 #[doc = "Low drive(DSCR1 = 0)/Middle drive for llC Fast-mode(DSCR1 = 1)"]
313 #[inline(always)]
314 pub fn _0(self) -> &'a mut W {
315 self.variant(DSCR_A::_0)
316 }
317 #[doc = "Middle drive(DSCR1 = 0)/Setting prohibited(DSCR1 = 1)"]
318 #[inline(always)]
319 pub fn _1(self) -> &'a mut W {
320 self.variant(DSCR_A::_1)
321 }
322}
323#[doc = "Field `DSCR1` reader - Drive Strength Control Register"]
324pub type DSCR1_R = crate::BitReader<DSCR1_A>;
325#[doc = "Drive Strength Control Register\n\nValue on reset: 0"]
326#[derive(Clone, Copy, Debug, PartialEq, Eq)]
327pub enum DSCR1_A {
328 #[doc = "0: Low drive(DSCR = 0)/Middle drive(DSCR = 1)"]
329 _0 = 0,
330 #[doc = "1: Middle drive for IIC Fast-mode(DSCR = 0)/Setting prohibited(DSCR = 1)"]
331 _1 = 1,
332}
333impl From<DSCR1_A> for bool {
334 #[inline(always)]
335 fn from(variant: DSCR1_A) -> Self {
336 variant as u8 != 0
337 }
338}
339impl DSCR1_R {
340 #[doc = "Get enumerated values variant"]
341 #[inline(always)]
342 pub fn variant(&self) -> DSCR1_A {
343 match self.bits {
344 false => DSCR1_A::_0,
345 true => DSCR1_A::_1,
346 }
347 }
348 #[doc = "Checks if the value of the field is `_0`"]
349 #[inline(always)]
350 pub fn is_0(&self) -> bool {
351 *self == DSCR1_A::_0
352 }
353 #[doc = "Checks if the value of the field is `_1`"]
354 #[inline(always)]
355 pub fn is_1(&self) -> bool {
356 *self == DSCR1_A::_1
357 }
358}
359#[doc = "Field `DSCR1` writer - Drive Strength Control Register"]
360pub type DSCR1_W<'a, const O: u8> = crate::BitWriter<'a, u16, P408PFS_HA_SPEC, DSCR1_A, O>;
361impl<'a, const O: u8> DSCR1_W<'a, O> {
362 #[doc = "Low drive(DSCR = 0)/Middle drive(DSCR = 1)"]
363 #[inline(always)]
364 pub fn _0(self) -> &'a mut W {
365 self.variant(DSCR1_A::_0)
366 }
367 #[doc = "Middle drive for IIC Fast-mode(DSCR = 0)/Setting prohibited(DSCR = 1)"]
368 #[inline(always)]
369 pub fn _1(self) -> &'a mut W {
370 self.variant(DSCR1_A::_1)
371 }
372}
373#[doc = "Field `EOR` reader - Event on Rising"]
374pub type EOR_R = crate::BitReader<EOR_A>;
375#[doc = "Event on Rising\n\nValue on reset: 0"]
376#[derive(Clone, Copy, Debug, PartialEq, Eq)]
377pub enum EOR_A {
378 #[doc = "0: Do not care"]
379 _0 = 0,
380 #[doc = "1: Detect rising edge"]
381 _1 = 1,
382}
383impl From<EOR_A> for bool {
384 #[inline(always)]
385 fn from(variant: EOR_A) -> Self {
386 variant as u8 != 0
387 }
388}
389impl EOR_R {
390 #[doc = "Get enumerated values variant"]
391 #[inline(always)]
392 pub fn variant(&self) -> EOR_A {
393 match self.bits {
394 false => EOR_A::_0,
395 true => EOR_A::_1,
396 }
397 }
398 #[doc = "Checks if the value of the field is `_0`"]
399 #[inline(always)]
400 pub fn is_0(&self) -> bool {
401 *self == EOR_A::_0
402 }
403 #[doc = "Checks if the value of the field is `_1`"]
404 #[inline(always)]
405 pub fn is_1(&self) -> bool {
406 *self == EOR_A::_1
407 }
408}
409#[doc = "Field `EOR` writer - Event on Rising"]
410pub type EOR_W<'a, const O: u8> = crate::BitWriter<'a, u16, P408PFS_HA_SPEC, EOR_A, O>;
411impl<'a, const O: u8> EOR_W<'a, O> {
412 #[doc = "Do not care"]
413 #[inline(always)]
414 pub fn _0(self) -> &'a mut W {
415 self.variant(EOR_A::_0)
416 }
417 #[doc = "Detect rising edge"]
418 #[inline(always)]
419 pub fn _1(self) -> &'a mut W {
420 self.variant(EOR_A::_1)
421 }
422}
423#[doc = "Field `EOF` reader - Event on Falling"]
424pub type EOF_R = crate::BitReader<EOF_A>;
425#[doc = "Event on Falling\n\nValue on reset: 0"]
426#[derive(Clone, Copy, Debug, PartialEq, Eq)]
427pub enum EOF_A {
428 #[doc = "0: Do not care"]
429 _0 = 0,
430 #[doc = "1: Detect falling edge"]
431 _1 = 1,
432}
433impl From<EOF_A> for bool {
434 #[inline(always)]
435 fn from(variant: EOF_A) -> Self {
436 variant as u8 != 0
437 }
438}
439impl EOF_R {
440 #[doc = "Get enumerated values variant"]
441 #[inline(always)]
442 pub fn variant(&self) -> EOF_A {
443 match self.bits {
444 false => EOF_A::_0,
445 true => EOF_A::_1,
446 }
447 }
448 #[doc = "Checks if the value of the field is `_0`"]
449 #[inline(always)]
450 pub fn is_0(&self) -> bool {
451 *self == EOF_A::_0
452 }
453 #[doc = "Checks if the value of the field is `_1`"]
454 #[inline(always)]
455 pub fn is_1(&self) -> bool {
456 *self == EOF_A::_1
457 }
458}
459#[doc = "Field `EOF` writer - Event on Falling"]
460pub type EOF_W<'a, const O: u8> = crate::BitWriter<'a, u16, P408PFS_HA_SPEC, EOF_A, O>;
461impl<'a, const O: u8> EOF_W<'a, O> {
462 #[doc = "Do not care"]
463 #[inline(always)]
464 pub fn _0(self) -> &'a mut W {
465 self.variant(EOF_A::_0)
466 }
467 #[doc = "Detect falling edge"]
468 #[inline(always)]
469 pub fn _1(self) -> &'a mut W {
470 self.variant(EOF_A::_1)
471 }
472}
473#[doc = "Field `ISEL` reader - IRQ input enable"]
474pub type ISEL_R = crate::BitReader<ISEL_A>;
475#[doc = "IRQ input enable\n\nValue on reset: 0"]
476#[derive(Clone, Copy, Debug, PartialEq, Eq)]
477pub enum ISEL_A {
478 #[doc = "0: Not used as IRQn input pin"]
479 _0 = 0,
480 #[doc = "1: Used as IRQn input pin"]
481 _1 = 1,
482}
483impl From<ISEL_A> for bool {
484 #[inline(always)]
485 fn from(variant: ISEL_A) -> Self {
486 variant as u8 != 0
487 }
488}
489impl ISEL_R {
490 #[doc = "Get enumerated values variant"]
491 #[inline(always)]
492 pub fn variant(&self) -> ISEL_A {
493 match self.bits {
494 false => ISEL_A::_0,
495 true => ISEL_A::_1,
496 }
497 }
498 #[doc = "Checks if the value of the field is `_0`"]
499 #[inline(always)]
500 pub fn is_0(&self) -> bool {
501 *self == ISEL_A::_0
502 }
503 #[doc = "Checks if the value of the field is `_1`"]
504 #[inline(always)]
505 pub fn is_1(&self) -> bool {
506 *self == ISEL_A::_1
507 }
508}
509#[doc = "Field `ISEL` writer - IRQ input enable"]
510pub type ISEL_W<'a, const O: u8> = crate::BitWriter<'a, u16, P408PFS_HA_SPEC, ISEL_A, O>;
511impl<'a, const O: u8> ISEL_W<'a, O> {
512 #[doc = "Not used as IRQn input pin"]
513 #[inline(always)]
514 pub fn _0(self) -> &'a mut W {
515 self.variant(ISEL_A::_0)
516 }
517 #[doc = "Used as IRQn input pin"]
518 #[inline(always)]
519 pub fn _1(self) -> &'a mut W {
520 self.variant(ISEL_A::_1)
521 }
522}
523#[doc = "Field `ASEL` reader - Analog Input enable"]
524pub type ASEL_R = crate::BitReader<ASEL_A>;
525#[doc = "Analog Input enable\n\nValue on reset: 0"]
526#[derive(Clone, Copy, Debug, PartialEq, Eq)]
527pub enum ASEL_A {
528 #[doc = "0: Used other than as analog pin"]
529 _0 = 0,
530 #[doc = "1: Used as analog pin"]
531 _1 = 1,
532}
533impl From<ASEL_A> for bool {
534 #[inline(always)]
535 fn from(variant: ASEL_A) -> Self {
536 variant as u8 != 0
537 }
538}
539impl ASEL_R {
540 #[doc = "Get enumerated values variant"]
541 #[inline(always)]
542 pub fn variant(&self) -> ASEL_A {
543 match self.bits {
544 false => ASEL_A::_0,
545 true => ASEL_A::_1,
546 }
547 }
548 #[doc = "Checks if the value of the field is `_0`"]
549 #[inline(always)]
550 pub fn is_0(&self) -> bool {
551 *self == ASEL_A::_0
552 }
553 #[doc = "Checks if the value of the field is `_1`"]
554 #[inline(always)]
555 pub fn is_1(&self) -> bool {
556 *self == ASEL_A::_1
557 }
558}
559#[doc = "Field `ASEL` writer - Analog Input enable"]
560pub type ASEL_W<'a, const O: u8> = crate::BitWriter<'a, u16, P408PFS_HA_SPEC, ASEL_A, O>;
561impl<'a, const O: u8> ASEL_W<'a, O> {
562 #[doc = "Used other than as analog pin"]
563 #[inline(always)]
564 pub fn _0(self) -> &'a mut W {
565 self.variant(ASEL_A::_0)
566 }
567 #[doc = "Used as analog pin"]
568 #[inline(always)]
569 pub fn _1(self) -> &'a mut W {
570 self.variant(ASEL_A::_1)
571 }
572}
573impl R {
574 #[doc = "Bit 0 - Port Output Data"]
575 #[inline(always)]
576 pub fn podr(&self) -> PODR_R {
577 PODR_R::new((self.bits & 1) != 0)
578 }
579 #[doc = "Bit 1 - Port Input Data"]
580 #[inline(always)]
581 pub fn pidr(&self) -> PIDR_R {
582 PIDR_R::new(((self.bits >> 1) & 1) != 0)
583 }
584 #[doc = "Bit 2 - Port Direction"]
585 #[inline(always)]
586 pub fn pdr(&self) -> PDR_R {
587 PDR_R::new(((self.bits >> 2) & 1) != 0)
588 }
589 #[doc = "Bit 4 - Pull-up Control"]
590 #[inline(always)]
591 pub fn pcr(&self) -> PCR_R {
592 PCR_R::new(((self.bits >> 4) & 1) != 0)
593 }
594 #[doc = "Bit 6 - N-Channel Open Drain Control"]
595 #[inline(always)]
596 pub fn ncodr(&self) -> NCODR_R {
597 NCODR_R::new(((self.bits >> 6) & 1) != 0)
598 }
599 #[doc = "Bit 10 - Drive Strength Control Register"]
600 #[inline(always)]
601 pub fn dscr(&self) -> DSCR_R {
602 DSCR_R::new(((self.bits >> 10) & 1) != 0)
603 }
604 #[doc = "Bit 11 - Drive Strength Control Register"]
605 #[inline(always)]
606 pub fn dscr1(&self) -> DSCR1_R {
607 DSCR1_R::new(((self.bits >> 11) & 1) != 0)
608 }
609 #[doc = "Bit 12 - Event on Rising"]
610 #[inline(always)]
611 pub fn eor(&self) -> EOR_R {
612 EOR_R::new(((self.bits >> 12) & 1) != 0)
613 }
614 #[doc = "Bit 13 - Event on Falling"]
615 #[inline(always)]
616 pub fn eof(&self) -> EOF_R {
617 EOF_R::new(((self.bits >> 13) & 1) != 0)
618 }
619 #[doc = "Bit 14 - IRQ input enable"]
620 #[inline(always)]
621 pub fn isel(&self) -> ISEL_R {
622 ISEL_R::new(((self.bits >> 14) & 1) != 0)
623 }
624 #[doc = "Bit 15 - Analog Input enable"]
625 #[inline(always)]
626 pub fn asel(&self) -> ASEL_R {
627 ASEL_R::new(((self.bits >> 15) & 1) != 0)
628 }
629}
630impl W {
631 #[doc = "Bit 0 - Port Output Data"]
632 #[inline(always)]
633 #[must_use]
634 pub fn podr(&mut self) -> PODR_W<0> {
635 PODR_W::new(self)
636 }
637 #[doc = "Bit 2 - Port Direction"]
638 #[inline(always)]
639 #[must_use]
640 pub fn pdr(&mut self) -> PDR_W<2> {
641 PDR_W::new(self)
642 }
643 #[doc = "Bit 4 - Pull-up Control"]
644 #[inline(always)]
645 #[must_use]
646 pub fn pcr(&mut self) -> PCR_W<4> {
647 PCR_W::new(self)
648 }
649 #[doc = "Bit 6 - N-Channel Open Drain Control"]
650 #[inline(always)]
651 #[must_use]
652 pub fn ncodr(&mut self) -> NCODR_W<6> {
653 NCODR_W::new(self)
654 }
655 #[doc = "Bit 10 - Drive Strength Control Register"]
656 #[inline(always)]
657 #[must_use]
658 pub fn dscr(&mut self) -> DSCR_W<10> {
659 DSCR_W::new(self)
660 }
661 #[doc = "Bit 11 - Drive Strength Control Register"]
662 #[inline(always)]
663 #[must_use]
664 pub fn dscr1(&mut self) -> DSCR1_W<11> {
665 DSCR1_W::new(self)
666 }
667 #[doc = "Bit 12 - Event on Rising"]
668 #[inline(always)]
669 #[must_use]
670 pub fn eor(&mut self) -> EOR_W<12> {
671 EOR_W::new(self)
672 }
673 #[doc = "Bit 13 - Event on Falling"]
674 #[inline(always)]
675 #[must_use]
676 pub fn eof(&mut self) -> EOF_W<13> {
677 EOF_W::new(self)
678 }
679 #[doc = "Bit 14 - IRQ input enable"]
680 #[inline(always)]
681 #[must_use]
682 pub fn isel(&mut self) -> ISEL_W<14> {
683 ISEL_W::new(self)
684 }
685 #[doc = "Bit 15 - Analog Input enable"]
686 #[inline(always)]
687 #[must_use]
688 pub fn asel(&mut self) -> ASEL_W<15> {
689 ASEL_W::new(self)
690 }
691 #[doc = "Writes raw bits to the register."]
692 #[inline(always)]
693 pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
694 self.0.bits(bits);
695 self
696 }
697}
698#[doc = "P408 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 [p408pfs_ha](index.html) module"]
699pub struct P408PFS_HA_SPEC;
700impl crate::RegisterSpec for P408PFS_HA_SPEC {
701 type Ux = u16;
702}
703#[doc = "`read()` method returns [p408pfs_ha::R](R) reader structure"]
704impl crate::Readable for P408PFS_HA_SPEC {
705 type Reader = R;
706}
707#[doc = "`write(|w| ..)` method takes [p408pfs_ha::W](W) writer structure"]
708impl crate::Writable for P408PFS_HA_SPEC {
709 type Writer = W;
710 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
711 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
712}
713#[doc = "`reset()` method sets P408PFS_HA to value 0"]
714impl crate::Resettable for P408PFS_HA_SPEC {
715 const RESET_VALUE: Self::Ux = 0;
716}