ra4e2_pac/
pfs.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.30.00, with svd2pac 0.4.0 on Sat, 12 Apr 2025 22:15:35 +0000
19
20#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"Control Register"]
28unsafe impl ::core::marker::Send for super::Pfs {}
29unsafe impl ::core::marker::Sync for super::Pfs {}
30impl super::Pfs {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36    #[doc = "Port 00%s Pin Function Select Register"]
37    #[inline(always)]
38    pub const fn p00pfs(
39        &self,
40    ) -> &'static crate::common::ClusterRegisterArray<
41        crate::common::Reg<self::P00Pfs_SPEC, crate::common::RW>,
42        3,
43        0x4,
44    > {
45        unsafe {
46            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x10usize))
47        }
48    }
49
50    #[doc = "Port 00%s Pin Function Select Register"]
51    #[inline(always)]
52    pub const fn p00pfs_ha(
53        &self,
54    ) -> &'static crate::common::ClusterRegisterArray<
55        crate::common::Reg<self::P00PfsHa_SPEC, crate::common::RW>,
56        3,
57        0x4,
58    > {
59        unsafe {
60            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x12usize))
61        }
62    }
63
64    #[doc = "Port 00%s Pin Function Select Register"]
65    #[inline(always)]
66    pub const fn p00pfs_by(
67        &self,
68    ) -> &'static crate::common::ClusterRegisterArray<
69        crate::common::Reg<self::P00PfsBy_SPEC, crate::common::RW>,
70        3,
71        0x4,
72    > {
73        unsafe {
74            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x13usize))
75        }
76    }
77
78    #[doc = "Port 008 Pin Function Select Register"]
79    #[inline(always)]
80    pub const fn p008pfs(
81        &self,
82    ) -> &'static crate::common::Reg<self::P008Pfs_SPEC, crate::common::RW> {
83        unsafe {
84            crate::common::Reg::<self::P008Pfs_SPEC, crate::common::RW>::from_ptr(
85                self._svd2pac_as_ptr().add(32usize),
86            )
87        }
88    }
89
90    #[doc = "Port 008 Pin Function Select Register"]
91    #[inline(always)]
92    pub const fn p008pfs_ha(
93        &self,
94    ) -> &'static crate::common::Reg<self::P008PfsHa_SPEC, crate::common::RW> {
95        unsafe {
96            crate::common::Reg::<self::P008PfsHa_SPEC, crate::common::RW>::from_ptr(
97                self._svd2pac_as_ptr().add(34usize),
98            )
99        }
100    }
101
102    #[doc = "Port 008 Pin Function Select Register"]
103    #[inline(always)]
104    pub const fn p008pfs_by(
105        &self,
106    ) -> &'static crate::common::Reg<self::P008PfsBy_SPEC, crate::common::RW> {
107        unsafe {
108            crate::common::Reg::<self::P008PfsBy_SPEC, crate::common::RW>::from_ptr(
109                self._svd2pac_as_ptr().add(35usize),
110            )
111        }
112    }
113
114    #[doc = "Port 0%s Pin Function Select Register"]
115    #[inline(always)]
116    pub const fn p0pfs(
117        &self,
118    ) -> &'static crate::common::ClusterRegisterArray<
119        crate::common::Reg<self::P0Pfs_SPEC, crate::common::RW>,
120        3,
121        0x4,
122    > {
123        unsafe {
124            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x34usize))
125        }
126    }
127
128    #[doc = "Port 0%s Pin Function Select Register"]
129    #[inline(always)]
130    pub const fn p0pfs_ha(
131        &self,
132    ) -> &'static crate::common::ClusterRegisterArray<
133        crate::common::Reg<self::P0PfsHa_SPEC, crate::common::RW>,
134        3,
135        0x4,
136    > {
137        unsafe {
138            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x36usize))
139        }
140    }
141
142    #[doc = "Port 0%s Pin Function Select Register"]
143    #[inline(always)]
144    pub const fn p0pfs_by(
145        &self,
146    ) -> &'static crate::common::ClusterRegisterArray<
147        crate::common::Reg<self::P0PfsBy_SPEC, crate::common::RW>,
148        3,
149        0x4,
150    > {
151        unsafe {
152            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x37usize))
153        }
154    }
155
156    #[doc = "Port 10%s Pin Function Select Register"]
157    #[inline(always)]
158    pub const fn p10pfs(
159        &self,
160    ) -> &'static crate::common::ClusterRegisterArray<
161        crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW>,
162        8,
163        0x4,
164    > {
165        unsafe {
166            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x48usize))
167        }
168    }
169
170    #[doc = "Port 10%s Pin Function Select Register"]
171    #[inline(always)]
172    pub const fn p10pfs_ha(
173        &self,
174    ) -> &'static crate::common::ClusterRegisterArray<
175        crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW>,
176        8,
177        0x4,
178    > {
179        unsafe {
180            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x4ausize))
181        }
182    }
183
184    #[doc = "Port 10%s Pin Function Select Register"]
185    #[inline(always)]
186    pub const fn p10pfs_by(
187        &self,
188    ) -> &'static crate::common::ClusterRegisterArray<
189        crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW>,
190        8,
191        0x4,
192    > {
193        unsafe {
194            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x4busize))
195        }
196    }
197
198    #[doc = "Port 1%s Pin Function Select Register"]
199    #[inline(always)]
200    pub const fn p1pfs(
201        &self,
202    ) -> &'static crate::common::ClusterRegisterArray<
203        crate::common::Reg<self::P1Pfs_SPEC, crate::common::RW>,
204        4,
205        0x4,
206    > {
207        unsafe {
208            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x68usize))
209        }
210    }
211
212    #[doc = "Port 1%s Pin Function Select Register"]
213    #[inline(always)]
214    pub const fn p1pfs_ha(
215        &self,
216    ) -> &'static crate::common::ClusterRegisterArray<
217        crate::common::Reg<self::P1PfsHa_SPEC, crate::common::RW>,
218        4,
219        0x4,
220    > {
221        unsafe {
222            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x6ausize))
223        }
224    }
225
226    #[doc = "Port 1%s Pin Function Select Register"]
227    #[inline(always)]
228    pub const fn p1pfs_by(
229        &self,
230    ) -> &'static crate::common::ClusterRegisterArray<
231        crate::common::Reg<self::P1PfsBy_SPEC, crate::common::RW>,
232        4,
233        0x4,
234    > {
235        unsafe {
236            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x6busize))
237        }
238    }
239
240    #[doc = "Port 200 Pin Function Select Register"]
241    #[inline(always)]
242    pub const fn p200pfs(
243        &self,
244    ) -> &'static crate::common::Reg<self::P200Pfs_SPEC, crate::common::RW> {
245        unsafe {
246            crate::common::Reg::<self::P200Pfs_SPEC, crate::common::RW>::from_ptr(
247                self._svd2pac_as_ptr().add(128usize),
248            )
249        }
250    }
251
252    #[doc = "Port 200 Pin Function Select Register"]
253    #[inline(always)]
254    pub const fn p200pfs_ha(
255        &self,
256    ) -> &'static crate::common::Reg<self::P200PfsHa_SPEC, crate::common::RW> {
257        unsafe {
258            crate::common::Reg::<self::P200PfsHa_SPEC, crate::common::RW>::from_ptr(
259                self._svd2pac_as_ptr().add(130usize),
260            )
261        }
262    }
263
264    #[doc = "Port 200 Pin Function Select Register"]
265    #[inline(always)]
266    pub const fn p200pfs_by(
267        &self,
268    ) -> &'static crate::common::Reg<self::P200PfsBy_SPEC, crate::common::RW> {
269        unsafe {
270            crate::common::Reg::<self::P200PfsBy_SPEC, crate::common::RW>::from_ptr(
271                self._svd2pac_as_ptr().add(131usize),
272            )
273        }
274    }
275
276    #[doc = "Port 201 Pin Function Select Register"]
277    #[inline(always)]
278    pub const fn p201pfs(
279        &self,
280    ) -> &'static crate::common::Reg<self::P201Pfs_SPEC, crate::common::RW> {
281        unsafe {
282            crate::common::Reg::<self::P201Pfs_SPEC, crate::common::RW>::from_ptr(
283                self._svd2pac_as_ptr().add(132usize),
284            )
285        }
286    }
287
288    #[doc = "Port 201 Pin Function Select Register"]
289    #[inline(always)]
290    pub const fn p201pfs_ha(
291        &self,
292    ) -> &'static crate::common::Reg<self::P201PfsHa_SPEC, crate::common::RW> {
293        unsafe {
294            crate::common::Reg::<self::P201PfsHa_SPEC, crate::common::RW>::from_ptr(
295                self._svd2pac_as_ptr().add(134usize),
296            )
297        }
298    }
299
300    #[doc = "Port 201 Pin Function Select Register"]
301    #[inline(always)]
302    pub const fn p201pfs_by(
303        &self,
304    ) -> &'static crate::common::Reg<self::P201PfsBy_SPEC, crate::common::RW> {
305        unsafe {
306            crate::common::Reg::<self::P201PfsBy_SPEC, crate::common::RW>::from_ptr(
307                self._svd2pac_as_ptr().add(135usize),
308            )
309        }
310    }
311
312    #[doc = "Port 20%s Pin Function Select Register"]
313    #[inline(always)]
314    pub const fn p20pfs(
315        &self,
316    ) -> &'static crate::common::ClusterRegisterArray<
317        crate::common::Reg<self::P20Pfs_SPEC, crate::common::RW>,
318        4,
319        0x4,
320    > {
321        unsafe {
322            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x94usize))
323        }
324    }
325
326    #[doc = "Port 20%s Pin Function Select Register"]
327    #[inline(always)]
328    pub const fn p20pfs_ha(
329        &self,
330    ) -> &'static crate::common::ClusterRegisterArray<
331        crate::common::Reg<self::P20PfsHa_SPEC, crate::common::RW>,
332        4,
333        0x4,
334    > {
335        unsafe {
336            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x96usize))
337        }
338    }
339
340    #[doc = "Port 20%s Pin Function Select Register"]
341    #[inline(always)]
342    pub const fn p20pfs_by(
343        &self,
344    ) -> &'static crate::common::ClusterRegisterArray<
345        crate::common::Reg<self::P20PfsBy_SPEC, crate::common::RW>,
346        4,
347        0x4,
348    > {
349        unsafe {
350            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x97usize))
351        }
352    }
353
354    #[doc = "Port 2%s Pin Function Select Register"]
355    #[inline(always)]
356    pub const fn p2pfs(
357        &self,
358    ) -> &'static crate::common::ClusterRegisterArray<
359        crate::common::Reg<self::P2Pfs_SPEC, crate::common::RW>,
360        2,
361        0x4,
362    > {
363        unsafe {
364            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xb0usize))
365        }
366    }
367
368    #[doc = "Port 2%s Pin Function Select Register"]
369    #[inline(always)]
370    pub const fn p2pfs_ha(
371        &self,
372    ) -> &'static crate::common::ClusterRegisterArray<
373        crate::common::Reg<self::P2PfsHa_SPEC, crate::common::RW>,
374        2,
375        0x4,
376    > {
377        unsafe {
378            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xb2usize))
379        }
380    }
381
382    #[doc = "Port 2%s Pin Function Select Register"]
383    #[inline(always)]
384    pub const fn p2pfs_by(
385        &self,
386    ) -> &'static crate::common::ClusterRegisterArray<
387        crate::common::Reg<self::P2PfsBy_SPEC, crate::common::RW>,
388        2,
389        0x4,
390    > {
391        unsafe {
392            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xb3usize))
393        }
394    }
395
396    #[doc = "Port 300 Pin Function Select Register"]
397    #[inline(always)]
398    pub const fn p300pfs(
399        &self,
400    ) -> &'static crate::common::Reg<self::P300Pfs_SPEC, crate::common::RW> {
401        unsafe {
402            crate::common::Reg::<self::P300Pfs_SPEC, crate::common::RW>::from_ptr(
403                self._svd2pac_as_ptr().add(192usize),
404            )
405        }
406    }
407
408    #[doc = "Port 300 Pin Function Select Register"]
409    #[inline(always)]
410    pub const fn p300pfs_ha(
411        &self,
412    ) -> &'static crate::common::Reg<self::P300PfsHa_SPEC, crate::common::RW> {
413        unsafe {
414            crate::common::Reg::<self::P300PfsHa_SPEC, crate::common::RW>::from_ptr(
415                self._svd2pac_as_ptr().add(194usize),
416            )
417        }
418    }
419
420    #[doc = "Port 300 Pin Function Select Register"]
421    #[inline(always)]
422    pub const fn p300pfs_by(
423        &self,
424    ) -> &'static crate::common::Reg<self::P300PfsBy_SPEC, crate::common::RW> {
425        unsafe {
426            crate::common::Reg::<self::P300PfsBy_SPEC, crate::common::RW>::from_ptr(
427                self._svd2pac_as_ptr().add(195usize),
428            )
429        }
430    }
431
432    #[doc = "Port 30%s Pin Function Select Register"]
433    #[inline(always)]
434    pub const fn p30pfs(
435        &self,
436    ) -> &'static crate::common::ClusterRegisterArray<
437        crate::common::Reg<self::P30Pfs_SPEC, crate::common::RW>,
438        4,
439        0x4,
440    > {
441        unsafe {
442            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xc4usize))
443        }
444    }
445
446    #[doc = "Port 30%s Pin Function Select Register"]
447    #[inline(always)]
448    pub const fn p30pfs_ha(
449        &self,
450    ) -> &'static crate::common::ClusterRegisterArray<
451        crate::common::Reg<self::P30PfsHa_SPEC, crate::common::RW>,
452        4,
453        0x4,
454    > {
455        unsafe {
456            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xc6usize))
457        }
458    }
459
460    #[doc = "Port 30%s Pin Function Select Register"]
461    #[inline(always)]
462    pub const fn p30pfs_by(
463        &self,
464    ) -> &'static crate::common::ClusterRegisterArray<
465        crate::common::Reg<self::P30PfsBy_SPEC, crate::common::RW>,
466        4,
467        0x4,
468    > {
469        unsafe {
470            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xc7usize))
471        }
472    }
473
474    #[doc = "Port 40%s Pin Function Select Register"]
475    #[inline(always)]
476    pub const fn p40pfs(
477        &self,
478    ) -> &'static crate::common::ClusterRegisterArray<
479        crate::common::Reg<self::P40Pfs_SPEC, crate::common::RW>,
480        3,
481        0x4,
482    > {
483        unsafe {
484            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x11cusize))
485        }
486    }
487
488    #[doc = "Port 40%s Pin Function Select Register"]
489    #[inline(always)]
490    pub const fn p40pfs_ha(
491        &self,
492    ) -> &'static crate::common::ClusterRegisterArray<
493        crate::common::Reg<self::P40PfsHa_SPEC, crate::common::RW>,
494        3,
495        0x4,
496    > {
497        unsafe {
498            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x11eusize))
499        }
500    }
501
502    #[doc = "Port 40%s Pin Function Select Register"]
503    #[inline(always)]
504    pub const fn p40pfs_by(
505        &self,
506    ) -> &'static crate::common::ClusterRegisterArray<
507        crate::common::Reg<self::P40PfsBy_SPEC, crate::common::RW>,
508        3,
509        0x4,
510    > {
511        unsafe {
512            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x11fusize))
513        }
514    }
515
516    #[doc = "Port 4%s Pin Function Select Register"]
517    #[inline(always)]
518    pub const fn p4pfs(
519        &self,
520    ) -> &'static crate::common::ClusterRegisterArray<
521        crate::common::Reg<self::P4Pfs_SPEC, crate::common::RW>,
522        2,
523        0x4,
524    > {
525        unsafe {
526            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x128usize))
527        }
528    }
529
530    #[doc = "Port 4%s Pin Function Select Register"]
531    #[inline(always)]
532    pub const fn p4pfs_ha(
533        &self,
534    ) -> &'static crate::common::ClusterRegisterArray<
535        crate::common::Reg<self::P4PfsHa_SPEC, crate::common::RW>,
536        2,
537        0x4,
538    > {
539        unsafe {
540            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x12ausize))
541        }
542    }
543
544    #[doc = "Port 4%s Pin Function Select Register"]
545    #[inline(always)]
546    pub const fn p4pfs_by(
547        &self,
548    ) -> &'static crate::common::ClusterRegisterArray<
549        crate::common::Reg<self::P4PfsBy_SPEC, crate::common::RW>,
550        2,
551        0x4,
552    > {
553        unsafe {
554            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x12busize))
555        }
556    }
557
558    #[doc = "Port 500 Pin Function Select Register"]
559    #[inline(always)]
560    pub const fn p500pfs(
561        &self,
562    ) -> &'static crate::common::Reg<self::P500Pfs_SPEC, crate::common::RW> {
563        unsafe {
564            crate::common::Reg::<self::P500Pfs_SPEC, crate::common::RW>::from_ptr(
565                self._svd2pac_as_ptr().add(320usize),
566            )
567        }
568    }
569
570    #[doc = "Port 500 Pin Function Select Register"]
571    #[inline(always)]
572    pub const fn p500pfs_ha(
573        &self,
574    ) -> &'static crate::common::Reg<self::P500PfsHa_SPEC, crate::common::RW> {
575        unsafe {
576            crate::common::Reg::<self::P500PfsHa_SPEC, crate::common::RW>::from_ptr(
577                self._svd2pac_as_ptr().add(322usize),
578            )
579        }
580    }
581
582    #[doc = "Port 500 Pin Function Select Register"]
583    #[inline(always)]
584    pub const fn p500pfs_by(
585        &self,
586    ) -> &'static crate::common::Reg<self::P500PfsBy_SPEC, crate::common::RW> {
587        unsafe {
588            crate::common::Reg::<self::P500PfsBy_SPEC, crate::common::RW>::from_ptr(
589                self._svd2pac_as_ptr().add(323usize),
590            )
591        }
592    }
593
594    #[doc = "Port 80%s Pin Function Select Register"]
595    #[inline(always)]
596    pub const fn p80pfs(
597        &self,
598    ) -> &'static crate::common::ClusterRegisterArray<
599        crate::common::Reg<self::P80Pfs_SPEC, crate::common::RW>,
600        2,
601        0x4,
602    > {
603        unsafe {
604            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x200usize))
605        }
606    }
607
608    #[doc = "Port 80%s Pin Function Select Register"]
609    #[inline(always)]
610    pub const fn p80pfs_ha(
611        &self,
612    ) -> &'static crate::common::ClusterRegisterArray<
613        crate::common::Reg<self::P80PfsHa_SPEC, crate::common::RW>,
614        2,
615        0x4,
616    > {
617        unsafe {
618            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x202usize))
619        }
620    }
621
622    #[doc = "Port 80%s Pin Function Select Register"]
623    #[inline(always)]
624    pub const fn p80pfs_by(
625        &self,
626    ) -> &'static crate::common::ClusterRegisterArray<
627        crate::common::Reg<self::P80PfsBy_SPEC, crate::common::RW>,
628        2,
629        0x4,
630    > {
631        unsafe {
632            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x203usize))
633        }
634    }
635
636    #[doc = "Write-Protect Register"]
637    #[inline(always)]
638    pub const fn pwpr(&self) -> &'static crate::common::Reg<self::Pwpr_SPEC, crate::common::RW> {
639        unsafe {
640            crate::common::Reg::<self::Pwpr_SPEC, crate::common::RW>::from_ptr(
641                self._svd2pac_as_ptr().add(1283usize),
642            )
643        }
644    }
645
646    #[doc = "Write-Protect Register for Secure"]
647    #[inline(always)]
648    pub const fn pwprs(&self) -> &'static crate::common::Reg<self::Pwprs_SPEC, crate::common::RW> {
649        unsafe {
650            crate::common::Reg::<self::Pwprs_SPEC, crate::common::RW>::from_ptr(
651                self._svd2pac_as_ptr().add(1285usize),
652            )
653        }
654    }
655
656    #[doc = "RI3C Slope Control Register"]
657    #[inline(always)]
658    pub const fn pfi3c(&self) -> &'static crate::common::Reg<self::Pfi3C_SPEC, crate::common::RW> {
659        unsafe {
660            crate::common::Reg::<self::Pfi3C_SPEC, crate::common::RW>::from_ptr(
661                self._svd2pac_as_ptr().add(1292usize),
662            )
663        }
664    }
665
666    #[doc = "Port Security Attribution register"]
667    #[inline(always)]
668    pub const fn psar(
669        &self,
670    ) -> &'static crate::common::ClusterRegisterArray<
671        crate::common::Reg<self::Psar_SPEC, crate::common::RW>,
672        6,
673        0x2,
674    > {
675        unsafe {
676            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x510usize))
677        }
678    }
679
680    #[doc = "Port Security Attribution register"]
681    #[inline(always)]
682    pub const fn p8sar(&self) -> &'static crate::common::Reg<self::P8Sar_SPEC, crate::common::RW> {
683        unsafe {
684            crate::common::Reg::<self::P8Sar_SPEC, crate::common::RW>::from_ptr(
685                self._svd2pac_as_ptr().add(1312usize),
686            )
687        }
688    }
689}
690#[doc(hidden)]
691#[derive(Copy, Clone, Eq, PartialEq)]
692pub struct P00Pfs_SPEC;
693impl crate::sealed::RegSpec for P00Pfs_SPEC {
694    type DataType = u32;
695}
696#[doc = "Port 00%s Pin Function Select Register"]
697pub type P00Pfs = crate::RegValueT<P00Pfs_SPEC>;
698
699impl P00Pfs {
700    #[doc = "Port Output Data"]
701    #[inline(always)]
702    pub fn podr(
703        self,
704    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p00pfs::Podr, P00Pfs_SPEC, crate::common::RW>
705    {
706        crate::common::RegisterField::<0,0x1,1,0,p00pfs::Podr, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
707    }
708    #[doc = "Port State"]
709    #[inline(always)]
710    pub fn pidr(
711        self,
712    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p00pfs::Pidr, P00Pfs_SPEC, crate::common::R>
713    {
714        crate::common::RegisterField::<1,0x1,1,0,p00pfs::Pidr, P00Pfs_SPEC,crate::common::R>::from_register(self,0)
715    }
716    #[doc = "Port Direction"]
717    #[inline(always)]
718    pub fn pdr(
719        self,
720    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p00pfs::Pdr, P00Pfs_SPEC, crate::common::RW>
721    {
722        crate::common::RegisterField::<2,0x1,1,0,p00pfs::Pdr, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
723    }
724    #[doc = "Pull-up Control"]
725    #[inline(always)]
726    pub fn pcr(
727        self,
728    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p00pfs::Pcr, P00Pfs_SPEC, crate::common::RW>
729    {
730        crate::common::RegisterField::<4,0x1,1,0,p00pfs::Pcr, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
731    }
732    #[doc = "N-Channel Open-Drain Control"]
733    #[inline(always)]
734    pub fn ncodr(
735        self,
736    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p00pfs::Ncodr, P00Pfs_SPEC, crate::common::RW>
737    {
738        crate::common::RegisterField::<6,0x1,1,0,p00pfs::Ncodr, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
739    }
740    #[doc = "Port Drive Capability"]
741    #[inline(always)]
742    pub fn dscr(
743        self,
744    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p00pfs::Dscr, P00Pfs_SPEC, crate::common::RW>
745    {
746        crate::common::RegisterField::<10,0x3,1,0,p00pfs::Dscr, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
747    }
748    #[doc = "Event on Falling/Event on Rising"]
749    #[inline(always)]
750    pub fn eofr(
751        self,
752    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p00pfs::Eofr, P00Pfs_SPEC, crate::common::RW>
753    {
754        crate::common::RegisterField::<12,0x3,1,0,p00pfs::Eofr, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
755    }
756    #[doc = "IRQ Input Enable"]
757    #[inline(always)]
758    pub fn isel(
759        self,
760    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p00pfs::Isel, P00Pfs_SPEC, crate::common::RW>
761    {
762        crate::common::RegisterField::<14,0x1,1,0,p00pfs::Isel, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
763    }
764    #[doc = "Analog Input Enable"]
765    #[inline(always)]
766    pub fn asel(
767        self,
768    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p00pfs::Asel, P00Pfs_SPEC, crate::common::RW>
769    {
770        crate::common::RegisterField::<15,0x1,1,0,p00pfs::Asel, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
771    }
772    #[doc = "Port Mode Control"]
773    #[inline(always)]
774    pub fn pmr(
775        self,
776    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p00pfs::Pmr, P00Pfs_SPEC, crate::common::RW>
777    {
778        crate::common::RegisterField::<16,0x1,1,0,p00pfs::Pmr, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
779    }
780    #[doc = "Peripheral Select"]
781    #[inline(always)]
782    pub fn psel(
783        self,
784    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P00Pfs_SPEC, crate::common::RW> {
785        crate::common::RegisterField::<24,0x1f,1,0,u8, P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
786    }
787}
788impl ::core::default::Default for P00Pfs {
789    #[inline(always)]
790    fn default() -> P00Pfs {
791        <crate::RegValueT<P00Pfs_SPEC> as RegisterValue<_>>::new(0)
792    }
793}
794pub mod p00pfs {
795
796    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
797    pub struct Podr_SPEC;
798    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
799    impl Podr {
800        #[doc = "Output low"]
801        pub const _0: Self = Self::new(0);
802        #[doc = "Output high"]
803        pub const _1: Self = Self::new(1);
804    }
805    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
806    pub struct Pidr_SPEC;
807    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
808    impl Pidr {
809        #[doc = "Low level"]
810        pub const _0: Self = Self::new(0);
811        #[doc = "High level"]
812        pub const _1: Self = Self::new(1);
813    }
814    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
815    pub struct Pdr_SPEC;
816    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
817    impl Pdr {
818        #[doc = "Input (functions as an input pin)"]
819        pub const _0: Self = Self::new(0);
820        #[doc = "Output (functions as an output pin)"]
821        pub const _1: Self = Self::new(1);
822    }
823    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
824    pub struct Pcr_SPEC;
825    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
826    impl Pcr {
827        #[doc = "Disable input pull-up"]
828        pub const _0: Self = Self::new(0);
829        #[doc = "Enable input pull-up"]
830        pub const _1: Self = Self::new(1);
831    }
832    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
833    pub struct Ncodr_SPEC;
834    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
835    impl Ncodr {
836        #[doc = "Output CMOS"]
837        pub const _0: Self = Self::new(0);
838        #[doc = "Output NMOS open-drain"]
839        pub const _1: Self = Self::new(1);
840    }
841    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
842    pub struct Dscr_SPEC;
843    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
844    impl Dscr {
845        #[doc = "Low drive"]
846        pub const _00: Self = Self::new(0);
847        #[doc = "Middle drive"]
848        pub const _01: Self = Self::new(1);
849        #[doc = "Setting prohibited"]
850        pub const _10: Self = Self::new(2);
851        #[doc = "High drive"]
852        pub const _11: Self = Self::new(3);
853    }
854    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
855    pub struct Eofr_SPEC;
856    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
857    impl Eofr {
858        #[doc = "Don\'t care"]
859        pub const _00: Self = Self::new(0);
860        #[doc = "Detect rising edge"]
861        pub const _01: Self = Self::new(1);
862        #[doc = "Detect falling edge"]
863        pub const _10: Self = Self::new(2);
864        #[doc = "Detect both edges"]
865        pub const _11: Self = Self::new(3);
866    }
867    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
868    pub struct Isel_SPEC;
869    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
870    impl Isel {
871        #[doc = "Do not use as IRQn input pin"]
872        pub const _0: Self = Self::new(0);
873        #[doc = "Use as IRQn input pin"]
874        pub const _1: Self = Self::new(1);
875    }
876    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
877    pub struct Asel_SPEC;
878    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
879    impl Asel {
880        #[doc = "Do not use as analog pin"]
881        pub const _0: Self = Self::new(0);
882        #[doc = "Use as analog pin"]
883        pub const _1: Self = Self::new(1);
884    }
885    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
886    pub struct Pmr_SPEC;
887    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
888    impl Pmr {
889        #[doc = "Use as general I/O pin"]
890        pub const _0: Self = Self::new(0);
891        #[doc = "Use as I/O port for peripheral functions"]
892        pub const _1: Self = Self::new(1);
893    }
894}
895#[doc(hidden)]
896#[derive(Copy, Clone, Eq, PartialEq)]
897pub struct P00PfsHa_SPEC;
898impl crate::sealed::RegSpec for P00PfsHa_SPEC {
899    type DataType = u16;
900}
901#[doc = "Port 00%s Pin Function Select Register"]
902pub type P00PfsHa = crate::RegValueT<P00PfsHa_SPEC>;
903
904impl P00PfsHa {
905    #[doc = "Port Output Data"]
906    #[inline(always)]
907    pub fn podr(
908        self,
909    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p00pfs_ha::Podr, P00PfsHa_SPEC, crate::common::RW>
910    {
911        crate::common::RegisterField::<
912            0,
913            0x1,
914            1,
915            0,
916            p00pfs_ha::Podr,
917            P00PfsHa_SPEC,
918            crate::common::RW,
919        >::from_register(self, 0)
920    }
921    #[doc = "Port State"]
922    #[inline(always)]
923    pub fn pidr(
924        self,
925    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p00pfs_ha::Pidr, P00PfsHa_SPEC, crate::common::R>
926    {
927        crate::common::RegisterField::<1,0x1,1,0,p00pfs_ha::Pidr, P00PfsHa_SPEC,crate::common::R>::from_register(self,0)
928    }
929    #[doc = "Port Direction"]
930    #[inline(always)]
931    pub fn pdr(
932        self,
933    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p00pfs_ha::Pdr, P00PfsHa_SPEC, crate::common::RW>
934    {
935        crate::common::RegisterField::<2,0x1,1,0,p00pfs_ha::Pdr, P00PfsHa_SPEC,crate::common::RW>::from_register(self,0)
936    }
937    #[doc = "Pull-up Control"]
938    #[inline(always)]
939    pub fn pcr(
940        self,
941    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p00pfs_ha::Pcr, P00PfsHa_SPEC, crate::common::RW>
942    {
943        crate::common::RegisterField::<4,0x1,1,0,p00pfs_ha::Pcr, P00PfsHa_SPEC,crate::common::RW>::from_register(self,0)
944    }
945    #[doc = "N-Channel Open-Drain Control"]
946    #[inline(always)]
947    pub fn ncodr(
948        self,
949    ) -> crate::common::RegisterField<
950        6,
951        0x1,
952        1,
953        0,
954        p00pfs_ha::Ncodr,
955        P00PfsHa_SPEC,
956        crate::common::RW,
957    > {
958        crate::common::RegisterField::<
959            6,
960            0x1,
961            1,
962            0,
963            p00pfs_ha::Ncodr,
964            P00PfsHa_SPEC,
965            crate::common::RW,
966        >::from_register(self, 0)
967    }
968    #[doc = "Port Drive Capability"]
969    #[inline(always)]
970    pub fn dscr(
971        self,
972    ) -> crate::common::RegisterField<
973        10,
974        0x3,
975        1,
976        0,
977        p00pfs_ha::Dscr,
978        P00PfsHa_SPEC,
979        crate::common::RW,
980    > {
981        crate::common::RegisterField::<
982            10,
983            0x3,
984            1,
985            0,
986            p00pfs_ha::Dscr,
987            P00PfsHa_SPEC,
988            crate::common::RW,
989        >::from_register(self, 0)
990    }
991    #[doc = "Event on Falling/Event on Rising"]
992    #[inline(always)]
993    pub fn eofr(
994        self,
995    ) -> crate::common::RegisterField<
996        12,
997        0x3,
998        1,
999        0,
1000        p00pfs_ha::Eofr,
1001        P00PfsHa_SPEC,
1002        crate::common::RW,
1003    > {
1004        crate::common::RegisterField::<
1005            12,
1006            0x3,
1007            1,
1008            0,
1009            p00pfs_ha::Eofr,
1010            P00PfsHa_SPEC,
1011            crate::common::RW,
1012        >::from_register(self, 0)
1013    }
1014    #[doc = "IRQ Input Enable"]
1015    #[inline(always)]
1016    pub fn isel(
1017        self,
1018    ) -> crate::common::RegisterField<
1019        14,
1020        0x1,
1021        1,
1022        0,
1023        p00pfs_ha::Isel,
1024        P00PfsHa_SPEC,
1025        crate::common::RW,
1026    > {
1027        crate::common::RegisterField::<
1028            14,
1029            0x1,
1030            1,
1031            0,
1032            p00pfs_ha::Isel,
1033            P00PfsHa_SPEC,
1034            crate::common::RW,
1035        >::from_register(self, 0)
1036    }
1037    #[doc = "Analog Input Enable"]
1038    #[inline(always)]
1039    pub fn asel(
1040        self,
1041    ) -> crate::common::RegisterField<
1042        15,
1043        0x1,
1044        1,
1045        0,
1046        p00pfs_ha::Asel,
1047        P00PfsHa_SPEC,
1048        crate::common::RW,
1049    > {
1050        crate::common::RegisterField::<
1051            15,
1052            0x1,
1053            1,
1054            0,
1055            p00pfs_ha::Asel,
1056            P00PfsHa_SPEC,
1057            crate::common::RW,
1058        >::from_register(self, 0)
1059    }
1060}
1061impl ::core::default::Default for P00PfsHa {
1062    #[inline(always)]
1063    fn default() -> P00PfsHa {
1064        <crate::RegValueT<P00PfsHa_SPEC> as RegisterValue<_>>::new(0)
1065    }
1066}
1067pub mod p00pfs_ha {
1068
1069    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1070    pub struct Podr_SPEC;
1071    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
1072    impl Podr {
1073        #[doc = "Output low"]
1074        pub const _0: Self = Self::new(0);
1075        #[doc = "Output high"]
1076        pub const _1: Self = Self::new(1);
1077    }
1078    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1079    pub struct Pidr_SPEC;
1080    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
1081    impl Pidr {
1082        #[doc = "Low level"]
1083        pub const _0: Self = Self::new(0);
1084        #[doc = "High level"]
1085        pub const _1: Self = Self::new(1);
1086    }
1087    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1088    pub struct Pdr_SPEC;
1089    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
1090    impl Pdr {
1091        #[doc = "Input (functions as an input pin)"]
1092        pub const _0: Self = Self::new(0);
1093        #[doc = "Output (functions as an output pin)"]
1094        pub const _1: Self = Self::new(1);
1095    }
1096    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1097    pub struct Pcr_SPEC;
1098    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
1099    impl Pcr {
1100        #[doc = "Disable input pull-up"]
1101        pub const _0: Self = Self::new(0);
1102        #[doc = "Enable input pull-up"]
1103        pub const _1: Self = Self::new(1);
1104    }
1105    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1106    pub struct Ncodr_SPEC;
1107    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
1108    impl Ncodr {
1109        #[doc = "Output CMOS"]
1110        pub const _0: Self = Self::new(0);
1111        #[doc = "Output NMOS open-drain"]
1112        pub const _1: Self = Self::new(1);
1113    }
1114    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1115    pub struct Dscr_SPEC;
1116    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
1117    impl Dscr {
1118        #[doc = "Low drive"]
1119        pub const _00: Self = Self::new(0);
1120        #[doc = "Middle drive"]
1121        pub const _01: Self = Self::new(1);
1122        #[doc = "Setting prohibited"]
1123        pub const _10: Self = Self::new(2);
1124        #[doc = "High drive"]
1125        pub const _11: Self = Self::new(3);
1126    }
1127    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1128    pub struct Eofr_SPEC;
1129    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
1130    impl Eofr {
1131        #[doc = "Don\'t care"]
1132        pub const _00: Self = Self::new(0);
1133        #[doc = "Detect rising edge"]
1134        pub const _01: Self = Self::new(1);
1135        #[doc = "Detect falling edge"]
1136        pub const _10: Self = Self::new(2);
1137        #[doc = "Detect both edges"]
1138        pub const _11: Self = Self::new(3);
1139    }
1140    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1141    pub struct Isel_SPEC;
1142    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
1143    impl Isel {
1144        #[doc = "Do not use as IRQn input pin"]
1145        pub const _0: Self = Self::new(0);
1146        #[doc = "Use as IRQn input pin"]
1147        pub const _1: Self = Self::new(1);
1148    }
1149    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1150    pub struct Asel_SPEC;
1151    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
1152    impl Asel {
1153        #[doc = "Do not use as analog pin"]
1154        pub const _0: Self = Self::new(0);
1155        #[doc = "Use as analog pin"]
1156        pub const _1: Self = Self::new(1);
1157    }
1158}
1159#[doc(hidden)]
1160#[derive(Copy, Clone, Eq, PartialEq)]
1161pub struct P00PfsBy_SPEC;
1162impl crate::sealed::RegSpec for P00PfsBy_SPEC {
1163    type DataType = u8;
1164}
1165#[doc = "Port 00%s Pin Function Select Register"]
1166pub type P00PfsBy = crate::RegValueT<P00PfsBy_SPEC>;
1167
1168impl P00PfsBy {
1169    #[doc = "Port Output Data"]
1170    #[inline(always)]
1171    pub fn podr(
1172        self,
1173    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p00pfs_by::Podr, P00PfsBy_SPEC, crate::common::RW>
1174    {
1175        crate::common::RegisterField::<
1176            0,
1177            0x1,
1178            1,
1179            0,
1180            p00pfs_by::Podr,
1181            P00PfsBy_SPEC,
1182            crate::common::RW,
1183        >::from_register(self, 0)
1184    }
1185    #[doc = "Port State"]
1186    #[inline(always)]
1187    pub fn pidr(
1188        self,
1189    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p00pfs_by::Pidr, P00PfsBy_SPEC, crate::common::R>
1190    {
1191        crate::common::RegisterField::<1,0x1,1,0,p00pfs_by::Pidr, P00PfsBy_SPEC,crate::common::R>::from_register(self,0)
1192    }
1193    #[doc = "Port Direction"]
1194    #[inline(always)]
1195    pub fn pdr(
1196        self,
1197    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p00pfs_by::Pdr, P00PfsBy_SPEC, crate::common::RW>
1198    {
1199        crate::common::RegisterField::<2,0x1,1,0,p00pfs_by::Pdr, P00PfsBy_SPEC,crate::common::RW>::from_register(self,0)
1200    }
1201    #[doc = "Pull-up Control"]
1202    #[inline(always)]
1203    pub fn pcr(
1204        self,
1205    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p00pfs_by::Pcr, P00PfsBy_SPEC, crate::common::RW>
1206    {
1207        crate::common::RegisterField::<4,0x1,1,0,p00pfs_by::Pcr, P00PfsBy_SPEC,crate::common::RW>::from_register(self,0)
1208    }
1209    #[doc = "N-Channel Open-Drain Control"]
1210    #[inline(always)]
1211    pub fn ncodr(
1212        self,
1213    ) -> crate::common::RegisterField<
1214        6,
1215        0x1,
1216        1,
1217        0,
1218        p00pfs_by::Ncodr,
1219        P00PfsBy_SPEC,
1220        crate::common::RW,
1221    > {
1222        crate::common::RegisterField::<
1223            6,
1224            0x1,
1225            1,
1226            0,
1227            p00pfs_by::Ncodr,
1228            P00PfsBy_SPEC,
1229            crate::common::RW,
1230        >::from_register(self, 0)
1231    }
1232}
1233impl ::core::default::Default for P00PfsBy {
1234    #[inline(always)]
1235    fn default() -> P00PfsBy {
1236        <crate::RegValueT<P00PfsBy_SPEC> as RegisterValue<_>>::new(0)
1237    }
1238}
1239pub mod p00pfs_by {
1240
1241    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1242    pub struct Podr_SPEC;
1243    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
1244    impl Podr {
1245        #[doc = "Output low"]
1246        pub const _0: Self = Self::new(0);
1247        #[doc = "Output high"]
1248        pub const _1: Self = Self::new(1);
1249    }
1250    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1251    pub struct Pidr_SPEC;
1252    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
1253    impl Pidr {
1254        #[doc = "Low level"]
1255        pub const _0: Self = Self::new(0);
1256        #[doc = "High level"]
1257        pub const _1: Self = Self::new(1);
1258    }
1259    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1260    pub struct Pdr_SPEC;
1261    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
1262    impl Pdr {
1263        #[doc = "Input (functions as an input pin)"]
1264        pub const _0: Self = Self::new(0);
1265        #[doc = "Output (functions as an output pin)"]
1266        pub const _1: Self = Self::new(1);
1267    }
1268    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1269    pub struct Pcr_SPEC;
1270    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
1271    impl Pcr {
1272        #[doc = "Disable input pull-up"]
1273        pub const _0: Self = Self::new(0);
1274        #[doc = "Enable input pull-up"]
1275        pub const _1: Self = Self::new(1);
1276    }
1277    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1278    pub struct Ncodr_SPEC;
1279    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
1280    impl Ncodr {
1281        #[doc = "Output CMOS"]
1282        pub const _0: Self = Self::new(0);
1283        #[doc = "Output NMOS open-drain"]
1284        pub const _1: Self = Self::new(1);
1285    }
1286}
1287#[doc(hidden)]
1288#[derive(Copy, Clone, Eq, PartialEq)]
1289pub struct P008Pfs_SPEC;
1290impl crate::sealed::RegSpec for P008Pfs_SPEC {
1291    type DataType = u32;
1292}
1293#[doc = "Port 008 Pin Function Select Register"]
1294pub type P008Pfs = crate::RegValueT<P008Pfs_SPEC>;
1295
1296impl P008Pfs {
1297    #[doc = "Port Output Data"]
1298    #[inline(always)]
1299    pub fn podr(
1300        self,
1301    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p008pfs::Podr, P008Pfs_SPEC, crate::common::RW>
1302    {
1303        crate::common::RegisterField::<0,0x1,1,0,p008pfs::Podr, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1304    }
1305    #[doc = "Port State"]
1306    #[inline(always)]
1307    pub fn pidr(
1308        self,
1309    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p008pfs::Pidr, P008Pfs_SPEC, crate::common::R>
1310    {
1311        crate::common::RegisterField::<1,0x1,1,0,p008pfs::Pidr, P008Pfs_SPEC,crate::common::R>::from_register(self,0)
1312    }
1313    #[doc = "Port Direction"]
1314    #[inline(always)]
1315    pub fn pdr(
1316        self,
1317    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p008pfs::Pdr, P008Pfs_SPEC, crate::common::RW>
1318    {
1319        crate::common::RegisterField::<2,0x1,1,0,p008pfs::Pdr, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1320    }
1321    #[doc = "Pull-up Control"]
1322    #[inline(always)]
1323    pub fn pcr(
1324        self,
1325    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p008pfs::Pcr, P008Pfs_SPEC, crate::common::RW>
1326    {
1327        crate::common::RegisterField::<4,0x1,1,0,p008pfs::Pcr, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1328    }
1329    #[doc = "N-Channel Open-Drain Control"]
1330    #[inline(always)]
1331    pub fn ncodr(
1332        self,
1333    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p008pfs::Ncodr, P008Pfs_SPEC, crate::common::RW>
1334    {
1335        crate::common::RegisterField::<6,0x1,1,0,p008pfs::Ncodr, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1336    }
1337    #[doc = "Port Drive Capability"]
1338    #[inline(always)]
1339    pub fn dscr(
1340        self,
1341    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p008pfs::Dscr, P008Pfs_SPEC, crate::common::RW>
1342    {
1343        crate::common::RegisterField::<10,0x3,1,0,p008pfs::Dscr, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1344    }
1345    #[doc = "Event on Falling/Event on Rising"]
1346    #[inline(always)]
1347    pub fn eofr(
1348        self,
1349    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p008pfs::Eofr, P008Pfs_SPEC, crate::common::RW>
1350    {
1351        crate::common::RegisterField::<12,0x3,1,0,p008pfs::Eofr, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1352    }
1353    #[doc = "IRQ Input Enable"]
1354    #[inline(always)]
1355    pub fn isel(
1356        self,
1357    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p008pfs::Isel, P008Pfs_SPEC, crate::common::RW>
1358    {
1359        crate::common::RegisterField::<14,0x1,1,0,p008pfs::Isel, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1360    }
1361    #[doc = "Analog Input Enable"]
1362    #[inline(always)]
1363    pub fn asel(
1364        self,
1365    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p008pfs::Asel, P008Pfs_SPEC, crate::common::RW>
1366    {
1367        crate::common::RegisterField::<15,0x1,1,0,p008pfs::Asel, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1368    }
1369    #[doc = "Port Mode Control"]
1370    #[inline(always)]
1371    pub fn pmr(
1372        self,
1373    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p008pfs::Pmr, P008Pfs_SPEC, crate::common::RW>
1374    {
1375        crate::common::RegisterField::<16,0x1,1,0,p008pfs::Pmr, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1376    }
1377    #[doc = "Peripheral Select"]
1378    #[inline(always)]
1379    pub fn psel(
1380        self,
1381    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P008Pfs_SPEC, crate::common::RW> {
1382        crate::common::RegisterField::<24,0x1f,1,0,u8, P008Pfs_SPEC,crate::common::RW>::from_register(self,0)
1383    }
1384}
1385impl ::core::default::Default for P008Pfs {
1386    #[inline(always)]
1387    fn default() -> P008Pfs {
1388        <crate::RegValueT<P008Pfs_SPEC> as RegisterValue<_>>::new(66576)
1389    }
1390}
1391pub mod p008pfs {
1392
1393    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1394    pub struct Podr_SPEC;
1395    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
1396    impl Podr {
1397        #[doc = "Output low"]
1398        pub const _0: Self = Self::new(0);
1399        #[doc = "Output high"]
1400        pub const _1: Self = Self::new(1);
1401    }
1402    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1403    pub struct Pidr_SPEC;
1404    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
1405    impl Pidr {
1406        #[doc = "Low level"]
1407        pub const _0: Self = Self::new(0);
1408        #[doc = "High level"]
1409        pub const _1: Self = Self::new(1);
1410    }
1411    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1412    pub struct Pdr_SPEC;
1413    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
1414    impl Pdr {
1415        #[doc = "Input (functions as an input pin)"]
1416        pub const _0: Self = Self::new(0);
1417        #[doc = "Output (functions as an output pin)"]
1418        pub const _1: Self = Self::new(1);
1419    }
1420    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1421    pub struct Pcr_SPEC;
1422    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
1423    impl Pcr {
1424        #[doc = "Disable input pull-up"]
1425        pub const _0: Self = Self::new(0);
1426        #[doc = "Enable input pull-up"]
1427        pub const _1: Self = Self::new(1);
1428    }
1429    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1430    pub struct Ncodr_SPEC;
1431    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
1432    impl Ncodr {
1433        #[doc = "Output CMOS"]
1434        pub const _0: Self = Self::new(0);
1435        #[doc = "Output NMOS open-drain"]
1436        pub const _1: Self = Self::new(1);
1437    }
1438    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1439    pub struct Dscr_SPEC;
1440    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
1441    impl Dscr {
1442        #[doc = "Low drive"]
1443        pub const _00: Self = Self::new(0);
1444        #[doc = "Middle drive"]
1445        pub const _01: Self = Self::new(1);
1446        #[doc = "Setting prohibited"]
1447        pub const _10: Self = Self::new(2);
1448        #[doc = "High drive"]
1449        pub const _11: Self = Self::new(3);
1450    }
1451    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1452    pub struct Eofr_SPEC;
1453    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
1454    impl Eofr {
1455        #[doc = "Don\'t care"]
1456        pub const _00: Self = Self::new(0);
1457        #[doc = "Detect rising edge"]
1458        pub const _01: Self = Self::new(1);
1459        #[doc = "Detect falling edge"]
1460        pub const _10: Self = Self::new(2);
1461        #[doc = "Detect both edges"]
1462        pub const _11: Self = Self::new(3);
1463    }
1464    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1465    pub struct Isel_SPEC;
1466    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
1467    impl Isel {
1468        #[doc = "Do not use as IRQn input pin"]
1469        pub const _0: Self = Self::new(0);
1470        #[doc = "Use as IRQn input pin"]
1471        pub const _1: Self = Self::new(1);
1472    }
1473    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1474    pub struct Asel_SPEC;
1475    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
1476    impl Asel {
1477        #[doc = "Do not use as analog pin"]
1478        pub const _0: Self = Self::new(0);
1479        #[doc = "Use as analog pin"]
1480        pub const _1: Self = Self::new(1);
1481    }
1482    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1483    pub struct Pmr_SPEC;
1484    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
1485    impl Pmr {
1486        #[doc = "Use as general I/O pin"]
1487        pub const _0: Self = Self::new(0);
1488        #[doc = "Use as I/O port for peripheral functions"]
1489        pub const _1: Self = Self::new(1);
1490    }
1491}
1492#[doc(hidden)]
1493#[derive(Copy, Clone, Eq, PartialEq)]
1494pub struct P008PfsHa_SPEC;
1495impl crate::sealed::RegSpec for P008PfsHa_SPEC {
1496    type DataType = u16;
1497}
1498#[doc = "Port 008 Pin Function Select Register"]
1499pub type P008PfsHa = crate::RegValueT<P008PfsHa_SPEC>;
1500
1501impl P008PfsHa {
1502    #[doc = "Port Output Data"]
1503    #[inline(always)]
1504    pub fn podr(
1505        self,
1506    ) -> crate::common::RegisterField<
1507        0,
1508        0x1,
1509        1,
1510        0,
1511        p008pfs_ha::Podr,
1512        P008PfsHa_SPEC,
1513        crate::common::RW,
1514    > {
1515        crate::common::RegisterField::<
1516            0,
1517            0x1,
1518            1,
1519            0,
1520            p008pfs_ha::Podr,
1521            P008PfsHa_SPEC,
1522            crate::common::RW,
1523        >::from_register(self, 0)
1524    }
1525    #[doc = "Port State"]
1526    #[inline(always)]
1527    pub fn pidr(
1528        self,
1529    ) -> crate::common::RegisterField<
1530        1,
1531        0x1,
1532        1,
1533        0,
1534        p008pfs_ha::Pidr,
1535        P008PfsHa_SPEC,
1536        crate::common::R,
1537    > {
1538        crate::common::RegisterField::<
1539            1,
1540            0x1,
1541            1,
1542            0,
1543            p008pfs_ha::Pidr,
1544            P008PfsHa_SPEC,
1545            crate::common::R,
1546        >::from_register(self, 0)
1547    }
1548    #[doc = "Port Direction"]
1549    #[inline(always)]
1550    pub fn pdr(
1551        self,
1552    ) -> crate::common::RegisterField<
1553        2,
1554        0x1,
1555        1,
1556        0,
1557        p008pfs_ha::Pdr,
1558        P008PfsHa_SPEC,
1559        crate::common::RW,
1560    > {
1561        crate::common::RegisterField::<
1562            2,
1563            0x1,
1564            1,
1565            0,
1566            p008pfs_ha::Pdr,
1567            P008PfsHa_SPEC,
1568            crate::common::RW,
1569        >::from_register(self, 0)
1570    }
1571    #[doc = "Pull-up Control"]
1572    #[inline(always)]
1573    pub fn pcr(
1574        self,
1575    ) -> crate::common::RegisterField<
1576        4,
1577        0x1,
1578        1,
1579        0,
1580        p008pfs_ha::Pcr,
1581        P008PfsHa_SPEC,
1582        crate::common::RW,
1583    > {
1584        crate::common::RegisterField::<
1585            4,
1586            0x1,
1587            1,
1588            0,
1589            p008pfs_ha::Pcr,
1590            P008PfsHa_SPEC,
1591            crate::common::RW,
1592        >::from_register(self, 0)
1593    }
1594    #[doc = "N-Channel Open-Drain Control"]
1595    #[inline(always)]
1596    pub fn ncodr(
1597        self,
1598    ) -> crate::common::RegisterField<
1599        6,
1600        0x1,
1601        1,
1602        0,
1603        p008pfs_ha::Ncodr,
1604        P008PfsHa_SPEC,
1605        crate::common::RW,
1606    > {
1607        crate::common::RegisterField::<
1608            6,
1609            0x1,
1610            1,
1611            0,
1612            p008pfs_ha::Ncodr,
1613            P008PfsHa_SPEC,
1614            crate::common::RW,
1615        >::from_register(self, 0)
1616    }
1617    #[doc = "Port Drive Capability"]
1618    #[inline(always)]
1619    pub fn dscr(
1620        self,
1621    ) -> crate::common::RegisterField<
1622        10,
1623        0x3,
1624        1,
1625        0,
1626        p008pfs_ha::Dscr,
1627        P008PfsHa_SPEC,
1628        crate::common::RW,
1629    > {
1630        crate::common::RegisterField::<
1631            10,
1632            0x3,
1633            1,
1634            0,
1635            p008pfs_ha::Dscr,
1636            P008PfsHa_SPEC,
1637            crate::common::RW,
1638        >::from_register(self, 0)
1639    }
1640    #[doc = "Event on Falling/Event on Rising"]
1641    #[inline(always)]
1642    pub fn eofr(
1643        self,
1644    ) -> crate::common::RegisterField<
1645        12,
1646        0x3,
1647        1,
1648        0,
1649        p008pfs_ha::Eofr,
1650        P008PfsHa_SPEC,
1651        crate::common::RW,
1652    > {
1653        crate::common::RegisterField::<
1654            12,
1655            0x3,
1656            1,
1657            0,
1658            p008pfs_ha::Eofr,
1659            P008PfsHa_SPEC,
1660            crate::common::RW,
1661        >::from_register(self, 0)
1662    }
1663    #[doc = "IRQ Input Enable"]
1664    #[inline(always)]
1665    pub fn isel(
1666        self,
1667    ) -> crate::common::RegisterField<
1668        14,
1669        0x1,
1670        1,
1671        0,
1672        p008pfs_ha::Isel,
1673        P008PfsHa_SPEC,
1674        crate::common::RW,
1675    > {
1676        crate::common::RegisterField::<
1677            14,
1678            0x1,
1679            1,
1680            0,
1681            p008pfs_ha::Isel,
1682            P008PfsHa_SPEC,
1683            crate::common::RW,
1684        >::from_register(self, 0)
1685    }
1686    #[doc = "Analog Input Enable"]
1687    #[inline(always)]
1688    pub fn asel(
1689        self,
1690    ) -> crate::common::RegisterField<
1691        15,
1692        0x1,
1693        1,
1694        0,
1695        p008pfs_ha::Asel,
1696        P008PfsHa_SPEC,
1697        crate::common::RW,
1698    > {
1699        crate::common::RegisterField::<
1700            15,
1701            0x1,
1702            1,
1703            0,
1704            p008pfs_ha::Asel,
1705            P008PfsHa_SPEC,
1706            crate::common::RW,
1707        >::from_register(self, 0)
1708    }
1709}
1710impl ::core::default::Default for P008PfsHa {
1711    #[inline(always)]
1712    fn default() -> P008PfsHa {
1713        <crate::RegValueT<P008PfsHa_SPEC> as RegisterValue<_>>::new(1040)
1714    }
1715}
1716pub mod p008pfs_ha {
1717
1718    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1719    pub struct Podr_SPEC;
1720    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
1721    impl Podr {
1722        #[doc = "Output low"]
1723        pub const _0: Self = Self::new(0);
1724        #[doc = "Output high"]
1725        pub const _1: Self = Self::new(1);
1726    }
1727    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1728    pub struct Pidr_SPEC;
1729    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
1730    impl Pidr {
1731        #[doc = "Low level"]
1732        pub const _0: Self = Self::new(0);
1733        #[doc = "High level"]
1734        pub const _1: Self = Self::new(1);
1735    }
1736    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1737    pub struct Pdr_SPEC;
1738    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
1739    impl Pdr {
1740        #[doc = "Input (functions as an input pin)"]
1741        pub const _0: Self = Self::new(0);
1742        #[doc = "Output (functions as an output pin)"]
1743        pub const _1: Self = Self::new(1);
1744    }
1745    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1746    pub struct Pcr_SPEC;
1747    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
1748    impl Pcr {
1749        #[doc = "Disable input pull-up"]
1750        pub const _0: Self = Self::new(0);
1751        #[doc = "Enable input pull-up"]
1752        pub const _1: Self = Self::new(1);
1753    }
1754    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1755    pub struct Ncodr_SPEC;
1756    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
1757    impl Ncodr {
1758        #[doc = "Output CMOS"]
1759        pub const _0: Self = Self::new(0);
1760        #[doc = "Output NMOS open-drain"]
1761        pub const _1: Self = Self::new(1);
1762    }
1763    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1764    pub struct Dscr_SPEC;
1765    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
1766    impl Dscr {
1767        #[doc = "Low drive"]
1768        pub const _00: Self = Self::new(0);
1769        #[doc = "Middle drive"]
1770        pub const _01: Self = Self::new(1);
1771        #[doc = "Setting prohibited"]
1772        pub const _10: Self = Self::new(2);
1773        #[doc = "High drive"]
1774        pub const _11: Self = Self::new(3);
1775    }
1776    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1777    pub struct Eofr_SPEC;
1778    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
1779    impl Eofr {
1780        #[doc = "Don\'t care"]
1781        pub const _00: Self = Self::new(0);
1782        #[doc = "Detect rising edge"]
1783        pub const _01: Self = Self::new(1);
1784        #[doc = "Detect falling edge"]
1785        pub const _10: Self = Self::new(2);
1786        #[doc = "Detect both edges"]
1787        pub const _11: Self = Self::new(3);
1788    }
1789    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1790    pub struct Isel_SPEC;
1791    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
1792    impl Isel {
1793        #[doc = "Do not use as IRQn input pin"]
1794        pub const _0: Self = Self::new(0);
1795        #[doc = "Use as IRQn input pin"]
1796        pub const _1: Self = Self::new(1);
1797    }
1798    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1799    pub struct Asel_SPEC;
1800    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
1801    impl Asel {
1802        #[doc = "Do not use as analog pin"]
1803        pub const _0: Self = Self::new(0);
1804        #[doc = "Use as analog pin"]
1805        pub const _1: Self = Self::new(1);
1806    }
1807}
1808#[doc(hidden)]
1809#[derive(Copy, Clone, Eq, PartialEq)]
1810pub struct P008PfsBy_SPEC;
1811impl crate::sealed::RegSpec for P008PfsBy_SPEC {
1812    type DataType = u8;
1813}
1814#[doc = "Port 008 Pin Function Select Register"]
1815pub type P008PfsBy = crate::RegValueT<P008PfsBy_SPEC>;
1816
1817impl P008PfsBy {
1818    #[doc = "Port Output Data"]
1819    #[inline(always)]
1820    pub fn podr(
1821        self,
1822    ) -> crate::common::RegisterField<
1823        0,
1824        0x1,
1825        1,
1826        0,
1827        p008pfs_by::Podr,
1828        P008PfsBy_SPEC,
1829        crate::common::RW,
1830    > {
1831        crate::common::RegisterField::<
1832            0,
1833            0x1,
1834            1,
1835            0,
1836            p008pfs_by::Podr,
1837            P008PfsBy_SPEC,
1838            crate::common::RW,
1839        >::from_register(self, 0)
1840    }
1841    #[doc = "Port State"]
1842    #[inline(always)]
1843    pub fn pidr(
1844        self,
1845    ) -> crate::common::RegisterField<
1846        1,
1847        0x1,
1848        1,
1849        0,
1850        p008pfs_by::Pidr,
1851        P008PfsBy_SPEC,
1852        crate::common::R,
1853    > {
1854        crate::common::RegisterField::<
1855            1,
1856            0x1,
1857            1,
1858            0,
1859            p008pfs_by::Pidr,
1860            P008PfsBy_SPEC,
1861            crate::common::R,
1862        >::from_register(self, 0)
1863    }
1864    #[doc = "Port Direction"]
1865    #[inline(always)]
1866    pub fn pdr(
1867        self,
1868    ) -> crate::common::RegisterField<
1869        2,
1870        0x1,
1871        1,
1872        0,
1873        p008pfs_by::Pdr,
1874        P008PfsBy_SPEC,
1875        crate::common::RW,
1876    > {
1877        crate::common::RegisterField::<
1878            2,
1879            0x1,
1880            1,
1881            0,
1882            p008pfs_by::Pdr,
1883            P008PfsBy_SPEC,
1884            crate::common::RW,
1885        >::from_register(self, 0)
1886    }
1887    #[doc = "Pull-up Control"]
1888    #[inline(always)]
1889    pub fn pcr(
1890        self,
1891    ) -> crate::common::RegisterField<
1892        4,
1893        0x1,
1894        1,
1895        0,
1896        p008pfs_by::Pcr,
1897        P008PfsBy_SPEC,
1898        crate::common::RW,
1899    > {
1900        crate::common::RegisterField::<
1901            4,
1902            0x1,
1903            1,
1904            0,
1905            p008pfs_by::Pcr,
1906            P008PfsBy_SPEC,
1907            crate::common::RW,
1908        >::from_register(self, 0)
1909    }
1910    #[doc = "N-Channel Open-Drain Control"]
1911    #[inline(always)]
1912    pub fn ncodr(
1913        self,
1914    ) -> crate::common::RegisterField<
1915        6,
1916        0x1,
1917        1,
1918        0,
1919        p008pfs_by::Ncodr,
1920        P008PfsBy_SPEC,
1921        crate::common::RW,
1922    > {
1923        crate::common::RegisterField::<
1924            6,
1925            0x1,
1926            1,
1927            0,
1928            p008pfs_by::Ncodr,
1929            P008PfsBy_SPEC,
1930            crate::common::RW,
1931        >::from_register(self, 0)
1932    }
1933}
1934impl ::core::default::Default for P008PfsBy {
1935    #[inline(always)]
1936    fn default() -> P008PfsBy {
1937        <crate::RegValueT<P008PfsBy_SPEC> as RegisterValue<_>>::new(16)
1938    }
1939}
1940pub mod p008pfs_by {
1941
1942    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1943    pub struct Podr_SPEC;
1944    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
1945    impl Podr {
1946        #[doc = "Output low"]
1947        pub const _0: Self = Self::new(0);
1948        #[doc = "Output high"]
1949        pub const _1: Self = Self::new(1);
1950    }
1951    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1952    pub struct Pidr_SPEC;
1953    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
1954    impl Pidr {
1955        #[doc = "Low level"]
1956        pub const _0: Self = Self::new(0);
1957        #[doc = "High level"]
1958        pub const _1: Self = Self::new(1);
1959    }
1960    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1961    pub struct Pdr_SPEC;
1962    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
1963    impl Pdr {
1964        #[doc = "Input (functions as an input pin)"]
1965        pub const _0: Self = Self::new(0);
1966        #[doc = "Output (functions as an output pin)"]
1967        pub const _1: Self = Self::new(1);
1968    }
1969    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1970    pub struct Pcr_SPEC;
1971    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
1972    impl Pcr {
1973        #[doc = "Disable input pull-up"]
1974        pub const _0: Self = Self::new(0);
1975        #[doc = "Enable input pull-up"]
1976        pub const _1: Self = Self::new(1);
1977    }
1978    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1979    pub struct Ncodr_SPEC;
1980    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
1981    impl Ncodr {
1982        #[doc = "Output CMOS"]
1983        pub const _0: Self = Self::new(0);
1984        #[doc = "Output NMOS open-drain"]
1985        pub const _1: Self = Self::new(1);
1986    }
1987}
1988#[doc(hidden)]
1989#[derive(Copy, Clone, Eq, PartialEq)]
1990pub struct P0Pfs_SPEC;
1991impl crate::sealed::RegSpec for P0Pfs_SPEC {
1992    type DataType = u32;
1993}
1994#[doc = "Port 0%s Pin Function Select Register"]
1995pub type P0Pfs = crate::RegValueT<P0Pfs_SPEC>;
1996
1997impl P0Pfs {
1998    #[doc = "Port Output Data"]
1999    #[inline(always)]
2000    pub fn podr(
2001        self,
2002    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p0pfs::Podr, P0Pfs_SPEC, crate::common::RW>
2003    {
2004        crate::common::RegisterField::<0,0x1,1,0,p0pfs::Podr, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2005    }
2006    #[doc = "Port State"]
2007    #[inline(always)]
2008    pub fn pidr(
2009        self,
2010    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p0pfs::Pidr, P0Pfs_SPEC, crate::common::R> {
2011        crate::common::RegisterField::<1,0x1,1,0,p0pfs::Pidr, P0Pfs_SPEC,crate::common::R>::from_register(self,0)
2012    }
2013    #[doc = "Port Direction"]
2014    #[inline(always)]
2015    pub fn pdr(
2016        self,
2017    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p0pfs::Pdr, P0Pfs_SPEC, crate::common::RW> {
2018        crate::common::RegisterField::<2,0x1,1,0,p0pfs::Pdr, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2019    }
2020    #[doc = "Pull-up Control"]
2021    #[inline(always)]
2022    pub fn pcr(
2023        self,
2024    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p0pfs::Pcr, P0Pfs_SPEC, crate::common::RW> {
2025        crate::common::RegisterField::<4,0x1,1,0,p0pfs::Pcr, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2026    }
2027    #[doc = "N-Channel Open-Drain Control"]
2028    #[inline(always)]
2029    pub fn ncodr(
2030        self,
2031    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p0pfs::Ncodr, P0Pfs_SPEC, crate::common::RW>
2032    {
2033        crate::common::RegisterField::<6,0x1,1,0,p0pfs::Ncodr, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2034    }
2035    #[doc = "Port Drive Capability"]
2036    #[inline(always)]
2037    pub fn dscr(
2038        self,
2039    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p0pfs::Dscr, P0Pfs_SPEC, crate::common::RW>
2040    {
2041        crate::common::RegisterField::<10,0x3,1,0,p0pfs::Dscr, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2042    }
2043    #[doc = "Event on Falling/Event on Rising"]
2044    #[inline(always)]
2045    pub fn eofr(
2046        self,
2047    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p0pfs::Eofr, P0Pfs_SPEC, crate::common::RW>
2048    {
2049        crate::common::RegisterField::<12,0x3,1,0,p0pfs::Eofr, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2050    }
2051    #[doc = "IRQ Input Enable"]
2052    #[inline(always)]
2053    pub fn isel(
2054        self,
2055    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p0pfs::Isel, P0Pfs_SPEC, crate::common::RW>
2056    {
2057        crate::common::RegisterField::<14,0x1,1,0,p0pfs::Isel, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2058    }
2059    #[doc = "Analog Input Enable"]
2060    #[inline(always)]
2061    pub fn asel(
2062        self,
2063    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p0pfs::Asel, P0Pfs_SPEC, crate::common::RW>
2064    {
2065        crate::common::RegisterField::<15,0x1,1,0,p0pfs::Asel, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2066    }
2067    #[doc = "Port Mode Control"]
2068    #[inline(always)]
2069    pub fn pmr(
2070        self,
2071    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p0pfs::Pmr, P0Pfs_SPEC, crate::common::RW>
2072    {
2073        crate::common::RegisterField::<16,0x1,1,0,p0pfs::Pmr, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2074    }
2075    #[doc = "Peripheral Select"]
2076    #[inline(always)]
2077    pub fn psel(
2078        self,
2079    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P0Pfs_SPEC, crate::common::RW> {
2080        crate::common::RegisterField::<24,0x1f,1,0,u8, P0Pfs_SPEC,crate::common::RW>::from_register(self,0)
2081    }
2082}
2083impl ::core::default::Default for P0Pfs {
2084    #[inline(always)]
2085    fn default() -> P0Pfs {
2086        <crate::RegValueT<P0Pfs_SPEC> as RegisterValue<_>>::new(0)
2087    }
2088}
2089pub mod p0pfs {
2090
2091    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2092    pub struct Podr_SPEC;
2093    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
2094    impl Podr {
2095        #[doc = "Output low"]
2096        pub const _0: Self = Self::new(0);
2097        #[doc = "Output high"]
2098        pub const _1: Self = Self::new(1);
2099    }
2100    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2101    pub struct Pidr_SPEC;
2102    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
2103    impl Pidr {
2104        #[doc = "Low level"]
2105        pub const _0: Self = Self::new(0);
2106        #[doc = "High level"]
2107        pub const _1: Self = Self::new(1);
2108    }
2109    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2110    pub struct Pdr_SPEC;
2111    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
2112    impl Pdr {
2113        #[doc = "Input (functions as an input pin)"]
2114        pub const _0: Self = Self::new(0);
2115        #[doc = "Output (functions as an output pin)"]
2116        pub const _1: Self = Self::new(1);
2117    }
2118    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2119    pub struct Pcr_SPEC;
2120    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
2121    impl Pcr {
2122        #[doc = "Disable input pull-up"]
2123        pub const _0: Self = Self::new(0);
2124        #[doc = "Enable input pull-up"]
2125        pub const _1: Self = Self::new(1);
2126    }
2127    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2128    pub struct Ncodr_SPEC;
2129    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
2130    impl Ncodr {
2131        #[doc = "Output CMOS"]
2132        pub const _0: Self = Self::new(0);
2133        #[doc = "Output NMOS open-drain"]
2134        pub const _1: Self = Self::new(1);
2135    }
2136    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2137    pub struct Dscr_SPEC;
2138    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
2139    impl Dscr {
2140        #[doc = "Low drive"]
2141        pub const _00: Self = Self::new(0);
2142        #[doc = "Middle drive"]
2143        pub const _01: Self = Self::new(1);
2144        #[doc = "Setting prohibited"]
2145        pub const _10: Self = Self::new(2);
2146        #[doc = "High drive"]
2147        pub const _11: Self = Self::new(3);
2148    }
2149    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2150    pub struct Eofr_SPEC;
2151    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
2152    impl Eofr {
2153        #[doc = "Don\'t care"]
2154        pub const _00: Self = Self::new(0);
2155        #[doc = "Detect rising edge"]
2156        pub const _01: Self = Self::new(1);
2157        #[doc = "Detect falling edge"]
2158        pub const _10: Self = Self::new(2);
2159        #[doc = "Detect both edges"]
2160        pub const _11: Self = Self::new(3);
2161    }
2162    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2163    pub struct Isel_SPEC;
2164    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
2165    impl Isel {
2166        #[doc = "Do not use as IRQn input pin"]
2167        pub const _0: Self = Self::new(0);
2168        #[doc = "Use as IRQn input pin"]
2169        pub const _1: Self = Self::new(1);
2170    }
2171    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2172    pub struct Asel_SPEC;
2173    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
2174    impl Asel {
2175        #[doc = "Do not use as analog pin"]
2176        pub const _0: Self = Self::new(0);
2177        #[doc = "Use as analog pin"]
2178        pub const _1: Self = Self::new(1);
2179    }
2180    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2181    pub struct Pmr_SPEC;
2182    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
2183    impl Pmr {
2184        #[doc = "Use as general I/O pin"]
2185        pub const _0: Self = Self::new(0);
2186        #[doc = "Use as I/O port for peripheral functions"]
2187        pub const _1: Self = Self::new(1);
2188    }
2189}
2190#[doc(hidden)]
2191#[derive(Copy, Clone, Eq, PartialEq)]
2192pub struct P0PfsHa_SPEC;
2193impl crate::sealed::RegSpec for P0PfsHa_SPEC {
2194    type DataType = u16;
2195}
2196#[doc = "Port 0%s Pin Function Select Register"]
2197pub type P0PfsHa = crate::RegValueT<P0PfsHa_SPEC>;
2198
2199impl P0PfsHa {
2200    #[doc = "Port Output Data"]
2201    #[inline(always)]
2202    pub fn podr(
2203        self,
2204    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p0pfs_ha::Podr, P0PfsHa_SPEC, crate::common::RW>
2205    {
2206        crate::common::RegisterField::<0,0x1,1,0,p0pfs_ha::Podr, P0PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2207    }
2208    #[doc = "Port State"]
2209    #[inline(always)]
2210    pub fn pidr(
2211        self,
2212    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p0pfs_ha::Pidr, P0PfsHa_SPEC, crate::common::R>
2213    {
2214        crate::common::RegisterField::<1,0x1,1,0,p0pfs_ha::Pidr, P0PfsHa_SPEC,crate::common::R>::from_register(self,0)
2215    }
2216    #[doc = "Port Direction"]
2217    #[inline(always)]
2218    pub fn pdr(
2219        self,
2220    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p0pfs_ha::Pdr, P0PfsHa_SPEC, crate::common::RW>
2221    {
2222        crate::common::RegisterField::<2,0x1,1,0,p0pfs_ha::Pdr, P0PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2223    }
2224    #[doc = "Pull-up Control"]
2225    #[inline(always)]
2226    pub fn pcr(
2227        self,
2228    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p0pfs_ha::Pcr, P0PfsHa_SPEC, crate::common::RW>
2229    {
2230        crate::common::RegisterField::<4,0x1,1,0,p0pfs_ha::Pcr, P0PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2231    }
2232    #[doc = "N-Channel Open-Drain Control"]
2233    #[inline(always)]
2234    pub fn ncodr(
2235        self,
2236    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p0pfs_ha::Ncodr, P0PfsHa_SPEC, crate::common::RW>
2237    {
2238        crate::common::RegisterField::<6,0x1,1,0,p0pfs_ha::Ncodr, P0PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2239    }
2240    #[doc = "Port Drive Capability"]
2241    #[inline(always)]
2242    pub fn dscr(
2243        self,
2244    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p0pfs_ha::Dscr, P0PfsHa_SPEC, crate::common::RW>
2245    {
2246        crate::common::RegisterField::<10,0x3,1,0,p0pfs_ha::Dscr, P0PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2247    }
2248    #[doc = "Event on Falling/Event on Rising"]
2249    #[inline(always)]
2250    pub fn eofr(
2251        self,
2252    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p0pfs_ha::Eofr, P0PfsHa_SPEC, crate::common::RW>
2253    {
2254        crate::common::RegisterField::<12,0x3,1,0,p0pfs_ha::Eofr, P0PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2255    }
2256    #[doc = "IRQ Input Enable"]
2257    #[inline(always)]
2258    pub fn isel(
2259        self,
2260    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p0pfs_ha::Isel, P0PfsHa_SPEC, crate::common::RW>
2261    {
2262        crate::common::RegisterField::<14,0x1,1,0,p0pfs_ha::Isel, P0PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2263    }
2264    #[doc = "Analog Input Enable"]
2265    #[inline(always)]
2266    pub fn asel(
2267        self,
2268    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p0pfs_ha::Asel, P0PfsHa_SPEC, crate::common::RW>
2269    {
2270        crate::common::RegisterField::<15,0x1,1,0,p0pfs_ha::Asel, P0PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2271    }
2272}
2273impl ::core::default::Default for P0PfsHa {
2274    #[inline(always)]
2275    fn default() -> P0PfsHa {
2276        <crate::RegValueT<P0PfsHa_SPEC> as RegisterValue<_>>::new(0)
2277    }
2278}
2279pub mod p0pfs_ha {
2280
2281    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2282    pub struct Podr_SPEC;
2283    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
2284    impl Podr {
2285        #[doc = "Output low"]
2286        pub const _0: Self = Self::new(0);
2287        #[doc = "Output high"]
2288        pub const _1: Self = Self::new(1);
2289    }
2290    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2291    pub struct Pidr_SPEC;
2292    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
2293    impl Pidr {
2294        #[doc = "Low level"]
2295        pub const _0: Self = Self::new(0);
2296        #[doc = "High level"]
2297        pub const _1: Self = Self::new(1);
2298    }
2299    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2300    pub struct Pdr_SPEC;
2301    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
2302    impl Pdr {
2303        #[doc = "Input (functions as an input pin)"]
2304        pub const _0: Self = Self::new(0);
2305        #[doc = "Output (functions as an output pin)"]
2306        pub const _1: Self = Self::new(1);
2307    }
2308    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2309    pub struct Pcr_SPEC;
2310    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
2311    impl Pcr {
2312        #[doc = "Disable input pull-up"]
2313        pub const _0: Self = Self::new(0);
2314        #[doc = "Enable input pull-up"]
2315        pub const _1: Self = Self::new(1);
2316    }
2317    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2318    pub struct Ncodr_SPEC;
2319    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
2320    impl Ncodr {
2321        #[doc = "Output CMOS"]
2322        pub const _0: Self = Self::new(0);
2323        #[doc = "Output NMOS open-drain"]
2324        pub const _1: Self = Self::new(1);
2325    }
2326    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2327    pub struct Dscr_SPEC;
2328    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
2329    impl Dscr {
2330        #[doc = "Low drive"]
2331        pub const _00: Self = Self::new(0);
2332        #[doc = "Middle drive"]
2333        pub const _01: Self = Self::new(1);
2334        #[doc = "Setting prohibited"]
2335        pub const _10: Self = Self::new(2);
2336        #[doc = "High drive"]
2337        pub const _11: Self = Self::new(3);
2338    }
2339    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2340    pub struct Eofr_SPEC;
2341    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
2342    impl Eofr {
2343        #[doc = "Don\'t care"]
2344        pub const _00: Self = Self::new(0);
2345        #[doc = "Detect rising edge"]
2346        pub const _01: Self = Self::new(1);
2347        #[doc = "Detect falling edge"]
2348        pub const _10: Self = Self::new(2);
2349        #[doc = "Detect both edges"]
2350        pub const _11: Self = Self::new(3);
2351    }
2352    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2353    pub struct Isel_SPEC;
2354    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
2355    impl Isel {
2356        #[doc = "Do not use as IRQn input pin"]
2357        pub const _0: Self = Self::new(0);
2358        #[doc = "Use as IRQn input pin"]
2359        pub const _1: Self = Self::new(1);
2360    }
2361    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2362    pub struct Asel_SPEC;
2363    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
2364    impl Asel {
2365        #[doc = "Do not use as analog pin"]
2366        pub const _0: Self = Self::new(0);
2367        #[doc = "Use as analog pin"]
2368        pub const _1: Self = Self::new(1);
2369    }
2370}
2371#[doc(hidden)]
2372#[derive(Copy, Clone, Eq, PartialEq)]
2373pub struct P0PfsBy_SPEC;
2374impl crate::sealed::RegSpec for P0PfsBy_SPEC {
2375    type DataType = u8;
2376}
2377#[doc = "Port 0%s Pin Function Select Register"]
2378pub type P0PfsBy = crate::RegValueT<P0PfsBy_SPEC>;
2379
2380impl P0PfsBy {
2381    #[doc = "Port Output Data"]
2382    #[inline(always)]
2383    pub fn podr(
2384        self,
2385    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p0pfs_by::Podr, P0PfsBy_SPEC, crate::common::RW>
2386    {
2387        crate::common::RegisterField::<0,0x1,1,0,p0pfs_by::Podr, P0PfsBy_SPEC,crate::common::RW>::from_register(self,0)
2388    }
2389    #[doc = "Port State"]
2390    #[inline(always)]
2391    pub fn pidr(
2392        self,
2393    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p0pfs_by::Pidr, P0PfsBy_SPEC, crate::common::R>
2394    {
2395        crate::common::RegisterField::<1,0x1,1,0,p0pfs_by::Pidr, P0PfsBy_SPEC,crate::common::R>::from_register(self,0)
2396    }
2397    #[doc = "Port Direction"]
2398    #[inline(always)]
2399    pub fn pdr(
2400        self,
2401    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p0pfs_by::Pdr, P0PfsBy_SPEC, crate::common::RW>
2402    {
2403        crate::common::RegisterField::<2,0x1,1,0,p0pfs_by::Pdr, P0PfsBy_SPEC,crate::common::RW>::from_register(self,0)
2404    }
2405    #[doc = "Pull-up Control"]
2406    #[inline(always)]
2407    pub fn pcr(
2408        self,
2409    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p0pfs_by::Pcr, P0PfsBy_SPEC, crate::common::RW>
2410    {
2411        crate::common::RegisterField::<4,0x1,1,0,p0pfs_by::Pcr, P0PfsBy_SPEC,crate::common::RW>::from_register(self,0)
2412    }
2413    #[doc = "N-Channel Open-Drain Control"]
2414    #[inline(always)]
2415    pub fn ncodr(
2416        self,
2417    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p0pfs_by::Ncodr, P0PfsBy_SPEC, crate::common::RW>
2418    {
2419        crate::common::RegisterField::<6,0x1,1,0,p0pfs_by::Ncodr, P0PfsBy_SPEC,crate::common::RW>::from_register(self,0)
2420    }
2421}
2422impl ::core::default::Default for P0PfsBy {
2423    #[inline(always)]
2424    fn default() -> P0PfsBy {
2425        <crate::RegValueT<P0PfsBy_SPEC> as RegisterValue<_>>::new(0)
2426    }
2427}
2428pub mod p0pfs_by {
2429
2430    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2431    pub struct Podr_SPEC;
2432    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
2433    impl Podr {
2434        #[doc = "Output low"]
2435        pub const _0: Self = Self::new(0);
2436        #[doc = "Output high"]
2437        pub const _1: Self = Self::new(1);
2438    }
2439    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2440    pub struct Pidr_SPEC;
2441    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
2442    impl Pidr {
2443        #[doc = "Low level"]
2444        pub const _0: Self = Self::new(0);
2445        #[doc = "High level"]
2446        pub const _1: Self = Self::new(1);
2447    }
2448    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2449    pub struct Pdr_SPEC;
2450    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
2451    impl Pdr {
2452        #[doc = "Input (functions as an input pin)"]
2453        pub const _0: Self = Self::new(0);
2454        #[doc = "Output (functions as an output pin)"]
2455        pub const _1: Self = Self::new(1);
2456    }
2457    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2458    pub struct Pcr_SPEC;
2459    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
2460    impl Pcr {
2461        #[doc = "Disable input pull-up"]
2462        pub const _0: Self = Self::new(0);
2463        #[doc = "Enable input pull-up"]
2464        pub const _1: Self = Self::new(1);
2465    }
2466    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2467    pub struct Ncodr_SPEC;
2468    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
2469    impl Ncodr {
2470        #[doc = "Output CMOS"]
2471        pub const _0: Self = Self::new(0);
2472        #[doc = "Output NMOS open-drain"]
2473        pub const _1: Self = Self::new(1);
2474    }
2475}
2476#[doc(hidden)]
2477#[derive(Copy, Clone, Eq, PartialEq)]
2478pub struct P10Pfs_SPEC;
2479impl crate::sealed::RegSpec for P10Pfs_SPEC {
2480    type DataType = u32;
2481}
2482#[doc = "Port 10%s Pin Function Select Register"]
2483pub type P10Pfs = crate::RegValueT<P10Pfs_SPEC>;
2484
2485impl P10Pfs {
2486    #[doc = "Port Output Data"]
2487    #[inline(always)]
2488    pub fn podr(
2489        self,
2490    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p10pfs::Podr, P10Pfs_SPEC, crate::common::RW>
2491    {
2492        crate::common::RegisterField::<0,0x1,1,0,p10pfs::Podr, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2493    }
2494    #[doc = "Port State"]
2495    #[inline(always)]
2496    pub fn pidr(
2497        self,
2498    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p10pfs::Pidr, P10Pfs_SPEC, crate::common::R>
2499    {
2500        crate::common::RegisterField::<1,0x1,1,0,p10pfs::Pidr, P10Pfs_SPEC,crate::common::R>::from_register(self,0)
2501    }
2502    #[doc = "Port Direction"]
2503    #[inline(always)]
2504    pub fn pdr(
2505        self,
2506    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p10pfs::Pdr, P10Pfs_SPEC, crate::common::RW>
2507    {
2508        crate::common::RegisterField::<2,0x1,1,0,p10pfs::Pdr, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2509    }
2510    #[doc = "Pull-up Control"]
2511    #[inline(always)]
2512    pub fn pcr(
2513        self,
2514    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p10pfs::Pcr, P10Pfs_SPEC, crate::common::RW>
2515    {
2516        crate::common::RegisterField::<4,0x1,1,0,p10pfs::Pcr, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2517    }
2518    #[doc = "N-Channel Open-Drain Control"]
2519    #[inline(always)]
2520    pub fn ncodr(
2521        self,
2522    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p10pfs::Ncodr, P10Pfs_SPEC, crate::common::RW>
2523    {
2524        crate::common::RegisterField::<6,0x1,1,0,p10pfs::Ncodr, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2525    }
2526    #[doc = "Port Drive Capability"]
2527    #[inline(always)]
2528    pub fn dscr(
2529        self,
2530    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p10pfs::Dscr, P10Pfs_SPEC, crate::common::RW>
2531    {
2532        crate::common::RegisterField::<10,0x3,1,0,p10pfs::Dscr, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2533    }
2534    #[doc = "Event on Falling/Event on Rising"]
2535    #[inline(always)]
2536    pub fn eofr(
2537        self,
2538    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p10pfs::Eofr, P10Pfs_SPEC, crate::common::RW>
2539    {
2540        crate::common::RegisterField::<12,0x3,1,0,p10pfs::Eofr, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2541    }
2542    #[doc = "IRQ Input Enable"]
2543    #[inline(always)]
2544    pub fn isel(
2545        self,
2546    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p10pfs::Isel, P10Pfs_SPEC, crate::common::RW>
2547    {
2548        crate::common::RegisterField::<14,0x1,1,0,p10pfs::Isel, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2549    }
2550    #[doc = "Analog Input Enable"]
2551    #[inline(always)]
2552    pub fn asel(
2553        self,
2554    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p10pfs::Asel, P10Pfs_SPEC, crate::common::RW>
2555    {
2556        crate::common::RegisterField::<15,0x1,1,0,p10pfs::Asel, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2557    }
2558    #[doc = "Port Mode Control"]
2559    #[inline(always)]
2560    pub fn pmr(
2561        self,
2562    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p10pfs::Pmr, P10Pfs_SPEC, crate::common::RW>
2563    {
2564        crate::common::RegisterField::<16,0x1,1,0,p10pfs::Pmr, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2565    }
2566    #[doc = "Peripheral Select"]
2567    #[inline(always)]
2568    pub fn psel(
2569        self,
2570    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P10Pfs_SPEC, crate::common::RW> {
2571        crate::common::RegisterField::<24,0x1f,1,0,u8, P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2572    }
2573}
2574impl ::core::default::Default for P10Pfs {
2575    #[inline(always)]
2576    fn default() -> P10Pfs {
2577        <crate::RegValueT<P10Pfs_SPEC> as RegisterValue<_>>::new(0)
2578    }
2579}
2580pub mod p10pfs {
2581
2582    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2583    pub struct Podr_SPEC;
2584    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
2585    impl Podr {
2586        #[doc = "Output low"]
2587        pub const _0: Self = Self::new(0);
2588        #[doc = "Output high"]
2589        pub const _1: Self = Self::new(1);
2590    }
2591    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2592    pub struct Pidr_SPEC;
2593    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
2594    impl Pidr {
2595        #[doc = "Low level"]
2596        pub const _0: Self = Self::new(0);
2597        #[doc = "High level"]
2598        pub const _1: Self = Self::new(1);
2599    }
2600    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2601    pub struct Pdr_SPEC;
2602    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
2603    impl Pdr {
2604        #[doc = "Input (functions as an input pin)"]
2605        pub const _0: Self = Self::new(0);
2606        #[doc = "Output (functions as an output pin)"]
2607        pub const _1: Self = Self::new(1);
2608    }
2609    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2610    pub struct Pcr_SPEC;
2611    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
2612    impl Pcr {
2613        #[doc = "Disable input pull-up"]
2614        pub const _0: Self = Self::new(0);
2615        #[doc = "Enable input pull-up"]
2616        pub const _1: Self = Self::new(1);
2617    }
2618    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2619    pub struct Ncodr_SPEC;
2620    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
2621    impl Ncodr {
2622        #[doc = "Output CMOS"]
2623        pub const _0: Self = Self::new(0);
2624        #[doc = "Output NMOS open-drain"]
2625        pub const _1: Self = Self::new(1);
2626    }
2627    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2628    pub struct Dscr_SPEC;
2629    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
2630    impl Dscr {
2631        #[doc = "Low drive"]
2632        pub const _00: Self = Self::new(0);
2633        #[doc = "Middle drive"]
2634        pub const _01: Self = Self::new(1);
2635        #[doc = "Setting prohibited"]
2636        pub const _10: Self = Self::new(2);
2637        #[doc = "High drive"]
2638        pub const _11: Self = Self::new(3);
2639    }
2640    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2641    pub struct Eofr_SPEC;
2642    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
2643    impl Eofr {
2644        #[doc = "Don\'t care"]
2645        pub const _00: Self = Self::new(0);
2646        #[doc = "Detect rising edge"]
2647        pub const _01: Self = Self::new(1);
2648        #[doc = "Detect falling edge"]
2649        pub const _10: Self = Self::new(2);
2650        #[doc = "Detect both edges"]
2651        pub const _11: Self = Self::new(3);
2652    }
2653    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2654    pub struct Isel_SPEC;
2655    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
2656    impl Isel {
2657        #[doc = "Do not use as IRQn input pin"]
2658        pub const _0: Self = Self::new(0);
2659        #[doc = "Use as IRQn input pin"]
2660        pub const _1: Self = Self::new(1);
2661    }
2662    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2663    pub struct Asel_SPEC;
2664    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
2665    impl Asel {
2666        #[doc = "Do not use as analog pin"]
2667        pub const _0: Self = Self::new(0);
2668        #[doc = "Use as analog pin"]
2669        pub const _1: Self = Self::new(1);
2670    }
2671    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2672    pub struct Pmr_SPEC;
2673    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
2674    impl Pmr {
2675        #[doc = "Use as general I/O pin"]
2676        pub const _0: Self = Self::new(0);
2677        #[doc = "Use as I/O port for peripheral functions"]
2678        pub const _1: Self = Self::new(1);
2679    }
2680}
2681#[doc(hidden)]
2682#[derive(Copy, Clone, Eq, PartialEq)]
2683pub struct P10PfsHa_SPEC;
2684impl crate::sealed::RegSpec for P10PfsHa_SPEC {
2685    type DataType = u16;
2686}
2687#[doc = "Port 10%s Pin Function Select Register"]
2688pub type P10PfsHa = crate::RegValueT<P10PfsHa_SPEC>;
2689
2690impl P10PfsHa {
2691    #[doc = "Port Output Data"]
2692    #[inline(always)]
2693    pub fn podr(
2694        self,
2695    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p10pfs_ha::Podr, P10PfsHa_SPEC, crate::common::RW>
2696    {
2697        crate::common::RegisterField::<
2698            0,
2699            0x1,
2700            1,
2701            0,
2702            p10pfs_ha::Podr,
2703            P10PfsHa_SPEC,
2704            crate::common::RW,
2705        >::from_register(self, 0)
2706    }
2707    #[doc = "Port State"]
2708    #[inline(always)]
2709    pub fn pidr(
2710        self,
2711    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p10pfs_ha::Pidr, P10PfsHa_SPEC, crate::common::R>
2712    {
2713        crate::common::RegisterField::<1,0x1,1,0,p10pfs_ha::Pidr, P10PfsHa_SPEC,crate::common::R>::from_register(self,0)
2714    }
2715    #[doc = "Port Direction"]
2716    #[inline(always)]
2717    pub fn pdr(
2718        self,
2719    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p10pfs_ha::Pdr, P10PfsHa_SPEC, crate::common::RW>
2720    {
2721        crate::common::RegisterField::<2,0x1,1,0,p10pfs_ha::Pdr, P10PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2722    }
2723    #[doc = "Pull-up Control"]
2724    #[inline(always)]
2725    pub fn pcr(
2726        self,
2727    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p10pfs_ha::Pcr, P10PfsHa_SPEC, crate::common::RW>
2728    {
2729        crate::common::RegisterField::<4,0x1,1,0,p10pfs_ha::Pcr, P10PfsHa_SPEC,crate::common::RW>::from_register(self,0)
2730    }
2731    #[doc = "N-Channel Open-Drain Control"]
2732    #[inline(always)]
2733    pub fn ncodr(
2734        self,
2735    ) -> crate::common::RegisterField<
2736        6,
2737        0x1,
2738        1,
2739        0,
2740        p10pfs_ha::Ncodr,
2741        P10PfsHa_SPEC,
2742        crate::common::RW,
2743    > {
2744        crate::common::RegisterField::<
2745            6,
2746            0x1,
2747            1,
2748            0,
2749            p10pfs_ha::Ncodr,
2750            P10PfsHa_SPEC,
2751            crate::common::RW,
2752        >::from_register(self, 0)
2753    }
2754    #[doc = "Port Drive Capability"]
2755    #[inline(always)]
2756    pub fn dscr(
2757        self,
2758    ) -> crate::common::RegisterField<
2759        10,
2760        0x3,
2761        1,
2762        0,
2763        p10pfs_ha::Dscr,
2764        P10PfsHa_SPEC,
2765        crate::common::RW,
2766    > {
2767        crate::common::RegisterField::<
2768            10,
2769            0x3,
2770            1,
2771            0,
2772            p10pfs_ha::Dscr,
2773            P10PfsHa_SPEC,
2774            crate::common::RW,
2775        >::from_register(self, 0)
2776    }
2777    #[doc = "Event on Falling/Event on Rising"]
2778    #[inline(always)]
2779    pub fn eofr(
2780        self,
2781    ) -> crate::common::RegisterField<
2782        12,
2783        0x3,
2784        1,
2785        0,
2786        p10pfs_ha::Eofr,
2787        P10PfsHa_SPEC,
2788        crate::common::RW,
2789    > {
2790        crate::common::RegisterField::<
2791            12,
2792            0x3,
2793            1,
2794            0,
2795            p10pfs_ha::Eofr,
2796            P10PfsHa_SPEC,
2797            crate::common::RW,
2798        >::from_register(self, 0)
2799    }
2800    #[doc = "IRQ Input Enable"]
2801    #[inline(always)]
2802    pub fn isel(
2803        self,
2804    ) -> crate::common::RegisterField<
2805        14,
2806        0x1,
2807        1,
2808        0,
2809        p10pfs_ha::Isel,
2810        P10PfsHa_SPEC,
2811        crate::common::RW,
2812    > {
2813        crate::common::RegisterField::<
2814            14,
2815            0x1,
2816            1,
2817            0,
2818            p10pfs_ha::Isel,
2819            P10PfsHa_SPEC,
2820            crate::common::RW,
2821        >::from_register(self, 0)
2822    }
2823    #[doc = "Analog Input Enable"]
2824    #[inline(always)]
2825    pub fn asel(
2826        self,
2827    ) -> crate::common::RegisterField<
2828        15,
2829        0x1,
2830        1,
2831        0,
2832        p10pfs_ha::Asel,
2833        P10PfsHa_SPEC,
2834        crate::common::RW,
2835    > {
2836        crate::common::RegisterField::<
2837            15,
2838            0x1,
2839            1,
2840            0,
2841            p10pfs_ha::Asel,
2842            P10PfsHa_SPEC,
2843            crate::common::RW,
2844        >::from_register(self, 0)
2845    }
2846}
2847impl ::core::default::Default for P10PfsHa {
2848    #[inline(always)]
2849    fn default() -> P10PfsHa {
2850        <crate::RegValueT<P10PfsHa_SPEC> as RegisterValue<_>>::new(0)
2851    }
2852}
2853pub mod p10pfs_ha {
2854
2855    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2856    pub struct Podr_SPEC;
2857    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
2858    impl Podr {
2859        #[doc = "Output low"]
2860        pub const _0: Self = Self::new(0);
2861        #[doc = "Output high"]
2862        pub const _1: Self = Self::new(1);
2863    }
2864    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2865    pub struct Pidr_SPEC;
2866    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
2867    impl Pidr {
2868        #[doc = "Low level"]
2869        pub const _0: Self = Self::new(0);
2870        #[doc = "High level"]
2871        pub const _1: Self = Self::new(1);
2872    }
2873    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2874    pub struct Pdr_SPEC;
2875    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
2876    impl Pdr {
2877        #[doc = "Input (functions as an input pin)"]
2878        pub const _0: Self = Self::new(0);
2879        #[doc = "Output (functions as an output pin)"]
2880        pub const _1: Self = Self::new(1);
2881    }
2882    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2883    pub struct Pcr_SPEC;
2884    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
2885    impl Pcr {
2886        #[doc = "Disable input pull-up"]
2887        pub const _0: Self = Self::new(0);
2888        #[doc = "Enable input pull-up"]
2889        pub const _1: Self = Self::new(1);
2890    }
2891    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2892    pub struct Ncodr_SPEC;
2893    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
2894    impl Ncodr {
2895        #[doc = "Output CMOS"]
2896        pub const _0: Self = Self::new(0);
2897        #[doc = "Output NMOS open-drain"]
2898        pub const _1: Self = Self::new(1);
2899    }
2900    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2901    pub struct Dscr_SPEC;
2902    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
2903    impl Dscr {
2904        #[doc = "Low drive"]
2905        pub const _00: Self = Self::new(0);
2906        #[doc = "Middle drive"]
2907        pub const _01: Self = Self::new(1);
2908        #[doc = "Setting prohibited"]
2909        pub const _10: Self = Self::new(2);
2910        #[doc = "High drive"]
2911        pub const _11: Self = Self::new(3);
2912    }
2913    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2914    pub struct Eofr_SPEC;
2915    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
2916    impl Eofr {
2917        #[doc = "Don\'t care"]
2918        pub const _00: Self = Self::new(0);
2919        #[doc = "Detect rising edge"]
2920        pub const _01: Self = Self::new(1);
2921        #[doc = "Detect falling edge"]
2922        pub const _10: Self = Self::new(2);
2923        #[doc = "Detect both edges"]
2924        pub const _11: Self = Self::new(3);
2925    }
2926    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2927    pub struct Isel_SPEC;
2928    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
2929    impl Isel {
2930        #[doc = "Do not use as IRQn input pin"]
2931        pub const _0: Self = Self::new(0);
2932        #[doc = "Use as IRQn input pin"]
2933        pub const _1: Self = Self::new(1);
2934    }
2935    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2936    pub struct Asel_SPEC;
2937    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
2938    impl Asel {
2939        #[doc = "Do not use as analog pin"]
2940        pub const _0: Self = Self::new(0);
2941        #[doc = "Use as analog pin"]
2942        pub const _1: Self = Self::new(1);
2943    }
2944}
2945#[doc(hidden)]
2946#[derive(Copy, Clone, Eq, PartialEq)]
2947pub struct P10PfsBy_SPEC;
2948impl crate::sealed::RegSpec for P10PfsBy_SPEC {
2949    type DataType = u8;
2950}
2951#[doc = "Port 10%s Pin Function Select Register"]
2952pub type P10PfsBy = crate::RegValueT<P10PfsBy_SPEC>;
2953
2954impl P10PfsBy {
2955    #[doc = "Port Output Data"]
2956    #[inline(always)]
2957    pub fn podr(
2958        self,
2959    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p10pfs_by::Podr, P10PfsBy_SPEC, crate::common::RW>
2960    {
2961        crate::common::RegisterField::<
2962            0,
2963            0x1,
2964            1,
2965            0,
2966            p10pfs_by::Podr,
2967            P10PfsBy_SPEC,
2968            crate::common::RW,
2969        >::from_register(self, 0)
2970    }
2971    #[doc = "Port State"]
2972    #[inline(always)]
2973    pub fn pidr(
2974        self,
2975    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p10pfs_by::Pidr, P10PfsBy_SPEC, crate::common::R>
2976    {
2977        crate::common::RegisterField::<1,0x1,1,0,p10pfs_by::Pidr, P10PfsBy_SPEC,crate::common::R>::from_register(self,0)
2978    }
2979    #[doc = "Port Direction"]
2980    #[inline(always)]
2981    pub fn pdr(
2982        self,
2983    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p10pfs_by::Pdr, P10PfsBy_SPEC, crate::common::RW>
2984    {
2985        crate::common::RegisterField::<2,0x1,1,0,p10pfs_by::Pdr, P10PfsBy_SPEC,crate::common::RW>::from_register(self,0)
2986    }
2987    #[doc = "Pull-up Control"]
2988    #[inline(always)]
2989    pub fn pcr(
2990        self,
2991    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p10pfs_by::Pcr, P10PfsBy_SPEC, crate::common::RW>
2992    {
2993        crate::common::RegisterField::<4,0x1,1,0,p10pfs_by::Pcr, P10PfsBy_SPEC,crate::common::RW>::from_register(self,0)
2994    }
2995    #[doc = "N-Channel Open-Drain Control"]
2996    #[inline(always)]
2997    pub fn ncodr(
2998        self,
2999    ) -> crate::common::RegisterField<
3000        6,
3001        0x1,
3002        1,
3003        0,
3004        p10pfs_by::Ncodr,
3005        P10PfsBy_SPEC,
3006        crate::common::RW,
3007    > {
3008        crate::common::RegisterField::<
3009            6,
3010            0x1,
3011            1,
3012            0,
3013            p10pfs_by::Ncodr,
3014            P10PfsBy_SPEC,
3015            crate::common::RW,
3016        >::from_register(self, 0)
3017    }
3018}
3019impl ::core::default::Default for P10PfsBy {
3020    #[inline(always)]
3021    fn default() -> P10PfsBy {
3022        <crate::RegValueT<P10PfsBy_SPEC> as RegisterValue<_>>::new(0)
3023    }
3024}
3025pub mod p10pfs_by {
3026
3027    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3028    pub struct Podr_SPEC;
3029    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3030    impl Podr {
3031        #[doc = "Output low"]
3032        pub const _0: Self = Self::new(0);
3033        #[doc = "Output high"]
3034        pub const _1: Self = Self::new(1);
3035    }
3036    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3037    pub struct Pidr_SPEC;
3038    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
3039    impl Pidr {
3040        #[doc = "Low level"]
3041        pub const _0: Self = Self::new(0);
3042        #[doc = "High level"]
3043        pub const _1: Self = Self::new(1);
3044    }
3045    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3046    pub struct Pdr_SPEC;
3047    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
3048    impl Pdr {
3049        #[doc = "Input (functions as an input pin)"]
3050        pub const _0: Self = Self::new(0);
3051        #[doc = "Output (functions as an output pin)"]
3052        pub const _1: Self = Self::new(1);
3053    }
3054    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3055    pub struct Pcr_SPEC;
3056    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
3057    impl Pcr {
3058        #[doc = "Disable input pull-up"]
3059        pub const _0: Self = Self::new(0);
3060        #[doc = "Enable input pull-up"]
3061        pub const _1: Self = Self::new(1);
3062    }
3063    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3064    pub struct Ncodr_SPEC;
3065    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
3066    impl Ncodr {
3067        #[doc = "Output CMOS"]
3068        pub const _0: Self = Self::new(0);
3069        #[doc = "Output NMOS open-drain"]
3070        pub const _1: Self = Self::new(1);
3071    }
3072}
3073#[doc(hidden)]
3074#[derive(Copy, Clone, Eq, PartialEq)]
3075pub struct P1Pfs_SPEC;
3076impl crate::sealed::RegSpec for P1Pfs_SPEC {
3077    type DataType = u32;
3078}
3079#[doc = "Port 1%s Pin Function Select Register"]
3080pub type P1Pfs = crate::RegValueT<P1Pfs_SPEC>;
3081
3082impl P1Pfs {
3083    #[doc = "Port Output Data"]
3084    #[inline(always)]
3085    pub fn podr(
3086        self,
3087    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p1pfs::Podr, P1Pfs_SPEC, crate::common::RW>
3088    {
3089        crate::common::RegisterField::<0,0x1,1,0,p1pfs::Podr, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3090    }
3091    #[doc = "Port State"]
3092    #[inline(always)]
3093    pub fn pidr(
3094        self,
3095    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p1pfs::Pidr, P1Pfs_SPEC, crate::common::R> {
3096        crate::common::RegisterField::<1,0x1,1,0,p1pfs::Pidr, P1Pfs_SPEC,crate::common::R>::from_register(self,0)
3097    }
3098    #[doc = "Port Direction"]
3099    #[inline(always)]
3100    pub fn pdr(
3101        self,
3102    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p1pfs::Pdr, P1Pfs_SPEC, crate::common::RW> {
3103        crate::common::RegisterField::<2,0x1,1,0,p1pfs::Pdr, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3104    }
3105    #[doc = "Pull-up Control"]
3106    #[inline(always)]
3107    pub fn pcr(
3108        self,
3109    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p1pfs::Pcr, P1Pfs_SPEC, crate::common::RW> {
3110        crate::common::RegisterField::<4,0x1,1,0,p1pfs::Pcr, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3111    }
3112    #[doc = "N-Channel Open-Drain Control"]
3113    #[inline(always)]
3114    pub fn ncodr(
3115        self,
3116    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p1pfs::Ncodr, P1Pfs_SPEC, crate::common::RW>
3117    {
3118        crate::common::RegisterField::<6,0x1,1,0,p1pfs::Ncodr, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3119    }
3120    #[doc = "Port Drive Capability"]
3121    #[inline(always)]
3122    pub fn dscr(
3123        self,
3124    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p1pfs::Dscr, P1Pfs_SPEC, crate::common::RW>
3125    {
3126        crate::common::RegisterField::<10,0x3,1,0,p1pfs::Dscr, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3127    }
3128    #[doc = "Event on Falling/Event on Rising"]
3129    #[inline(always)]
3130    pub fn eofr(
3131        self,
3132    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p1pfs::Eofr, P1Pfs_SPEC, crate::common::RW>
3133    {
3134        crate::common::RegisterField::<12,0x3,1,0,p1pfs::Eofr, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3135    }
3136    #[doc = "IRQ Input Enable"]
3137    #[inline(always)]
3138    pub fn isel(
3139        self,
3140    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p1pfs::Isel, P1Pfs_SPEC, crate::common::RW>
3141    {
3142        crate::common::RegisterField::<14,0x1,1,0,p1pfs::Isel, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3143    }
3144    #[doc = "Analog Input Enable"]
3145    #[inline(always)]
3146    pub fn asel(
3147        self,
3148    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p1pfs::Asel, P1Pfs_SPEC, crate::common::RW>
3149    {
3150        crate::common::RegisterField::<15,0x1,1,0,p1pfs::Asel, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3151    }
3152    #[doc = "Port Mode Control"]
3153    #[inline(always)]
3154    pub fn pmr(
3155        self,
3156    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p1pfs::Pmr, P1Pfs_SPEC, crate::common::RW>
3157    {
3158        crate::common::RegisterField::<16,0x1,1,0,p1pfs::Pmr, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3159    }
3160    #[doc = "Peripheral Select"]
3161    #[inline(always)]
3162    pub fn psel(
3163        self,
3164    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P1Pfs_SPEC, crate::common::RW> {
3165        crate::common::RegisterField::<24,0x1f,1,0,u8, P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3166    }
3167}
3168impl ::core::default::Default for P1Pfs {
3169    #[inline(always)]
3170    fn default() -> P1Pfs {
3171        <crate::RegValueT<P1Pfs_SPEC> as RegisterValue<_>>::new(0)
3172    }
3173}
3174pub mod p1pfs {
3175
3176    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3177    pub struct Podr_SPEC;
3178    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3179    impl Podr {
3180        #[doc = "Output low"]
3181        pub const _0: Self = Self::new(0);
3182        #[doc = "Output high"]
3183        pub const _1: Self = Self::new(1);
3184    }
3185    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3186    pub struct Pidr_SPEC;
3187    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
3188    impl Pidr {
3189        #[doc = "Low level"]
3190        pub const _0: Self = Self::new(0);
3191        #[doc = "High level"]
3192        pub const _1: Self = Self::new(1);
3193    }
3194    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3195    pub struct Pdr_SPEC;
3196    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
3197    impl Pdr {
3198        #[doc = "Input (functions as an input pin)"]
3199        pub const _0: Self = Self::new(0);
3200        #[doc = "Output (functions as an output pin)"]
3201        pub const _1: Self = Self::new(1);
3202    }
3203    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3204    pub struct Pcr_SPEC;
3205    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
3206    impl Pcr {
3207        #[doc = "Disable input pull-up"]
3208        pub const _0: Self = Self::new(0);
3209        #[doc = "Enable input pull-up"]
3210        pub const _1: Self = Self::new(1);
3211    }
3212    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3213    pub struct Ncodr_SPEC;
3214    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
3215    impl Ncodr {
3216        #[doc = "Output CMOS"]
3217        pub const _0: Self = Self::new(0);
3218        #[doc = "Output NMOS open-drain"]
3219        pub const _1: Self = Self::new(1);
3220    }
3221    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3222    pub struct Dscr_SPEC;
3223    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
3224    impl Dscr {
3225        #[doc = "Low drive"]
3226        pub const _00: Self = Self::new(0);
3227        #[doc = "Middle drive"]
3228        pub const _01: Self = Self::new(1);
3229        #[doc = "Setting prohibited"]
3230        pub const _10: Self = Self::new(2);
3231        #[doc = "High drive"]
3232        pub const _11: Self = Self::new(3);
3233    }
3234    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3235    pub struct Eofr_SPEC;
3236    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
3237    impl Eofr {
3238        #[doc = "Don\'t care"]
3239        pub const _00: Self = Self::new(0);
3240        #[doc = "Detect rising edge"]
3241        pub const _01: Self = Self::new(1);
3242        #[doc = "Detect falling edge"]
3243        pub const _10: Self = Self::new(2);
3244        #[doc = "Detect both edges"]
3245        pub const _11: Self = Self::new(3);
3246    }
3247    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3248    pub struct Isel_SPEC;
3249    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
3250    impl Isel {
3251        #[doc = "Do not use as IRQn input pin"]
3252        pub const _0: Self = Self::new(0);
3253        #[doc = "Use as IRQn input pin"]
3254        pub const _1: Self = Self::new(1);
3255    }
3256    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3257    pub struct Asel_SPEC;
3258    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
3259    impl Asel {
3260        #[doc = "Do not use as analog pin"]
3261        pub const _0: Self = Self::new(0);
3262        #[doc = "Use as analog pin"]
3263        pub const _1: Self = Self::new(1);
3264    }
3265    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3266    pub struct Pmr_SPEC;
3267    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
3268    impl Pmr {
3269        #[doc = "Use as general I/O pin"]
3270        pub const _0: Self = Self::new(0);
3271        #[doc = "Use as I/O port for peripheral functions"]
3272        pub const _1: Self = Self::new(1);
3273    }
3274}
3275#[doc(hidden)]
3276#[derive(Copy, Clone, Eq, PartialEq)]
3277pub struct P1PfsHa_SPEC;
3278impl crate::sealed::RegSpec for P1PfsHa_SPEC {
3279    type DataType = u16;
3280}
3281#[doc = "Port 1%s Pin Function Select Register"]
3282pub type P1PfsHa = crate::RegValueT<P1PfsHa_SPEC>;
3283
3284impl P1PfsHa {
3285    #[doc = "Port Output Data"]
3286    #[inline(always)]
3287    pub fn podr(
3288        self,
3289    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p1pfs_ha::Podr, P1PfsHa_SPEC, crate::common::RW>
3290    {
3291        crate::common::RegisterField::<0,0x1,1,0,p1pfs_ha::Podr, P1PfsHa_SPEC,crate::common::RW>::from_register(self,0)
3292    }
3293    #[doc = "Port State"]
3294    #[inline(always)]
3295    pub fn pidr(
3296        self,
3297    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p1pfs_ha::Pidr, P1PfsHa_SPEC, crate::common::R>
3298    {
3299        crate::common::RegisterField::<1,0x1,1,0,p1pfs_ha::Pidr, P1PfsHa_SPEC,crate::common::R>::from_register(self,0)
3300    }
3301    #[doc = "Port Direction"]
3302    #[inline(always)]
3303    pub fn pdr(
3304        self,
3305    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p1pfs_ha::Pdr, P1PfsHa_SPEC, crate::common::RW>
3306    {
3307        crate::common::RegisterField::<2,0x1,1,0,p1pfs_ha::Pdr, P1PfsHa_SPEC,crate::common::RW>::from_register(self,0)
3308    }
3309    #[doc = "Pull-up Control"]
3310    #[inline(always)]
3311    pub fn pcr(
3312        self,
3313    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p1pfs_ha::Pcr, P1PfsHa_SPEC, crate::common::RW>
3314    {
3315        crate::common::RegisterField::<4,0x1,1,0,p1pfs_ha::Pcr, P1PfsHa_SPEC,crate::common::RW>::from_register(self,0)
3316    }
3317    #[doc = "N-Channel Open-Drain Control"]
3318    #[inline(always)]
3319    pub fn ncodr(
3320        self,
3321    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p1pfs_ha::Ncodr, P1PfsHa_SPEC, crate::common::RW>
3322    {
3323        crate::common::RegisterField::<6,0x1,1,0,p1pfs_ha::Ncodr, P1PfsHa_SPEC,crate::common::RW>::from_register(self,0)
3324    }
3325    #[doc = "Port Drive Capability"]
3326    #[inline(always)]
3327    pub fn dscr(
3328        self,
3329    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p1pfs_ha::Dscr, P1PfsHa_SPEC, crate::common::RW>
3330    {
3331        crate::common::RegisterField::<10,0x3,1,0,p1pfs_ha::Dscr, P1PfsHa_SPEC,crate::common::RW>::from_register(self,0)
3332    }
3333    #[doc = "Event on Falling/Event on Rising"]
3334    #[inline(always)]
3335    pub fn eofr(
3336        self,
3337    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p1pfs_ha::Eofr, P1PfsHa_SPEC, crate::common::RW>
3338    {
3339        crate::common::RegisterField::<12,0x3,1,0,p1pfs_ha::Eofr, P1PfsHa_SPEC,crate::common::RW>::from_register(self,0)
3340    }
3341    #[doc = "IRQ Input Enable"]
3342    #[inline(always)]
3343    pub fn isel(
3344        self,
3345    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p1pfs_ha::Isel, P1PfsHa_SPEC, crate::common::RW>
3346    {
3347        crate::common::RegisterField::<14,0x1,1,0,p1pfs_ha::Isel, P1PfsHa_SPEC,crate::common::RW>::from_register(self,0)
3348    }
3349    #[doc = "Analog Input Enable"]
3350    #[inline(always)]
3351    pub fn asel(
3352        self,
3353    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p1pfs_ha::Asel, P1PfsHa_SPEC, crate::common::RW>
3354    {
3355        crate::common::RegisterField::<15,0x1,1,0,p1pfs_ha::Asel, P1PfsHa_SPEC,crate::common::RW>::from_register(self,0)
3356    }
3357}
3358impl ::core::default::Default for P1PfsHa {
3359    #[inline(always)]
3360    fn default() -> P1PfsHa {
3361        <crate::RegValueT<P1PfsHa_SPEC> as RegisterValue<_>>::new(0)
3362    }
3363}
3364pub mod p1pfs_ha {
3365
3366    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3367    pub struct Podr_SPEC;
3368    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3369    impl Podr {
3370        #[doc = "Output low"]
3371        pub const _0: Self = Self::new(0);
3372        #[doc = "Output high"]
3373        pub const _1: Self = Self::new(1);
3374    }
3375    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3376    pub struct Pidr_SPEC;
3377    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
3378    impl Pidr {
3379        #[doc = "Low level"]
3380        pub const _0: Self = Self::new(0);
3381        #[doc = "High level"]
3382        pub const _1: Self = Self::new(1);
3383    }
3384    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3385    pub struct Pdr_SPEC;
3386    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
3387    impl Pdr {
3388        #[doc = "Input (functions as an input pin)"]
3389        pub const _0: Self = Self::new(0);
3390        #[doc = "Output (functions as an output pin)"]
3391        pub const _1: Self = Self::new(1);
3392    }
3393    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3394    pub struct Pcr_SPEC;
3395    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
3396    impl Pcr {
3397        #[doc = "Disable input pull-up"]
3398        pub const _0: Self = Self::new(0);
3399        #[doc = "Enable input pull-up"]
3400        pub const _1: Self = Self::new(1);
3401    }
3402    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3403    pub struct Ncodr_SPEC;
3404    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
3405    impl Ncodr {
3406        #[doc = "Output CMOS"]
3407        pub const _0: Self = Self::new(0);
3408        #[doc = "Output NMOS open-drain"]
3409        pub const _1: Self = Self::new(1);
3410    }
3411    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3412    pub struct Dscr_SPEC;
3413    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
3414    impl Dscr {
3415        #[doc = "Low drive"]
3416        pub const _00: Self = Self::new(0);
3417        #[doc = "Middle drive"]
3418        pub const _01: Self = Self::new(1);
3419        #[doc = "Setting prohibited"]
3420        pub const _10: Self = Self::new(2);
3421        #[doc = "High drive"]
3422        pub const _11: Self = Self::new(3);
3423    }
3424    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3425    pub struct Eofr_SPEC;
3426    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
3427    impl Eofr {
3428        #[doc = "Don\'t care"]
3429        pub const _00: Self = Self::new(0);
3430        #[doc = "Detect rising edge"]
3431        pub const _01: Self = Self::new(1);
3432        #[doc = "Detect falling edge"]
3433        pub const _10: Self = Self::new(2);
3434        #[doc = "Detect both edges"]
3435        pub const _11: Self = Self::new(3);
3436    }
3437    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3438    pub struct Isel_SPEC;
3439    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
3440    impl Isel {
3441        #[doc = "Do not use as IRQn input pin"]
3442        pub const _0: Self = Self::new(0);
3443        #[doc = "Use as IRQn input pin"]
3444        pub const _1: Self = Self::new(1);
3445    }
3446    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3447    pub struct Asel_SPEC;
3448    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
3449    impl Asel {
3450        #[doc = "Do not use as analog pin"]
3451        pub const _0: Self = Self::new(0);
3452        #[doc = "Use as analog pin"]
3453        pub const _1: Self = Self::new(1);
3454    }
3455}
3456#[doc(hidden)]
3457#[derive(Copy, Clone, Eq, PartialEq)]
3458pub struct P1PfsBy_SPEC;
3459impl crate::sealed::RegSpec for P1PfsBy_SPEC {
3460    type DataType = u8;
3461}
3462#[doc = "Port 1%s Pin Function Select Register"]
3463pub type P1PfsBy = crate::RegValueT<P1PfsBy_SPEC>;
3464
3465impl P1PfsBy {
3466    #[doc = "Port Output Data"]
3467    #[inline(always)]
3468    pub fn podr(
3469        self,
3470    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p1pfs_by::Podr, P1PfsBy_SPEC, crate::common::RW>
3471    {
3472        crate::common::RegisterField::<0,0x1,1,0,p1pfs_by::Podr, P1PfsBy_SPEC,crate::common::RW>::from_register(self,0)
3473    }
3474    #[doc = "Port State"]
3475    #[inline(always)]
3476    pub fn pidr(
3477        self,
3478    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p1pfs_by::Pidr, P1PfsBy_SPEC, crate::common::R>
3479    {
3480        crate::common::RegisterField::<1,0x1,1,0,p1pfs_by::Pidr, P1PfsBy_SPEC,crate::common::R>::from_register(self,0)
3481    }
3482    #[doc = "Port Direction"]
3483    #[inline(always)]
3484    pub fn pdr(
3485        self,
3486    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p1pfs_by::Pdr, P1PfsBy_SPEC, crate::common::RW>
3487    {
3488        crate::common::RegisterField::<2,0x1,1,0,p1pfs_by::Pdr, P1PfsBy_SPEC,crate::common::RW>::from_register(self,0)
3489    }
3490    #[doc = "Pull-up Control"]
3491    #[inline(always)]
3492    pub fn pcr(
3493        self,
3494    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p1pfs_by::Pcr, P1PfsBy_SPEC, crate::common::RW>
3495    {
3496        crate::common::RegisterField::<4,0x1,1,0,p1pfs_by::Pcr, P1PfsBy_SPEC,crate::common::RW>::from_register(self,0)
3497    }
3498    #[doc = "N-Channel Open-Drain Control"]
3499    #[inline(always)]
3500    pub fn ncodr(
3501        self,
3502    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p1pfs_by::Ncodr, P1PfsBy_SPEC, crate::common::RW>
3503    {
3504        crate::common::RegisterField::<6,0x1,1,0,p1pfs_by::Ncodr, P1PfsBy_SPEC,crate::common::RW>::from_register(self,0)
3505    }
3506}
3507impl ::core::default::Default for P1PfsBy {
3508    #[inline(always)]
3509    fn default() -> P1PfsBy {
3510        <crate::RegValueT<P1PfsBy_SPEC> as RegisterValue<_>>::new(0)
3511    }
3512}
3513pub mod p1pfs_by {
3514
3515    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3516    pub struct Podr_SPEC;
3517    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3518    impl Podr {
3519        #[doc = "Output low"]
3520        pub const _0: Self = Self::new(0);
3521        #[doc = "Output high"]
3522        pub const _1: Self = Self::new(1);
3523    }
3524    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3525    pub struct Pidr_SPEC;
3526    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
3527    impl Pidr {
3528        #[doc = "Low level"]
3529        pub const _0: Self = Self::new(0);
3530        #[doc = "High level"]
3531        pub const _1: Self = Self::new(1);
3532    }
3533    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3534    pub struct Pdr_SPEC;
3535    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
3536    impl Pdr {
3537        #[doc = "Input (functions as an input pin)"]
3538        pub const _0: Self = Self::new(0);
3539        #[doc = "Output (functions as an output pin)"]
3540        pub const _1: Self = Self::new(1);
3541    }
3542    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3543    pub struct Pcr_SPEC;
3544    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
3545    impl Pcr {
3546        #[doc = "Disable input pull-up"]
3547        pub const _0: Self = Self::new(0);
3548        #[doc = "Enable input pull-up"]
3549        pub const _1: Self = Self::new(1);
3550    }
3551    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3552    pub struct Ncodr_SPEC;
3553    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
3554    impl Ncodr {
3555        #[doc = "Output CMOS"]
3556        pub const _0: Self = Self::new(0);
3557        #[doc = "Output NMOS open-drain"]
3558        pub const _1: Self = Self::new(1);
3559    }
3560}
3561#[doc(hidden)]
3562#[derive(Copy, Clone, Eq, PartialEq)]
3563pub struct P200Pfs_SPEC;
3564impl crate::sealed::RegSpec for P200Pfs_SPEC {
3565    type DataType = u32;
3566}
3567#[doc = "Port 200 Pin Function Select Register"]
3568pub type P200Pfs = crate::RegValueT<P200Pfs_SPEC>;
3569
3570impl P200Pfs {
3571    #[doc = "Port Output Data"]
3572    #[inline(always)]
3573    pub fn podr(
3574        self,
3575    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p200pfs::Podr, P200Pfs_SPEC, crate::common::RW>
3576    {
3577        crate::common::RegisterField::<0,0x1,1,0,p200pfs::Podr, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3578    }
3579    #[doc = "Port State"]
3580    #[inline(always)]
3581    pub fn pidr(
3582        self,
3583    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p200pfs::Pidr, P200Pfs_SPEC, crate::common::R>
3584    {
3585        crate::common::RegisterField::<1,0x1,1,0,p200pfs::Pidr, P200Pfs_SPEC,crate::common::R>::from_register(self,0)
3586    }
3587    #[doc = "Port Direction"]
3588    #[inline(always)]
3589    pub fn pdr(
3590        self,
3591    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p200pfs::Pdr, P200Pfs_SPEC, crate::common::RW>
3592    {
3593        crate::common::RegisterField::<2,0x1,1,0,p200pfs::Pdr, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3594    }
3595    #[doc = "Pull-up Control"]
3596    #[inline(always)]
3597    pub fn pcr(
3598        self,
3599    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p200pfs::Pcr, P200Pfs_SPEC, crate::common::RW>
3600    {
3601        crate::common::RegisterField::<4,0x1,1,0,p200pfs::Pcr, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3602    }
3603    #[doc = "N-Channel Open-Drain Control"]
3604    #[inline(always)]
3605    pub fn ncodr(
3606        self,
3607    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p200pfs::Ncodr, P200Pfs_SPEC, crate::common::RW>
3608    {
3609        crate::common::RegisterField::<6,0x1,1,0,p200pfs::Ncodr, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3610    }
3611    #[doc = "Port Drive Capability"]
3612    #[inline(always)]
3613    pub fn dscr(
3614        self,
3615    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p200pfs::Dscr, P200Pfs_SPEC, crate::common::RW>
3616    {
3617        crate::common::RegisterField::<10,0x3,1,0,p200pfs::Dscr, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3618    }
3619    #[doc = "Event on Falling/Event on Rising"]
3620    #[inline(always)]
3621    pub fn eofr(
3622        self,
3623    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p200pfs::Eofr, P200Pfs_SPEC, crate::common::RW>
3624    {
3625        crate::common::RegisterField::<12,0x3,1,0,p200pfs::Eofr, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3626    }
3627    #[doc = "IRQ Input Enable"]
3628    #[inline(always)]
3629    pub fn isel(
3630        self,
3631    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p200pfs::Isel, P200Pfs_SPEC, crate::common::RW>
3632    {
3633        crate::common::RegisterField::<14,0x1,1,0,p200pfs::Isel, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3634    }
3635    #[doc = "Analog Input Enable"]
3636    #[inline(always)]
3637    pub fn asel(
3638        self,
3639    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p200pfs::Asel, P200Pfs_SPEC, crate::common::RW>
3640    {
3641        crate::common::RegisterField::<15,0x1,1,0,p200pfs::Asel, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3642    }
3643    #[doc = "Port Mode Control"]
3644    #[inline(always)]
3645    pub fn pmr(
3646        self,
3647    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p200pfs::Pmr, P200Pfs_SPEC, crate::common::RW>
3648    {
3649        crate::common::RegisterField::<16,0x1,1,0,p200pfs::Pmr, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3650    }
3651    #[doc = "Peripheral Select"]
3652    #[inline(always)]
3653    pub fn psel(
3654        self,
3655    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P200Pfs_SPEC, crate::common::RW> {
3656        crate::common::RegisterField::<24,0x1f,1,0,u8, P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
3657    }
3658}
3659impl ::core::default::Default for P200Pfs {
3660    #[inline(always)]
3661    fn default() -> P200Pfs {
3662        <crate::RegValueT<P200Pfs_SPEC> as RegisterValue<_>>::new(0)
3663    }
3664}
3665pub mod p200pfs {
3666
3667    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3668    pub struct Podr_SPEC;
3669    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3670    impl Podr {
3671        #[doc = "Output low"]
3672        pub const _0: Self = Self::new(0);
3673        #[doc = "Output high"]
3674        pub const _1: Self = Self::new(1);
3675    }
3676    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3677    pub struct Pidr_SPEC;
3678    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
3679    impl Pidr {
3680        #[doc = "Low level"]
3681        pub const _0: Self = Self::new(0);
3682        #[doc = "High level"]
3683        pub const _1: Self = Self::new(1);
3684    }
3685    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3686    pub struct Pdr_SPEC;
3687    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
3688    impl Pdr {
3689        #[doc = "Input (functions as an input pin)"]
3690        pub const _0: Self = Self::new(0);
3691        #[doc = "Output (functions as an output pin)"]
3692        pub const _1: Self = Self::new(1);
3693    }
3694    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3695    pub struct Pcr_SPEC;
3696    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
3697    impl Pcr {
3698        #[doc = "Disable input pull-up"]
3699        pub const _0: Self = Self::new(0);
3700        #[doc = "Enable input pull-up"]
3701        pub const _1: Self = Self::new(1);
3702    }
3703    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3704    pub struct Ncodr_SPEC;
3705    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
3706    impl Ncodr {
3707        #[doc = "Output CMOS"]
3708        pub const _0: Self = Self::new(0);
3709        #[doc = "Output NMOS open-drain"]
3710        pub const _1: Self = Self::new(1);
3711    }
3712    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3713    pub struct Dscr_SPEC;
3714    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
3715    impl Dscr {
3716        #[doc = "Low drive"]
3717        pub const _00: Self = Self::new(0);
3718        #[doc = "Middle drive"]
3719        pub const _01: Self = Self::new(1);
3720        #[doc = "Setting prohibited"]
3721        pub const _10: Self = Self::new(2);
3722        #[doc = "High drive"]
3723        pub const _11: Self = Self::new(3);
3724    }
3725    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3726    pub struct Eofr_SPEC;
3727    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
3728    impl Eofr {
3729        #[doc = "Don\'t care"]
3730        pub const _00: Self = Self::new(0);
3731        #[doc = "Detect rising edge"]
3732        pub const _01: Self = Self::new(1);
3733        #[doc = "Detect falling edge"]
3734        pub const _10: Self = Self::new(2);
3735        #[doc = "Detect both edges"]
3736        pub const _11: Self = Self::new(3);
3737    }
3738    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3739    pub struct Isel_SPEC;
3740    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
3741    impl Isel {
3742        #[doc = "Do not use as IRQn input pin"]
3743        pub const _0: Self = Self::new(0);
3744        #[doc = "Use as IRQn input pin"]
3745        pub const _1: Self = Self::new(1);
3746    }
3747    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3748    pub struct Asel_SPEC;
3749    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
3750    impl Asel {
3751        #[doc = "Do not use as analog pin"]
3752        pub const _0: Self = Self::new(0);
3753        #[doc = "Use as analog pin"]
3754        pub const _1: Self = Self::new(1);
3755    }
3756    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3757    pub struct Pmr_SPEC;
3758    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
3759    impl Pmr {
3760        #[doc = "Use as general I/O pin"]
3761        pub const _0: Self = Self::new(0);
3762        #[doc = "Use as I/O port for peripheral functions"]
3763        pub const _1: Self = Self::new(1);
3764    }
3765}
3766#[doc(hidden)]
3767#[derive(Copy, Clone, Eq, PartialEq)]
3768pub struct P200PfsHa_SPEC;
3769impl crate::sealed::RegSpec for P200PfsHa_SPEC {
3770    type DataType = u16;
3771}
3772#[doc = "Port 200 Pin Function Select Register"]
3773pub type P200PfsHa = crate::RegValueT<P200PfsHa_SPEC>;
3774
3775impl P200PfsHa {
3776    #[doc = "Port Output Data"]
3777    #[inline(always)]
3778    pub fn podr(
3779        self,
3780    ) -> crate::common::RegisterField<
3781        0,
3782        0x1,
3783        1,
3784        0,
3785        p200pfs_ha::Podr,
3786        P200PfsHa_SPEC,
3787        crate::common::RW,
3788    > {
3789        crate::common::RegisterField::<
3790            0,
3791            0x1,
3792            1,
3793            0,
3794            p200pfs_ha::Podr,
3795            P200PfsHa_SPEC,
3796            crate::common::RW,
3797        >::from_register(self, 0)
3798    }
3799    #[doc = "Port State"]
3800    #[inline(always)]
3801    pub fn pidr(
3802        self,
3803    ) -> crate::common::RegisterField<
3804        1,
3805        0x1,
3806        1,
3807        0,
3808        p200pfs_ha::Pidr,
3809        P200PfsHa_SPEC,
3810        crate::common::R,
3811    > {
3812        crate::common::RegisterField::<
3813            1,
3814            0x1,
3815            1,
3816            0,
3817            p200pfs_ha::Pidr,
3818            P200PfsHa_SPEC,
3819            crate::common::R,
3820        >::from_register(self, 0)
3821    }
3822    #[doc = "Port Direction"]
3823    #[inline(always)]
3824    pub fn pdr(
3825        self,
3826    ) -> crate::common::RegisterField<
3827        2,
3828        0x1,
3829        1,
3830        0,
3831        p200pfs_ha::Pdr,
3832        P200PfsHa_SPEC,
3833        crate::common::RW,
3834    > {
3835        crate::common::RegisterField::<
3836            2,
3837            0x1,
3838            1,
3839            0,
3840            p200pfs_ha::Pdr,
3841            P200PfsHa_SPEC,
3842            crate::common::RW,
3843        >::from_register(self, 0)
3844    }
3845    #[doc = "Pull-up Control"]
3846    #[inline(always)]
3847    pub fn pcr(
3848        self,
3849    ) -> crate::common::RegisterField<
3850        4,
3851        0x1,
3852        1,
3853        0,
3854        p200pfs_ha::Pcr,
3855        P200PfsHa_SPEC,
3856        crate::common::RW,
3857    > {
3858        crate::common::RegisterField::<
3859            4,
3860            0x1,
3861            1,
3862            0,
3863            p200pfs_ha::Pcr,
3864            P200PfsHa_SPEC,
3865            crate::common::RW,
3866        >::from_register(self, 0)
3867    }
3868    #[doc = "N-Channel Open-Drain Control"]
3869    #[inline(always)]
3870    pub fn ncodr(
3871        self,
3872    ) -> crate::common::RegisterField<
3873        6,
3874        0x1,
3875        1,
3876        0,
3877        p200pfs_ha::Ncodr,
3878        P200PfsHa_SPEC,
3879        crate::common::RW,
3880    > {
3881        crate::common::RegisterField::<
3882            6,
3883            0x1,
3884            1,
3885            0,
3886            p200pfs_ha::Ncodr,
3887            P200PfsHa_SPEC,
3888            crate::common::RW,
3889        >::from_register(self, 0)
3890    }
3891    #[doc = "Port Drive Capability"]
3892    #[inline(always)]
3893    pub fn dscr(
3894        self,
3895    ) -> crate::common::RegisterField<
3896        10,
3897        0x3,
3898        1,
3899        0,
3900        p200pfs_ha::Dscr,
3901        P200PfsHa_SPEC,
3902        crate::common::RW,
3903    > {
3904        crate::common::RegisterField::<
3905            10,
3906            0x3,
3907            1,
3908            0,
3909            p200pfs_ha::Dscr,
3910            P200PfsHa_SPEC,
3911            crate::common::RW,
3912        >::from_register(self, 0)
3913    }
3914    #[doc = "Event on Falling/Event on Rising"]
3915    #[inline(always)]
3916    pub fn eofr(
3917        self,
3918    ) -> crate::common::RegisterField<
3919        12,
3920        0x3,
3921        1,
3922        0,
3923        p200pfs_ha::Eofr,
3924        P200PfsHa_SPEC,
3925        crate::common::RW,
3926    > {
3927        crate::common::RegisterField::<
3928            12,
3929            0x3,
3930            1,
3931            0,
3932            p200pfs_ha::Eofr,
3933            P200PfsHa_SPEC,
3934            crate::common::RW,
3935        >::from_register(self, 0)
3936    }
3937    #[doc = "IRQ Input Enable"]
3938    #[inline(always)]
3939    pub fn isel(
3940        self,
3941    ) -> crate::common::RegisterField<
3942        14,
3943        0x1,
3944        1,
3945        0,
3946        p200pfs_ha::Isel,
3947        P200PfsHa_SPEC,
3948        crate::common::RW,
3949    > {
3950        crate::common::RegisterField::<
3951            14,
3952            0x1,
3953            1,
3954            0,
3955            p200pfs_ha::Isel,
3956            P200PfsHa_SPEC,
3957            crate::common::RW,
3958        >::from_register(self, 0)
3959    }
3960    #[doc = "Analog Input Enable"]
3961    #[inline(always)]
3962    pub fn asel(
3963        self,
3964    ) -> crate::common::RegisterField<
3965        15,
3966        0x1,
3967        1,
3968        0,
3969        p200pfs_ha::Asel,
3970        P200PfsHa_SPEC,
3971        crate::common::RW,
3972    > {
3973        crate::common::RegisterField::<
3974            15,
3975            0x1,
3976            1,
3977            0,
3978            p200pfs_ha::Asel,
3979            P200PfsHa_SPEC,
3980            crate::common::RW,
3981        >::from_register(self, 0)
3982    }
3983}
3984impl ::core::default::Default for P200PfsHa {
3985    #[inline(always)]
3986    fn default() -> P200PfsHa {
3987        <crate::RegValueT<P200PfsHa_SPEC> as RegisterValue<_>>::new(0)
3988    }
3989}
3990pub mod p200pfs_ha {
3991
3992    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3993    pub struct Podr_SPEC;
3994    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3995    impl Podr {
3996        #[doc = "Output low"]
3997        pub const _0: Self = Self::new(0);
3998        #[doc = "Output high"]
3999        pub const _1: Self = Self::new(1);
4000    }
4001    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4002    pub struct Pidr_SPEC;
4003    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
4004    impl Pidr {
4005        #[doc = "Low level"]
4006        pub const _0: Self = Self::new(0);
4007        #[doc = "High level"]
4008        pub const _1: Self = Self::new(1);
4009    }
4010    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4011    pub struct Pdr_SPEC;
4012    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
4013    impl Pdr {
4014        #[doc = "Input (functions as an input pin)"]
4015        pub const _0: Self = Self::new(0);
4016        #[doc = "Output (functions as an output pin)"]
4017        pub const _1: Self = Self::new(1);
4018    }
4019    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4020    pub struct Pcr_SPEC;
4021    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
4022    impl Pcr {
4023        #[doc = "Disable input pull-up"]
4024        pub const _0: Self = Self::new(0);
4025        #[doc = "Enable input pull-up"]
4026        pub const _1: Self = Self::new(1);
4027    }
4028    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4029    pub struct Ncodr_SPEC;
4030    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
4031    impl Ncodr {
4032        #[doc = "Output CMOS"]
4033        pub const _0: Self = Self::new(0);
4034        #[doc = "Output NMOS open-drain"]
4035        pub const _1: Self = Self::new(1);
4036    }
4037    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4038    pub struct Dscr_SPEC;
4039    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
4040    impl Dscr {
4041        #[doc = "Low drive"]
4042        pub const _00: Self = Self::new(0);
4043        #[doc = "Middle drive"]
4044        pub const _01: Self = Self::new(1);
4045        #[doc = "Setting prohibited"]
4046        pub const _10: Self = Self::new(2);
4047        #[doc = "High drive"]
4048        pub const _11: Self = Self::new(3);
4049    }
4050    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4051    pub struct Eofr_SPEC;
4052    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
4053    impl Eofr {
4054        #[doc = "Don\'t care"]
4055        pub const _00: Self = Self::new(0);
4056        #[doc = "Detect rising edge"]
4057        pub const _01: Self = Self::new(1);
4058        #[doc = "Detect falling edge"]
4059        pub const _10: Self = Self::new(2);
4060        #[doc = "Detect both edges"]
4061        pub const _11: Self = Self::new(3);
4062    }
4063    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4064    pub struct Isel_SPEC;
4065    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
4066    impl Isel {
4067        #[doc = "Do not use as IRQn input pin"]
4068        pub const _0: Self = Self::new(0);
4069        #[doc = "Use as IRQn input pin"]
4070        pub const _1: Self = Self::new(1);
4071    }
4072    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4073    pub struct Asel_SPEC;
4074    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
4075    impl Asel {
4076        #[doc = "Do not use as analog pin"]
4077        pub const _0: Self = Self::new(0);
4078        #[doc = "Use as analog pin"]
4079        pub const _1: Self = Self::new(1);
4080    }
4081}
4082#[doc(hidden)]
4083#[derive(Copy, Clone, Eq, PartialEq)]
4084pub struct P200PfsBy_SPEC;
4085impl crate::sealed::RegSpec for P200PfsBy_SPEC {
4086    type DataType = u8;
4087}
4088#[doc = "Port 200 Pin Function Select Register"]
4089pub type P200PfsBy = crate::RegValueT<P200PfsBy_SPEC>;
4090
4091impl P200PfsBy {
4092    #[doc = "Port Output Data"]
4093    #[inline(always)]
4094    pub fn podr(
4095        self,
4096    ) -> crate::common::RegisterField<
4097        0,
4098        0x1,
4099        1,
4100        0,
4101        p200pfs_by::Podr,
4102        P200PfsBy_SPEC,
4103        crate::common::RW,
4104    > {
4105        crate::common::RegisterField::<
4106            0,
4107            0x1,
4108            1,
4109            0,
4110            p200pfs_by::Podr,
4111            P200PfsBy_SPEC,
4112            crate::common::RW,
4113        >::from_register(self, 0)
4114    }
4115    #[doc = "Port State"]
4116    #[inline(always)]
4117    pub fn pidr(
4118        self,
4119    ) -> crate::common::RegisterField<
4120        1,
4121        0x1,
4122        1,
4123        0,
4124        p200pfs_by::Pidr,
4125        P200PfsBy_SPEC,
4126        crate::common::R,
4127    > {
4128        crate::common::RegisterField::<
4129            1,
4130            0x1,
4131            1,
4132            0,
4133            p200pfs_by::Pidr,
4134            P200PfsBy_SPEC,
4135            crate::common::R,
4136        >::from_register(self, 0)
4137    }
4138    #[doc = "Port Direction"]
4139    #[inline(always)]
4140    pub fn pdr(
4141        self,
4142    ) -> crate::common::RegisterField<
4143        2,
4144        0x1,
4145        1,
4146        0,
4147        p200pfs_by::Pdr,
4148        P200PfsBy_SPEC,
4149        crate::common::RW,
4150    > {
4151        crate::common::RegisterField::<
4152            2,
4153            0x1,
4154            1,
4155            0,
4156            p200pfs_by::Pdr,
4157            P200PfsBy_SPEC,
4158            crate::common::RW,
4159        >::from_register(self, 0)
4160    }
4161    #[doc = "Pull-up Control"]
4162    #[inline(always)]
4163    pub fn pcr(
4164        self,
4165    ) -> crate::common::RegisterField<
4166        4,
4167        0x1,
4168        1,
4169        0,
4170        p200pfs_by::Pcr,
4171        P200PfsBy_SPEC,
4172        crate::common::RW,
4173    > {
4174        crate::common::RegisterField::<
4175            4,
4176            0x1,
4177            1,
4178            0,
4179            p200pfs_by::Pcr,
4180            P200PfsBy_SPEC,
4181            crate::common::RW,
4182        >::from_register(self, 0)
4183    }
4184    #[doc = "N-Channel Open-Drain Control"]
4185    #[inline(always)]
4186    pub fn ncodr(
4187        self,
4188    ) -> crate::common::RegisterField<
4189        6,
4190        0x1,
4191        1,
4192        0,
4193        p200pfs_by::Ncodr,
4194        P200PfsBy_SPEC,
4195        crate::common::RW,
4196    > {
4197        crate::common::RegisterField::<
4198            6,
4199            0x1,
4200            1,
4201            0,
4202            p200pfs_by::Ncodr,
4203            P200PfsBy_SPEC,
4204            crate::common::RW,
4205        >::from_register(self, 0)
4206    }
4207}
4208impl ::core::default::Default for P200PfsBy {
4209    #[inline(always)]
4210    fn default() -> P200PfsBy {
4211        <crate::RegValueT<P200PfsBy_SPEC> as RegisterValue<_>>::new(0)
4212    }
4213}
4214pub mod p200pfs_by {
4215
4216    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4217    pub struct Podr_SPEC;
4218    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
4219    impl Podr {
4220        #[doc = "Output low"]
4221        pub const _0: Self = Self::new(0);
4222        #[doc = "Output high"]
4223        pub const _1: Self = Self::new(1);
4224    }
4225    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4226    pub struct Pidr_SPEC;
4227    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
4228    impl Pidr {
4229        #[doc = "Low level"]
4230        pub const _0: Self = Self::new(0);
4231        #[doc = "High level"]
4232        pub const _1: Self = Self::new(1);
4233    }
4234    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4235    pub struct Pdr_SPEC;
4236    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
4237    impl Pdr {
4238        #[doc = "Input (functions as an input pin)"]
4239        pub const _0: Self = Self::new(0);
4240        #[doc = "Output (functions as an output pin)"]
4241        pub const _1: Self = Self::new(1);
4242    }
4243    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4244    pub struct Pcr_SPEC;
4245    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
4246    impl Pcr {
4247        #[doc = "Disable input pull-up"]
4248        pub const _0: Self = Self::new(0);
4249        #[doc = "Enable input pull-up"]
4250        pub const _1: Self = Self::new(1);
4251    }
4252    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4253    pub struct Ncodr_SPEC;
4254    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
4255    impl Ncodr {
4256        #[doc = "Output CMOS"]
4257        pub const _0: Self = Self::new(0);
4258        #[doc = "Output NMOS open-drain"]
4259        pub const _1: Self = Self::new(1);
4260    }
4261}
4262#[doc(hidden)]
4263#[derive(Copy, Clone, Eq, PartialEq)]
4264pub struct P201Pfs_SPEC;
4265impl crate::sealed::RegSpec for P201Pfs_SPEC {
4266    type DataType = u32;
4267}
4268#[doc = "Port 201 Pin Function Select Register"]
4269pub type P201Pfs = crate::RegValueT<P201Pfs_SPEC>;
4270
4271impl P201Pfs {
4272    #[doc = "Port Output Data"]
4273    #[inline(always)]
4274    pub fn podr(
4275        self,
4276    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p201pfs::Podr, P201Pfs_SPEC, crate::common::RW>
4277    {
4278        crate::common::RegisterField::<0,0x1,1,0,p201pfs::Podr, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4279    }
4280    #[doc = "Port State"]
4281    #[inline(always)]
4282    pub fn pidr(
4283        self,
4284    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p201pfs::Pidr, P201Pfs_SPEC, crate::common::R>
4285    {
4286        crate::common::RegisterField::<1,0x1,1,0,p201pfs::Pidr, P201Pfs_SPEC,crate::common::R>::from_register(self,0)
4287    }
4288    #[doc = "Port Direction"]
4289    #[inline(always)]
4290    pub fn pdr(
4291        self,
4292    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p201pfs::Pdr, P201Pfs_SPEC, crate::common::RW>
4293    {
4294        crate::common::RegisterField::<2,0x1,1,0,p201pfs::Pdr, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4295    }
4296    #[doc = "Pull-up Control"]
4297    #[inline(always)]
4298    pub fn pcr(
4299        self,
4300    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p201pfs::Pcr, P201Pfs_SPEC, crate::common::RW>
4301    {
4302        crate::common::RegisterField::<4,0x1,1,0,p201pfs::Pcr, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4303    }
4304    #[doc = "N-Channel Open-Drain Control"]
4305    #[inline(always)]
4306    pub fn ncodr(
4307        self,
4308    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p201pfs::Ncodr, P201Pfs_SPEC, crate::common::RW>
4309    {
4310        crate::common::RegisterField::<6,0x1,1,0,p201pfs::Ncodr, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4311    }
4312    #[doc = "Port Drive Capability"]
4313    #[inline(always)]
4314    pub fn dscr(
4315        self,
4316    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p201pfs::Dscr, P201Pfs_SPEC, crate::common::RW>
4317    {
4318        crate::common::RegisterField::<10,0x3,1,0,p201pfs::Dscr, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4319    }
4320    #[doc = "Event on Falling/Event on Rising"]
4321    #[inline(always)]
4322    pub fn eofr(
4323        self,
4324    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p201pfs::Eofr, P201Pfs_SPEC, crate::common::RW>
4325    {
4326        crate::common::RegisterField::<12,0x3,1,0,p201pfs::Eofr, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4327    }
4328    #[doc = "IRQ Input Enable"]
4329    #[inline(always)]
4330    pub fn isel(
4331        self,
4332    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p201pfs::Isel, P201Pfs_SPEC, crate::common::RW>
4333    {
4334        crate::common::RegisterField::<14,0x1,1,0,p201pfs::Isel, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4335    }
4336    #[doc = "Analog Input Enable"]
4337    #[inline(always)]
4338    pub fn asel(
4339        self,
4340    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p201pfs::Asel, P201Pfs_SPEC, crate::common::RW>
4341    {
4342        crate::common::RegisterField::<15,0x1,1,0,p201pfs::Asel, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4343    }
4344    #[doc = "Port Mode Control"]
4345    #[inline(always)]
4346    pub fn pmr(
4347        self,
4348    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p201pfs::Pmr, P201Pfs_SPEC, crate::common::RW>
4349    {
4350        crate::common::RegisterField::<16,0x1,1,0,p201pfs::Pmr, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4351    }
4352    #[doc = "Peripheral Select"]
4353    #[inline(always)]
4354    pub fn psel(
4355        self,
4356    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P201Pfs_SPEC, crate::common::RW> {
4357        crate::common::RegisterField::<24,0x1f,1,0,u8, P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
4358    }
4359}
4360impl ::core::default::Default for P201Pfs {
4361    #[inline(always)]
4362    fn default() -> P201Pfs {
4363        <crate::RegValueT<P201Pfs_SPEC> as RegisterValue<_>>::new(16)
4364    }
4365}
4366pub mod p201pfs {
4367
4368    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4369    pub struct Podr_SPEC;
4370    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
4371    impl Podr {
4372        #[doc = "Output low"]
4373        pub const _0: Self = Self::new(0);
4374        #[doc = "Output high"]
4375        pub const _1: Self = Self::new(1);
4376    }
4377    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4378    pub struct Pidr_SPEC;
4379    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
4380    impl Pidr {
4381        #[doc = "Low level"]
4382        pub const _0: Self = Self::new(0);
4383        #[doc = "High level"]
4384        pub const _1: Self = Self::new(1);
4385    }
4386    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4387    pub struct Pdr_SPEC;
4388    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
4389    impl Pdr {
4390        #[doc = "Input (functions as an input pin)"]
4391        pub const _0: Self = Self::new(0);
4392        #[doc = "Output (functions as an output pin)"]
4393        pub const _1: Self = Self::new(1);
4394    }
4395    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4396    pub struct Pcr_SPEC;
4397    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
4398    impl Pcr {
4399        #[doc = "Disable input pull-up"]
4400        pub const _0: Self = Self::new(0);
4401        #[doc = "Enable input pull-up"]
4402        pub const _1: Self = Self::new(1);
4403    }
4404    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4405    pub struct Ncodr_SPEC;
4406    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
4407    impl Ncodr {
4408        #[doc = "Output CMOS"]
4409        pub const _0: Self = Self::new(0);
4410        #[doc = "Output NMOS open-drain"]
4411        pub const _1: Self = Self::new(1);
4412    }
4413    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4414    pub struct Dscr_SPEC;
4415    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
4416    impl Dscr {
4417        #[doc = "Low drive"]
4418        pub const _00: Self = Self::new(0);
4419        #[doc = "Middle drive"]
4420        pub const _01: Self = Self::new(1);
4421        #[doc = "Setting prohibited"]
4422        pub const _10: Self = Self::new(2);
4423        #[doc = "High drive"]
4424        pub const _11: Self = Self::new(3);
4425    }
4426    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4427    pub struct Eofr_SPEC;
4428    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
4429    impl Eofr {
4430        #[doc = "Don\'t care"]
4431        pub const _00: Self = Self::new(0);
4432        #[doc = "Detect rising edge"]
4433        pub const _01: Self = Self::new(1);
4434        #[doc = "Detect falling edge"]
4435        pub const _10: Self = Self::new(2);
4436        #[doc = "Detect both edges"]
4437        pub const _11: Self = Self::new(3);
4438    }
4439    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4440    pub struct Isel_SPEC;
4441    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
4442    impl Isel {
4443        #[doc = "Do not use as IRQn input pin"]
4444        pub const _0: Self = Self::new(0);
4445        #[doc = "Use as IRQn input pin"]
4446        pub const _1: Self = Self::new(1);
4447    }
4448    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4449    pub struct Asel_SPEC;
4450    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
4451    impl Asel {
4452        #[doc = "Do not use as analog pin"]
4453        pub const _0: Self = Self::new(0);
4454        #[doc = "Use as analog pin"]
4455        pub const _1: Self = Self::new(1);
4456    }
4457    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4458    pub struct Pmr_SPEC;
4459    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
4460    impl Pmr {
4461        #[doc = "Use as general I/O pin"]
4462        pub const _0: Self = Self::new(0);
4463        #[doc = "Use as I/O port for peripheral functions"]
4464        pub const _1: Self = Self::new(1);
4465    }
4466}
4467#[doc(hidden)]
4468#[derive(Copy, Clone, Eq, PartialEq)]
4469pub struct P201PfsHa_SPEC;
4470impl crate::sealed::RegSpec for P201PfsHa_SPEC {
4471    type DataType = u16;
4472}
4473#[doc = "Port 201 Pin Function Select Register"]
4474pub type P201PfsHa = crate::RegValueT<P201PfsHa_SPEC>;
4475
4476impl P201PfsHa {
4477    #[doc = "Port Output Data"]
4478    #[inline(always)]
4479    pub fn podr(
4480        self,
4481    ) -> crate::common::RegisterField<
4482        0,
4483        0x1,
4484        1,
4485        0,
4486        p201pfs_ha::Podr,
4487        P201PfsHa_SPEC,
4488        crate::common::RW,
4489    > {
4490        crate::common::RegisterField::<
4491            0,
4492            0x1,
4493            1,
4494            0,
4495            p201pfs_ha::Podr,
4496            P201PfsHa_SPEC,
4497            crate::common::RW,
4498        >::from_register(self, 0)
4499    }
4500    #[doc = "Port State"]
4501    #[inline(always)]
4502    pub fn pidr(
4503        self,
4504    ) -> crate::common::RegisterField<
4505        1,
4506        0x1,
4507        1,
4508        0,
4509        p201pfs_ha::Pidr,
4510        P201PfsHa_SPEC,
4511        crate::common::R,
4512    > {
4513        crate::common::RegisterField::<
4514            1,
4515            0x1,
4516            1,
4517            0,
4518            p201pfs_ha::Pidr,
4519            P201PfsHa_SPEC,
4520            crate::common::R,
4521        >::from_register(self, 0)
4522    }
4523    #[doc = "Port Direction"]
4524    #[inline(always)]
4525    pub fn pdr(
4526        self,
4527    ) -> crate::common::RegisterField<
4528        2,
4529        0x1,
4530        1,
4531        0,
4532        p201pfs_ha::Pdr,
4533        P201PfsHa_SPEC,
4534        crate::common::RW,
4535    > {
4536        crate::common::RegisterField::<
4537            2,
4538            0x1,
4539            1,
4540            0,
4541            p201pfs_ha::Pdr,
4542            P201PfsHa_SPEC,
4543            crate::common::RW,
4544        >::from_register(self, 0)
4545    }
4546    #[doc = "Pull-up Control"]
4547    #[inline(always)]
4548    pub fn pcr(
4549        self,
4550    ) -> crate::common::RegisterField<
4551        4,
4552        0x1,
4553        1,
4554        0,
4555        p201pfs_ha::Pcr,
4556        P201PfsHa_SPEC,
4557        crate::common::RW,
4558    > {
4559        crate::common::RegisterField::<
4560            4,
4561            0x1,
4562            1,
4563            0,
4564            p201pfs_ha::Pcr,
4565            P201PfsHa_SPEC,
4566            crate::common::RW,
4567        >::from_register(self, 0)
4568    }
4569    #[doc = "N-Channel Open-Drain Control"]
4570    #[inline(always)]
4571    pub fn ncodr(
4572        self,
4573    ) -> crate::common::RegisterField<
4574        6,
4575        0x1,
4576        1,
4577        0,
4578        p201pfs_ha::Ncodr,
4579        P201PfsHa_SPEC,
4580        crate::common::RW,
4581    > {
4582        crate::common::RegisterField::<
4583            6,
4584            0x1,
4585            1,
4586            0,
4587            p201pfs_ha::Ncodr,
4588            P201PfsHa_SPEC,
4589            crate::common::RW,
4590        >::from_register(self, 0)
4591    }
4592    #[doc = "Port Drive Capability"]
4593    #[inline(always)]
4594    pub fn dscr(
4595        self,
4596    ) -> crate::common::RegisterField<
4597        10,
4598        0x3,
4599        1,
4600        0,
4601        p201pfs_ha::Dscr,
4602        P201PfsHa_SPEC,
4603        crate::common::RW,
4604    > {
4605        crate::common::RegisterField::<
4606            10,
4607            0x3,
4608            1,
4609            0,
4610            p201pfs_ha::Dscr,
4611            P201PfsHa_SPEC,
4612            crate::common::RW,
4613        >::from_register(self, 0)
4614    }
4615    #[doc = "Event on Falling/Event on Rising"]
4616    #[inline(always)]
4617    pub fn eofr(
4618        self,
4619    ) -> crate::common::RegisterField<
4620        12,
4621        0x3,
4622        1,
4623        0,
4624        p201pfs_ha::Eofr,
4625        P201PfsHa_SPEC,
4626        crate::common::RW,
4627    > {
4628        crate::common::RegisterField::<
4629            12,
4630            0x3,
4631            1,
4632            0,
4633            p201pfs_ha::Eofr,
4634            P201PfsHa_SPEC,
4635            crate::common::RW,
4636        >::from_register(self, 0)
4637    }
4638    #[doc = "IRQ Input Enable"]
4639    #[inline(always)]
4640    pub fn isel(
4641        self,
4642    ) -> crate::common::RegisterField<
4643        14,
4644        0x1,
4645        1,
4646        0,
4647        p201pfs_ha::Isel,
4648        P201PfsHa_SPEC,
4649        crate::common::RW,
4650    > {
4651        crate::common::RegisterField::<
4652            14,
4653            0x1,
4654            1,
4655            0,
4656            p201pfs_ha::Isel,
4657            P201PfsHa_SPEC,
4658            crate::common::RW,
4659        >::from_register(self, 0)
4660    }
4661    #[doc = "Analog Input Enable"]
4662    #[inline(always)]
4663    pub fn asel(
4664        self,
4665    ) -> crate::common::RegisterField<
4666        15,
4667        0x1,
4668        1,
4669        0,
4670        p201pfs_ha::Asel,
4671        P201PfsHa_SPEC,
4672        crate::common::RW,
4673    > {
4674        crate::common::RegisterField::<
4675            15,
4676            0x1,
4677            1,
4678            0,
4679            p201pfs_ha::Asel,
4680            P201PfsHa_SPEC,
4681            crate::common::RW,
4682        >::from_register(self, 0)
4683    }
4684}
4685impl ::core::default::Default for P201PfsHa {
4686    #[inline(always)]
4687    fn default() -> P201PfsHa {
4688        <crate::RegValueT<P201PfsHa_SPEC> as RegisterValue<_>>::new(16)
4689    }
4690}
4691pub mod p201pfs_ha {
4692
4693    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4694    pub struct Podr_SPEC;
4695    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
4696    impl Podr {
4697        #[doc = "Output low"]
4698        pub const _0: Self = Self::new(0);
4699        #[doc = "Output high"]
4700        pub const _1: Self = Self::new(1);
4701    }
4702    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4703    pub struct Pidr_SPEC;
4704    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
4705    impl Pidr {
4706        #[doc = "Low level"]
4707        pub const _0: Self = Self::new(0);
4708        #[doc = "High level"]
4709        pub const _1: Self = Self::new(1);
4710    }
4711    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4712    pub struct Pdr_SPEC;
4713    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
4714    impl Pdr {
4715        #[doc = "Input (functions as an input pin)"]
4716        pub const _0: Self = Self::new(0);
4717        #[doc = "Output (functions as an output pin)"]
4718        pub const _1: Self = Self::new(1);
4719    }
4720    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4721    pub struct Pcr_SPEC;
4722    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
4723    impl Pcr {
4724        #[doc = "Disable input pull-up"]
4725        pub const _0: Self = Self::new(0);
4726        #[doc = "Enable input pull-up"]
4727        pub const _1: Self = Self::new(1);
4728    }
4729    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4730    pub struct Ncodr_SPEC;
4731    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
4732    impl Ncodr {
4733        #[doc = "Output CMOS"]
4734        pub const _0: Self = Self::new(0);
4735        #[doc = "Output NMOS open-drain"]
4736        pub const _1: Self = Self::new(1);
4737    }
4738    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4739    pub struct Dscr_SPEC;
4740    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
4741    impl Dscr {
4742        #[doc = "Low drive"]
4743        pub const _00: Self = Self::new(0);
4744        #[doc = "Middle drive"]
4745        pub const _01: Self = Self::new(1);
4746        #[doc = "Setting prohibited"]
4747        pub const _10: Self = Self::new(2);
4748        #[doc = "High drive"]
4749        pub const _11: Self = Self::new(3);
4750    }
4751    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4752    pub struct Eofr_SPEC;
4753    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
4754    impl Eofr {
4755        #[doc = "Don\'t care"]
4756        pub const _00: Self = Self::new(0);
4757        #[doc = "Detect rising edge"]
4758        pub const _01: Self = Self::new(1);
4759        #[doc = "Detect falling edge"]
4760        pub const _10: Self = Self::new(2);
4761        #[doc = "Detect both edges"]
4762        pub const _11: Self = Self::new(3);
4763    }
4764    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4765    pub struct Isel_SPEC;
4766    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
4767    impl Isel {
4768        #[doc = "Do not use as IRQn input pin"]
4769        pub const _0: Self = Self::new(0);
4770        #[doc = "Use as IRQn input pin"]
4771        pub const _1: Self = Self::new(1);
4772    }
4773    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4774    pub struct Asel_SPEC;
4775    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
4776    impl Asel {
4777        #[doc = "Do not use as analog pin"]
4778        pub const _0: Self = Self::new(0);
4779        #[doc = "Use as analog pin"]
4780        pub const _1: Self = Self::new(1);
4781    }
4782}
4783#[doc(hidden)]
4784#[derive(Copy, Clone, Eq, PartialEq)]
4785pub struct P201PfsBy_SPEC;
4786impl crate::sealed::RegSpec for P201PfsBy_SPEC {
4787    type DataType = u8;
4788}
4789#[doc = "Port 201 Pin Function Select Register"]
4790pub type P201PfsBy = crate::RegValueT<P201PfsBy_SPEC>;
4791
4792impl P201PfsBy {
4793    #[doc = "Port Output Data"]
4794    #[inline(always)]
4795    pub fn podr(
4796        self,
4797    ) -> crate::common::RegisterField<
4798        0,
4799        0x1,
4800        1,
4801        0,
4802        p201pfs_by::Podr,
4803        P201PfsBy_SPEC,
4804        crate::common::RW,
4805    > {
4806        crate::common::RegisterField::<
4807            0,
4808            0x1,
4809            1,
4810            0,
4811            p201pfs_by::Podr,
4812            P201PfsBy_SPEC,
4813            crate::common::RW,
4814        >::from_register(self, 0)
4815    }
4816    #[doc = "Port State"]
4817    #[inline(always)]
4818    pub fn pidr(
4819        self,
4820    ) -> crate::common::RegisterField<
4821        1,
4822        0x1,
4823        1,
4824        0,
4825        p201pfs_by::Pidr,
4826        P201PfsBy_SPEC,
4827        crate::common::R,
4828    > {
4829        crate::common::RegisterField::<
4830            1,
4831            0x1,
4832            1,
4833            0,
4834            p201pfs_by::Pidr,
4835            P201PfsBy_SPEC,
4836            crate::common::R,
4837        >::from_register(self, 0)
4838    }
4839    #[doc = "Port Direction"]
4840    #[inline(always)]
4841    pub fn pdr(
4842        self,
4843    ) -> crate::common::RegisterField<
4844        2,
4845        0x1,
4846        1,
4847        0,
4848        p201pfs_by::Pdr,
4849        P201PfsBy_SPEC,
4850        crate::common::RW,
4851    > {
4852        crate::common::RegisterField::<
4853            2,
4854            0x1,
4855            1,
4856            0,
4857            p201pfs_by::Pdr,
4858            P201PfsBy_SPEC,
4859            crate::common::RW,
4860        >::from_register(self, 0)
4861    }
4862    #[doc = "Pull-up Control"]
4863    #[inline(always)]
4864    pub fn pcr(
4865        self,
4866    ) -> crate::common::RegisterField<
4867        4,
4868        0x1,
4869        1,
4870        0,
4871        p201pfs_by::Pcr,
4872        P201PfsBy_SPEC,
4873        crate::common::RW,
4874    > {
4875        crate::common::RegisterField::<
4876            4,
4877            0x1,
4878            1,
4879            0,
4880            p201pfs_by::Pcr,
4881            P201PfsBy_SPEC,
4882            crate::common::RW,
4883        >::from_register(self, 0)
4884    }
4885    #[doc = "N-Channel Open-Drain Control"]
4886    #[inline(always)]
4887    pub fn ncodr(
4888        self,
4889    ) -> crate::common::RegisterField<
4890        6,
4891        0x1,
4892        1,
4893        0,
4894        p201pfs_by::Ncodr,
4895        P201PfsBy_SPEC,
4896        crate::common::RW,
4897    > {
4898        crate::common::RegisterField::<
4899            6,
4900            0x1,
4901            1,
4902            0,
4903            p201pfs_by::Ncodr,
4904            P201PfsBy_SPEC,
4905            crate::common::RW,
4906        >::from_register(self, 0)
4907    }
4908}
4909impl ::core::default::Default for P201PfsBy {
4910    #[inline(always)]
4911    fn default() -> P201PfsBy {
4912        <crate::RegValueT<P201PfsBy_SPEC> as RegisterValue<_>>::new(16)
4913    }
4914}
4915pub mod p201pfs_by {
4916
4917    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4918    pub struct Podr_SPEC;
4919    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
4920    impl Podr {
4921        #[doc = "Output low"]
4922        pub const _0: Self = Self::new(0);
4923        #[doc = "Output high"]
4924        pub const _1: Self = Self::new(1);
4925    }
4926    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4927    pub struct Pidr_SPEC;
4928    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
4929    impl Pidr {
4930        #[doc = "Low level"]
4931        pub const _0: Self = Self::new(0);
4932        #[doc = "High level"]
4933        pub const _1: Self = Self::new(1);
4934    }
4935    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4936    pub struct Pdr_SPEC;
4937    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
4938    impl Pdr {
4939        #[doc = "Input (functions as an input pin)"]
4940        pub const _0: Self = Self::new(0);
4941        #[doc = "Output (functions as an output pin)"]
4942        pub const _1: Self = Self::new(1);
4943    }
4944    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4945    pub struct Pcr_SPEC;
4946    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
4947    impl Pcr {
4948        #[doc = "Disable input pull-up"]
4949        pub const _0: Self = Self::new(0);
4950        #[doc = "Enable input pull-up"]
4951        pub const _1: Self = Self::new(1);
4952    }
4953    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4954    pub struct Ncodr_SPEC;
4955    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
4956    impl Ncodr {
4957        #[doc = "Output CMOS"]
4958        pub const _0: Self = Self::new(0);
4959        #[doc = "Output NMOS open-drain"]
4960        pub const _1: Self = Self::new(1);
4961    }
4962}
4963#[doc(hidden)]
4964#[derive(Copy, Clone, Eq, PartialEq)]
4965pub struct P20Pfs_SPEC;
4966impl crate::sealed::RegSpec for P20Pfs_SPEC {
4967    type DataType = u32;
4968}
4969#[doc = "Port 20%s Pin Function Select Register"]
4970pub type P20Pfs = crate::RegValueT<P20Pfs_SPEC>;
4971
4972impl P20Pfs {
4973    #[doc = "Port Output Data"]
4974    #[inline(always)]
4975    pub fn podr(
4976        self,
4977    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p20pfs::Podr, P20Pfs_SPEC, crate::common::RW>
4978    {
4979        crate::common::RegisterField::<0,0x1,1,0,p20pfs::Podr, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
4980    }
4981    #[doc = "Port State"]
4982    #[inline(always)]
4983    pub fn pidr(
4984        self,
4985    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p20pfs::Pidr, P20Pfs_SPEC, crate::common::R>
4986    {
4987        crate::common::RegisterField::<1,0x1,1,0,p20pfs::Pidr, P20Pfs_SPEC,crate::common::R>::from_register(self,0)
4988    }
4989    #[doc = "Port Direction"]
4990    #[inline(always)]
4991    pub fn pdr(
4992        self,
4993    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p20pfs::Pdr, P20Pfs_SPEC, crate::common::RW>
4994    {
4995        crate::common::RegisterField::<2,0x1,1,0,p20pfs::Pdr, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
4996    }
4997    #[doc = "Pull-up Control"]
4998    #[inline(always)]
4999    pub fn pcr(
5000        self,
5001    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p20pfs::Pcr, P20Pfs_SPEC, crate::common::RW>
5002    {
5003        crate::common::RegisterField::<4,0x1,1,0,p20pfs::Pcr, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
5004    }
5005    #[doc = "N-Channel Open-Drain Control"]
5006    #[inline(always)]
5007    pub fn ncodr(
5008        self,
5009    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p20pfs::Ncodr, P20Pfs_SPEC, crate::common::RW>
5010    {
5011        crate::common::RegisterField::<6,0x1,1,0,p20pfs::Ncodr, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
5012    }
5013    #[doc = "Port Drive Capability"]
5014    #[inline(always)]
5015    pub fn dscr(
5016        self,
5017    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p20pfs::Dscr, P20Pfs_SPEC, crate::common::RW>
5018    {
5019        crate::common::RegisterField::<10,0x3,1,0,p20pfs::Dscr, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
5020    }
5021    #[doc = "Event on Falling/Event on Rising"]
5022    #[inline(always)]
5023    pub fn eofr(
5024        self,
5025    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p20pfs::Eofr, P20Pfs_SPEC, crate::common::RW>
5026    {
5027        crate::common::RegisterField::<12,0x3,1,0,p20pfs::Eofr, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
5028    }
5029    #[doc = "IRQ Input Enable"]
5030    #[inline(always)]
5031    pub fn isel(
5032        self,
5033    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p20pfs::Isel, P20Pfs_SPEC, crate::common::RW>
5034    {
5035        crate::common::RegisterField::<14,0x1,1,0,p20pfs::Isel, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
5036    }
5037    #[doc = "Analog Input Enable"]
5038    #[inline(always)]
5039    pub fn asel(
5040        self,
5041    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p20pfs::Asel, P20Pfs_SPEC, crate::common::RW>
5042    {
5043        crate::common::RegisterField::<15,0x1,1,0,p20pfs::Asel, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
5044    }
5045    #[doc = "Port Mode Control"]
5046    #[inline(always)]
5047    pub fn pmr(
5048        self,
5049    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p20pfs::Pmr, P20Pfs_SPEC, crate::common::RW>
5050    {
5051        crate::common::RegisterField::<16,0x1,1,0,p20pfs::Pmr, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
5052    }
5053    #[doc = "Peripheral Select"]
5054    #[inline(always)]
5055    pub fn psel(
5056        self,
5057    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P20Pfs_SPEC, crate::common::RW> {
5058        crate::common::RegisterField::<24,0x1f,1,0,u8, P20Pfs_SPEC,crate::common::RW>::from_register(self,0)
5059    }
5060}
5061impl ::core::default::Default for P20Pfs {
5062    #[inline(always)]
5063    fn default() -> P20Pfs {
5064        <crate::RegValueT<P20Pfs_SPEC> as RegisterValue<_>>::new(0)
5065    }
5066}
5067pub mod p20pfs {
5068
5069    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5070    pub struct Podr_SPEC;
5071    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
5072    impl Podr {
5073        #[doc = "Output low"]
5074        pub const _0: Self = Self::new(0);
5075        #[doc = "Output high"]
5076        pub const _1: Self = Self::new(1);
5077    }
5078    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5079    pub struct Pidr_SPEC;
5080    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
5081    impl Pidr {
5082        #[doc = "Low level"]
5083        pub const _0: Self = Self::new(0);
5084        #[doc = "High level"]
5085        pub const _1: Self = Self::new(1);
5086    }
5087    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5088    pub struct Pdr_SPEC;
5089    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
5090    impl Pdr {
5091        #[doc = "Input (functions as an input pin)"]
5092        pub const _0: Self = Self::new(0);
5093        #[doc = "Output (functions as an output pin)"]
5094        pub const _1: Self = Self::new(1);
5095    }
5096    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5097    pub struct Pcr_SPEC;
5098    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
5099    impl Pcr {
5100        #[doc = "Disable input pull-up"]
5101        pub const _0: Self = Self::new(0);
5102        #[doc = "Enable input pull-up"]
5103        pub const _1: Self = Self::new(1);
5104    }
5105    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5106    pub struct Ncodr_SPEC;
5107    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
5108    impl Ncodr {
5109        #[doc = "Output CMOS"]
5110        pub const _0: Self = Self::new(0);
5111        #[doc = "Output NMOS open-drain"]
5112        pub const _1: Self = Self::new(1);
5113    }
5114    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5115    pub struct Dscr_SPEC;
5116    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
5117    impl Dscr {
5118        #[doc = "Low drive"]
5119        pub const _00: Self = Self::new(0);
5120        #[doc = "Middle drive"]
5121        pub const _01: Self = Self::new(1);
5122        #[doc = "Setting prohibited"]
5123        pub const _10: Self = Self::new(2);
5124        #[doc = "High drive"]
5125        pub const _11: Self = Self::new(3);
5126    }
5127    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5128    pub struct Eofr_SPEC;
5129    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
5130    impl Eofr {
5131        #[doc = "Don\'t care"]
5132        pub const _00: Self = Self::new(0);
5133        #[doc = "Detect rising edge"]
5134        pub const _01: Self = Self::new(1);
5135        #[doc = "Detect falling edge"]
5136        pub const _10: Self = Self::new(2);
5137        #[doc = "Detect both edges"]
5138        pub const _11: Self = Self::new(3);
5139    }
5140    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5141    pub struct Isel_SPEC;
5142    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
5143    impl Isel {
5144        #[doc = "Do not use as IRQn input pin"]
5145        pub const _0: Self = Self::new(0);
5146        #[doc = "Use as IRQn input pin"]
5147        pub const _1: Self = Self::new(1);
5148    }
5149    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5150    pub struct Asel_SPEC;
5151    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
5152    impl Asel {
5153        #[doc = "Do not use as analog pin"]
5154        pub const _0: Self = Self::new(0);
5155        #[doc = "Use as analog pin"]
5156        pub const _1: Self = Self::new(1);
5157    }
5158    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5159    pub struct Pmr_SPEC;
5160    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
5161    impl Pmr {
5162        #[doc = "Use as general I/O pin"]
5163        pub const _0: Self = Self::new(0);
5164        #[doc = "Use as I/O port for peripheral functions"]
5165        pub const _1: Self = Self::new(1);
5166    }
5167}
5168#[doc(hidden)]
5169#[derive(Copy, Clone, Eq, PartialEq)]
5170pub struct P20PfsHa_SPEC;
5171impl crate::sealed::RegSpec for P20PfsHa_SPEC {
5172    type DataType = u16;
5173}
5174#[doc = "Port 20%s Pin Function Select Register"]
5175pub type P20PfsHa = crate::RegValueT<P20PfsHa_SPEC>;
5176
5177impl P20PfsHa {
5178    #[doc = "Port Output Data"]
5179    #[inline(always)]
5180    pub fn podr(
5181        self,
5182    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p20pfs_ha::Podr, P20PfsHa_SPEC, crate::common::RW>
5183    {
5184        crate::common::RegisterField::<
5185            0,
5186            0x1,
5187            1,
5188            0,
5189            p20pfs_ha::Podr,
5190            P20PfsHa_SPEC,
5191            crate::common::RW,
5192        >::from_register(self, 0)
5193    }
5194    #[doc = "Port State"]
5195    #[inline(always)]
5196    pub fn pidr(
5197        self,
5198    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p20pfs_ha::Pidr, P20PfsHa_SPEC, crate::common::R>
5199    {
5200        crate::common::RegisterField::<1,0x1,1,0,p20pfs_ha::Pidr, P20PfsHa_SPEC,crate::common::R>::from_register(self,0)
5201    }
5202    #[doc = "Port Direction"]
5203    #[inline(always)]
5204    pub fn pdr(
5205        self,
5206    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p20pfs_ha::Pdr, P20PfsHa_SPEC, crate::common::RW>
5207    {
5208        crate::common::RegisterField::<2,0x1,1,0,p20pfs_ha::Pdr, P20PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5209    }
5210    #[doc = "Pull-up Control"]
5211    #[inline(always)]
5212    pub fn pcr(
5213        self,
5214    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p20pfs_ha::Pcr, P20PfsHa_SPEC, crate::common::RW>
5215    {
5216        crate::common::RegisterField::<4,0x1,1,0,p20pfs_ha::Pcr, P20PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5217    }
5218    #[doc = "N-Channel Open-Drain Control"]
5219    #[inline(always)]
5220    pub fn ncodr(
5221        self,
5222    ) -> crate::common::RegisterField<
5223        6,
5224        0x1,
5225        1,
5226        0,
5227        p20pfs_ha::Ncodr,
5228        P20PfsHa_SPEC,
5229        crate::common::RW,
5230    > {
5231        crate::common::RegisterField::<
5232            6,
5233            0x1,
5234            1,
5235            0,
5236            p20pfs_ha::Ncodr,
5237            P20PfsHa_SPEC,
5238            crate::common::RW,
5239        >::from_register(self, 0)
5240    }
5241    #[doc = "Port Drive Capability"]
5242    #[inline(always)]
5243    pub fn dscr(
5244        self,
5245    ) -> crate::common::RegisterField<
5246        10,
5247        0x3,
5248        1,
5249        0,
5250        p20pfs_ha::Dscr,
5251        P20PfsHa_SPEC,
5252        crate::common::RW,
5253    > {
5254        crate::common::RegisterField::<
5255            10,
5256            0x3,
5257            1,
5258            0,
5259            p20pfs_ha::Dscr,
5260            P20PfsHa_SPEC,
5261            crate::common::RW,
5262        >::from_register(self, 0)
5263    }
5264    #[doc = "Event on Falling/Event on Rising"]
5265    #[inline(always)]
5266    pub fn eofr(
5267        self,
5268    ) -> crate::common::RegisterField<
5269        12,
5270        0x3,
5271        1,
5272        0,
5273        p20pfs_ha::Eofr,
5274        P20PfsHa_SPEC,
5275        crate::common::RW,
5276    > {
5277        crate::common::RegisterField::<
5278            12,
5279            0x3,
5280            1,
5281            0,
5282            p20pfs_ha::Eofr,
5283            P20PfsHa_SPEC,
5284            crate::common::RW,
5285        >::from_register(self, 0)
5286    }
5287    #[doc = "IRQ Input Enable"]
5288    #[inline(always)]
5289    pub fn isel(
5290        self,
5291    ) -> crate::common::RegisterField<
5292        14,
5293        0x1,
5294        1,
5295        0,
5296        p20pfs_ha::Isel,
5297        P20PfsHa_SPEC,
5298        crate::common::RW,
5299    > {
5300        crate::common::RegisterField::<
5301            14,
5302            0x1,
5303            1,
5304            0,
5305            p20pfs_ha::Isel,
5306            P20PfsHa_SPEC,
5307            crate::common::RW,
5308        >::from_register(self, 0)
5309    }
5310    #[doc = "Analog Input Enable"]
5311    #[inline(always)]
5312    pub fn asel(
5313        self,
5314    ) -> crate::common::RegisterField<
5315        15,
5316        0x1,
5317        1,
5318        0,
5319        p20pfs_ha::Asel,
5320        P20PfsHa_SPEC,
5321        crate::common::RW,
5322    > {
5323        crate::common::RegisterField::<
5324            15,
5325            0x1,
5326            1,
5327            0,
5328            p20pfs_ha::Asel,
5329            P20PfsHa_SPEC,
5330            crate::common::RW,
5331        >::from_register(self, 0)
5332    }
5333}
5334impl ::core::default::Default for P20PfsHa {
5335    #[inline(always)]
5336    fn default() -> P20PfsHa {
5337        <crate::RegValueT<P20PfsHa_SPEC> as RegisterValue<_>>::new(0)
5338    }
5339}
5340pub mod p20pfs_ha {
5341
5342    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5343    pub struct Podr_SPEC;
5344    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
5345    impl Podr {
5346        #[doc = "Output low"]
5347        pub const _0: Self = Self::new(0);
5348        #[doc = "Output high"]
5349        pub const _1: Self = Self::new(1);
5350    }
5351    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5352    pub struct Pidr_SPEC;
5353    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
5354    impl Pidr {
5355        #[doc = "Low level"]
5356        pub const _0: Self = Self::new(0);
5357        #[doc = "High level"]
5358        pub const _1: Self = Self::new(1);
5359    }
5360    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5361    pub struct Pdr_SPEC;
5362    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
5363    impl Pdr {
5364        #[doc = "Input (functions as an input pin)"]
5365        pub const _0: Self = Self::new(0);
5366        #[doc = "Output (functions as an output pin)"]
5367        pub const _1: Self = Self::new(1);
5368    }
5369    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5370    pub struct Pcr_SPEC;
5371    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
5372    impl Pcr {
5373        #[doc = "Disable input pull-up"]
5374        pub const _0: Self = Self::new(0);
5375        #[doc = "Enable input pull-up"]
5376        pub const _1: Self = Self::new(1);
5377    }
5378    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5379    pub struct Ncodr_SPEC;
5380    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
5381    impl Ncodr {
5382        #[doc = "Output CMOS"]
5383        pub const _0: Self = Self::new(0);
5384        #[doc = "Output NMOS open-drain"]
5385        pub const _1: Self = Self::new(1);
5386    }
5387    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5388    pub struct Dscr_SPEC;
5389    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
5390    impl Dscr {
5391        #[doc = "Low drive"]
5392        pub const _00: Self = Self::new(0);
5393        #[doc = "Middle drive"]
5394        pub const _01: Self = Self::new(1);
5395        #[doc = "Setting prohibited"]
5396        pub const _10: Self = Self::new(2);
5397        #[doc = "High drive"]
5398        pub const _11: Self = Self::new(3);
5399    }
5400    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5401    pub struct Eofr_SPEC;
5402    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
5403    impl Eofr {
5404        #[doc = "Don\'t care"]
5405        pub const _00: Self = Self::new(0);
5406        #[doc = "Detect rising edge"]
5407        pub const _01: Self = Self::new(1);
5408        #[doc = "Detect falling edge"]
5409        pub const _10: Self = Self::new(2);
5410        #[doc = "Detect both edges"]
5411        pub const _11: Self = Self::new(3);
5412    }
5413    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5414    pub struct Isel_SPEC;
5415    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
5416    impl Isel {
5417        #[doc = "Do not use as IRQn input pin"]
5418        pub const _0: Self = Self::new(0);
5419        #[doc = "Use as IRQn input pin"]
5420        pub const _1: Self = Self::new(1);
5421    }
5422    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5423    pub struct Asel_SPEC;
5424    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
5425    impl Asel {
5426        #[doc = "Do not use as analog pin"]
5427        pub const _0: Self = Self::new(0);
5428        #[doc = "Use as analog pin"]
5429        pub const _1: Self = Self::new(1);
5430    }
5431}
5432#[doc(hidden)]
5433#[derive(Copy, Clone, Eq, PartialEq)]
5434pub struct P20PfsBy_SPEC;
5435impl crate::sealed::RegSpec for P20PfsBy_SPEC {
5436    type DataType = u8;
5437}
5438#[doc = "Port 20%s Pin Function Select Register"]
5439pub type P20PfsBy = crate::RegValueT<P20PfsBy_SPEC>;
5440
5441impl P20PfsBy {
5442    #[doc = "Port Output Data"]
5443    #[inline(always)]
5444    pub fn podr(
5445        self,
5446    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p20pfs_by::Podr, P20PfsBy_SPEC, crate::common::RW>
5447    {
5448        crate::common::RegisterField::<
5449            0,
5450            0x1,
5451            1,
5452            0,
5453            p20pfs_by::Podr,
5454            P20PfsBy_SPEC,
5455            crate::common::RW,
5456        >::from_register(self, 0)
5457    }
5458    #[doc = "Port State"]
5459    #[inline(always)]
5460    pub fn pidr(
5461        self,
5462    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p20pfs_by::Pidr, P20PfsBy_SPEC, crate::common::R>
5463    {
5464        crate::common::RegisterField::<1,0x1,1,0,p20pfs_by::Pidr, P20PfsBy_SPEC,crate::common::R>::from_register(self,0)
5465    }
5466    #[doc = "Port Direction"]
5467    #[inline(always)]
5468    pub fn pdr(
5469        self,
5470    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p20pfs_by::Pdr, P20PfsBy_SPEC, crate::common::RW>
5471    {
5472        crate::common::RegisterField::<2,0x1,1,0,p20pfs_by::Pdr, P20PfsBy_SPEC,crate::common::RW>::from_register(self,0)
5473    }
5474    #[doc = "Pull-up Control"]
5475    #[inline(always)]
5476    pub fn pcr(
5477        self,
5478    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p20pfs_by::Pcr, P20PfsBy_SPEC, crate::common::RW>
5479    {
5480        crate::common::RegisterField::<4,0x1,1,0,p20pfs_by::Pcr, P20PfsBy_SPEC,crate::common::RW>::from_register(self,0)
5481    }
5482    #[doc = "N-Channel Open-Drain Control"]
5483    #[inline(always)]
5484    pub fn ncodr(
5485        self,
5486    ) -> crate::common::RegisterField<
5487        6,
5488        0x1,
5489        1,
5490        0,
5491        p20pfs_by::Ncodr,
5492        P20PfsBy_SPEC,
5493        crate::common::RW,
5494    > {
5495        crate::common::RegisterField::<
5496            6,
5497            0x1,
5498            1,
5499            0,
5500            p20pfs_by::Ncodr,
5501            P20PfsBy_SPEC,
5502            crate::common::RW,
5503        >::from_register(self, 0)
5504    }
5505}
5506impl ::core::default::Default for P20PfsBy {
5507    #[inline(always)]
5508    fn default() -> P20PfsBy {
5509        <crate::RegValueT<P20PfsBy_SPEC> as RegisterValue<_>>::new(0)
5510    }
5511}
5512pub mod p20pfs_by {
5513
5514    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5515    pub struct Podr_SPEC;
5516    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
5517    impl Podr {
5518        #[doc = "Output low"]
5519        pub const _0: Self = Self::new(0);
5520        #[doc = "Output high"]
5521        pub const _1: Self = Self::new(1);
5522    }
5523    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5524    pub struct Pidr_SPEC;
5525    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
5526    impl Pidr {
5527        #[doc = "Low level"]
5528        pub const _0: Self = Self::new(0);
5529        #[doc = "High level"]
5530        pub const _1: Self = Self::new(1);
5531    }
5532    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5533    pub struct Pdr_SPEC;
5534    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
5535    impl Pdr {
5536        #[doc = "Input (functions as an input pin)"]
5537        pub const _0: Self = Self::new(0);
5538        #[doc = "Output (functions as an output pin)"]
5539        pub const _1: Self = Self::new(1);
5540    }
5541    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5542    pub struct Pcr_SPEC;
5543    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
5544    impl Pcr {
5545        #[doc = "Disable input pull-up"]
5546        pub const _0: Self = Self::new(0);
5547        #[doc = "Enable input pull-up"]
5548        pub const _1: Self = Self::new(1);
5549    }
5550    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5551    pub struct Ncodr_SPEC;
5552    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
5553    impl Ncodr {
5554        #[doc = "Output CMOS"]
5555        pub const _0: Self = Self::new(0);
5556        #[doc = "Output NMOS open-drain"]
5557        pub const _1: Self = Self::new(1);
5558    }
5559}
5560#[doc(hidden)]
5561#[derive(Copy, Clone, Eq, PartialEq)]
5562pub struct P2Pfs_SPEC;
5563impl crate::sealed::RegSpec for P2Pfs_SPEC {
5564    type DataType = u32;
5565}
5566#[doc = "Port 2%s Pin Function Select Register"]
5567pub type P2Pfs = crate::RegValueT<P2Pfs_SPEC>;
5568
5569impl P2Pfs {
5570    #[doc = "Port Output Data"]
5571    #[inline(always)]
5572    pub fn podr(
5573        self,
5574    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p2pfs::Podr, P2Pfs_SPEC, crate::common::RW>
5575    {
5576        crate::common::RegisterField::<0,0x1,1,0,p2pfs::Podr, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5577    }
5578    #[doc = "Port State"]
5579    #[inline(always)]
5580    pub fn pidr(
5581        self,
5582    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p2pfs::Pidr, P2Pfs_SPEC, crate::common::R> {
5583        crate::common::RegisterField::<1,0x1,1,0,p2pfs::Pidr, P2Pfs_SPEC,crate::common::R>::from_register(self,0)
5584    }
5585    #[doc = "Port Direction"]
5586    #[inline(always)]
5587    pub fn pdr(
5588        self,
5589    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p2pfs::Pdr, P2Pfs_SPEC, crate::common::RW> {
5590        crate::common::RegisterField::<2,0x1,1,0,p2pfs::Pdr, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5591    }
5592    #[doc = "Pull-up Control"]
5593    #[inline(always)]
5594    pub fn pcr(
5595        self,
5596    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p2pfs::Pcr, P2Pfs_SPEC, crate::common::RW> {
5597        crate::common::RegisterField::<4,0x1,1,0,p2pfs::Pcr, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5598    }
5599    #[doc = "N-Channel Open-Drain Control"]
5600    #[inline(always)]
5601    pub fn ncodr(
5602        self,
5603    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p2pfs::Ncodr, P2Pfs_SPEC, crate::common::RW>
5604    {
5605        crate::common::RegisterField::<6,0x1,1,0,p2pfs::Ncodr, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5606    }
5607    #[doc = "Port Drive Capability"]
5608    #[inline(always)]
5609    pub fn dscr(
5610        self,
5611    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p2pfs::Dscr, P2Pfs_SPEC, crate::common::RW>
5612    {
5613        crate::common::RegisterField::<10,0x3,1,0,p2pfs::Dscr, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5614    }
5615    #[doc = "Event on Falling/Event on Rising"]
5616    #[inline(always)]
5617    pub fn eofr(
5618        self,
5619    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p2pfs::Eofr, P2Pfs_SPEC, crate::common::RW>
5620    {
5621        crate::common::RegisterField::<12,0x3,1,0,p2pfs::Eofr, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5622    }
5623    #[doc = "IRQ Input Enable"]
5624    #[inline(always)]
5625    pub fn isel(
5626        self,
5627    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p2pfs::Isel, P2Pfs_SPEC, crate::common::RW>
5628    {
5629        crate::common::RegisterField::<14,0x1,1,0,p2pfs::Isel, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5630    }
5631    #[doc = "Analog Input Enable"]
5632    #[inline(always)]
5633    pub fn asel(
5634        self,
5635    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p2pfs::Asel, P2Pfs_SPEC, crate::common::RW>
5636    {
5637        crate::common::RegisterField::<15,0x1,1,0,p2pfs::Asel, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5638    }
5639    #[doc = "Port Mode Control"]
5640    #[inline(always)]
5641    pub fn pmr(
5642        self,
5643    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p2pfs::Pmr, P2Pfs_SPEC, crate::common::RW>
5644    {
5645        crate::common::RegisterField::<16,0x1,1,0,p2pfs::Pmr, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5646    }
5647    #[doc = "Peripheral Select"]
5648    #[inline(always)]
5649    pub fn psel(
5650        self,
5651    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P2Pfs_SPEC, crate::common::RW> {
5652        crate::common::RegisterField::<24,0x1f,1,0,u8, P2Pfs_SPEC,crate::common::RW>::from_register(self,0)
5653    }
5654}
5655impl ::core::default::Default for P2Pfs {
5656    #[inline(always)]
5657    fn default() -> P2Pfs {
5658        <crate::RegValueT<P2Pfs_SPEC> as RegisterValue<_>>::new(0)
5659    }
5660}
5661pub mod p2pfs {
5662
5663    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5664    pub struct Podr_SPEC;
5665    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
5666    impl Podr {
5667        #[doc = "Output low"]
5668        pub const _0: Self = Self::new(0);
5669        #[doc = "Output high"]
5670        pub const _1: Self = Self::new(1);
5671    }
5672    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5673    pub struct Pidr_SPEC;
5674    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
5675    impl Pidr {
5676        #[doc = "Low level"]
5677        pub const _0: Self = Self::new(0);
5678        #[doc = "High level"]
5679        pub const _1: Self = Self::new(1);
5680    }
5681    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5682    pub struct Pdr_SPEC;
5683    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
5684    impl Pdr {
5685        #[doc = "Input (functions as an input pin)"]
5686        pub const _0: Self = Self::new(0);
5687        #[doc = "Output (functions as an output pin)"]
5688        pub const _1: Self = Self::new(1);
5689    }
5690    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5691    pub struct Pcr_SPEC;
5692    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
5693    impl Pcr {
5694        #[doc = "Disable input pull-up"]
5695        pub const _0: Self = Self::new(0);
5696        #[doc = "Enable input pull-up"]
5697        pub const _1: Self = Self::new(1);
5698    }
5699    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5700    pub struct Ncodr_SPEC;
5701    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
5702    impl Ncodr {
5703        #[doc = "Output CMOS"]
5704        pub const _0: Self = Self::new(0);
5705        #[doc = "Output NMOS open-drain"]
5706        pub const _1: Self = Self::new(1);
5707    }
5708    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5709    pub struct Dscr_SPEC;
5710    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
5711    impl Dscr {
5712        #[doc = "Low drive"]
5713        pub const _00: Self = Self::new(0);
5714        #[doc = "Middle drive"]
5715        pub const _01: Self = Self::new(1);
5716        #[doc = "Setting prohibited"]
5717        pub const _10: Self = Self::new(2);
5718        #[doc = "High drive"]
5719        pub const _11: Self = Self::new(3);
5720    }
5721    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5722    pub struct Eofr_SPEC;
5723    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
5724    impl Eofr {
5725        #[doc = "Don\'t care"]
5726        pub const _00: Self = Self::new(0);
5727        #[doc = "Detect rising edge"]
5728        pub const _01: Self = Self::new(1);
5729        #[doc = "Detect falling edge"]
5730        pub const _10: Self = Self::new(2);
5731        #[doc = "Detect both edges"]
5732        pub const _11: Self = Self::new(3);
5733    }
5734    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5735    pub struct Isel_SPEC;
5736    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
5737    impl Isel {
5738        #[doc = "Do not use as IRQn input pin"]
5739        pub const _0: Self = Self::new(0);
5740        #[doc = "Use as IRQn input pin"]
5741        pub const _1: Self = Self::new(1);
5742    }
5743    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5744    pub struct Asel_SPEC;
5745    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
5746    impl Asel {
5747        #[doc = "Do not use as analog pin"]
5748        pub const _0: Self = Self::new(0);
5749        #[doc = "Use as analog pin"]
5750        pub const _1: Self = Self::new(1);
5751    }
5752    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5753    pub struct Pmr_SPEC;
5754    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
5755    impl Pmr {
5756        #[doc = "Use as general I/O pin"]
5757        pub const _0: Self = Self::new(0);
5758        #[doc = "Use as I/O port for peripheral functions"]
5759        pub const _1: Self = Self::new(1);
5760    }
5761}
5762#[doc(hidden)]
5763#[derive(Copy, Clone, Eq, PartialEq)]
5764pub struct P2PfsHa_SPEC;
5765impl crate::sealed::RegSpec for P2PfsHa_SPEC {
5766    type DataType = u16;
5767}
5768#[doc = "Port 2%s Pin Function Select Register"]
5769pub type P2PfsHa = crate::RegValueT<P2PfsHa_SPEC>;
5770
5771impl P2PfsHa {
5772    #[doc = "Port Output Data"]
5773    #[inline(always)]
5774    pub fn podr(
5775        self,
5776    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p2pfs_ha::Podr, P2PfsHa_SPEC, crate::common::RW>
5777    {
5778        crate::common::RegisterField::<0,0x1,1,0,p2pfs_ha::Podr, P2PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5779    }
5780    #[doc = "Port State"]
5781    #[inline(always)]
5782    pub fn pidr(
5783        self,
5784    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p2pfs_ha::Pidr, P2PfsHa_SPEC, crate::common::R>
5785    {
5786        crate::common::RegisterField::<1,0x1,1,0,p2pfs_ha::Pidr, P2PfsHa_SPEC,crate::common::R>::from_register(self,0)
5787    }
5788    #[doc = "Port Direction"]
5789    #[inline(always)]
5790    pub fn pdr(
5791        self,
5792    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p2pfs_ha::Pdr, P2PfsHa_SPEC, crate::common::RW>
5793    {
5794        crate::common::RegisterField::<2,0x1,1,0,p2pfs_ha::Pdr, P2PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5795    }
5796    #[doc = "Pull-up Control"]
5797    #[inline(always)]
5798    pub fn pcr(
5799        self,
5800    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p2pfs_ha::Pcr, P2PfsHa_SPEC, crate::common::RW>
5801    {
5802        crate::common::RegisterField::<4,0x1,1,0,p2pfs_ha::Pcr, P2PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5803    }
5804    #[doc = "N-Channel Open-Drain Control"]
5805    #[inline(always)]
5806    pub fn ncodr(
5807        self,
5808    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p2pfs_ha::Ncodr, P2PfsHa_SPEC, crate::common::RW>
5809    {
5810        crate::common::RegisterField::<6,0x1,1,0,p2pfs_ha::Ncodr, P2PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5811    }
5812    #[doc = "Port Drive Capability"]
5813    #[inline(always)]
5814    pub fn dscr(
5815        self,
5816    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p2pfs_ha::Dscr, P2PfsHa_SPEC, crate::common::RW>
5817    {
5818        crate::common::RegisterField::<10,0x3,1,0,p2pfs_ha::Dscr, P2PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5819    }
5820    #[doc = "Event on Falling/Event on Rising"]
5821    #[inline(always)]
5822    pub fn eofr(
5823        self,
5824    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p2pfs_ha::Eofr, P2PfsHa_SPEC, crate::common::RW>
5825    {
5826        crate::common::RegisterField::<12,0x3,1,0,p2pfs_ha::Eofr, P2PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5827    }
5828    #[doc = "IRQ Input Enable"]
5829    #[inline(always)]
5830    pub fn isel(
5831        self,
5832    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p2pfs_ha::Isel, P2PfsHa_SPEC, crate::common::RW>
5833    {
5834        crate::common::RegisterField::<14,0x1,1,0,p2pfs_ha::Isel, P2PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5835    }
5836    #[doc = "Analog Input Enable"]
5837    #[inline(always)]
5838    pub fn asel(
5839        self,
5840    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p2pfs_ha::Asel, P2PfsHa_SPEC, crate::common::RW>
5841    {
5842        crate::common::RegisterField::<15,0x1,1,0,p2pfs_ha::Asel, P2PfsHa_SPEC,crate::common::RW>::from_register(self,0)
5843    }
5844}
5845impl ::core::default::Default for P2PfsHa {
5846    #[inline(always)]
5847    fn default() -> P2PfsHa {
5848        <crate::RegValueT<P2PfsHa_SPEC> as RegisterValue<_>>::new(0)
5849    }
5850}
5851pub mod p2pfs_ha {
5852
5853    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5854    pub struct Podr_SPEC;
5855    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
5856    impl Podr {
5857        #[doc = "Output low"]
5858        pub const _0: Self = Self::new(0);
5859        #[doc = "Output high"]
5860        pub const _1: Self = Self::new(1);
5861    }
5862    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5863    pub struct Pidr_SPEC;
5864    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
5865    impl Pidr {
5866        #[doc = "Low level"]
5867        pub const _0: Self = Self::new(0);
5868        #[doc = "High level"]
5869        pub const _1: Self = Self::new(1);
5870    }
5871    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5872    pub struct Pdr_SPEC;
5873    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
5874    impl Pdr {
5875        #[doc = "Input (functions as an input pin)"]
5876        pub const _0: Self = Self::new(0);
5877        #[doc = "Output (functions as an output pin)"]
5878        pub const _1: Self = Self::new(1);
5879    }
5880    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5881    pub struct Pcr_SPEC;
5882    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
5883    impl Pcr {
5884        #[doc = "Disable input pull-up"]
5885        pub const _0: Self = Self::new(0);
5886        #[doc = "Enable input pull-up"]
5887        pub const _1: Self = Self::new(1);
5888    }
5889    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5890    pub struct Ncodr_SPEC;
5891    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
5892    impl Ncodr {
5893        #[doc = "Output CMOS"]
5894        pub const _0: Self = Self::new(0);
5895        #[doc = "Output NMOS open-drain"]
5896        pub const _1: Self = Self::new(1);
5897    }
5898    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5899    pub struct Dscr_SPEC;
5900    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
5901    impl Dscr {
5902        #[doc = "Low drive"]
5903        pub const _00: Self = Self::new(0);
5904        #[doc = "Middle drive"]
5905        pub const _01: Self = Self::new(1);
5906        #[doc = "Setting prohibited"]
5907        pub const _10: Self = Self::new(2);
5908        #[doc = "High drive"]
5909        pub const _11: Self = Self::new(3);
5910    }
5911    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5912    pub struct Eofr_SPEC;
5913    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
5914    impl Eofr {
5915        #[doc = "Don\'t care"]
5916        pub const _00: Self = Self::new(0);
5917        #[doc = "Detect rising edge"]
5918        pub const _01: Self = Self::new(1);
5919        #[doc = "Detect falling edge"]
5920        pub const _10: Self = Self::new(2);
5921        #[doc = "Detect both edges"]
5922        pub const _11: Self = Self::new(3);
5923    }
5924    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5925    pub struct Isel_SPEC;
5926    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
5927    impl Isel {
5928        #[doc = "Do not use as IRQn input pin"]
5929        pub const _0: Self = Self::new(0);
5930        #[doc = "Use as IRQn input pin"]
5931        pub const _1: Self = Self::new(1);
5932    }
5933    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5934    pub struct Asel_SPEC;
5935    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
5936    impl Asel {
5937        #[doc = "Do not use as analog pin"]
5938        pub const _0: Self = Self::new(0);
5939        #[doc = "Use as analog pin"]
5940        pub const _1: Self = Self::new(1);
5941    }
5942}
5943#[doc(hidden)]
5944#[derive(Copy, Clone, Eq, PartialEq)]
5945pub struct P2PfsBy_SPEC;
5946impl crate::sealed::RegSpec for P2PfsBy_SPEC {
5947    type DataType = u8;
5948}
5949#[doc = "Port 2%s Pin Function Select Register"]
5950pub type P2PfsBy = crate::RegValueT<P2PfsBy_SPEC>;
5951
5952impl P2PfsBy {
5953    #[doc = "Port Output Data"]
5954    #[inline(always)]
5955    pub fn podr(
5956        self,
5957    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p2pfs_by::Podr, P2PfsBy_SPEC, crate::common::RW>
5958    {
5959        crate::common::RegisterField::<0,0x1,1,0,p2pfs_by::Podr, P2PfsBy_SPEC,crate::common::RW>::from_register(self,0)
5960    }
5961    #[doc = "Port State"]
5962    #[inline(always)]
5963    pub fn pidr(
5964        self,
5965    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p2pfs_by::Pidr, P2PfsBy_SPEC, crate::common::R>
5966    {
5967        crate::common::RegisterField::<1,0x1,1,0,p2pfs_by::Pidr, P2PfsBy_SPEC,crate::common::R>::from_register(self,0)
5968    }
5969    #[doc = "Port Direction"]
5970    #[inline(always)]
5971    pub fn pdr(
5972        self,
5973    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p2pfs_by::Pdr, P2PfsBy_SPEC, crate::common::RW>
5974    {
5975        crate::common::RegisterField::<2,0x1,1,0,p2pfs_by::Pdr, P2PfsBy_SPEC,crate::common::RW>::from_register(self,0)
5976    }
5977    #[doc = "Pull-up Control"]
5978    #[inline(always)]
5979    pub fn pcr(
5980        self,
5981    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p2pfs_by::Pcr, P2PfsBy_SPEC, crate::common::RW>
5982    {
5983        crate::common::RegisterField::<4,0x1,1,0,p2pfs_by::Pcr, P2PfsBy_SPEC,crate::common::RW>::from_register(self,0)
5984    }
5985    #[doc = "N-Channel Open-Drain Control"]
5986    #[inline(always)]
5987    pub fn ncodr(
5988        self,
5989    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p2pfs_by::Ncodr, P2PfsBy_SPEC, crate::common::RW>
5990    {
5991        crate::common::RegisterField::<6,0x1,1,0,p2pfs_by::Ncodr, P2PfsBy_SPEC,crate::common::RW>::from_register(self,0)
5992    }
5993}
5994impl ::core::default::Default for P2PfsBy {
5995    #[inline(always)]
5996    fn default() -> P2PfsBy {
5997        <crate::RegValueT<P2PfsBy_SPEC> as RegisterValue<_>>::new(0)
5998    }
5999}
6000pub mod p2pfs_by {
6001
6002    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6003    pub struct Podr_SPEC;
6004    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
6005    impl Podr {
6006        #[doc = "Output low"]
6007        pub const _0: Self = Self::new(0);
6008        #[doc = "Output high"]
6009        pub const _1: Self = Self::new(1);
6010    }
6011    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6012    pub struct Pidr_SPEC;
6013    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
6014    impl Pidr {
6015        #[doc = "Low level"]
6016        pub const _0: Self = Self::new(0);
6017        #[doc = "High level"]
6018        pub const _1: Self = Self::new(1);
6019    }
6020    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6021    pub struct Pdr_SPEC;
6022    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
6023    impl Pdr {
6024        #[doc = "Input (functions as an input pin)"]
6025        pub const _0: Self = Self::new(0);
6026        #[doc = "Output (functions as an output pin)"]
6027        pub const _1: Self = Self::new(1);
6028    }
6029    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6030    pub struct Pcr_SPEC;
6031    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
6032    impl Pcr {
6033        #[doc = "Disable input pull-up"]
6034        pub const _0: Self = Self::new(0);
6035        #[doc = "Enable input pull-up"]
6036        pub const _1: Self = Self::new(1);
6037    }
6038    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6039    pub struct Ncodr_SPEC;
6040    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
6041    impl Ncodr {
6042        #[doc = "Output CMOS"]
6043        pub const _0: Self = Self::new(0);
6044        #[doc = "Output NMOS open-drain"]
6045        pub const _1: Self = Self::new(1);
6046    }
6047}
6048#[doc(hidden)]
6049#[derive(Copy, Clone, Eq, PartialEq)]
6050pub struct P300Pfs_SPEC;
6051impl crate::sealed::RegSpec for P300Pfs_SPEC {
6052    type DataType = u32;
6053}
6054#[doc = "Port 300 Pin Function Select Register"]
6055pub type P300Pfs = crate::RegValueT<P300Pfs_SPEC>;
6056
6057impl P300Pfs {
6058    #[doc = "Port Output Data"]
6059    #[inline(always)]
6060    pub fn podr(
6061        self,
6062    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p300pfs::Podr, P300Pfs_SPEC, crate::common::RW>
6063    {
6064        crate::common::RegisterField::<0,0x1,1,0,p300pfs::Podr, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6065    }
6066    #[doc = "Port State"]
6067    #[inline(always)]
6068    pub fn pidr(
6069        self,
6070    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p300pfs::Pidr, P300Pfs_SPEC, crate::common::R>
6071    {
6072        crate::common::RegisterField::<1,0x1,1,0,p300pfs::Pidr, P300Pfs_SPEC,crate::common::R>::from_register(self,0)
6073    }
6074    #[doc = "Port Direction"]
6075    #[inline(always)]
6076    pub fn pdr(
6077        self,
6078    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p300pfs::Pdr, P300Pfs_SPEC, crate::common::RW>
6079    {
6080        crate::common::RegisterField::<2,0x1,1,0,p300pfs::Pdr, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6081    }
6082    #[doc = "Pull-up Control"]
6083    #[inline(always)]
6084    pub fn pcr(
6085        self,
6086    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p300pfs::Pcr, P300Pfs_SPEC, crate::common::RW>
6087    {
6088        crate::common::RegisterField::<4,0x1,1,0,p300pfs::Pcr, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6089    }
6090    #[doc = "N-Channel Open-Drain Control"]
6091    #[inline(always)]
6092    pub fn ncodr(
6093        self,
6094    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p300pfs::Ncodr, P300Pfs_SPEC, crate::common::RW>
6095    {
6096        crate::common::RegisterField::<6,0x1,1,0,p300pfs::Ncodr, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6097    }
6098    #[doc = "Port Drive Capability"]
6099    #[inline(always)]
6100    pub fn dscr(
6101        self,
6102    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p300pfs::Dscr, P300Pfs_SPEC, crate::common::RW>
6103    {
6104        crate::common::RegisterField::<10,0x3,1,0,p300pfs::Dscr, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6105    }
6106    #[doc = "Event on Falling/Event on Rising"]
6107    #[inline(always)]
6108    pub fn eofr(
6109        self,
6110    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p300pfs::Eofr, P300Pfs_SPEC, crate::common::RW>
6111    {
6112        crate::common::RegisterField::<12,0x3,1,0,p300pfs::Eofr, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6113    }
6114    #[doc = "IRQ Input Enable"]
6115    #[inline(always)]
6116    pub fn isel(
6117        self,
6118    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p300pfs::Isel, P300Pfs_SPEC, crate::common::RW>
6119    {
6120        crate::common::RegisterField::<14,0x1,1,0,p300pfs::Isel, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6121    }
6122    #[doc = "Analog Input Enable"]
6123    #[inline(always)]
6124    pub fn asel(
6125        self,
6126    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p300pfs::Asel, P300Pfs_SPEC, crate::common::RW>
6127    {
6128        crate::common::RegisterField::<15,0x1,1,0,p300pfs::Asel, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6129    }
6130    #[doc = "Port Mode Control"]
6131    #[inline(always)]
6132    pub fn pmr(
6133        self,
6134    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p300pfs::Pmr, P300Pfs_SPEC, crate::common::RW>
6135    {
6136        crate::common::RegisterField::<16,0x1,1,0,p300pfs::Pmr, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6137    }
6138    #[doc = "Peripheral Select"]
6139    #[inline(always)]
6140    pub fn psel(
6141        self,
6142    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P300Pfs_SPEC, crate::common::RW> {
6143        crate::common::RegisterField::<24,0x1f,1,0,u8, P300Pfs_SPEC,crate::common::RW>::from_register(self,0)
6144    }
6145}
6146impl ::core::default::Default for P300Pfs {
6147    #[inline(always)]
6148    fn default() -> P300Pfs {
6149        <crate::RegValueT<P300Pfs_SPEC> as RegisterValue<_>>::new(65552)
6150    }
6151}
6152pub mod p300pfs {
6153
6154    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6155    pub struct Podr_SPEC;
6156    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
6157    impl Podr {
6158        #[doc = "Output low"]
6159        pub const _0: Self = Self::new(0);
6160        #[doc = "Output high"]
6161        pub const _1: Self = Self::new(1);
6162    }
6163    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6164    pub struct Pidr_SPEC;
6165    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
6166    impl Pidr {
6167        #[doc = "Low level"]
6168        pub const _0: Self = Self::new(0);
6169        #[doc = "High level"]
6170        pub const _1: Self = Self::new(1);
6171    }
6172    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6173    pub struct Pdr_SPEC;
6174    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
6175    impl Pdr {
6176        #[doc = "Input (functions as an input pin)"]
6177        pub const _0: Self = Self::new(0);
6178        #[doc = "Output (functions as an output pin)"]
6179        pub const _1: Self = Self::new(1);
6180    }
6181    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6182    pub struct Pcr_SPEC;
6183    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
6184    impl Pcr {
6185        #[doc = "Disable input pull-up"]
6186        pub const _0: Self = Self::new(0);
6187        #[doc = "Enable input pull-up"]
6188        pub const _1: Self = Self::new(1);
6189    }
6190    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6191    pub struct Ncodr_SPEC;
6192    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
6193    impl Ncodr {
6194        #[doc = "Output CMOS"]
6195        pub const _0: Self = Self::new(0);
6196        #[doc = "Output NMOS open-drain"]
6197        pub const _1: Self = Self::new(1);
6198    }
6199    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6200    pub struct Dscr_SPEC;
6201    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
6202    impl Dscr {
6203        #[doc = "Low drive"]
6204        pub const _00: Self = Self::new(0);
6205        #[doc = "Middle drive"]
6206        pub const _01: Self = Self::new(1);
6207        #[doc = "Setting prohibited"]
6208        pub const _10: Self = Self::new(2);
6209        #[doc = "High drive"]
6210        pub const _11: Self = Self::new(3);
6211    }
6212    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6213    pub struct Eofr_SPEC;
6214    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
6215    impl Eofr {
6216        #[doc = "Don\'t care"]
6217        pub const _00: Self = Self::new(0);
6218        #[doc = "Detect rising edge"]
6219        pub const _01: Self = Self::new(1);
6220        #[doc = "Detect falling edge"]
6221        pub const _10: Self = Self::new(2);
6222        #[doc = "Detect both edges"]
6223        pub const _11: Self = Self::new(3);
6224    }
6225    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6226    pub struct Isel_SPEC;
6227    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
6228    impl Isel {
6229        #[doc = "Do not use as IRQn input pin"]
6230        pub const _0: Self = Self::new(0);
6231        #[doc = "Use as IRQn input pin"]
6232        pub const _1: Self = Self::new(1);
6233    }
6234    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6235    pub struct Asel_SPEC;
6236    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
6237    impl Asel {
6238        #[doc = "Do not use as analog pin"]
6239        pub const _0: Self = Self::new(0);
6240        #[doc = "Use as analog pin"]
6241        pub const _1: Self = Self::new(1);
6242    }
6243    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6244    pub struct Pmr_SPEC;
6245    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
6246    impl Pmr {
6247        #[doc = "Use as general I/O pin"]
6248        pub const _0: Self = Self::new(0);
6249        #[doc = "Use as I/O port for peripheral functions"]
6250        pub const _1: Self = Self::new(1);
6251    }
6252}
6253#[doc(hidden)]
6254#[derive(Copy, Clone, Eq, PartialEq)]
6255pub struct P300PfsHa_SPEC;
6256impl crate::sealed::RegSpec for P300PfsHa_SPEC {
6257    type DataType = u16;
6258}
6259#[doc = "Port 300 Pin Function Select Register"]
6260pub type P300PfsHa = crate::RegValueT<P300PfsHa_SPEC>;
6261
6262impl P300PfsHa {
6263    #[doc = "Port Output Data"]
6264    #[inline(always)]
6265    pub fn podr(
6266        self,
6267    ) -> crate::common::RegisterField<
6268        0,
6269        0x1,
6270        1,
6271        0,
6272        p300pfs_ha::Podr,
6273        P300PfsHa_SPEC,
6274        crate::common::RW,
6275    > {
6276        crate::common::RegisterField::<
6277            0,
6278            0x1,
6279            1,
6280            0,
6281            p300pfs_ha::Podr,
6282            P300PfsHa_SPEC,
6283            crate::common::RW,
6284        >::from_register(self, 0)
6285    }
6286    #[doc = "Port State"]
6287    #[inline(always)]
6288    pub fn pidr(
6289        self,
6290    ) -> crate::common::RegisterField<
6291        1,
6292        0x1,
6293        1,
6294        0,
6295        p300pfs_ha::Pidr,
6296        P300PfsHa_SPEC,
6297        crate::common::R,
6298    > {
6299        crate::common::RegisterField::<
6300            1,
6301            0x1,
6302            1,
6303            0,
6304            p300pfs_ha::Pidr,
6305            P300PfsHa_SPEC,
6306            crate::common::R,
6307        >::from_register(self, 0)
6308    }
6309    #[doc = "Port Direction"]
6310    #[inline(always)]
6311    pub fn pdr(
6312        self,
6313    ) -> crate::common::RegisterField<
6314        2,
6315        0x1,
6316        1,
6317        0,
6318        p300pfs_ha::Pdr,
6319        P300PfsHa_SPEC,
6320        crate::common::RW,
6321    > {
6322        crate::common::RegisterField::<
6323            2,
6324            0x1,
6325            1,
6326            0,
6327            p300pfs_ha::Pdr,
6328            P300PfsHa_SPEC,
6329            crate::common::RW,
6330        >::from_register(self, 0)
6331    }
6332    #[doc = "Pull-up Control"]
6333    #[inline(always)]
6334    pub fn pcr(
6335        self,
6336    ) -> crate::common::RegisterField<
6337        4,
6338        0x1,
6339        1,
6340        0,
6341        p300pfs_ha::Pcr,
6342        P300PfsHa_SPEC,
6343        crate::common::RW,
6344    > {
6345        crate::common::RegisterField::<
6346            4,
6347            0x1,
6348            1,
6349            0,
6350            p300pfs_ha::Pcr,
6351            P300PfsHa_SPEC,
6352            crate::common::RW,
6353        >::from_register(self, 0)
6354    }
6355    #[doc = "N-Channel Open-Drain Control"]
6356    #[inline(always)]
6357    pub fn ncodr(
6358        self,
6359    ) -> crate::common::RegisterField<
6360        6,
6361        0x1,
6362        1,
6363        0,
6364        p300pfs_ha::Ncodr,
6365        P300PfsHa_SPEC,
6366        crate::common::RW,
6367    > {
6368        crate::common::RegisterField::<
6369            6,
6370            0x1,
6371            1,
6372            0,
6373            p300pfs_ha::Ncodr,
6374            P300PfsHa_SPEC,
6375            crate::common::RW,
6376        >::from_register(self, 0)
6377    }
6378    #[doc = "Port Drive Capability"]
6379    #[inline(always)]
6380    pub fn dscr(
6381        self,
6382    ) -> crate::common::RegisterField<
6383        10,
6384        0x3,
6385        1,
6386        0,
6387        p300pfs_ha::Dscr,
6388        P300PfsHa_SPEC,
6389        crate::common::RW,
6390    > {
6391        crate::common::RegisterField::<
6392            10,
6393            0x3,
6394            1,
6395            0,
6396            p300pfs_ha::Dscr,
6397            P300PfsHa_SPEC,
6398            crate::common::RW,
6399        >::from_register(self, 0)
6400    }
6401    #[doc = "Event on Falling/Event on Rising"]
6402    #[inline(always)]
6403    pub fn eofr(
6404        self,
6405    ) -> crate::common::RegisterField<
6406        12,
6407        0x3,
6408        1,
6409        0,
6410        p300pfs_ha::Eofr,
6411        P300PfsHa_SPEC,
6412        crate::common::RW,
6413    > {
6414        crate::common::RegisterField::<
6415            12,
6416            0x3,
6417            1,
6418            0,
6419            p300pfs_ha::Eofr,
6420            P300PfsHa_SPEC,
6421            crate::common::RW,
6422        >::from_register(self, 0)
6423    }
6424    #[doc = "IRQ Input Enable"]
6425    #[inline(always)]
6426    pub fn isel(
6427        self,
6428    ) -> crate::common::RegisterField<
6429        14,
6430        0x1,
6431        1,
6432        0,
6433        p300pfs_ha::Isel,
6434        P300PfsHa_SPEC,
6435        crate::common::RW,
6436    > {
6437        crate::common::RegisterField::<
6438            14,
6439            0x1,
6440            1,
6441            0,
6442            p300pfs_ha::Isel,
6443            P300PfsHa_SPEC,
6444            crate::common::RW,
6445        >::from_register(self, 0)
6446    }
6447    #[doc = "Analog Input Enable"]
6448    #[inline(always)]
6449    pub fn asel(
6450        self,
6451    ) -> crate::common::RegisterField<
6452        15,
6453        0x1,
6454        1,
6455        0,
6456        p300pfs_ha::Asel,
6457        P300PfsHa_SPEC,
6458        crate::common::RW,
6459    > {
6460        crate::common::RegisterField::<
6461            15,
6462            0x1,
6463            1,
6464            0,
6465            p300pfs_ha::Asel,
6466            P300PfsHa_SPEC,
6467            crate::common::RW,
6468        >::from_register(self, 0)
6469    }
6470}
6471impl ::core::default::Default for P300PfsHa {
6472    #[inline(always)]
6473    fn default() -> P300PfsHa {
6474        <crate::RegValueT<P300PfsHa_SPEC> as RegisterValue<_>>::new(16)
6475    }
6476}
6477pub mod p300pfs_ha {
6478
6479    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6480    pub struct Podr_SPEC;
6481    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
6482    impl Podr {
6483        #[doc = "Output low"]
6484        pub const _0: Self = Self::new(0);
6485        #[doc = "Output high"]
6486        pub const _1: Self = Self::new(1);
6487    }
6488    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6489    pub struct Pidr_SPEC;
6490    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
6491    impl Pidr {
6492        #[doc = "Low level"]
6493        pub const _0: Self = Self::new(0);
6494        #[doc = "High level"]
6495        pub const _1: Self = Self::new(1);
6496    }
6497    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6498    pub struct Pdr_SPEC;
6499    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
6500    impl Pdr {
6501        #[doc = "Input (functions as an input pin)"]
6502        pub const _0: Self = Self::new(0);
6503        #[doc = "Output (functions as an output pin)"]
6504        pub const _1: Self = Self::new(1);
6505    }
6506    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6507    pub struct Pcr_SPEC;
6508    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
6509    impl Pcr {
6510        #[doc = "Disable input pull-up"]
6511        pub const _0: Self = Self::new(0);
6512        #[doc = "Enable input pull-up"]
6513        pub const _1: Self = Self::new(1);
6514    }
6515    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6516    pub struct Ncodr_SPEC;
6517    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
6518    impl Ncodr {
6519        #[doc = "Output CMOS"]
6520        pub const _0: Self = Self::new(0);
6521        #[doc = "Output NMOS open-drain"]
6522        pub const _1: Self = Self::new(1);
6523    }
6524    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6525    pub struct Dscr_SPEC;
6526    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
6527    impl Dscr {
6528        #[doc = "Low drive"]
6529        pub const _00: Self = Self::new(0);
6530        #[doc = "Middle drive"]
6531        pub const _01: Self = Self::new(1);
6532        #[doc = "Setting prohibited"]
6533        pub const _10: Self = Self::new(2);
6534        #[doc = "High drive"]
6535        pub const _11: Self = Self::new(3);
6536    }
6537    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6538    pub struct Eofr_SPEC;
6539    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
6540    impl Eofr {
6541        #[doc = "Don\'t care"]
6542        pub const _00: Self = Self::new(0);
6543        #[doc = "Detect rising edge"]
6544        pub const _01: Self = Self::new(1);
6545        #[doc = "Detect falling edge"]
6546        pub const _10: Self = Self::new(2);
6547        #[doc = "Detect both edges"]
6548        pub const _11: Self = Self::new(3);
6549    }
6550    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6551    pub struct Isel_SPEC;
6552    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
6553    impl Isel {
6554        #[doc = "Do not use as IRQn input pin"]
6555        pub const _0: Self = Self::new(0);
6556        #[doc = "Use as IRQn input pin"]
6557        pub const _1: Self = Self::new(1);
6558    }
6559    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6560    pub struct Asel_SPEC;
6561    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
6562    impl Asel {
6563        #[doc = "Do not use as analog pin"]
6564        pub const _0: Self = Self::new(0);
6565        #[doc = "Use as analog pin"]
6566        pub const _1: Self = Self::new(1);
6567    }
6568}
6569#[doc(hidden)]
6570#[derive(Copy, Clone, Eq, PartialEq)]
6571pub struct P300PfsBy_SPEC;
6572impl crate::sealed::RegSpec for P300PfsBy_SPEC {
6573    type DataType = u8;
6574}
6575#[doc = "Port 300 Pin Function Select Register"]
6576pub type P300PfsBy = crate::RegValueT<P300PfsBy_SPEC>;
6577
6578impl P300PfsBy {
6579    #[doc = "Port Output Data"]
6580    #[inline(always)]
6581    pub fn podr(
6582        self,
6583    ) -> crate::common::RegisterField<
6584        0,
6585        0x1,
6586        1,
6587        0,
6588        p300pfs_by::Podr,
6589        P300PfsBy_SPEC,
6590        crate::common::RW,
6591    > {
6592        crate::common::RegisterField::<
6593            0,
6594            0x1,
6595            1,
6596            0,
6597            p300pfs_by::Podr,
6598            P300PfsBy_SPEC,
6599            crate::common::RW,
6600        >::from_register(self, 0)
6601    }
6602    #[doc = "Port State"]
6603    #[inline(always)]
6604    pub fn pidr(
6605        self,
6606    ) -> crate::common::RegisterField<
6607        1,
6608        0x1,
6609        1,
6610        0,
6611        p300pfs_by::Pidr,
6612        P300PfsBy_SPEC,
6613        crate::common::R,
6614    > {
6615        crate::common::RegisterField::<
6616            1,
6617            0x1,
6618            1,
6619            0,
6620            p300pfs_by::Pidr,
6621            P300PfsBy_SPEC,
6622            crate::common::R,
6623        >::from_register(self, 0)
6624    }
6625    #[doc = "Port Direction"]
6626    #[inline(always)]
6627    pub fn pdr(
6628        self,
6629    ) -> crate::common::RegisterField<
6630        2,
6631        0x1,
6632        1,
6633        0,
6634        p300pfs_by::Pdr,
6635        P300PfsBy_SPEC,
6636        crate::common::RW,
6637    > {
6638        crate::common::RegisterField::<
6639            2,
6640            0x1,
6641            1,
6642            0,
6643            p300pfs_by::Pdr,
6644            P300PfsBy_SPEC,
6645            crate::common::RW,
6646        >::from_register(self, 0)
6647    }
6648    #[doc = "Pull-up Control"]
6649    #[inline(always)]
6650    pub fn pcr(
6651        self,
6652    ) -> crate::common::RegisterField<
6653        4,
6654        0x1,
6655        1,
6656        0,
6657        p300pfs_by::Pcr,
6658        P300PfsBy_SPEC,
6659        crate::common::RW,
6660    > {
6661        crate::common::RegisterField::<
6662            4,
6663            0x1,
6664            1,
6665            0,
6666            p300pfs_by::Pcr,
6667            P300PfsBy_SPEC,
6668            crate::common::RW,
6669        >::from_register(self, 0)
6670    }
6671    #[doc = "N-Channel Open-Drain Control"]
6672    #[inline(always)]
6673    pub fn ncodr(
6674        self,
6675    ) -> crate::common::RegisterField<
6676        6,
6677        0x1,
6678        1,
6679        0,
6680        p300pfs_by::Ncodr,
6681        P300PfsBy_SPEC,
6682        crate::common::RW,
6683    > {
6684        crate::common::RegisterField::<
6685            6,
6686            0x1,
6687            1,
6688            0,
6689            p300pfs_by::Ncodr,
6690            P300PfsBy_SPEC,
6691            crate::common::RW,
6692        >::from_register(self, 0)
6693    }
6694}
6695impl ::core::default::Default for P300PfsBy {
6696    #[inline(always)]
6697    fn default() -> P300PfsBy {
6698        <crate::RegValueT<P300PfsBy_SPEC> as RegisterValue<_>>::new(16)
6699    }
6700}
6701pub mod p300pfs_by {
6702
6703    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6704    pub struct Podr_SPEC;
6705    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
6706    impl Podr {
6707        #[doc = "Output low"]
6708        pub const _0: Self = Self::new(0);
6709        #[doc = "Output high"]
6710        pub const _1: Self = Self::new(1);
6711    }
6712    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6713    pub struct Pidr_SPEC;
6714    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
6715    impl Pidr {
6716        #[doc = "Low level"]
6717        pub const _0: Self = Self::new(0);
6718        #[doc = "High level"]
6719        pub const _1: Self = Self::new(1);
6720    }
6721    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6722    pub struct Pdr_SPEC;
6723    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
6724    impl Pdr {
6725        #[doc = "Input (functions as an input pin)"]
6726        pub const _0: Self = Self::new(0);
6727        #[doc = "Output (functions as an output pin)"]
6728        pub const _1: Self = Self::new(1);
6729    }
6730    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6731    pub struct Pcr_SPEC;
6732    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
6733    impl Pcr {
6734        #[doc = "Disable input pull-up"]
6735        pub const _0: Self = Self::new(0);
6736        #[doc = "Enable input pull-up"]
6737        pub const _1: Self = Self::new(1);
6738    }
6739    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6740    pub struct Ncodr_SPEC;
6741    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
6742    impl Ncodr {
6743        #[doc = "Output CMOS"]
6744        pub const _0: Self = Self::new(0);
6745        #[doc = "Output NMOS open-drain"]
6746        pub const _1: Self = Self::new(1);
6747    }
6748}
6749#[doc(hidden)]
6750#[derive(Copy, Clone, Eq, PartialEq)]
6751pub struct P30Pfs_SPEC;
6752impl crate::sealed::RegSpec for P30Pfs_SPEC {
6753    type DataType = u32;
6754}
6755#[doc = "Port 30%s Pin Function Select Register"]
6756pub type P30Pfs = crate::RegValueT<P30Pfs_SPEC>;
6757
6758impl P30Pfs {
6759    #[doc = "Port Output Data"]
6760    #[inline(always)]
6761    pub fn podr(
6762        self,
6763    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p30pfs::Podr, P30Pfs_SPEC, crate::common::RW>
6764    {
6765        crate::common::RegisterField::<0,0x1,1,0,p30pfs::Podr, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6766    }
6767    #[doc = "Port State"]
6768    #[inline(always)]
6769    pub fn pidr(
6770        self,
6771    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p30pfs::Pidr, P30Pfs_SPEC, crate::common::R>
6772    {
6773        crate::common::RegisterField::<1,0x1,1,0,p30pfs::Pidr, P30Pfs_SPEC,crate::common::R>::from_register(self,0)
6774    }
6775    #[doc = "Port Direction"]
6776    #[inline(always)]
6777    pub fn pdr(
6778        self,
6779    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p30pfs::Pdr, P30Pfs_SPEC, crate::common::RW>
6780    {
6781        crate::common::RegisterField::<2,0x1,1,0,p30pfs::Pdr, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6782    }
6783    #[doc = "Pull-up Control"]
6784    #[inline(always)]
6785    pub fn pcr(
6786        self,
6787    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p30pfs::Pcr, P30Pfs_SPEC, crate::common::RW>
6788    {
6789        crate::common::RegisterField::<4,0x1,1,0,p30pfs::Pcr, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6790    }
6791    #[doc = "N-Channel Open-Drain Control"]
6792    #[inline(always)]
6793    pub fn ncodr(
6794        self,
6795    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p30pfs::Ncodr, P30Pfs_SPEC, crate::common::RW>
6796    {
6797        crate::common::RegisterField::<6,0x1,1,0,p30pfs::Ncodr, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6798    }
6799    #[doc = "Port Drive Capability"]
6800    #[inline(always)]
6801    pub fn dscr(
6802        self,
6803    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p30pfs::Dscr, P30Pfs_SPEC, crate::common::RW>
6804    {
6805        crate::common::RegisterField::<10,0x3,1,0,p30pfs::Dscr, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6806    }
6807    #[doc = "Event on Falling/Event on Rising"]
6808    #[inline(always)]
6809    pub fn eofr(
6810        self,
6811    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p30pfs::Eofr, P30Pfs_SPEC, crate::common::RW>
6812    {
6813        crate::common::RegisterField::<12,0x3,1,0,p30pfs::Eofr, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6814    }
6815    #[doc = "IRQ Input Enable"]
6816    #[inline(always)]
6817    pub fn isel(
6818        self,
6819    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p30pfs::Isel, P30Pfs_SPEC, crate::common::RW>
6820    {
6821        crate::common::RegisterField::<14,0x1,1,0,p30pfs::Isel, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6822    }
6823    #[doc = "Analog Input Enable"]
6824    #[inline(always)]
6825    pub fn asel(
6826        self,
6827    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p30pfs::Asel, P30Pfs_SPEC, crate::common::RW>
6828    {
6829        crate::common::RegisterField::<15,0x1,1,0,p30pfs::Asel, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6830    }
6831    #[doc = "Port Mode Control"]
6832    #[inline(always)]
6833    pub fn pmr(
6834        self,
6835    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p30pfs::Pmr, P30Pfs_SPEC, crate::common::RW>
6836    {
6837        crate::common::RegisterField::<16,0x1,1,0,p30pfs::Pmr, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6838    }
6839    #[doc = "Peripheral Select"]
6840    #[inline(always)]
6841    pub fn psel(
6842        self,
6843    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P30Pfs_SPEC, crate::common::RW> {
6844        crate::common::RegisterField::<24,0x1f,1,0,u8, P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
6845    }
6846}
6847impl ::core::default::Default for P30Pfs {
6848    #[inline(always)]
6849    fn default() -> P30Pfs {
6850        <crate::RegValueT<P30Pfs_SPEC> as RegisterValue<_>>::new(0)
6851    }
6852}
6853pub mod p30pfs {
6854
6855    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6856    pub struct Podr_SPEC;
6857    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
6858    impl Podr {
6859        #[doc = "Output low"]
6860        pub const _0: Self = Self::new(0);
6861        #[doc = "Output high"]
6862        pub const _1: Self = Self::new(1);
6863    }
6864    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6865    pub struct Pidr_SPEC;
6866    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
6867    impl Pidr {
6868        #[doc = "Low level"]
6869        pub const _0: Self = Self::new(0);
6870        #[doc = "High level"]
6871        pub const _1: Self = Self::new(1);
6872    }
6873    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6874    pub struct Pdr_SPEC;
6875    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
6876    impl Pdr {
6877        #[doc = "Input (functions as an input pin)"]
6878        pub const _0: Self = Self::new(0);
6879        #[doc = "Output (functions as an output pin)"]
6880        pub const _1: Self = Self::new(1);
6881    }
6882    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6883    pub struct Pcr_SPEC;
6884    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
6885    impl Pcr {
6886        #[doc = "Disable input pull-up"]
6887        pub const _0: Self = Self::new(0);
6888        #[doc = "Enable input pull-up"]
6889        pub const _1: Self = Self::new(1);
6890    }
6891    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6892    pub struct Ncodr_SPEC;
6893    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
6894    impl Ncodr {
6895        #[doc = "Output CMOS"]
6896        pub const _0: Self = Self::new(0);
6897        #[doc = "Output NMOS open-drain"]
6898        pub const _1: Self = Self::new(1);
6899    }
6900    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6901    pub struct Dscr_SPEC;
6902    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
6903    impl Dscr {
6904        #[doc = "Low drive"]
6905        pub const _00: Self = Self::new(0);
6906        #[doc = "Middle drive"]
6907        pub const _01: Self = Self::new(1);
6908        #[doc = "Setting prohibited"]
6909        pub const _10: Self = Self::new(2);
6910        #[doc = "High drive"]
6911        pub const _11: Self = Self::new(3);
6912    }
6913    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6914    pub struct Eofr_SPEC;
6915    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
6916    impl Eofr {
6917        #[doc = "Don\'t care"]
6918        pub const _00: Self = Self::new(0);
6919        #[doc = "Detect rising edge"]
6920        pub const _01: Self = Self::new(1);
6921        #[doc = "Detect falling edge"]
6922        pub const _10: Self = Self::new(2);
6923        #[doc = "Detect both edges"]
6924        pub const _11: Self = Self::new(3);
6925    }
6926    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6927    pub struct Isel_SPEC;
6928    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
6929    impl Isel {
6930        #[doc = "Do not use as IRQn input pin"]
6931        pub const _0: Self = Self::new(0);
6932        #[doc = "Use as IRQn input pin"]
6933        pub const _1: Self = Self::new(1);
6934    }
6935    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6936    pub struct Asel_SPEC;
6937    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
6938    impl Asel {
6939        #[doc = "Do not use as analog pin"]
6940        pub const _0: Self = Self::new(0);
6941        #[doc = "Use as analog pin"]
6942        pub const _1: Self = Self::new(1);
6943    }
6944    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6945    pub struct Pmr_SPEC;
6946    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
6947    impl Pmr {
6948        #[doc = "Use as general I/O pin"]
6949        pub const _0: Self = Self::new(0);
6950        #[doc = "Use as I/O port for peripheral functions"]
6951        pub const _1: Self = Self::new(1);
6952    }
6953}
6954#[doc(hidden)]
6955#[derive(Copy, Clone, Eq, PartialEq)]
6956pub struct P30PfsHa_SPEC;
6957impl crate::sealed::RegSpec for P30PfsHa_SPEC {
6958    type DataType = u16;
6959}
6960#[doc = "Port 30%s Pin Function Select Register"]
6961pub type P30PfsHa = crate::RegValueT<P30PfsHa_SPEC>;
6962
6963impl P30PfsHa {
6964    #[doc = "Port Output Data"]
6965    #[inline(always)]
6966    pub fn podr(
6967        self,
6968    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p30pfs_ha::Podr, P30PfsHa_SPEC, crate::common::RW>
6969    {
6970        crate::common::RegisterField::<
6971            0,
6972            0x1,
6973            1,
6974            0,
6975            p30pfs_ha::Podr,
6976            P30PfsHa_SPEC,
6977            crate::common::RW,
6978        >::from_register(self, 0)
6979    }
6980    #[doc = "Port State"]
6981    #[inline(always)]
6982    pub fn pidr(
6983        self,
6984    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p30pfs_ha::Pidr, P30PfsHa_SPEC, crate::common::R>
6985    {
6986        crate::common::RegisterField::<1,0x1,1,0,p30pfs_ha::Pidr, P30PfsHa_SPEC,crate::common::R>::from_register(self,0)
6987    }
6988    #[doc = "Port Direction"]
6989    #[inline(always)]
6990    pub fn pdr(
6991        self,
6992    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p30pfs_ha::Pdr, P30PfsHa_SPEC, crate::common::RW>
6993    {
6994        crate::common::RegisterField::<2,0x1,1,0,p30pfs_ha::Pdr, P30PfsHa_SPEC,crate::common::RW>::from_register(self,0)
6995    }
6996    #[doc = "Pull-up Control"]
6997    #[inline(always)]
6998    pub fn pcr(
6999        self,
7000    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p30pfs_ha::Pcr, P30PfsHa_SPEC, crate::common::RW>
7001    {
7002        crate::common::RegisterField::<4,0x1,1,0,p30pfs_ha::Pcr, P30PfsHa_SPEC,crate::common::RW>::from_register(self,0)
7003    }
7004    #[doc = "N-Channel Open-Drain Control"]
7005    #[inline(always)]
7006    pub fn ncodr(
7007        self,
7008    ) -> crate::common::RegisterField<
7009        6,
7010        0x1,
7011        1,
7012        0,
7013        p30pfs_ha::Ncodr,
7014        P30PfsHa_SPEC,
7015        crate::common::RW,
7016    > {
7017        crate::common::RegisterField::<
7018            6,
7019            0x1,
7020            1,
7021            0,
7022            p30pfs_ha::Ncodr,
7023            P30PfsHa_SPEC,
7024            crate::common::RW,
7025        >::from_register(self, 0)
7026    }
7027    #[doc = "Port Drive Capability"]
7028    #[inline(always)]
7029    pub fn dscr(
7030        self,
7031    ) -> crate::common::RegisterField<
7032        10,
7033        0x3,
7034        1,
7035        0,
7036        p30pfs_ha::Dscr,
7037        P30PfsHa_SPEC,
7038        crate::common::RW,
7039    > {
7040        crate::common::RegisterField::<
7041            10,
7042            0x3,
7043            1,
7044            0,
7045            p30pfs_ha::Dscr,
7046            P30PfsHa_SPEC,
7047            crate::common::RW,
7048        >::from_register(self, 0)
7049    }
7050    #[doc = "Event on Falling/Event on Rising"]
7051    #[inline(always)]
7052    pub fn eofr(
7053        self,
7054    ) -> crate::common::RegisterField<
7055        12,
7056        0x3,
7057        1,
7058        0,
7059        p30pfs_ha::Eofr,
7060        P30PfsHa_SPEC,
7061        crate::common::RW,
7062    > {
7063        crate::common::RegisterField::<
7064            12,
7065            0x3,
7066            1,
7067            0,
7068            p30pfs_ha::Eofr,
7069            P30PfsHa_SPEC,
7070            crate::common::RW,
7071        >::from_register(self, 0)
7072    }
7073    #[doc = "IRQ Input Enable"]
7074    #[inline(always)]
7075    pub fn isel(
7076        self,
7077    ) -> crate::common::RegisterField<
7078        14,
7079        0x1,
7080        1,
7081        0,
7082        p30pfs_ha::Isel,
7083        P30PfsHa_SPEC,
7084        crate::common::RW,
7085    > {
7086        crate::common::RegisterField::<
7087            14,
7088            0x1,
7089            1,
7090            0,
7091            p30pfs_ha::Isel,
7092            P30PfsHa_SPEC,
7093            crate::common::RW,
7094        >::from_register(self, 0)
7095    }
7096    #[doc = "Analog Input Enable"]
7097    #[inline(always)]
7098    pub fn asel(
7099        self,
7100    ) -> crate::common::RegisterField<
7101        15,
7102        0x1,
7103        1,
7104        0,
7105        p30pfs_ha::Asel,
7106        P30PfsHa_SPEC,
7107        crate::common::RW,
7108    > {
7109        crate::common::RegisterField::<
7110            15,
7111            0x1,
7112            1,
7113            0,
7114            p30pfs_ha::Asel,
7115            P30PfsHa_SPEC,
7116            crate::common::RW,
7117        >::from_register(self, 0)
7118    }
7119}
7120impl ::core::default::Default for P30PfsHa {
7121    #[inline(always)]
7122    fn default() -> P30PfsHa {
7123        <crate::RegValueT<P30PfsHa_SPEC> as RegisterValue<_>>::new(0)
7124    }
7125}
7126pub mod p30pfs_ha {
7127
7128    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7129    pub struct Podr_SPEC;
7130    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
7131    impl Podr {
7132        #[doc = "Output low"]
7133        pub const _0: Self = Self::new(0);
7134        #[doc = "Output high"]
7135        pub const _1: Self = Self::new(1);
7136    }
7137    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7138    pub struct Pidr_SPEC;
7139    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
7140    impl Pidr {
7141        #[doc = "Low level"]
7142        pub const _0: Self = Self::new(0);
7143        #[doc = "High level"]
7144        pub const _1: Self = Self::new(1);
7145    }
7146    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7147    pub struct Pdr_SPEC;
7148    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
7149    impl Pdr {
7150        #[doc = "Input (functions as an input pin)"]
7151        pub const _0: Self = Self::new(0);
7152        #[doc = "Output (functions as an output pin)"]
7153        pub const _1: Self = Self::new(1);
7154    }
7155    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7156    pub struct Pcr_SPEC;
7157    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
7158    impl Pcr {
7159        #[doc = "Disable input pull-up"]
7160        pub const _0: Self = Self::new(0);
7161        #[doc = "Enable input pull-up"]
7162        pub const _1: Self = Self::new(1);
7163    }
7164    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7165    pub struct Ncodr_SPEC;
7166    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
7167    impl Ncodr {
7168        #[doc = "Output CMOS"]
7169        pub const _0: Self = Self::new(0);
7170        #[doc = "Output NMOS open-drain"]
7171        pub const _1: Self = Self::new(1);
7172    }
7173    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7174    pub struct Dscr_SPEC;
7175    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
7176    impl Dscr {
7177        #[doc = "Low drive"]
7178        pub const _00: Self = Self::new(0);
7179        #[doc = "Middle drive"]
7180        pub const _01: Self = Self::new(1);
7181        #[doc = "Setting prohibited"]
7182        pub const _10: Self = Self::new(2);
7183        #[doc = "High drive"]
7184        pub const _11: Self = Self::new(3);
7185    }
7186    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7187    pub struct Eofr_SPEC;
7188    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
7189    impl Eofr {
7190        #[doc = "Don\'t care"]
7191        pub const _00: Self = Self::new(0);
7192        #[doc = "Detect rising edge"]
7193        pub const _01: Self = Self::new(1);
7194        #[doc = "Detect falling edge"]
7195        pub const _10: Self = Self::new(2);
7196        #[doc = "Detect both edges"]
7197        pub const _11: Self = Self::new(3);
7198    }
7199    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7200    pub struct Isel_SPEC;
7201    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
7202    impl Isel {
7203        #[doc = "Do not use as IRQn input pin"]
7204        pub const _0: Self = Self::new(0);
7205        #[doc = "Use as IRQn input pin"]
7206        pub const _1: Self = Self::new(1);
7207    }
7208    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7209    pub struct Asel_SPEC;
7210    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
7211    impl Asel {
7212        #[doc = "Do not use as analog pin"]
7213        pub const _0: Self = Self::new(0);
7214        #[doc = "Use as analog pin"]
7215        pub const _1: Self = Self::new(1);
7216    }
7217}
7218#[doc(hidden)]
7219#[derive(Copy, Clone, Eq, PartialEq)]
7220pub struct P30PfsBy_SPEC;
7221impl crate::sealed::RegSpec for P30PfsBy_SPEC {
7222    type DataType = u8;
7223}
7224#[doc = "Port 30%s Pin Function Select Register"]
7225pub type P30PfsBy = crate::RegValueT<P30PfsBy_SPEC>;
7226
7227impl P30PfsBy {
7228    #[doc = "Port Output Data"]
7229    #[inline(always)]
7230    pub fn podr(
7231        self,
7232    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p30pfs_by::Podr, P30PfsBy_SPEC, crate::common::RW>
7233    {
7234        crate::common::RegisterField::<
7235            0,
7236            0x1,
7237            1,
7238            0,
7239            p30pfs_by::Podr,
7240            P30PfsBy_SPEC,
7241            crate::common::RW,
7242        >::from_register(self, 0)
7243    }
7244    #[doc = "Port State"]
7245    #[inline(always)]
7246    pub fn pidr(
7247        self,
7248    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p30pfs_by::Pidr, P30PfsBy_SPEC, crate::common::R>
7249    {
7250        crate::common::RegisterField::<1,0x1,1,0,p30pfs_by::Pidr, P30PfsBy_SPEC,crate::common::R>::from_register(self,0)
7251    }
7252    #[doc = "Port Direction"]
7253    #[inline(always)]
7254    pub fn pdr(
7255        self,
7256    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p30pfs_by::Pdr, P30PfsBy_SPEC, crate::common::RW>
7257    {
7258        crate::common::RegisterField::<2,0x1,1,0,p30pfs_by::Pdr, P30PfsBy_SPEC,crate::common::RW>::from_register(self,0)
7259    }
7260    #[doc = "Pull-up Control"]
7261    #[inline(always)]
7262    pub fn pcr(
7263        self,
7264    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p30pfs_by::Pcr, P30PfsBy_SPEC, crate::common::RW>
7265    {
7266        crate::common::RegisterField::<4,0x1,1,0,p30pfs_by::Pcr, P30PfsBy_SPEC,crate::common::RW>::from_register(self,0)
7267    }
7268    #[doc = "N-Channel Open-Drain Control"]
7269    #[inline(always)]
7270    pub fn ncodr(
7271        self,
7272    ) -> crate::common::RegisterField<
7273        6,
7274        0x1,
7275        1,
7276        0,
7277        p30pfs_by::Ncodr,
7278        P30PfsBy_SPEC,
7279        crate::common::RW,
7280    > {
7281        crate::common::RegisterField::<
7282            6,
7283            0x1,
7284            1,
7285            0,
7286            p30pfs_by::Ncodr,
7287            P30PfsBy_SPEC,
7288            crate::common::RW,
7289        >::from_register(self, 0)
7290    }
7291}
7292impl ::core::default::Default for P30PfsBy {
7293    #[inline(always)]
7294    fn default() -> P30PfsBy {
7295        <crate::RegValueT<P30PfsBy_SPEC> as RegisterValue<_>>::new(0)
7296    }
7297}
7298pub mod p30pfs_by {
7299
7300    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7301    pub struct Podr_SPEC;
7302    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
7303    impl Podr {
7304        #[doc = "Output low"]
7305        pub const _0: Self = Self::new(0);
7306        #[doc = "Output high"]
7307        pub const _1: Self = Self::new(1);
7308    }
7309    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7310    pub struct Pidr_SPEC;
7311    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
7312    impl Pidr {
7313        #[doc = "Low level"]
7314        pub const _0: Self = Self::new(0);
7315        #[doc = "High level"]
7316        pub const _1: Self = Self::new(1);
7317    }
7318    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7319    pub struct Pdr_SPEC;
7320    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
7321    impl Pdr {
7322        #[doc = "Input (functions as an input pin)"]
7323        pub const _0: Self = Self::new(0);
7324        #[doc = "Output (functions as an output pin)"]
7325        pub const _1: Self = Self::new(1);
7326    }
7327    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7328    pub struct Pcr_SPEC;
7329    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
7330    impl Pcr {
7331        #[doc = "Disable input pull-up"]
7332        pub const _0: Self = Self::new(0);
7333        #[doc = "Enable input pull-up"]
7334        pub const _1: Self = Self::new(1);
7335    }
7336    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7337    pub struct Ncodr_SPEC;
7338    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
7339    impl Ncodr {
7340        #[doc = "Output CMOS"]
7341        pub const _0: Self = Self::new(0);
7342        #[doc = "Output NMOS open-drain"]
7343        pub const _1: Self = Self::new(1);
7344    }
7345}
7346#[doc(hidden)]
7347#[derive(Copy, Clone, Eq, PartialEq)]
7348pub struct P40Pfs_SPEC;
7349impl crate::sealed::RegSpec for P40Pfs_SPEC {
7350    type DataType = u32;
7351}
7352#[doc = "Port 40%s Pin Function Select Register"]
7353pub type P40Pfs = crate::RegValueT<P40Pfs_SPEC>;
7354
7355impl P40Pfs {
7356    #[doc = "Port Output Data"]
7357    #[inline(always)]
7358    pub fn podr(
7359        self,
7360    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p40pfs::Podr, P40Pfs_SPEC, crate::common::RW>
7361    {
7362        crate::common::RegisterField::<0,0x1,1,0,p40pfs::Podr, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7363    }
7364    #[doc = "Port State"]
7365    #[inline(always)]
7366    pub fn pidr(
7367        self,
7368    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p40pfs::Pidr, P40Pfs_SPEC, crate::common::R>
7369    {
7370        crate::common::RegisterField::<1,0x1,1,0,p40pfs::Pidr, P40Pfs_SPEC,crate::common::R>::from_register(self,0)
7371    }
7372    #[doc = "Port Direction"]
7373    #[inline(always)]
7374    pub fn pdr(
7375        self,
7376    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p40pfs::Pdr, P40Pfs_SPEC, crate::common::RW>
7377    {
7378        crate::common::RegisterField::<2,0x1,1,0,p40pfs::Pdr, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7379    }
7380    #[doc = "Pull-up Control"]
7381    #[inline(always)]
7382    pub fn pcr(
7383        self,
7384    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p40pfs::Pcr, P40Pfs_SPEC, crate::common::RW>
7385    {
7386        crate::common::RegisterField::<4,0x1,1,0,p40pfs::Pcr, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7387    }
7388    #[doc = "N-Channel Open-Drain Control"]
7389    #[inline(always)]
7390    pub fn ncodr(
7391        self,
7392    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p40pfs::Ncodr, P40Pfs_SPEC, crate::common::RW>
7393    {
7394        crate::common::RegisterField::<6,0x1,1,0,p40pfs::Ncodr, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7395    }
7396    #[doc = "Port Drive Capability"]
7397    #[inline(always)]
7398    pub fn dscr(
7399        self,
7400    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p40pfs::Dscr, P40Pfs_SPEC, crate::common::RW>
7401    {
7402        crate::common::RegisterField::<10,0x3,1,0,p40pfs::Dscr, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7403    }
7404    #[doc = "Event on Falling/Event on Rising"]
7405    #[inline(always)]
7406    pub fn eofr(
7407        self,
7408    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p40pfs::Eofr, P40Pfs_SPEC, crate::common::RW>
7409    {
7410        crate::common::RegisterField::<12,0x3,1,0,p40pfs::Eofr, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7411    }
7412    #[doc = "IRQ Input Enable"]
7413    #[inline(always)]
7414    pub fn isel(
7415        self,
7416    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p40pfs::Isel, P40Pfs_SPEC, crate::common::RW>
7417    {
7418        crate::common::RegisterField::<14,0x1,1,0,p40pfs::Isel, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7419    }
7420    #[doc = "Analog Input Enable"]
7421    #[inline(always)]
7422    pub fn asel(
7423        self,
7424    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p40pfs::Asel, P40Pfs_SPEC, crate::common::RW>
7425    {
7426        crate::common::RegisterField::<15,0x1,1,0,p40pfs::Asel, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7427    }
7428    #[doc = "Port Mode Control"]
7429    #[inline(always)]
7430    pub fn pmr(
7431        self,
7432    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p40pfs::Pmr, P40Pfs_SPEC, crate::common::RW>
7433    {
7434        crate::common::RegisterField::<16,0x1,1,0,p40pfs::Pmr, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7435    }
7436    #[doc = "Peripheral Select"]
7437    #[inline(always)]
7438    pub fn psel(
7439        self,
7440    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P40Pfs_SPEC, crate::common::RW> {
7441        crate::common::RegisterField::<24,0x1f,1,0,u8, P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
7442    }
7443}
7444impl ::core::default::Default for P40Pfs {
7445    #[inline(always)]
7446    fn default() -> P40Pfs {
7447        <crate::RegValueT<P40Pfs_SPEC> as RegisterValue<_>>::new(0)
7448    }
7449}
7450pub mod p40pfs {
7451
7452    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7453    pub struct Podr_SPEC;
7454    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
7455    impl Podr {
7456        #[doc = "Output low"]
7457        pub const _0: Self = Self::new(0);
7458        #[doc = "Output high"]
7459        pub const _1: Self = Self::new(1);
7460    }
7461    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7462    pub struct Pidr_SPEC;
7463    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
7464    impl Pidr {
7465        #[doc = "Low level"]
7466        pub const _0: Self = Self::new(0);
7467        #[doc = "High level"]
7468        pub const _1: Self = Self::new(1);
7469    }
7470    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7471    pub struct Pdr_SPEC;
7472    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
7473    impl Pdr {
7474        #[doc = "Input (functions as an input pin)"]
7475        pub const _0: Self = Self::new(0);
7476        #[doc = "Output (functions as an output pin)"]
7477        pub const _1: Self = Self::new(1);
7478    }
7479    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7480    pub struct Pcr_SPEC;
7481    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
7482    impl Pcr {
7483        #[doc = "Disable input pull-up"]
7484        pub const _0: Self = Self::new(0);
7485        #[doc = "Enable input pull-up"]
7486        pub const _1: Self = Self::new(1);
7487    }
7488    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7489    pub struct Ncodr_SPEC;
7490    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
7491    impl Ncodr {
7492        #[doc = "Output CMOS"]
7493        pub const _0: Self = Self::new(0);
7494        #[doc = "Output NMOS open-drain"]
7495        pub const _1: Self = Self::new(1);
7496    }
7497    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7498    pub struct Dscr_SPEC;
7499    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
7500    impl Dscr {
7501        #[doc = "Low drive"]
7502        pub const _00: Self = Self::new(0);
7503        #[doc = "Middle drive"]
7504        pub const _01: Self = Self::new(1);
7505        #[doc = "Setting prohibited"]
7506        pub const _10: Self = Self::new(2);
7507        #[doc = "High drive"]
7508        pub const _11: Self = Self::new(3);
7509    }
7510    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7511    pub struct Eofr_SPEC;
7512    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
7513    impl Eofr {
7514        #[doc = "Don\'t care"]
7515        pub const _00: Self = Self::new(0);
7516        #[doc = "Detect rising edge"]
7517        pub const _01: Self = Self::new(1);
7518        #[doc = "Detect falling edge"]
7519        pub const _10: Self = Self::new(2);
7520        #[doc = "Detect both edges"]
7521        pub const _11: Self = Self::new(3);
7522    }
7523    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7524    pub struct Isel_SPEC;
7525    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
7526    impl Isel {
7527        #[doc = "Do not use as IRQn input pin"]
7528        pub const _0: Self = Self::new(0);
7529        #[doc = "Use as IRQn input pin"]
7530        pub const _1: Self = Self::new(1);
7531    }
7532    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7533    pub struct Asel_SPEC;
7534    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
7535    impl Asel {
7536        #[doc = "Do not use as analog pin"]
7537        pub const _0: Self = Self::new(0);
7538        #[doc = "Use as analog pin"]
7539        pub const _1: Self = Self::new(1);
7540    }
7541    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7542    pub struct Pmr_SPEC;
7543    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
7544    impl Pmr {
7545        #[doc = "Use as general I/O pin"]
7546        pub const _0: Self = Self::new(0);
7547        #[doc = "Use as I/O port for peripheral functions"]
7548        pub const _1: Self = Self::new(1);
7549    }
7550}
7551#[doc(hidden)]
7552#[derive(Copy, Clone, Eq, PartialEq)]
7553pub struct P40PfsHa_SPEC;
7554impl crate::sealed::RegSpec for P40PfsHa_SPEC {
7555    type DataType = u16;
7556}
7557#[doc = "Port 40%s Pin Function Select Register"]
7558pub type P40PfsHa = crate::RegValueT<P40PfsHa_SPEC>;
7559
7560impl P40PfsHa {
7561    #[doc = "Port Output Data"]
7562    #[inline(always)]
7563    pub fn podr(
7564        self,
7565    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p40pfs_ha::Podr, P40PfsHa_SPEC, crate::common::RW>
7566    {
7567        crate::common::RegisterField::<
7568            0,
7569            0x1,
7570            1,
7571            0,
7572            p40pfs_ha::Podr,
7573            P40PfsHa_SPEC,
7574            crate::common::RW,
7575        >::from_register(self, 0)
7576    }
7577    #[doc = "Port State"]
7578    #[inline(always)]
7579    pub fn pidr(
7580        self,
7581    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p40pfs_ha::Pidr, P40PfsHa_SPEC, crate::common::R>
7582    {
7583        crate::common::RegisterField::<1,0x1,1,0,p40pfs_ha::Pidr, P40PfsHa_SPEC,crate::common::R>::from_register(self,0)
7584    }
7585    #[doc = "Port Direction"]
7586    #[inline(always)]
7587    pub fn pdr(
7588        self,
7589    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p40pfs_ha::Pdr, P40PfsHa_SPEC, crate::common::RW>
7590    {
7591        crate::common::RegisterField::<2,0x1,1,0,p40pfs_ha::Pdr, P40PfsHa_SPEC,crate::common::RW>::from_register(self,0)
7592    }
7593    #[doc = "Pull-up Control"]
7594    #[inline(always)]
7595    pub fn pcr(
7596        self,
7597    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p40pfs_ha::Pcr, P40PfsHa_SPEC, crate::common::RW>
7598    {
7599        crate::common::RegisterField::<4,0x1,1,0,p40pfs_ha::Pcr, P40PfsHa_SPEC,crate::common::RW>::from_register(self,0)
7600    }
7601    #[doc = "N-Channel Open-Drain Control"]
7602    #[inline(always)]
7603    pub fn ncodr(
7604        self,
7605    ) -> crate::common::RegisterField<
7606        6,
7607        0x1,
7608        1,
7609        0,
7610        p40pfs_ha::Ncodr,
7611        P40PfsHa_SPEC,
7612        crate::common::RW,
7613    > {
7614        crate::common::RegisterField::<
7615            6,
7616            0x1,
7617            1,
7618            0,
7619            p40pfs_ha::Ncodr,
7620            P40PfsHa_SPEC,
7621            crate::common::RW,
7622        >::from_register(self, 0)
7623    }
7624    #[doc = "Port Drive Capability"]
7625    #[inline(always)]
7626    pub fn dscr(
7627        self,
7628    ) -> crate::common::RegisterField<
7629        10,
7630        0x3,
7631        1,
7632        0,
7633        p40pfs_ha::Dscr,
7634        P40PfsHa_SPEC,
7635        crate::common::RW,
7636    > {
7637        crate::common::RegisterField::<
7638            10,
7639            0x3,
7640            1,
7641            0,
7642            p40pfs_ha::Dscr,
7643            P40PfsHa_SPEC,
7644            crate::common::RW,
7645        >::from_register(self, 0)
7646    }
7647    #[doc = "Event on Falling/Event on Rising"]
7648    #[inline(always)]
7649    pub fn eofr(
7650        self,
7651    ) -> crate::common::RegisterField<
7652        12,
7653        0x3,
7654        1,
7655        0,
7656        p40pfs_ha::Eofr,
7657        P40PfsHa_SPEC,
7658        crate::common::RW,
7659    > {
7660        crate::common::RegisterField::<
7661            12,
7662            0x3,
7663            1,
7664            0,
7665            p40pfs_ha::Eofr,
7666            P40PfsHa_SPEC,
7667            crate::common::RW,
7668        >::from_register(self, 0)
7669    }
7670    #[doc = "IRQ Input Enable"]
7671    #[inline(always)]
7672    pub fn isel(
7673        self,
7674    ) -> crate::common::RegisterField<
7675        14,
7676        0x1,
7677        1,
7678        0,
7679        p40pfs_ha::Isel,
7680        P40PfsHa_SPEC,
7681        crate::common::RW,
7682    > {
7683        crate::common::RegisterField::<
7684            14,
7685            0x1,
7686            1,
7687            0,
7688            p40pfs_ha::Isel,
7689            P40PfsHa_SPEC,
7690            crate::common::RW,
7691        >::from_register(self, 0)
7692    }
7693    #[doc = "Analog Input Enable"]
7694    #[inline(always)]
7695    pub fn asel(
7696        self,
7697    ) -> crate::common::RegisterField<
7698        15,
7699        0x1,
7700        1,
7701        0,
7702        p40pfs_ha::Asel,
7703        P40PfsHa_SPEC,
7704        crate::common::RW,
7705    > {
7706        crate::common::RegisterField::<
7707            15,
7708            0x1,
7709            1,
7710            0,
7711            p40pfs_ha::Asel,
7712            P40PfsHa_SPEC,
7713            crate::common::RW,
7714        >::from_register(self, 0)
7715    }
7716}
7717impl ::core::default::Default for P40PfsHa {
7718    #[inline(always)]
7719    fn default() -> P40PfsHa {
7720        <crate::RegValueT<P40PfsHa_SPEC> as RegisterValue<_>>::new(0)
7721    }
7722}
7723pub mod p40pfs_ha {
7724
7725    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7726    pub struct Podr_SPEC;
7727    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
7728    impl Podr {
7729        #[doc = "Output low"]
7730        pub const _0: Self = Self::new(0);
7731        #[doc = "Output high"]
7732        pub const _1: Self = Self::new(1);
7733    }
7734    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7735    pub struct Pidr_SPEC;
7736    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
7737    impl Pidr {
7738        #[doc = "Low level"]
7739        pub const _0: Self = Self::new(0);
7740        #[doc = "High level"]
7741        pub const _1: Self = Self::new(1);
7742    }
7743    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7744    pub struct Pdr_SPEC;
7745    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
7746    impl Pdr {
7747        #[doc = "Input (functions as an input pin)"]
7748        pub const _0: Self = Self::new(0);
7749        #[doc = "Output (functions as an output pin)"]
7750        pub const _1: Self = Self::new(1);
7751    }
7752    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7753    pub struct Pcr_SPEC;
7754    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
7755    impl Pcr {
7756        #[doc = "Disable input pull-up"]
7757        pub const _0: Self = Self::new(0);
7758        #[doc = "Enable input pull-up"]
7759        pub const _1: Self = Self::new(1);
7760    }
7761    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7762    pub struct Ncodr_SPEC;
7763    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
7764    impl Ncodr {
7765        #[doc = "Output CMOS"]
7766        pub const _0: Self = Self::new(0);
7767        #[doc = "Output NMOS open-drain"]
7768        pub const _1: Self = Self::new(1);
7769    }
7770    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7771    pub struct Dscr_SPEC;
7772    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
7773    impl Dscr {
7774        #[doc = "Low drive"]
7775        pub const _00: Self = Self::new(0);
7776        #[doc = "Middle drive"]
7777        pub const _01: Self = Self::new(1);
7778        #[doc = "Setting prohibited"]
7779        pub const _10: Self = Self::new(2);
7780        #[doc = "High drive"]
7781        pub const _11: Self = Self::new(3);
7782    }
7783    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7784    pub struct Eofr_SPEC;
7785    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
7786    impl Eofr {
7787        #[doc = "Don\'t care"]
7788        pub const _00: Self = Self::new(0);
7789        #[doc = "Detect rising edge"]
7790        pub const _01: Self = Self::new(1);
7791        #[doc = "Detect falling edge"]
7792        pub const _10: Self = Self::new(2);
7793        #[doc = "Detect both edges"]
7794        pub const _11: Self = Self::new(3);
7795    }
7796    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7797    pub struct Isel_SPEC;
7798    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
7799    impl Isel {
7800        #[doc = "Do not use as IRQn input pin"]
7801        pub const _0: Self = Self::new(0);
7802        #[doc = "Use as IRQn input pin"]
7803        pub const _1: Self = Self::new(1);
7804    }
7805    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7806    pub struct Asel_SPEC;
7807    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
7808    impl Asel {
7809        #[doc = "Do not use as analog pin"]
7810        pub const _0: Self = Self::new(0);
7811        #[doc = "Use as analog pin"]
7812        pub const _1: Self = Self::new(1);
7813    }
7814}
7815#[doc(hidden)]
7816#[derive(Copy, Clone, Eq, PartialEq)]
7817pub struct P40PfsBy_SPEC;
7818impl crate::sealed::RegSpec for P40PfsBy_SPEC {
7819    type DataType = u8;
7820}
7821#[doc = "Port 40%s Pin Function Select Register"]
7822pub type P40PfsBy = crate::RegValueT<P40PfsBy_SPEC>;
7823
7824impl P40PfsBy {
7825    #[doc = "Port Output Data"]
7826    #[inline(always)]
7827    pub fn podr(
7828        self,
7829    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p40pfs_by::Podr, P40PfsBy_SPEC, crate::common::RW>
7830    {
7831        crate::common::RegisterField::<
7832            0,
7833            0x1,
7834            1,
7835            0,
7836            p40pfs_by::Podr,
7837            P40PfsBy_SPEC,
7838            crate::common::RW,
7839        >::from_register(self, 0)
7840    }
7841    #[doc = "Port State"]
7842    #[inline(always)]
7843    pub fn pidr(
7844        self,
7845    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p40pfs_by::Pidr, P40PfsBy_SPEC, crate::common::R>
7846    {
7847        crate::common::RegisterField::<1,0x1,1,0,p40pfs_by::Pidr, P40PfsBy_SPEC,crate::common::R>::from_register(self,0)
7848    }
7849    #[doc = "Port Direction"]
7850    #[inline(always)]
7851    pub fn pdr(
7852        self,
7853    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p40pfs_by::Pdr, P40PfsBy_SPEC, crate::common::RW>
7854    {
7855        crate::common::RegisterField::<2,0x1,1,0,p40pfs_by::Pdr, P40PfsBy_SPEC,crate::common::RW>::from_register(self,0)
7856    }
7857    #[doc = "Pull-up Control"]
7858    #[inline(always)]
7859    pub fn pcr(
7860        self,
7861    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p40pfs_by::Pcr, P40PfsBy_SPEC, crate::common::RW>
7862    {
7863        crate::common::RegisterField::<4,0x1,1,0,p40pfs_by::Pcr, P40PfsBy_SPEC,crate::common::RW>::from_register(self,0)
7864    }
7865    #[doc = "N-Channel Open-Drain Control"]
7866    #[inline(always)]
7867    pub fn ncodr(
7868        self,
7869    ) -> crate::common::RegisterField<
7870        6,
7871        0x1,
7872        1,
7873        0,
7874        p40pfs_by::Ncodr,
7875        P40PfsBy_SPEC,
7876        crate::common::RW,
7877    > {
7878        crate::common::RegisterField::<
7879            6,
7880            0x1,
7881            1,
7882            0,
7883            p40pfs_by::Ncodr,
7884            P40PfsBy_SPEC,
7885            crate::common::RW,
7886        >::from_register(self, 0)
7887    }
7888}
7889impl ::core::default::Default for P40PfsBy {
7890    #[inline(always)]
7891    fn default() -> P40PfsBy {
7892        <crate::RegValueT<P40PfsBy_SPEC> as RegisterValue<_>>::new(0)
7893    }
7894}
7895pub mod p40pfs_by {
7896
7897    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7898    pub struct Podr_SPEC;
7899    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
7900    impl Podr {
7901        #[doc = "Output low"]
7902        pub const _0: Self = Self::new(0);
7903        #[doc = "Output high"]
7904        pub const _1: Self = Self::new(1);
7905    }
7906    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7907    pub struct Pidr_SPEC;
7908    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
7909    impl Pidr {
7910        #[doc = "Low level"]
7911        pub const _0: Self = Self::new(0);
7912        #[doc = "High level"]
7913        pub const _1: Self = Self::new(1);
7914    }
7915    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7916    pub struct Pdr_SPEC;
7917    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
7918    impl Pdr {
7919        #[doc = "Input (functions as an input pin)"]
7920        pub const _0: Self = Self::new(0);
7921        #[doc = "Output (functions as an output pin)"]
7922        pub const _1: Self = Self::new(1);
7923    }
7924    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7925    pub struct Pcr_SPEC;
7926    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
7927    impl Pcr {
7928        #[doc = "Disable input pull-up"]
7929        pub const _0: Self = Self::new(0);
7930        #[doc = "Enable input pull-up"]
7931        pub const _1: Self = Self::new(1);
7932    }
7933    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7934    pub struct Ncodr_SPEC;
7935    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
7936    impl Ncodr {
7937        #[doc = "Output CMOS"]
7938        pub const _0: Self = Self::new(0);
7939        #[doc = "Output NMOS open-drain"]
7940        pub const _1: Self = Self::new(1);
7941    }
7942}
7943#[doc(hidden)]
7944#[derive(Copy, Clone, Eq, PartialEq)]
7945pub struct P4Pfs_SPEC;
7946impl crate::sealed::RegSpec for P4Pfs_SPEC {
7947    type DataType = u32;
7948}
7949#[doc = "Port 4%s Pin Function Select Register"]
7950pub type P4Pfs = crate::RegValueT<P4Pfs_SPEC>;
7951
7952impl P4Pfs {
7953    #[doc = "Port Output Data"]
7954    #[inline(always)]
7955    pub fn podr(
7956        self,
7957    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p4pfs::Podr, P4Pfs_SPEC, crate::common::RW>
7958    {
7959        crate::common::RegisterField::<0,0x1,1,0,p4pfs::Podr, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
7960    }
7961    #[doc = "Port State"]
7962    #[inline(always)]
7963    pub fn pidr(
7964        self,
7965    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p4pfs::Pidr, P4Pfs_SPEC, crate::common::R> {
7966        crate::common::RegisterField::<1,0x1,1,0,p4pfs::Pidr, P4Pfs_SPEC,crate::common::R>::from_register(self,0)
7967    }
7968    #[doc = "Port Direction"]
7969    #[inline(always)]
7970    pub fn pdr(
7971        self,
7972    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p4pfs::Pdr, P4Pfs_SPEC, crate::common::RW> {
7973        crate::common::RegisterField::<2,0x1,1,0,p4pfs::Pdr, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
7974    }
7975    #[doc = "Pull-up Control"]
7976    #[inline(always)]
7977    pub fn pcr(
7978        self,
7979    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p4pfs::Pcr, P4Pfs_SPEC, crate::common::RW> {
7980        crate::common::RegisterField::<4,0x1,1,0,p4pfs::Pcr, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
7981    }
7982    #[doc = "N-Channel Open-Drain Control"]
7983    #[inline(always)]
7984    pub fn ncodr(
7985        self,
7986    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p4pfs::Ncodr, P4Pfs_SPEC, crate::common::RW>
7987    {
7988        crate::common::RegisterField::<6,0x1,1,0,p4pfs::Ncodr, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
7989    }
7990    #[doc = "Port Drive Capability"]
7991    #[inline(always)]
7992    pub fn dscr(
7993        self,
7994    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p4pfs::Dscr, P4Pfs_SPEC, crate::common::RW>
7995    {
7996        crate::common::RegisterField::<10,0x3,1,0,p4pfs::Dscr, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
7997    }
7998    #[doc = "Event on Falling/Event on Rising"]
7999    #[inline(always)]
8000    pub fn eofr(
8001        self,
8002    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p4pfs::Eofr, P4Pfs_SPEC, crate::common::RW>
8003    {
8004        crate::common::RegisterField::<12,0x3,1,0,p4pfs::Eofr, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
8005    }
8006    #[doc = "IRQ Input Enable"]
8007    #[inline(always)]
8008    pub fn isel(
8009        self,
8010    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p4pfs::Isel, P4Pfs_SPEC, crate::common::RW>
8011    {
8012        crate::common::RegisterField::<14,0x1,1,0,p4pfs::Isel, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
8013    }
8014    #[doc = "Analog Input Enable"]
8015    #[inline(always)]
8016    pub fn asel(
8017        self,
8018    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p4pfs::Asel, P4Pfs_SPEC, crate::common::RW>
8019    {
8020        crate::common::RegisterField::<15,0x1,1,0,p4pfs::Asel, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
8021    }
8022    #[doc = "Port Mode Control"]
8023    #[inline(always)]
8024    pub fn pmr(
8025        self,
8026    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p4pfs::Pmr, P4Pfs_SPEC, crate::common::RW>
8027    {
8028        crate::common::RegisterField::<16,0x1,1,0,p4pfs::Pmr, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
8029    }
8030    #[doc = "Peripheral Select"]
8031    #[inline(always)]
8032    pub fn psel(
8033        self,
8034    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P4Pfs_SPEC, crate::common::RW> {
8035        crate::common::RegisterField::<24,0x1f,1,0,u8, P4Pfs_SPEC,crate::common::RW>::from_register(self,0)
8036    }
8037}
8038impl ::core::default::Default for P4Pfs {
8039    #[inline(always)]
8040    fn default() -> P4Pfs {
8041        <crate::RegValueT<P4Pfs_SPEC> as RegisterValue<_>>::new(0)
8042    }
8043}
8044pub mod p4pfs {
8045
8046    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8047    pub struct Podr_SPEC;
8048    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
8049    impl Podr {
8050        #[doc = "Output low"]
8051        pub const _0: Self = Self::new(0);
8052        #[doc = "Output high"]
8053        pub const _1: Self = Self::new(1);
8054    }
8055    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8056    pub struct Pidr_SPEC;
8057    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
8058    impl Pidr {
8059        #[doc = "Low level"]
8060        pub const _0: Self = Self::new(0);
8061        #[doc = "High level"]
8062        pub const _1: Self = Self::new(1);
8063    }
8064    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8065    pub struct Pdr_SPEC;
8066    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
8067    impl Pdr {
8068        #[doc = "Input (functions as an input pin)"]
8069        pub const _0: Self = Self::new(0);
8070        #[doc = "Output (functions as an output pin)"]
8071        pub const _1: Self = Self::new(1);
8072    }
8073    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8074    pub struct Pcr_SPEC;
8075    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
8076    impl Pcr {
8077        #[doc = "Disable input pull-up"]
8078        pub const _0: Self = Self::new(0);
8079        #[doc = "Enable input pull-up"]
8080        pub const _1: Self = Self::new(1);
8081    }
8082    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8083    pub struct Ncodr_SPEC;
8084    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
8085    impl Ncodr {
8086        #[doc = "Output CMOS"]
8087        pub const _0: Self = Self::new(0);
8088        #[doc = "Output NMOS open-drain"]
8089        pub const _1: Self = Self::new(1);
8090    }
8091    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8092    pub struct Dscr_SPEC;
8093    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
8094    impl Dscr {
8095        #[doc = "Low drive"]
8096        pub const _00: Self = Self::new(0);
8097        #[doc = "Middle drive"]
8098        pub const _01: Self = Self::new(1);
8099        #[doc = "Setting prohibited"]
8100        pub const _10: Self = Self::new(2);
8101        #[doc = "High drive"]
8102        pub const _11: Self = Self::new(3);
8103    }
8104    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8105    pub struct Eofr_SPEC;
8106    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
8107    impl Eofr {
8108        #[doc = "Don\'t care"]
8109        pub const _00: Self = Self::new(0);
8110        #[doc = "Detect rising edge"]
8111        pub const _01: Self = Self::new(1);
8112        #[doc = "Detect falling edge"]
8113        pub const _10: Self = Self::new(2);
8114        #[doc = "Detect both edges"]
8115        pub const _11: Self = Self::new(3);
8116    }
8117    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8118    pub struct Isel_SPEC;
8119    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
8120    impl Isel {
8121        #[doc = "Do not use as IRQn input pin"]
8122        pub const _0: Self = Self::new(0);
8123        #[doc = "Use as IRQn input pin"]
8124        pub const _1: Self = Self::new(1);
8125    }
8126    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8127    pub struct Asel_SPEC;
8128    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
8129    impl Asel {
8130        #[doc = "Do not use as analog pin"]
8131        pub const _0: Self = Self::new(0);
8132        #[doc = "Use as analog pin"]
8133        pub const _1: Self = Self::new(1);
8134    }
8135    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8136    pub struct Pmr_SPEC;
8137    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
8138    impl Pmr {
8139        #[doc = "Use as general I/O pin"]
8140        pub const _0: Self = Self::new(0);
8141        #[doc = "Use as I/O port for peripheral functions"]
8142        pub const _1: Self = Self::new(1);
8143    }
8144}
8145#[doc(hidden)]
8146#[derive(Copy, Clone, Eq, PartialEq)]
8147pub struct P4PfsHa_SPEC;
8148impl crate::sealed::RegSpec for P4PfsHa_SPEC {
8149    type DataType = u16;
8150}
8151#[doc = "Port 4%s Pin Function Select Register"]
8152pub type P4PfsHa = crate::RegValueT<P4PfsHa_SPEC>;
8153
8154impl P4PfsHa {
8155    #[doc = "Port Output Data"]
8156    #[inline(always)]
8157    pub fn podr(
8158        self,
8159    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p4pfs_ha::Podr, P4PfsHa_SPEC, crate::common::RW>
8160    {
8161        crate::common::RegisterField::<0,0x1,1,0,p4pfs_ha::Podr, P4PfsHa_SPEC,crate::common::RW>::from_register(self,0)
8162    }
8163    #[doc = "Port State"]
8164    #[inline(always)]
8165    pub fn pidr(
8166        self,
8167    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p4pfs_ha::Pidr, P4PfsHa_SPEC, crate::common::R>
8168    {
8169        crate::common::RegisterField::<1,0x1,1,0,p4pfs_ha::Pidr, P4PfsHa_SPEC,crate::common::R>::from_register(self,0)
8170    }
8171    #[doc = "Port Direction"]
8172    #[inline(always)]
8173    pub fn pdr(
8174        self,
8175    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p4pfs_ha::Pdr, P4PfsHa_SPEC, crate::common::RW>
8176    {
8177        crate::common::RegisterField::<2,0x1,1,0,p4pfs_ha::Pdr, P4PfsHa_SPEC,crate::common::RW>::from_register(self,0)
8178    }
8179    #[doc = "Pull-up Control"]
8180    #[inline(always)]
8181    pub fn pcr(
8182        self,
8183    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p4pfs_ha::Pcr, P4PfsHa_SPEC, crate::common::RW>
8184    {
8185        crate::common::RegisterField::<4,0x1,1,0,p4pfs_ha::Pcr, P4PfsHa_SPEC,crate::common::RW>::from_register(self,0)
8186    }
8187    #[doc = "N-Channel Open-Drain Control"]
8188    #[inline(always)]
8189    pub fn ncodr(
8190        self,
8191    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p4pfs_ha::Ncodr, P4PfsHa_SPEC, crate::common::RW>
8192    {
8193        crate::common::RegisterField::<6,0x1,1,0,p4pfs_ha::Ncodr, P4PfsHa_SPEC,crate::common::RW>::from_register(self,0)
8194    }
8195    #[doc = "Port Drive Capability"]
8196    #[inline(always)]
8197    pub fn dscr(
8198        self,
8199    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p4pfs_ha::Dscr, P4PfsHa_SPEC, crate::common::RW>
8200    {
8201        crate::common::RegisterField::<10,0x3,1,0,p4pfs_ha::Dscr, P4PfsHa_SPEC,crate::common::RW>::from_register(self,0)
8202    }
8203    #[doc = "Event on Falling/Event on Rising"]
8204    #[inline(always)]
8205    pub fn eofr(
8206        self,
8207    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p4pfs_ha::Eofr, P4PfsHa_SPEC, crate::common::RW>
8208    {
8209        crate::common::RegisterField::<12,0x3,1,0,p4pfs_ha::Eofr, P4PfsHa_SPEC,crate::common::RW>::from_register(self,0)
8210    }
8211    #[doc = "IRQ Input Enable"]
8212    #[inline(always)]
8213    pub fn isel(
8214        self,
8215    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p4pfs_ha::Isel, P4PfsHa_SPEC, crate::common::RW>
8216    {
8217        crate::common::RegisterField::<14,0x1,1,0,p4pfs_ha::Isel, P4PfsHa_SPEC,crate::common::RW>::from_register(self,0)
8218    }
8219    #[doc = "Analog Input Enable"]
8220    #[inline(always)]
8221    pub fn asel(
8222        self,
8223    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p4pfs_ha::Asel, P4PfsHa_SPEC, crate::common::RW>
8224    {
8225        crate::common::RegisterField::<15,0x1,1,0,p4pfs_ha::Asel, P4PfsHa_SPEC,crate::common::RW>::from_register(self,0)
8226    }
8227}
8228impl ::core::default::Default for P4PfsHa {
8229    #[inline(always)]
8230    fn default() -> P4PfsHa {
8231        <crate::RegValueT<P4PfsHa_SPEC> as RegisterValue<_>>::new(0)
8232    }
8233}
8234pub mod p4pfs_ha {
8235
8236    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8237    pub struct Podr_SPEC;
8238    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
8239    impl Podr {
8240        #[doc = "Output low"]
8241        pub const _0: Self = Self::new(0);
8242        #[doc = "Output high"]
8243        pub const _1: Self = Self::new(1);
8244    }
8245    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8246    pub struct Pidr_SPEC;
8247    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
8248    impl Pidr {
8249        #[doc = "Low level"]
8250        pub const _0: Self = Self::new(0);
8251        #[doc = "High level"]
8252        pub const _1: Self = Self::new(1);
8253    }
8254    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8255    pub struct Pdr_SPEC;
8256    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
8257    impl Pdr {
8258        #[doc = "Input (functions as an input pin)"]
8259        pub const _0: Self = Self::new(0);
8260        #[doc = "Output (functions as an output pin)"]
8261        pub const _1: Self = Self::new(1);
8262    }
8263    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8264    pub struct Pcr_SPEC;
8265    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
8266    impl Pcr {
8267        #[doc = "Disable input pull-up"]
8268        pub const _0: Self = Self::new(0);
8269        #[doc = "Enable input pull-up"]
8270        pub const _1: Self = Self::new(1);
8271    }
8272    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8273    pub struct Ncodr_SPEC;
8274    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
8275    impl Ncodr {
8276        #[doc = "Output CMOS"]
8277        pub const _0: Self = Self::new(0);
8278        #[doc = "Output NMOS open-drain"]
8279        pub const _1: Self = Self::new(1);
8280    }
8281    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8282    pub struct Dscr_SPEC;
8283    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
8284    impl Dscr {
8285        #[doc = "Low drive"]
8286        pub const _00: Self = Self::new(0);
8287        #[doc = "Middle drive"]
8288        pub const _01: Self = Self::new(1);
8289        #[doc = "Setting prohibited"]
8290        pub const _10: Self = Self::new(2);
8291        #[doc = "High drive"]
8292        pub const _11: Self = Self::new(3);
8293    }
8294    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8295    pub struct Eofr_SPEC;
8296    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
8297    impl Eofr {
8298        #[doc = "Don\'t care"]
8299        pub const _00: Self = Self::new(0);
8300        #[doc = "Detect rising edge"]
8301        pub const _01: Self = Self::new(1);
8302        #[doc = "Detect falling edge"]
8303        pub const _10: Self = Self::new(2);
8304        #[doc = "Detect both edges"]
8305        pub const _11: Self = Self::new(3);
8306    }
8307    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8308    pub struct Isel_SPEC;
8309    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
8310    impl Isel {
8311        #[doc = "Do not use as IRQn input pin"]
8312        pub const _0: Self = Self::new(0);
8313        #[doc = "Use as IRQn input pin"]
8314        pub const _1: Self = Self::new(1);
8315    }
8316    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8317    pub struct Asel_SPEC;
8318    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
8319    impl Asel {
8320        #[doc = "Do not use as analog pin"]
8321        pub const _0: Self = Self::new(0);
8322        #[doc = "Use as analog pin"]
8323        pub const _1: Self = Self::new(1);
8324    }
8325}
8326#[doc(hidden)]
8327#[derive(Copy, Clone, Eq, PartialEq)]
8328pub struct P4PfsBy_SPEC;
8329impl crate::sealed::RegSpec for P4PfsBy_SPEC {
8330    type DataType = u8;
8331}
8332#[doc = "Port 4%s Pin Function Select Register"]
8333pub type P4PfsBy = crate::RegValueT<P4PfsBy_SPEC>;
8334
8335impl P4PfsBy {
8336    #[doc = "Port Output Data"]
8337    #[inline(always)]
8338    pub fn podr(
8339        self,
8340    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p4pfs_by::Podr, P4PfsBy_SPEC, crate::common::RW>
8341    {
8342        crate::common::RegisterField::<0,0x1,1,0,p4pfs_by::Podr, P4PfsBy_SPEC,crate::common::RW>::from_register(self,0)
8343    }
8344    #[doc = "Port State"]
8345    #[inline(always)]
8346    pub fn pidr(
8347        self,
8348    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p4pfs_by::Pidr, P4PfsBy_SPEC, crate::common::R>
8349    {
8350        crate::common::RegisterField::<1,0x1,1,0,p4pfs_by::Pidr, P4PfsBy_SPEC,crate::common::R>::from_register(self,0)
8351    }
8352    #[doc = "Port Direction"]
8353    #[inline(always)]
8354    pub fn pdr(
8355        self,
8356    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p4pfs_by::Pdr, P4PfsBy_SPEC, crate::common::RW>
8357    {
8358        crate::common::RegisterField::<2,0x1,1,0,p4pfs_by::Pdr, P4PfsBy_SPEC,crate::common::RW>::from_register(self,0)
8359    }
8360    #[doc = "Pull-up Control"]
8361    #[inline(always)]
8362    pub fn pcr(
8363        self,
8364    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p4pfs_by::Pcr, P4PfsBy_SPEC, crate::common::RW>
8365    {
8366        crate::common::RegisterField::<4,0x1,1,0,p4pfs_by::Pcr, P4PfsBy_SPEC,crate::common::RW>::from_register(self,0)
8367    }
8368    #[doc = "N-Channel Open-Drain Control"]
8369    #[inline(always)]
8370    pub fn ncodr(
8371        self,
8372    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p4pfs_by::Ncodr, P4PfsBy_SPEC, crate::common::RW>
8373    {
8374        crate::common::RegisterField::<6,0x1,1,0,p4pfs_by::Ncodr, P4PfsBy_SPEC,crate::common::RW>::from_register(self,0)
8375    }
8376}
8377impl ::core::default::Default for P4PfsBy {
8378    #[inline(always)]
8379    fn default() -> P4PfsBy {
8380        <crate::RegValueT<P4PfsBy_SPEC> as RegisterValue<_>>::new(0)
8381    }
8382}
8383pub mod p4pfs_by {
8384
8385    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8386    pub struct Podr_SPEC;
8387    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
8388    impl Podr {
8389        #[doc = "Output low"]
8390        pub const _0: Self = Self::new(0);
8391        #[doc = "Output high"]
8392        pub const _1: Self = Self::new(1);
8393    }
8394    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8395    pub struct Pidr_SPEC;
8396    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
8397    impl Pidr {
8398        #[doc = "Low level"]
8399        pub const _0: Self = Self::new(0);
8400        #[doc = "High level"]
8401        pub const _1: Self = Self::new(1);
8402    }
8403    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8404    pub struct Pdr_SPEC;
8405    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
8406    impl Pdr {
8407        #[doc = "Input (functions as an input pin)"]
8408        pub const _0: Self = Self::new(0);
8409        #[doc = "Output (functions as an output pin)"]
8410        pub const _1: Self = Self::new(1);
8411    }
8412    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8413    pub struct Pcr_SPEC;
8414    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
8415    impl Pcr {
8416        #[doc = "Disable input pull-up"]
8417        pub const _0: Self = Self::new(0);
8418        #[doc = "Enable input pull-up"]
8419        pub const _1: Self = Self::new(1);
8420    }
8421    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8422    pub struct Ncodr_SPEC;
8423    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
8424    impl Ncodr {
8425        #[doc = "Output CMOS"]
8426        pub const _0: Self = Self::new(0);
8427        #[doc = "Output NMOS open-drain"]
8428        pub const _1: Self = Self::new(1);
8429    }
8430}
8431#[doc(hidden)]
8432#[derive(Copy, Clone, Eq, PartialEq)]
8433pub struct P500Pfs_SPEC;
8434impl crate::sealed::RegSpec for P500Pfs_SPEC {
8435    type DataType = u32;
8436}
8437#[doc = "Port 500 Pin Function Select Register"]
8438pub type P500Pfs = crate::RegValueT<P500Pfs_SPEC>;
8439
8440impl P500Pfs {
8441    #[doc = "Port Output Data"]
8442    #[inline(always)]
8443    pub fn podr(
8444        self,
8445    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p500pfs::Podr, P500Pfs_SPEC, crate::common::RW>
8446    {
8447        crate::common::RegisterField::<0,0x1,1,0,p500pfs::Podr, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8448    }
8449    #[doc = "Port State"]
8450    #[inline(always)]
8451    pub fn pidr(
8452        self,
8453    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p500pfs::Pidr, P500Pfs_SPEC, crate::common::R>
8454    {
8455        crate::common::RegisterField::<1,0x1,1,0,p500pfs::Pidr, P500Pfs_SPEC,crate::common::R>::from_register(self,0)
8456    }
8457    #[doc = "Port Direction"]
8458    #[inline(always)]
8459    pub fn pdr(
8460        self,
8461    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p500pfs::Pdr, P500Pfs_SPEC, crate::common::RW>
8462    {
8463        crate::common::RegisterField::<2,0x1,1,0,p500pfs::Pdr, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8464    }
8465    #[doc = "Pull-up Control"]
8466    #[inline(always)]
8467    pub fn pcr(
8468        self,
8469    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p500pfs::Pcr, P500Pfs_SPEC, crate::common::RW>
8470    {
8471        crate::common::RegisterField::<4,0x1,1,0,p500pfs::Pcr, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8472    }
8473    #[doc = "N-Channel Open-Drain Control"]
8474    #[inline(always)]
8475    pub fn ncodr(
8476        self,
8477    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p500pfs::Ncodr, P500Pfs_SPEC, crate::common::RW>
8478    {
8479        crate::common::RegisterField::<6,0x1,1,0,p500pfs::Ncodr, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8480    }
8481    #[doc = "Port Drive Capability"]
8482    #[inline(always)]
8483    pub fn dscr(
8484        self,
8485    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p500pfs::Dscr, P500Pfs_SPEC, crate::common::RW>
8486    {
8487        crate::common::RegisterField::<10,0x3,1,0,p500pfs::Dscr, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8488    }
8489    #[doc = "Event on Falling/Event on Rising"]
8490    #[inline(always)]
8491    pub fn eofr(
8492        self,
8493    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p500pfs::Eofr, P500Pfs_SPEC, crate::common::RW>
8494    {
8495        crate::common::RegisterField::<12,0x3,1,0,p500pfs::Eofr, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8496    }
8497    #[doc = "IRQ Input Enable"]
8498    #[inline(always)]
8499    pub fn isel(
8500        self,
8501    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p500pfs::Isel, P500Pfs_SPEC, crate::common::RW>
8502    {
8503        crate::common::RegisterField::<14,0x1,1,0,p500pfs::Isel, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8504    }
8505    #[doc = "Analog Input Enable"]
8506    #[inline(always)]
8507    pub fn asel(
8508        self,
8509    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p500pfs::Asel, P500Pfs_SPEC, crate::common::RW>
8510    {
8511        crate::common::RegisterField::<15,0x1,1,0,p500pfs::Asel, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8512    }
8513    #[doc = "Port Mode Control"]
8514    #[inline(always)]
8515    pub fn pmr(
8516        self,
8517    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p500pfs::Pmr, P500Pfs_SPEC, crate::common::RW>
8518    {
8519        crate::common::RegisterField::<16,0x1,1,0,p500pfs::Pmr, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8520    }
8521    #[doc = "Peripheral Select"]
8522    #[inline(always)]
8523    pub fn psel(
8524        self,
8525    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P500Pfs_SPEC, crate::common::RW> {
8526        crate::common::RegisterField::<24,0x1f,1,0,u8, P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
8527    }
8528}
8529impl ::core::default::Default for P500Pfs {
8530    #[inline(always)]
8531    fn default() -> P500Pfs {
8532        <crate::RegValueT<P500Pfs_SPEC> as RegisterValue<_>>::new(0)
8533    }
8534}
8535pub mod p500pfs {
8536
8537    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8538    pub struct Podr_SPEC;
8539    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
8540    impl Podr {
8541        #[doc = "Output low"]
8542        pub const _0: Self = Self::new(0);
8543        #[doc = "Output high"]
8544        pub const _1: Self = Self::new(1);
8545    }
8546    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8547    pub struct Pidr_SPEC;
8548    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
8549    impl Pidr {
8550        #[doc = "Low level"]
8551        pub const _0: Self = Self::new(0);
8552        #[doc = "High level"]
8553        pub const _1: Self = Self::new(1);
8554    }
8555    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8556    pub struct Pdr_SPEC;
8557    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
8558    impl Pdr {
8559        #[doc = "Input (functions as an input pin)"]
8560        pub const _0: Self = Self::new(0);
8561        #[doc = "Output (functions as an output pin)"]
8562        pub const _1: Self = Self::new(1);
8563    }
8564    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8565    pub struct Pcr_SPEC;
8566    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
8567    impl Pcr {
8568        #[doc = "Disable input pull-up"]
8569        pub const _0: Self = Self::new(0);
8570        #[doc = "Enable input pull-up"]
8571        pub const _1: Self = Self::new(1);
8572    }
8573    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8574    pub struct Ncodr_SPEC;
8575    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
8576    impl Ncodr {
8577        #[doc = "Output CMOS"]
8578        pub const _0: Self = Self::new(0);
8579        #[doc = "Output NMOS open-drain"]
8580        pub const _1: Self = Self::new(1);
8581    }
8582    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8583    pub struct Dscr_SPEC;
8584    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
8585    impl Dscr {
8586        #[doc = "Low drive"]
8587        pub const _00: Self = Self::new(0);
8588        #[doc = "Middle drive"]
8589        pub const _01: Self = Self::new(1);
8590        #[doc = "Setting prohibited"]
8591        pub const _10: Self = Self::new(2);
8592        #[doc = "High drive"]
8593        pub const _11: Self = Self::new(3);
8594    }
8595    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8596    pub struct Eofr_SPEC;
8597    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
8598    impl Eofr {
8599        #[doc = "Don\'t care"]
8600        pub const _00: Self = Self::new(0);
8601        #[doc = "Detect rising edge"]
8602        pub const _01: Self = Self::new(1);
8603        #[doc = "Detect falling edge"]
8604        pub const _10: Self = Self::new(2);
8605        #[doc = "Detect both edges"]
8606        pub const _11: Self = Self::new(3);
8607    }
8608    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8609    pub struct Isel_SPEC;
8610    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
8611    impl Isel {
8612        #[doc = "Do not use as IRQn input pin"]
8613        pub const _0: Self = Self::new(0);
8614        #[doc = "Use as IRQn input pin"]
8615        pub const _1: Self = Self::new(1);
8616    }
8617    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8618    pub struct Asel_SPEC;
8619    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
8620    impl Asel {
8621        #[doc = "Do not use as analog pin"]
8622        pub const _0: Self = Self::new(0);
8623        #[doc = "Use as analog pin"]
8624        pub const _1: Self = Self::new(1);
8625    }
8626    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8627    pub struct Pmr_SPEC;
8628    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
8629    impl Pmr {
8630        #[doc = "Use as general I/O pin"]
8631        pub const _0: Self = Self::new(0);
8632        #[doc = "Use as I/O port for peripheral functions"]
8633        pub const _1: Self = Self::new(1);
8634    }
8635}
8636#[doc(hidden)]
8637#[derive(Copy, Clone, Eq, PartialEq)]
8638pub struct P500PfsHa_SPEC;
8639impl crate::sealed::RegSpec for P500PfsHa_SPEC {
8640    type DataType = u16;
8641}
8642#[doc = "Port 500 Pin Function Select Register"]
8643pub type P500PfsHa = crate::RegValueT<P500PfsHa_SPEC>;
8644
8645impl P500PfsHa {
8646    #[doc = "Port Output Data"]
8647    #[inline(always)]
8648    pub fn podr(
8649        self,
8650    ) -> crate::common::RegisterField<
8651        0,
8652        0x1,
8653        1,
8654        0,
8655        p500pfs_ha::Podr,
8656        P500PfsHa_SPEC,
8657        crate::common::RW,
8658    > {
8659        crate::common::RegisterField::<
8660            0,
8661            0x1,
8662            1,
8663            0,
8664            p500pfs_ha::Podr,
8665            P500PfsHa_SPEC,
8666            crate::common::RW,
8667        >::from_register(self, 0)
8668    }
8669    #[doc = "Port State"]
8670    #[inline(always)]
8671    pub fn pidr(
8672        self,
8673    ) -> crate::common::RegisterField<
8674        1,
8675        0x1,
8676        1,
8677        0,
8678        p500pfs_ha::Pidr,
8679        P500PfsHa_SPEC,
8680        crate::common::R,
8681    > {
8682        crate::common::RegisterField::<
8683            1,
8684            0x1,
8685            1,
8686            0,
8687            p500pfs_ha::Pidr,
8688            P500PfsHa_SPEC,
8689            crate::common::R,
8690        >::from_register(self, 0)
8691    }
8692    #[doc = "Port Direction"]
8693    #[inline(always)]
8694    pub fn pdr(
8695        self,
8696    ) -> crate::common::RegisterField<
8697        2,
8698        0x1,
8699        1,
8700        0,
8701        p500pfs_ha::Pdr,
8702        P500PfsHa_SPEC,
8703        crate::common::RW,
8704    > {
8705        crate::common::RegisterField::<
8706            2,
8707            0x1,
8708            1,
8709            0,
8710            p500pfs_ha::Pdr,
8711            P500PfsHa_SPEC,
8712            crate::common::RW,
8713        >::from_register(self, 0)
8714    }
8715    #[doc = "Pull-up Control"]
8716    #[inline(always)]
8717    pub fn pcr(
8718        self,
8719    ) -> crate::common::RegisterField<
8720        4,
8721        0x1,
8722        1,
8723        0,
8724        p500pfs_ha::Pcr,
8725        P500PfsHa_SPEC,
8726        crate::common::RW,
8727    > {
8728        crate::common::RegisterField::<
8729            4,
8730            0x1,
8731            1,
8732            0,
8733            p500pfs_ha::Pcr,
8734            P500PfsHa_SPEC,
8735            crate::common::RW,
8736        >::from_register(self, 0)
8737    }
8738    #[doc = "N-Channel Open-Drain Control"]
8739    #[inline(always)]
8740    pub fn ncodr(
8741        self,
8742    ) -> crate::common::RegisterField<
8743        6,
8744        0x1,
8745        1,
8746        0,
8747        p500pfs_ha::Ncodr,
8748        P500PfsHa_SPEC,
8749        crate::common::RW,
8750    > {
8751        crate::common::RegisterField::<
8752            6,
8753            0x1,
8754            1,
8755            0,
8756            p500pfs_ha::Ncodr,
8757            P500PfsHa_SPEC,
8758            crate::common::RW,
8759        >::from_register(self, 0)
8760    }
8761    #[doc = "Port Drive Capability"]
8762    #[inline(always)]
8763    pub fn dscr(
8764        self,
8765    ) -> crate::common::RegisterField<
8766        10,
8767        0x3,
8768        1,
8769        0,
8770        p500pfs_ha::Dscr,
8771        P500PfsHa_SPEC,
8772        crate::common::RW,
8773    > {
8774        crate::common::RegisterField::<
8775            10,
8776            0x3,
8777            1,
8778            0,
8779            p500pfs_ha::Dscr,
8780            P500PfsHa_SPEC,
8781            crate::common::RW,
8782        >::from_register(self, 0)
8783    }
8784    #[doc = "Event on Falling/Event on Rising"]
8785    #[inline(always)]
8786    pub fn eofr(
8787        self,
8788    ) -> crate::common::RegisterField<
8789        12,
8790        0x3,
8791        1,
8792        0,
8793        p500pfs_ha::Eofr,
8794        P500PfsHa_SPEC,
8795        crate::common::RW,
8796    > {
8797        crate::common::RegisterField::<
8798            12,
8799            0x3,
8800            1,
8801            0,
8802            p500pfs_ha::Eofr,
8803            P500PfsHa_SPEC,
8804            crate::common::RW,
8805        >::from_register(self, 0)
8806    }
8807    #[doc = "IRQ Input Enable"]
8808    #[inline(always)]
8809    pub fn isel(
8810        self,
8811    ) -> crate::common::RegisterField<
8812        14,
8813        0x1,
8814        1,
8815        0,
8816        p500pfs_ha::Isel,
8817        P500PfsHa_SPEC,
8818        crate::common::RW,
8819    > {
8820        crate::common::RegisterField::<
8821            14,
8822            0x1,
8823            1,
8824            0,
8825            p500pfs_ha::Isel,
8826            P500PfsHa_SPEC,
8827            crate::common::RW,
8828        >::from_register(self, 0)
8829    }
8830    #[doc = "Analog Input Enable"]
8831    #[inline(always)]
8832    pub fn asel(
8833        self,
8834    ) -> crate::common::RegisterField<
8835        15,
8836        0x1,
8837        1,
8838        0,
8839        p500pfs_ha::Asel,
8840        P500PfsHa_SPEC,
8841        crate::common::RW,
8842    > {
8843        crate::common::RegisterField::<
8844            15,
8845            0x1,
8846            1,
8847            0,
8848            p500pfs_ha::Asel,
8849            P500PfsHa_SPEC,
8850            crate::common::RW,
8851        >::from_register(self, 0)
8852    }
8853}
8854impl ::core::default::Default for P500PfsHa {
8855    #[inline(always)]
8856    fn default() -> P500PfsHa {
8857        <crate::RegValueT<P500PfsHa_SPEC> as RegisterValue<_>>::new(0)
8858    }
8859}
8860pub mod p500pfs_ha {
8861
8862    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8863    pub struct Podr_SPEC;
8864    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
8865    impl Podr {
8866        #[doc = "Output low"]
8867        pub const _0: Self = Self::new(0);
8868        #[doc = "Output high"]
8869        pub const _1: Self = Self::new(1);
8870    }
8871    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8872    pub struct Pidr_SPEC;
8873    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
8874    impl Pidr {
8875        #[doc = "Low level"]
8876        pub const _0: Self = Self::new(0);
8877        #[doc = "High level"]
8878        pub const _1: Self = Self::new(1);
8879    }
8880    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8881    pub struct Pdr_SPEC;
8882    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
8883    impl Pdr {
8884        #[doc = "Input (functions as an input pin)"]
8885        pub const _0: Self = Self::new(0);
8886        #[doc = "Output (functions as an output pin)"]
8887        pub const _1: Self = Self::new(1);
8888    }
8889    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8890    pub struct Pcr_SPEC;
8891    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
8892    impl Pcr {
8893        #[doc = "Disable input pull-up"]
8894        pub const _0: Self = Self::new(0);
8895        #[doc = "Enable input pull-up"]
8896        pub const _1: Self = Self::new(1);
8897    }
8898    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8899    pub struct Ncodr_SPEC;
8900    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
8901    impl Ncodr {
8902        #[doc = "Output CMOS"]
8903        pub const _0: Self = Self::new(0);
8904        #[doc = "Output NMOS open-drain"]
8905        pub const _1: Self = Self::new(1);
8906    }
8907    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8908    pub struct Dscr_SPEC;
8909    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
8910    impl Dscr {
8911        #[doc = "Low drive"]
8912        pub const _00: Self = Self::new(0);
8913        #[doc = "Middle drive"]
8914        pub const _01: Self = Self::new(1);
8915        #[doc = "Setting prohibited"]
8916        pub const _10: Self = Self::new(2);
8917        #[doc = "High drive"]
8918        pub const _11: Self = Self::new(3);
8919    }
8920    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8921    pub struct Eofr_SPEC;
8922    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
8923    impl Eofr {
8924        #[doc = "Don\'t care"]
8925        pub const _00: Self = Self::new(0);
8926        #[doc = "Detect rising edge"]
8927        pub const _01: Self = Self::new(1);
8928        #[doc = "Detect falling edge"]
8929        pub const _10: Self = Self::new(2);
8930        #[doc = "Detect both edges"]
8931        pub const _11: Self = Self::new(3);
8932    }
8933    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8934    pub struct Isel_SPEC;
8935    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
8936    impl Isel {
8937        #[doc = "Do not use as IRQn input pin"]
8938        pub const _0: Self = Self::new(0);
8939        #[doc = "Use as IRQn input pin"]
8940        pub const _1: Self = Self::new(1);
8941    }
8942    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8943    pub struct Asel_SPEC;
8944    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
8945    impl Asel {
8946        #[doc = "Do not use as analog pin"]
8947        pub const _0: Self = Self::new(0);
8948        #[doc = "Use as analog pin"]
8949        pub const _1: Self = Self::new(1);
8950    }
8951}
8952#[doc(hidden)]
8953#[derive(Copy, Clone, Eq, PartialEq)]
8954pub struct P500PfsBy_SPEC;
8955impl crate::sealed::RegSpec for P500PfsBy_SPEC {
8956    type DataType = u8;
8957}
8958#[doc = "Port 500 Pin Function Select Register"]
8959pub type P500PfsBy = crate::RegValueT<P500PfsBy_SPEC>;
8960
8961impl P500PfsBy {
8962    #[doc = "Port Output Data"]
8963    #[inline(always)]
8964    pub fn podr(
8965        self,
8966    ) -> crate::common::RegisterField<
8967        0,
8968        0x1,
8969        1,
8970        0,
8971        p500pfs_by::Podr,
8972        P500PfsBy_SPEC,
8973        crate::common::RW,
8974    > {
8975        crate::common::RegisterField::<
8976            0,
8977            0x1,
8978            1,
8979            0,
8980            p500pfs_by::Podr,
8981            P500PfsBy_SPEC,
8982            crate::common::RW,
8983        >::from_register(self, 0)
8984    }
8985    #[doc = "Port State"]
8986    #[inline(always)]
8987    pub fn pidr(
8988        self,
8989    ) -> crate::common::RegisterField<
8990        1,
8991        0x1,
8992        1,
8993        0,
8994        p500pfs_by::Pidr,
8995        P500PfsBy_SPEC,
8996        crate::common::R,
8997    > {
8998        crate::common::RegisterField::<
8999            1,
9000            0x1,
9001            1,
9002            0,
9003            p500pfs_by::Pidr,
9004            P500PfsBy_SPEC,
9005            crate::common::R,
9006        >::from_register(self, 0)
9007    }
9008    #[doc = "Port Direction"]
9009    #[inline(always)]
9010    pub fn pdr(
9011        self,
9012    ) -> crate::common::RegisterField<
9013        2,
9014        0x1,
9015        1,
9016        0,
9017        p500pfs_by::Pdr,
9018        P500PfsBy_SPEC,
9019        crate::common::RW,
9020    > {
9021        crate::common::RegisterField::<
9022            2,
9023            0x1,
9024            1,
9025            0,
9026            p500pfs_by::Pdr,
9027            P500PfsBy_SPEC,
9028            crate::common::RW,
9029        >::from_register(self, 0)
9030    }
9031    #[doc = "Pull-up Control"]
9032    #[inline(always)]
9033    pub fn pcr(
9034        self,
9035    ) -> crate::common::RegisterField<
9036        4,
9037        0x1,
9038        1,
9039        0,
9040        p500pfs_by::Pcr,
9041        P500PfsBy_SPEC,
9042        crate::common::RW,
9043    > {
9044        crate::common::RegisterField::<
9045            4,
9046            0x1,
9047            1,
9048            0,
9049            p500pfs_by::Pcr,
9050            P500PfsBy_SPEC,
9051            crate::common::RW,
9052        >::from_register(self, 0)
9053    }
9054    #[doc = "N-Channel Open-Drain Control"]
9055    #[inline(always)]
9056    pub fn ncodr(
9057        self,
9058    ) -> crate::common::RegisterField<
9059        6,
9060        0x1,
9061        1,
9062        0,
9063        p500pfs_by::Ncodr,
9064        P500PfsBy_SPEC,
9065        crate::common::RW,
9066    > {
9067        crate::common::RegisterField::<
9068            6,
9069            0x1,
9070            1,
9071            0,
9072            p500pfs_by::Ncodr,
9073            P500PfsBy_SPEC,
9074            crate::common::RW,
9075        >::from_register(self, 0)
9076    }
9077}
9078impl ::core::default::Default for P500PfsBy {
9079    #[inline(always)]
9080    fn default() -> P500PfsBy {
9081        <crate::RegValueT<P500PfsBy_SPEC> as RegisterValue<_>>::new(0)
9082    }
9083}
9084pub mod p500pfs_by {
9085
9086    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9087    pub struct Podr_SPEC;
9088    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
9089    impl Podr {
9090        #[doc = "Output low"]
9091        pub const _0: Self = Self::new(0);
9092        #[doc = "Output high"]
9093        pub const _1: Self = Self::new(1);
9094    }
9095    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9096    pub struct Pidr_SPEC;
9097    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
9098    impl Pidr {
9099        #[doc = "Low level"]
9100        pub const _0: Self = Self::new(0);
9101        #[doc = "High level"]
9102        pub const _1: Self = Self::new(1);
9103    }
9104    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9105    pub struct Pdr_SPEC;
9106    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
9107    impl Pdr {
9108        #[doc = "Input (functions as an input pin)"]
9109        pub const _0: Self = Self::new(0);
9110        #[doc = "Output (functions as an output pin)"]
9111        pub const _1: Self = Self::new(1);
9112    }
9113    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9114    pub struct Pcr_SPEC;
9115    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
9116    impl Pcr {
9117        #[doc = "Disable input pull-up"]
9118        pub const _0: Self = Self::new(0);
9119        #[doc = "Enable input pull-up"]
9120        pub const _1: Self = Self::new(1);
9121    }
9122    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9123    pub struct Ncodr_SPEC;
9124    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
9125    impl Ncodr {
9126        #[doc = "Output CMOS"]
9127        pub const _0: Self = Self::new(0);
9128        #[doc = "Output NMOS open-drain"]
9129        pub const _1: Self = Self::new(1);
9130    }
9131}
9132#[doc(hidden)]
9133#[derive(Copy, Clone, Eq, PartialEq)]
9134pub struct P80Pfs_SPEC;
9135impl crate::sealed::RegSpec for P80Pfs_SPEC {
9136    type DataType = u32;
9137}
9138#[doc = "Port 80%s Pin Function Select Register"]
9139pub type P80Pfs = crate::RegValueT<P80Pfs_SPEC>;
9140
9141impl P80Pfs {
9142    #[doc = "Port Output Data"]
9143    #[inline(always)]
9144    pub fn podr(
9145        self,
9146    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p80pfs::Podr, P80Pfs_SPEC, crate::common::RW>
9147    {
9148        crate::common::RegisterField::<0,0x1,1,0,p80pfs::Podr, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9149    }
9150    #[doc = "Port State"]
9151    #[inline(always)]
9152    pub fn pidr(
9153        self,
9154    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p80pfs::Pidr, P80Pfs_SPEC, crate::common::R>
9155    {
9156        crate::common::RegisterField::<1,0x1,1,0,p80pfs::Pidr, P80Pfs_SPEC,crate::common::R>::from_register(self,0)
9157    }
9158    #[doc = "Port Direction"]
9159    #[inline(always)]
9160    pub fn pdr(
9161        self,
9162    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p80pfs::Pdr, P80Pfs_SPEC, crate::common::RW>
9163    {
9164        crate::common::RegisterField::<2,0x1,1,0,p80pfs::Pdr, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9165    }
9166    #[doc = "Pull-up Control"]
9167    #[inline(always)]
9168    pub fn pcr(
9169        self,
9170    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p80pfs::Pcr, P80Pfs_SPEC, crate::common::RW>
9171    {
9172        crate::common::RegisterField::<4,0x1,1,0,p80pfs::Pcr, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9173    }
9174    #[doc = "N-Channel Open-Drain Control"]
9175    #[inline(always)]
9176    pub fn ncodr(
9177        self,
9178    ) -> crate::common::RegisterField<6, 0x1, 1, 0, p80pfs::Ncodr, P80Pfs_SPEC, crate::common::RW>
9179    {
9180        crate::common::RegisterField::<6,0x1,1,0,p80pfs::Ncodr, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9181    }
9182    #[doc = "Port Drive Capability"]
9183    #[inline(always)]
9184    pub fn dscr(
9185        self,
9186    ) -> crate::common::RegisterField<10, 0x3, 1, 0, p80pfs::Dscr, P80Pfs_SPEC, crate::common::RW>
9187    {
9188        crate::common::RegisterField::<10,0x3,1,0,p80pfs::Dscr, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9189    }
9190    #[doc = "Event on Falling/Event on Rising"]
9191    #[inline(always)]
9192    pub fn eofr(
9193        self,
9194    ) -> crate::common::RegisterField<12, 0x3, 1, 0, p80pfs::Eofr, P80Pfs_SPEC, crate::common::RW>
9195    {
9196        crate::common::RegisterField::<12,0x3,1,0,p80pfs::Eofr, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9197    }
9198    #[doc = "IRQ Input Enable"]
9199    #[inline(always)]
9200    pub fn isel(
9201        self,
9202    ) -> crate::common::RegisterField<14, 0x1, 1, 0, p80pfs::Isel, P80Pfs_SPEC, crate::common::RW>
9203    {
9204        crate::common::RegisterField::<14,0x1,1,0,p80pfs::Isel, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9205    }
9206    #[doc = "Analog Input Enable"]
9207    #[inline(always)]
9208    pub fn asel(
9209        self,
9210    ) -> crate::common::RegisterField<15, 0x1, 1, 0, p80pfs::Asel, P80Pfs_SPEC, crate::common::RW>
9211    {
9212        crate::common::RegisterField::<15,0x1,1,0,p80pfs::Asel, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9213    }
9214    #[doc = "Port Mode Control"]
9215    #[inline(always)]
9216    pub fn pmr(
9217        self,
9218    ) -> crate::common::RegisterField<16, 0x1, 1, 0, p80pfs::Pmr, P80Pfs_SPEC, crate::common::RW>
9219    {
9220        crate::common::RegisterField::<16,0x1,1,0,p80pfs::Pmr, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9221    }
9222    #[doc = "Peripheral Select"]
9223    #[inline(always)]
9224    pub fn psel(
9225        self,
9226    ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, P80Pfs_SPEC, crate::common::RW> {
9227        crate::common::RegisterField::<24,0x1f,1,0,u8, P80Pfs_SPEC,crate::common::RW>::from_register(self,0)
9228    }
9229}
9230impl ::core::default::Default for P80Pfs {
9231    #[inline(always)]
9232    fn default() -> P80Pfs {
9233        <crate::RegValueT<P80Pfs_SPEC> as RegisterValue<_>>::new(0)
9234    }
9235}
9236pub mod p80pfs {
9237
9238    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9239    pub struct Podr_SPEC;
9240    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
9241    impl Podr {
9242        #[doc = "Output low"]
9243        pub const _0: Self = Self::new(0);
9244        #[doc = "Output high"]
9245        pub const _1: Self = Self::new(1);
9246    }
9247    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9248    pub struct Pidr_SPEC;
9249    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
9250    impl Pidr {
9251        #[doc = "Low level"]
9252        pub const _0: Self = Self::new(0);
9253        #[doc = "High level"]
9254        pub const _1: Self = Self::new(1);
9255    }
9256    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9257    pub struct Pdr_SPEC;
9258    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
9259    impl Pdr {
9260        #[doc = "Input (functions as an input pin)"]
9261        pub const _0: Self = Self::new(0);
9262        #[doc = "Output (functions as an output pin)"]
9263        pub const _1: Self = Self::new(1);
9264    }
9265    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9266    pub struct Pcr_SPEC;
9267    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
9268    impl Pcr {
9269        #[doc = "Disable input pull-up"]
9270        pub const _0: Self = Self::new(0);
9271        #[doc = "Enable input pull-up"]
9272        pub const _1: Self = Self::new(1);
9273    }
9274    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9275    pub struct Ncodr_SPEC;
9276    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
9277    impl Ncodr {
9278        #[doc = "Output CMOS"]
9279        pub const _0: Self = Self::new(0);
9280        #[doc = "Output NMOS open-drain"]
9281        pub const _1: Self = Self::new(1);
9282    }
9283    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9284    pub struct Dscr_SPEC;
9285    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
9286    impl Dscr {
9287        #[doc = "Low drive"]
9288        pub const _00: Self = Self::new(0);
9289        #[doc = "Middle drive"]
9290        pub const _01: Self = Self::new(1);
9291        #[doc = "Setting prohibited"]
9292        pub const _10: Self = Self::new(2);
9293        #[doc = "High drive"]
9294        pub const _11: Self = Self::new(3);
9295    }
9296    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9297    pub struct Eofr_SPEC;
9298    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
9299    impl Eofr {
9300        #[doc = "Don\'t care"]
9301        pub const _00: Self = Self::new(0);
9302        #[doc = "Detect rising edge"]
9303        pub const _01: Self = Self::new(1);
9304        #[doc = "Detect falling edge"]
9305        pub const _10: Self = Self::new(2);
9306        #[doc = "Detect both edges"]
9307        pub const _11: Self = Self::new(3);
9308    }
9309    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9310    pub struct Isel_SPEC;
9311    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
9312    impl Isel {
9313        #[doc = "Do not use as IRQn input pin"]
9314        pub const _0: Self = Self::new(0);
9315        #[doc = "Use as IRQn input pin"]
9316        pub const _1: Self = Self::new(1);
9317    }
9318    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9319    pub struct Asel_SPEC;
9320    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
9321    impl Asel {
9322        #[doc = "Do not use as analog pin"]
9323        pub const _0: Self = Self::new(0);
9324        #[doc = "Use as analog pin"]
9325        pub const _1: Self = Self::new(1);
9326    }
9327    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9328    pub struct Pmr_SPEC;
9329    pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
9330    impl Pmr {
9331        #[doc = "Use as general I/O pin"]
9332        pub const _0: Self = Self::new(0);
9333        #[doc = "Use as I/O port for peripheral functions"]
9334        pub const _1: Self = Self::new(1);
9335    }
9336}
9337#[doc(hidden)]
9338#[derive(Copy, Clone, Eq, PartialEq)]
9339pub struct P80PfsHa_SPEC;
9340impl crate::sealed::RegSpec for P80PfsHa_SPEC {
9341    type DataType = u16;
9342}
9343#[doc = "Port 80%s Pin Function Select Register"]
9344pub type P80PfsHa = crate::RegValueT<P80PfsHa_SPEC>;
9345
9346impl P80PfsHa {
9347    #[doc = "Port Output Data"]
9348    #[inline(always)]
9349    pub fn podr(
9350        self,
9351    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p80pfs_ha::Podr, P80PfsHa_SPEC, crate::common::RW>
9352    {
9353        crate::common::RegisterField::<
9354            0,
9355            0x1,
9356            1,
9357            0,
9358            p80pfs_ha::Podr,
9359            P80PfsHa_SPEC,
9360            crate::common::RW,
9361        >::from_register(self, 0)
9362    }
9363    #[doc = "Port State"]
9364    #[inline(always)]
9365    pub fn pidr(
9366        self,
9367    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p80pfs_ha::Pidr, P80PfsHa_SPEC, crate::common::R>
9368    {
9369        crate::common::RegisterField::<1,0x1,1,0,p80pfs_ha::Pidr, P80PfsHa_SPEC,crate::common::R>::from_register(self,0)
9370    }
9371    #[doc = "Port Direction"]
9372    #[inline(always)]
9373    pub fn pdr(
9374        self,
9375    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p80pfs_ha::Pdr, P80PfsHa_SPEC, crate::common::RW>
9376    {
9377        crate::common::RegisterField::<2,0x1,1,0,p80pfs_ha::Pdr, P80PfsHa_SPEC,crate::common::RW>::from_register(self,0)
9378    }
9379    #[doc = "Pull-up Control"]
9380    #[inline(always)]
9381    pub fn pcr(
9382        self,
9383    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p80pfs_ha::Pcr, P80PfsHa_SPEC, crate::common::RW>
9384    {
9385        crate::common::RegisterField::<4,0x1,1,0,p80pfs_ha::Pcr, P80PfsHa_SPEC,crate::common::RW>::from_register(self,0)
9386    }
9387    #[doc = "N-Channel Open-Drain Control"]
9388    #[inline(always)]
9389    pub fn ncodr(
9390        self,
9391    ) -> crate::common::RegisterField<
9392        6,
9393        0x1,
9394        1,
9395        0,
9396        p80pfs_ha::Ncodr,
9397        P80PfsHa_SPEC,
9398        crate::common::RW,
9399    > {
9400        crate::common::RegisterField::<
9401            6,
9402            0x1,
9403            1,
9404            0,
9405            p80pfs_ha::Ncodr,
9406            P80PfsHa_SPEC,
9407            crate::common::RW,
9408        >::from_register(self, 0)
9409    }
9410    #[doc = "Port Drive Capability"]
9411    #[inline(always)]
9412    pub fn dscr(
9413        self,
9414    ) -> crate::common::RegisterField<
9415        10,
9416        0x3,
9417        1,
9418        0,
9419        p80pfs_ha::Dscr,
9420        P80PfsHa_SPEC,
9421        crate::common::RW,
9422    > {
9423        crate::common::RegisterField::<
9424            10,
9425            0x3,
9426            1,
9427            0,
9428            p80pfs_ha::Dscr,
9429            P80PfsHa_SPEC,
9430            crate::common::RW,
9431        >::from_register(self, 0)
9432    }
9433    #[doc = "Event on Falling/Event on Rising"]
9434    #[inline(always)]
9435    pub fn eofr(
9436        self,
9437    ) -> crate::common::RegisterField<
9438        12,
9439        0x3,
9440        1,
9441        0,
9442        p80pfs_ha::Eofr,
9443        P80PfsHa_SPEC,
9444        crate::common::RW,
9445    > {
9446        crate::common::RegisterField::<
9447            12,
9448            0x3,
9449            1,
9450            0,
9451            p80pfs_ha::Eofr,
9452            P80PfsHa_SPEC,
9453            crate::common::RW,
9454        >::from_register(self, 0)
9455    }
9456    #[doc = "IRQ Input Enable"]
9457    #[inline(always)]
9458    pub fn isel(
9459        self,
9460    ) -> crate::common::RegisterField<
9461        14,
9462        0x1,
9463        1,
9464        0,
9465        p80pfs_ha::Isel,
9466        P80PfsHa_SPEC,
9467        crate::common::RW,
9468    > {
9469        crate::common::RegisterField::<
9470            14,
9471            0x1,
9472            1,
9473            0,
9474            p80pfs_ha::Isel,
9475            P80PfsHa_SPEC,
9476            crate::common::RW,
9477        >::from_register(self, 0)
9478    }
9479    #[doc = "Analog Input Enable"]
9480    #[inline(always)]
9481    pub fn asel(
9482        self,
9483    ) -> crate::common::RegisterField<
9484        15,
9485        0x1,
9486        1,
9487        0,
9488        p80pfs_ha::Asel,
9489        P80PfsHa_SPEC,
9490        crate::common::RW,
9491    > {
9492        crate::common::RegisterField::<
9493            15,
9494            0x1,
9495            1,
9496            0,
9497            p80pfs_ha::Asel,
9498            P80PfsHa_SPEC,
9499            crate::common::RW,
9500        >::from_register(self, 0)
9501    }
9502}
9503impl ::core::default::Default for P80PfsHa {
9504    #[inline(always)]
9505    fn default() -> P80PfsHa {
9506        <crate::RegValueT<P80PfsHa_SPEC> as RegisterValue<_>>::new(0)
9507    }
9508}
9509pub mod p80pfs_ha {
9510
9511    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9512    pub struct Podr_SPEC;
9513    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
9514    impl Podr {
9515        #[doc = "Output low"]
9516        pub const _0: Self = Self::new(0);
9517        #[doc = "Output high"]
9518        pub const _1: Self = Self::new(1);
9519    }
9520    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9521    pub struct Pidr_SPEC;
9522    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
9523    impl Pidr {
9524        #[doc = "Low level"]
9525        pub const _0: Self = Self::new(0);
9526        #[doc = "High level"]
9527        pub const _1: Self = Self::new(1);
9528    }
9529    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9530    pub struct Pdr_SPEC;
9531    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
9532    impl Pdr {
9533        #[doc = "Input (functions as an input pin)"]
9534        pub const _0: Self = Self::new(0);
9535        #[doc = "Output (functions as an output pin)"]
9536        pub const _1: Self = Self::new(1);
9537    }
9538    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9539    pub struct Pcr_SPEC;
9540    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
9541    impl Pcr {
9542        #[doc = "Disable input pull-up"]
9543        pub const _0: Self = Self::new(0);
9544        #[doc = "Enable input pull-up"]
9545        pub const _1: Self = Self::new(1);
9546    }
9547    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9548    pub struct Ncodr_SPEC;
9549    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
9550    impl Ncodr {
9551        #[doc = "Output CMOS"]
9552        pub const _0: Self = Self::new(0);
9553        #[doc = "Output NMOS open-drain"]
9554        pub const _1: Self = Self::new(1);
9555    }
9556    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9557    pub struct Dscr_SPEC;
9558    pub type Dscr = crate::EnumBitfieldStruct<u8, Dscr_SPEC>;
9559    impl Dscr {
9560        #[doc = "Low drive"]
9561        pub const _00: Self = Self::new(0);
9562        #[doc = "Middle drive"]
9563        pub const _01: Self = Self::new(1);
9564        #[doc = "Setting prohibited"]
9565        pub const _10: Self = Self::new(2);
9566        #[doc = "High drive"]
9567        pub const _11: Self = Self::new(3);
9568    }
9569    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9570    pub struct Eofr_SPEC;
9571    pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
9572    impl Eofr {
9573        #[doc = "Don\'t care"]
9574        pub const _00: Self = Self::new(0);
9575        #[doc = "Detect rising edge"]
9576        pub const _01: Self = Self::new(1);
9577        #[doc = "Detect falling edge"]
9578        pub const _10: Self = Self::new(2);
9579        #[doc = "Detect both edges"]
9580        pub const _11: Self = Self::new(3);
9581    }
9582    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9583    pub struct Isel_SPEC;
9584    pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
9585    impl Isel {
9586        #[doc = "Do not use as IRQn input pin"]
9587        pub const _0: Self = Self::new(0);
9588        #[doc = "Use as IRQn input pin"]
9589        pub const _1: Self = Self::new(1);
9590    }
9591    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9592    pub struct Asel_SPEC;
9593    pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
9594    impl Asel {
9595        #[doc = "Do not use as analog pin"]
9596        pub const _0: Self = Self::new(0);
9597        #[doc = "Use as analog pin"]
9598        pub const _1: Self = Self::new(1);
9599    }
9600}
9601#[doc(hidden)]
9602#[derive(Copy, Clone, Eq, PartialEq)]
9603pub struct P80PfsBy_SPEC;
9604impl crate::sealed::RegSpec for P80PfsBy_SPEC {
9605    type DataType = u8;
9606}
9607#[doc = "Port 80%s Pin Function Select Register"]
9608pub type P80PfsBy = crate::RegValueT<P80PfsBy_SPEC>;
9609
9610impl P80PfsBy {
9611    #[doc = "Port Output Data"]
9612    #[inline(always)]
9613    pub fn podr(
9614        self,
9615    ) -> crate::common::RegisterField<0, 0x1, 1, 0, p80pfs_by::Podr, P80PfsBy_SPEC, crate::common::RW>
9616    {
9617        crate::common::RegisterField::<
9618            0,
9619            0x1,
9620            1,
9621            0,
9622            p80pfs_by::Podr,
9623            P80PfsBy_SPEC,
9624            crate::common::RW,
9625        >::from_register(self, 0)
9626    }
9627    #[doc = "Port State"]
9628    #[inline(always)]
9629    pub fn pidr(
9630        self,
9631    ) -> crate::common::RegisterField<1, 0x1, 1, 0, p80pfs_by::Pidr, P80PfsBy_SPEC, crate::common::R>
9632    {
9633        crate::common::RegisterField::<1,0x1,1,0,p80pfs_by::Pidr, P80PfsBy_SPEC,crate::common::R>::from_register(self,0)
9634    }
9635    #[doc = "Port Direction"]
9636    #[inline(always)]
9637    pub fn pdr(
9638        self,
9639    ) -> crate::common::RegisterField<2, 0x1, 1, 0, p80pfs_by::Pdr, P80PfsBy_SPEC, crate::common::RW>
9640    {
9641        crate::common::RegisterField::<2,0x1,1,0,p80pfs_by::Pdr, P80PfsBy_SPEC,crate::common::RW>::from_register(self,0)
9642    }
9643    #[doc = "Pull-up Control"]
9644    #[inline(always)]
9645    pub fn pcr(
9646        self,
9647    ) -> crate::common::RegisterField<4, 0x1, 1, 0, p80pfs_by::Pcr, P80PfsBy_SPEC, crate::common::RW>
9648    {
9649        crate::common::RegisterField::<4,0x1,1,0,p80pfs_by::Pcr, P80PfsBy_SPEC,crate::common::RW>::from_register(self,0)
9650    }
9651    #[doc = "N-Channel Open-Drain Control"]
9652    #[inline(always)]
9653    pub fn ncodr(
9654        self,
9655    ) -> crate::common::RegisterField<
9656        6,
9657        0x1,
9658        1,
9659        0,
9660        p80pfs_by::Ncodr,
9661        P80PfsBy_SPEC,
9662        crate::common::RW,
9663    > {
9664        crate::common::RegisterField::<
9665            6,
9666            0x1,
9667            1,
9668            0,
9669            p80pfs_by::Ncodr,
9670            P80PfsBy_SPEC,
9671            crate::common::RW,
9672        >::from_register(self, 0)
9673    }
9674}
9675impl ::core::default::Default for P80PfsBy {
9676    #[inline(always)]
9677    fn default() -> P80PfsBy {
9678        <crate::RegValueT<P80PfsBy_SPEC> as RegisterValue<_>>::new(0)
9679    }
9680}
9681pub mod p80pfs_by {
9682
9683    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9684    pub struct Podr_SPEC;
9685    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
9686    impl Podr {
9687        #[doc = "Output low"]
9688        pub const _0: Self = Self::new(0);
9689        #[doc = "Output high"]
9690        pub const _1: Self = Self::new(1);
9691    }
9692    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9693    pub struct Pidr_SPEC;
9694    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
9695    impl Pidr {
9696        #[doc = "Low level"]
9697        pub const _0: Self = Self::new(0);
9698        #[doc = "High level"]
9699        pub const _1: Self = Self::new(1);
9700    }
9701    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9702    pub struct Pdr_SPEC;
9703    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
9704    impl Pdr {
9705        #[doc = "Input (functions as an input pin)"]
9706        pub const _0: Self = Self::new(0);
9707        #[doc = "Output (functions as an output pin)"]
9708        pub const _1: Self = Self::new(1);
9709    }
9710    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9711    pub struct Pcr_SPEC;
9712    pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
9713    impl Pcr {
9714        #[doc = "Disable input pull-up"]
9715        pub const _0: Self = Self::new(0);
9716        #[doc = "Enable input pull-up"]
9717        pub const _1: Self = Self::new(1);
9718    }
9719    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9720    pub struct Ncodr_SPEC;
9721    pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
9722    impl Ncodr {
9723        #[doc = "Output CMOS"]
9724        pub const _0: Self = Self::new(0);
9725        #[doc = "Output NMOS open-drain"]
9726        pub const _1: Self = Self::new(1);
9727    }
9728}
9729#[doc(hidden)]
9730#[derive(Copy, Clone, Eq, PartialEq)]
9731pub struct Pwpr_SPEC;
9732impl crate::sealed::RegSpec for Pwpr_SPEC {
9733    type DataType = u8;
9734}
9735#[doc = "Write-Protect Register"]
9736pub type Pwpr = crate::RegValueT<Pwpr_SPEC>;
9737
9738impl Pwpr {
9739    #[doc = "PmnPFS Register Write Enable"]
9740    #[inline(always)]
9741    pub fn pfswe(
9742        self,
9743    ) -> crate::common::RegisterField<6, 0x1, 1, 0, pwpr::Pfswe, Pwpr_SPEC, crate::common::RW> {
9744        crate::common::RegisterField::<6,0x1,1,0,pwpr::Pfswe, Pwpr_SPEC,crate::common::RW>::from_register(self,0)
9745    }
9746    #[doc = "PFSWE Bit Write Disable"]
9747    #[inline(always)]
9748    pub fn b0wi(
9749        self,
9750    ) -> crate::common::RegisterField<7, 0x1, 1, 0, pwpr::B0Wi, Pwpr_SPEC, crate::common::RW> {
9751        crate::common::RegisterField::<7,0x1,1,0,pwpr::B0Wi, Pwpr_SPEC,crate::common::RW>::from_register(self,0)
9752    }
9753}
9754impl ::core::default::Default for Pwpr {
9755    #[inline(always)]
9756    fn default() -> Pwpr {
9757        <crate::RegValueT<Pwpr_SPEC> as RegisterValue<_>>::new(128)
9758    }
9759}
9760pub mod pwpr {
9761
9762    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9763    pub struct Pfswe_SPEC;
9764    pub type Pfswe = crate::EnumBitfieldStruct<u8, Pfswe_SPEC>;
9765    impl Pfswe {
9766        #[doc = "Writing to the PmnPFS register is disabled"]
9767        pub const _0: Self = Self::new(0);
9768        #[doc = "Writing to the PmnPFS register is enabled"]
9769        pub const _1: Self = Self::new(1);
9770    }
9771    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9772    pub struct B0Wi_SPEC;
9773    pub type B0Wi = crate::EnumBitfieldStruct<u8, B0Wi_SPEC>;
9774    impl B0Wi {
9775        #[doc = "Writing to the PFSWE bit is enabled"]
9776        pub const _0: Self = Self::new(0);
9777        #[doc = "Writing to the PFSWE bit is disabled"]
9778        pub const _1: Self = Self::new(1);
9779    }
9780}
9781#[doc(hidden)]
9782#[derive(Copy, Clone, Eq, PartialEq)]
9783pub struct Pwprs_SPEC;
9784impl crate::sealed::RegSpec for Pwprs_SPEC {
9785    type DataType = u8;
9786}
9787#[doc = "Write-Protect Register for Secure"]
9788pub type Pwprs = crate::RegValueT<Pwprs_SPEC>;
9789
9790impl Pwprs {
9791    #[doc = "PmnPFS Register Write Enable"]
9792    #[inline(always)]
9793    pub fn pfswe(
9794        self,
9795    ) -> crate::common::RegisterField<6, 0x1, 1, 0, pwprs::Pfswe, Pwprs_SPEC, crate::common::RW>
9796    {
9797        crate::common::RegisterField::<6,0x1,1,0,pwprs::Pfswe, Pwprs_SPEC,crate::common::RW>::from_register(self,0)
9798    }
9799    #[doc = "PFSWE Bit Write Disable"]
9800    #[inline(always)]
9801    pub fn b0wi(
9802        self,
9803    ) -> crate::common::RegisterField<7, 0x1, 1, 0, pwprs::B0Wi, Pwprs_SPEC, crate::common::RW>
9804    {
9805        crate::common::RegisterField::<7,0x1,1,0,pwprs::B0Wi, Pwprs_SPEC,crate::common::RW>::from_register(self,0)
9806    }
9807}
9808impl ::core::default::Default for Pwprs {
9809    #[inline(always)]
9810    fn default() -> Pwprs {
9811        <crate::RegValueT<Pwprs_SPEC> as RegisterValue<_>>::new(128)
9812    }
9813}
9814pub mod pwprs {
9815
9816    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9817    pub struct Pfswe_SPEC;
9818    pub type Pfswe = crate::EnumBitfieldStruct<u8, Pfswe_SPEC>;
9819    impl Pfswe {
9820        #[doc = "Disable writes to the PmnPFS register"]
9821        pub const _0: Self = Self::new(0);
9822        #[doc = "Enable writes to the PmnPFS register"]
9823        pub const _1: Self = Self::new(1);
9824    }
9825    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9826    pub struct B0Wi_SPEC;
9827    pub type B0Wi = crate::EnumBitfieldStruct<u8, B0Wi_SPEC>;
9828    impl B0Wi {
9829        #[doc = "Enable writes the PFSWE bit"]
9830        pub const _0: Self = Self::new(0);
9831        #[doc = "Disable writes to the PFSWE bit"]
9832        pub const _1: Self = Self::new(1);
9833    }
9834}
9835#[doc(hidden)]
9836#[derive(Copy, Clone, Eq, PartialEq)]
9837pub struct Pfi3C_SPEC;
9838impl crate::sealed::RegSpec for Pfi3C_SPEC {
9839    type DataType = u8;
9840}
9841#[doc = "RI3C Slope Control Register"]
9842pub type Pfi3C = crate::RegValueT<Pfi3C_SPEC>;
9843
9844impl Pfi3C {
9845    #[doc = "I3C mode slope control bit"]
9846    #[inline(always)]
9847    pub fn i3cslope0(
9848        self,
9849    ) -> crate::common::RegisterField<0, 0x1, 1, 0, pfi3c::I3Cslope0, Pfi3C_SPEC, crate::common::RW>
9850    {
9851        crate::common::RegisterField::<0,0x1,1,0,pfi3c::I3Cslope0, Pfi3C_SPEC,crate::common::RW>::from_register(self,0)
9852    }
9853}
9854impl ::core::default::Default for Pfi3C {
9855    #[inline(always)]
9856    fn default() -> Pfi3C {
9857        <crate::RegValueT<Pfi3C_SPEC> as RegisterValue<_>>::new(0)
9858    }
9859}
9860pub mod pfi3c {
9861
9862    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9863    pub struct I3Cslope0_SPEC;
9864    pub type I3Cslope0 = crate::EnumBitfieldStruct<u8, I3Cslope0_SPEC>;
9865    impl I3Cslope0 {
9866        #[doc = "I3C mode slope control disable"]
9867        pub const _0: Self = Self::new(0);
9868        #[doc = "I3C mode slope control enable"]
9869        pub const _1: Self = Self::new(1);
9870    }
9871}
9872#[doc(hidden)]
9873#[derive(Copy, Clone, Eq, PartialEq)]
9874pub struct Psar_SPEC;
9875impl crate::sealed::RegSpec for Psar_SPEC {
9876    type DataType = u16;
9877}
9878#[doc = "Port Security Attribution register"]
9879pub type Psar = crate::RegValueT<Psar_SPEC>;
9880
9881impl Psar {
9882    #[doc = "Pmn Security Attribution"]
9883    #[inline(always)]
9884    pub fn pmnsa(
9885        self,
9886    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, psar::Pmnsa, Psar_SPEC, crate::common::RW>
9887    {
9888        crate::common::RegisterField::<0,0xffff,1,0,psar::Pmnsa, Psar_SPEC,crate::common::RW>::from_register(self,0)
9889    }
9890}
9891impl ::core::default::Default for Psar {
9892    #[inline(always)]
9893    fn default() -> Psar {
9894        <crate::RegValueT<Psar_SPEC> as RegisterValue<_>>::new(65535)
9895    }
9896}
9897pub mod psar {
9898
9899    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9900    pub struct Pmnsa_SPEC;
9901    pub type Pmnsa = crate::EnumBitfieldStruct<u8, Pmnsa_SPEC>;
9902    impl Pmnsa {
9903        #[doc = "Secure"]
9904        pub const _0: Self = Self::new(0);
9905        #[doc = "Non Secure"]
9906        pub const _1: Self = Self::new(1);
9907    }
9908}
9909#[doc(hidden)]
9910#[derive(Copy, Clone, Eq, PartialEq)]
9911pub struct P8Sar_SPEC;
9912impl crate::sealed::RegSpec for P8Sar_SPEC {
9913    type DataType = u16;
9914}
9915#[doc = "Port Security Attribution register"]
9916pub type P8Sar = crate::RegValueT<P8Sar_SPEC>;
9917
9918impl P8Sar {
9919    #[doc = "Pmn Security Attribution"]
9920    #[inline(always)]
9921    pub fn pmnsa(
9922        self,
9923    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, p8sar::Pmnsa, P8Sar_SPEC, crate::common::RW>
9924    {
9925        crate::common::RegisterField::<0,0xffff,1,0,p8sar::Pmnsa, P8Sar_SPEC,crate::common::RW>::from_register(self,0)
9926    }
9927}
9928impl ::core::default::Default for P8Sar {
9929    #[inline(always)]
9930    fn default() -> P8Sar {
9931        <crate::RegValueT<P8Sar_SPEC> as RegisterValue<_>>::new(65535)
9932    }
9933}
9934pub mod p8sar {
9935
9936    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9937    pub struct Pmnsa_SPEC;
9938    pub type Pmnsa = crate::EnumBitfieldStruct<u8, Pmnsa_SPEC>;
9939    impl Pmnsa {
9940        #[doc = "Secure"]
9941        pub const _0: Self = Self::new(0);
9942        #[doc = "Non Secure"]
9943        pub const _1: Self = Self::new(1);
9944    }
9945}