1#![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
37 #[doc = "Port 00%s Pin Function Select Register"]
38 #[inline(always)]
39 pub const fn p00pfs(
40 &self,
41 ) -> &'static crate::common::ClusterRegisterArray<
42 crate::common::Reg<self::P00Pfs_SPEC, crate::common::RW>,
43 5,
44 0x4,
45 > {
46 unsafe {
47 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x0usize))
48 }
49 }
50 #[inline(always)]
51 pub const fn p000pfs(
52 &self,
53 ) -> &'static crate::common::Reg<self::P00Pfs_SPEC, crate::common::RW> {
54 unsafe {
55 crate::common::Reg::<self::P00Pfs_SPEC, crate::common::RW>::from_ptr(
56 self._svd2pac_as_ptr().add(0x0usize),
57 )
58 }
59 }
60 #[inline(always)]
61 pub const fn p001pfs(
62 &self,
63 ) -> &'static crate::common::Reg<self::P00Pfs_SPEC, crate::common::RW> {
64 unsafe {
65 crate::common::Reg::<self::P00Pfs_SPEC, crate::common::RW>::from_ptr(
66 self._svd2pac_as_ptr().add(0x4usize),
67 )
68 }
69 }
70 #[inline(always)]
71 pub const fn p002pfs(
72 &self,
73 ) -> &'static crate::common::Reg<self::P00Pfs_SPEC, crate::common::RW> {
74 unsafe {
75 crate::common::Reg::<self::P00Pfs_SPEC, crate::common::RW>::from_ptr(
76 self._svd2pac_as_ptr().add(0x8usize),
77 )
78 }
79 }
80 #[inline(always)]
81 pub const fn p003pfs(
82 &self,
83 ) -> &'static crate::common::Reg<self::P00Pfs_SPEC, crate::common::RW> {
84 unsafe {
85 crate::common::Reg::<self::P00Pfs_SPEC, crate::common::RW>::from_ptr(
86 self._svd2pac_as_ptr().add(0xcusize),
87 )
88 }
89 }
90 #[inline(always)]
91 pub const fn p004pfs(
92 &self,
93 ) -> &'static crate::common::Reg<self::P00Pfs_SPEC, crate::common::RW> {
94 unsafe {
95 crate::common::Reg::<self::P00Pfs_SPEC, crate::common::RW>::from_ptr(
96 self._svd2pac_as_ptr().add(0x10usize),
97 )
98 }
99 }
100
101 #[doc = "Port 00%s Pin Function Select Register"]
102 #[inline(always)]
103 pub const fn p00pfs_ha(
104 &self,
105 ) -> &'static crate::common::ClusterRegisterArray<
106 crate::common::Reg<self::P00PfsHa_SPEC, crate::common::RW>,
107 5,
108 0x4,
109 > {
110 unsafe {
111 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x2usize))
112 }
113 }
114 #[inline(always)]
115 pub const fn p000pfs_ha(
116 &self,
117 ) -> &'static crate::common::Reg<self::P00PfsHa_SPEC, crate::common::RW> {
118 unsafe {
119 crate::common::Reg::<self::P00PfsHa_SPEC, crate::common::RW>::from_ptr(
120 self._svd2pac_as_ptr().add(0x2usize),
121 )
122 }
123 }
124 #[inline(always)]
125 pub const fn p001pfs_ha(
126 &self,
127 ) -> &'static crate::common::Reg<self::P00PfsHa_SPEC, crate::common::RW> {
128 unsafe {
129 crate::common::Reg::<self::P00PfsHa_SPEC, crate::common::RW>::from_ptr(
130 self._svd2pac_as_ptr().add(0x6usize),
131 )
132 }
133 }
134 #[inline(always)]
135 pub const fn p002pfs_ha(
136 &self,
137 ) -> &'static crate::common::Reg<self::P00PfsHa_SPEC, crate::common::RW> {
138 unsafe {
139 crate::common::Reg::<self::P00PfsHa_SPEC, crate::common::RW>::from_ptr(
140 self._svd2pac_as_ptr().add(0xausize),
141 )
142 }
143 }
144 #[inline(always)]
145 pub const fn p003pfs_ha(
146 &self,
147 ) -> &'static crate::common::Reg<self::P00PfsHa_SPEC, crate::common::RW> {
148 unsafe {
149 crate::common::Reg::<self::P00PfsHa_SPEC, crate::common::RW>::from_ptr(
150 self._svd2pac_as_ptr().add(0xeusize),
151 )
152 }
153 }
154 #[inline(always)]
155 pub const fn p004pfs_ha(
156 &self,
157 ) -> &'static crate::common::Reg<self::P00PfsHa_SPEC, crate::common::RW> {
158 unsafe {
159 crate::common::Reg::<self::P00PfsHa_SPEC, crate::common::RW>::from_ptr(
160 self._svd2pac_as_ptr().add(0x12usize),
161 )
162 }
163 }
164
165 #[doc = "Port 00%s Pin Function Select Register"]
166 #[inline(always)]
167 pub const fn p00pfs_by(
168 &self,
169 ) -> &'static crate::common::ClusterRegisterArray<
170 crate::common::Reg<self::P00PfsBy_SPEC, crate::common::RW>,
171 5,
172 0x4,
173 > {
174 unsafe {
175 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x3usize))
176 }
177 }
178 #[inline(always)]
179 pub const fn p000pfs_by(
180 &self,
181 ) -> &'static crate::common::Reg<self::P00PfsBy_SPEC, crate::common::RW> {
182 unsafe {
183 crate::common::Reg::<self::P00PfsBy_SPEC, crate::common::RW>::from_ptr(
184 self._svd2pac_as_ptr().add(0x3usize),
185 )
186 }
187 }
188 #[inline(always)]
189 pub const fn p001pfs_by(
190 &self,
191 ) -> &'static crate::common::Reg<self::P00PfsBy_SPEC, crate::common::RW> {
192 unsafe {
193 crate::common::Reg::<self::P00PfsBy_SPEC, crate::common::RW>::from_ptr(
194 self._svd2pac_as_ptr().add(0x7usize),
195 )
196 }
197 }
198 #[inline(always)]
199 pub const fn p002pfs_by(
200 &self,
201 ) -> &'static crate::common::Reg<self::P00PfsBy_SPEC, crate::common::RW> {
202 unsafe {
203 crate::common::Reg::<self::P00PfsBy_SPEC, crate::common::RW>::from_ptr(
204 self._svd2pac_as_ptr().add(0xbusize),
205 )
206 }
207 }
208 #[inline(always)]
209 pub const fn p003pfs_by(
210 &self,
211 ) -> &'static crate::common::Reg<self::P00PfsBy_SPEC, crate::common::RW> {
212 unsafe {
213 crate::common::Reg::<self::P00PfsBy_SPEC, crate::common::RW>::from_ptr(
214 self._svd2pac_as_ptr().add(0xfusize),
215 )
216 }
217 }
218 #[inline(always)]
219 pub const fn p004pfs_by(
220 &self,
221 ) -> &'static crate::common::Reg<self::P00PfsBy_SPEC, crate::common::RW> {
222 unsafe {
223 crate::common::Reg::<self::P00PfsBy_SPEC, crate::common::RW>::from_ptr(
224 self._svd2pac_as_ptr().add(0x13usize),
225 )
226 }
227 }
228
229 #[doc = "Port 10%s Pin Function Select Register"]
230 #[inline(always)]
231 pub const fn p10pfs(
232 &self,
233 ) -> &'static crate::common::ClusterRegisterArray<
234 crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW>,
235 10,
236 0x4,
237 > {
238 unsafe {
239 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x40usize))
240 }
241 }
242 #[inline(always)]
243 pub const fn p100pfs(
244 &self,
245 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
246 unsafe {
247 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
248 self._svd2pac_as_ptr().add(0x40usize),
249 )
250 }
251 }
252 #[inline(always)]
253 pub const fn p101pfs(
254 &self,
255 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
256 unsafe {
257 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
258 self._svd2pac_as_ptr().add(0x44usize),
259 )
260 }
261 }
262 #[inline(always)]
263 pub const fn p102pfs(
264 &self,
265 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
266 unsafe {
267 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
268 self._svd2pac_as_ptr().add(0x48usize),
269 )
270 }
271 }
272 #[inline(always)]
273 pub const fn p103pfs(
274 &self,
275 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
276 unsafe {
277 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
278 self._svd2pac_as_ptr().add(0x4cusize),
279 )
280 }
281 }
282 #[inline(always)]
283 pub const fn p104pfs(
284 &self,
285 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
286 unsafe {
287 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
288 self._svd2pac_as_ptr().add(0x50usize),
289 )
290 }
291 }
292 #[inline(always)]
293 pub const fn p105pfs(
294 &self,
295 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
296 unsafe {
297 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
298 self._svd2pac_as_ptr().add(0x54usize),
299 )
300 }
301 }
302 #[inline(always)]
303 pub const fn p106pfs(
304 &self,
305 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
306 unsafe {
307 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
308 self._svd2pac_as_ptr().add(0x58usize),
309 )
310 }
311 }
312 #[inline(always)]
313 pub const fn p107pfs(
314 &self,
315 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
316 unsafe {
317 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
318 self._svd2pac_as_ptr().add(0x5cusize),
319 )
320 }
321 }
322 #[inline(always)]
323 pub const fn p108pfs(
324 &self,
325 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
326 unsafe {
327 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
328 self._svd2pac_as_ptr().add(0x60usize),
329 )
330 }
331 }
332 #[inline(always)]
333 pub const fn p109pfs(
334 &self,
335 ) -> &'static crate::common::Reg<self::P10Pfs_SPEC, crate::common::RW> {
336 unsafe {
337 crate::common::Reg::<self::P10Pfs_SPEC, crate::common::RW>::from_ptr(
338 self._svd2pac_as_ptr().add(0x64usize),
339 )
340 }
341 }
342
343 #[doc = "Port 10%s Pin Function Select Register"]
344 #[inline(always)]
345 pub const fn p10pfs_ha(
346 &self,
347 ) -> &'static crate::common::ClusterRegisterArray<
348 crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW>,
349 10,
350 0x4,
351 > {
352 unsafe {
353 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x42usize))
354 }
355 }
356 #[inline(always)]
357 pub const fn p100pfs_ha(
358 &self,
359 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
360 unsafe {
361 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
362 self._svd2pac_as_ptr().add(0x42usize),
363 )
364 }
365 }
366 #[inline(always)]
367 pub const fn p101pfs_ha(
368 &self,
369 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
370 unsafe {
371 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
372 self._svd2pac_as_ptr().add(0x46usize),
373 )
374 }
375 }
376 #[inline(always)]
377 pub const fn p102pfs_ha(
378 &self,
379 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
380 unsafe {
381 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
382 self._svd2pac_as_ptr().add(0x4ausize),
383 )
384 }
385 }
386 #[inline(always)]
387 pub const fn p103pfs_ha(
388 &self,
389 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
390 unsafe {
391 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
392 self._svd2pac_as_ptr().add(0x4eusize),
393 )
394 }
395 }
396 #[inline(always)]
397 pub const fn p104pfs_ha(
398 &self,
399 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
400 unsafe {
401 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
402 self._svd2pac_as_ptr().add(0x52usize),
403 )
404 }
405 }
406 #[inline(always)]
407 pub const fn p105pfs_ha(
408 &self,
409 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
410 unsafe {
411 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
412 self._svd2pac_as_ptr().add(0x56usize),
413 )
414 }
415 }
416 #[inline(always)]
417 pub const fn p106pfs_ha(
418 &self,
419 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
420 unsafe {
421 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
422 self._svd2pac_as_ptr().add(0x5ausize),
423 )
424 }
425 }
426 #[inline(always)]
427 pub const fn p107pfs_ha(
428 &self,
429 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
430 unsafe {
431 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
432 self._svd2pac_as_ptr().add(0x5eusize),
433 )
434 }
435 }
436 #[inline(always)]
437 pub const fn p108pfs_ha(
438 &self,
439 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
440 unsafe {
441 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
442 self._svd2pac_as_ptr().add(0x62usize),
443 )
444 }
445 }
446 #[inline(always)]
447 pub const fn p109pfs_ha(
448 &self,
449 ) -> &'static crate::common::Reg<self::P10PfsHa_SPEC, crate::common::RW> {
450 unsafe {
451 crate::common::Reg::<self::P10PfsHa_SPEC, crate::common::RW>::from_ptr(
452 self._svd2pac_as_ptr().add(0x66usize),
453 )
454 }
455 }
456
457 #[doc = "Port 10%s Pin Function Select Register"]
458 #[inline(always)]
459 pub const fn p10pfs_by(
460 &self,
461 ) -> &'static crate::common::ClusterRegisterArray<
462 crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW>,
463 10,
464 0x4,
465 > {
466 unsafe {
467 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x43usize))
468 }
469 }
470 #[inline(always)]
471 pub const fn p100pfs_by(
472 &self,
473 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
474 unsafe {
475 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
476 self._svd2pac_as_ptr().add(0x43usize),
477 )
478 }
479 }
480 #[inline(always)]
481 pub const fn p101pfs_by(
482 &self,
483 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
484 unsafe {
485 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
486 self._svd2pac_as_ptr().add(0x47usize),
487 )
488 }
489 }
490 #[inline(always)]
491 pub const fn p102pfs_by(
492 &self,
493 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
494 unsafe {
495 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
496 self._svd2pac_as_ptr().add(0x4busize),
497 )
498 }
499 }
500 #[inline(always)]
501 pub const fn p103pfs_by(
502 &self,
503 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
504 unsafe {
505 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
506 self._svd2pac_as_ptr().add(0x4fusize),
507 )
508 }
509 }
510 #[inline(always)]
511 pub const fn p104pfs_by(
512 &self,
513 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
514 unsafe {
515 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
516 self._svd2pac_as_ptr().add(0x53usize),
517 )
518 }
519 }
520 #[inline(always)]
521 pub const fn p105pfs_by(
522 &self,
523 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
524 unsafe {
525 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
526 self._svd2pac_as_ptr().add(0x57usize),
527 )
528 }
529 }
530 #[inline(always)]
531 pub const fn p106pfs_by(
532 &self,
533 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
534 unsafe {
535 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
536 self._svd2pac_as_ptr().add(0x5busize),
537 )
538 }
539 }
540 #[inline(always)]
541 pub const fn p107pfs_by(
542 &self,
543 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
544 unsafe {
545 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
546 self._svd2pac_as_ptr().add(0x5fusize),
547 )
548 }
549 }
550 #[inline(always)]
551 pub const fn p108pfs_by(
552 &self,
553 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
554 unsafe {
555 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
556 self._svd2pac_as_ptr().add(0x63usize),
557 )
558 }
559 }
560 #[inline(always)]
561 pub const fn p109pfs_by(
562 &self,
563 ) -> &'static crate::common::Reg<self::P10PfsBy_SPEC, crate::common::RW> {
564 unsafe {
565 crate::common::Reg::<self::P10PfsBy_SPEC, crate::common::RW>::from_ptr(
566 self._svd2pac_as_ptr().add(0x67usize),
567 )
568 }
569 }
570
571 #[doc = "Port 1%s Pin Function Select Register"]
572 #[inline(always)]
573 pub const fn p1pfs(
574 &self,
575 ) -> &'static crate::common::ClusterRegisterArray<
576 crate::common::Reg<self::P1Pfs_SPEC, crate::common::RW>,
577 4,
578 0x4,
579 > {
580 unsafe {
581 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x68usize))
582 }
583 }
584 #[inline(always)]
585 pub const fn p110pfs(
586 &self,
587 ) -> &'static crate::common::Reg<self::P1Pfs_SPEC, crate::common::RW> {
588 unsafe {
589 crate::common::Reg::<self::P1Pfs_SPEC, crate::common::RW>::from_ptr(
590 self._svd2pac_as_ptr().add(0x68usize),
591 )
592 }
593 }
594 #[inline(always)]
595 pub const fn p111pfs(
596 &self,
597 ) -> &'static crate::common::Reg<self::P1Pfs_SPEC, crate::common::RW> {
598 unsafe {
599 crate::common::Reg::<self::P1Pfs_SPEC, crate::common::RW>::from_ptr(
600 self._svd2pac_as_ptr().add(0x6cusize),
601 )
602 }
603 }
604 #[inline(always)]
605 pub const fn p112pfs(
606 &self,
607 ) -> &'static crate::common::Reg<self::P1Pfs_SPEC, crate::common::RW> {
608 unsafe {
609 crate::common::Reg::<self::P1Pfs_SPEC, crate::common::RW>::from_ptr(
610 self._svd2pac_as_ptr().add(0x70usize),
611 )
612 }
613 }
614 #[inline(always)]
615 pub const fn p113pfs(
616 &self,
617 ) -> &'static crate::common::Reg<self::P1Pfs_SPEC, crate::common::RW> {
618 unsafe {
619 crate::common::Reg::<self::P1Pfs_SPEC, crate::common::RW>::from_ptr(
620 self._svd2pac_as_ptr().add(0x74usize),
621 )
622 }
623 }
624
625 #[doc = "Port 1%s Pin Function Select Register"]
626 #[inline(always)]
627 pub const fn p1pfs_ha(
628 &self,
629 ) -> &'static crate::common::ClusterRegisterArray<
630 crate::common::Reg<self::P1PfsHa_SPEC, crate::common::RW>,
631 4,
632 0x4,
633 > {
634 unsafe {
635 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x6ausize))
636 }
637 }
638 #[inline(always)]
639 pub const fn p110pfs_ha(
640 &self,
641 ) -> &'static crate::common::Reg<self::P1PfsHa_SPEC, crate::common::RW> {
642 unsafe {
643 crate::common::Reg::<self::P1PfsHa_SPEC, crate::common::RW>::from_ptr(
644 self._svd2pac_as_ptr().add(0x6ausize),
645 )
646 }
647 }
648 #[inline(always)]
649 pub const fn p111pfs_ha(
650 &self,
651 ) -> &'static crate::common::Reg<self::P1PfsHa_SPEC, crate::common::RW> {
652 unsafe {
653 crate::common::Reg::<self::P1PfsHa_SPEC, crate::common::RW>::from_ptr(
654 self._svd2pac_as_ptr().add(0x6eusize),
655 )
656 }
657 }
658 #[inline(always)]
659 pub const fn p112pfs_ha(
660 &self,
661 ) -> &'static crate::common::Reg<self::P1PfsHa_SPEC, crate::common::RW> {
662 unsafe {
663 crate::common::Reg::<self::P1PfsHa_SPEC, crate::common::RW>::from_ptr(
664 self._svd2pac_as_ptr().add(0x72usize),
665 )
666 }
667 }
668 #[inline(always)]
669 pub const fn p113pfs_ha(
670 &self,
671 ) -> &'static crate::common::Reg<self::P1PfsHa_SPEC, crate::common::RW> {
672 unsafe {
673 crate::common::Reg::<self::P1PfsHa_SPEC, crate::common::RW>::from_ptr(
674 self._svd2pac_as_ptr().add(0x76usize),
675 )
676 }
677 }
678
679 #[doc = "Port 1%s Pin Function Select Register"]
680 #[inline(always)]
681 pub const fn p1pfs_by(
682 &self,
683 ) -> &'static crate::common::ClusterRegisterArray<
684 crate::common::Reg<self::P1PfsBy_SPEC, crate::common::RW>,
685 4,
686 0x4,
687 > {
688 unsafe {
689 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x6busize))
690 }
691 }
692 #[inline(always)]
693 pub const fn p110pfs_by(
694 &self,
695 ) -> &'static crate::common::Reg<self::P1PfsBy_SPEC, crate::common::RW> {
696 unsafe {
697 crate::common::Reg::<self::P1PfsBy_SPEC, crate::common::RW>::from_ptr(
698 self._svd2pac_as_ptr().add(0x6busize),
699 )
700 }
701 }
702 #[inline(always)]
703 pub const fn p111pfs_by(
704 &self,
705 ) -> &'static crate::common::Reg<self::P1PfsBy_SPEC, crate::common::RW> {
706 unsafe {
707 crate::common::Reg::<self::P1PfsBy_SPEC, crate::common::RW>::from_ptr(
708 self._svd2pac_as_ptr().add(0x6fusize),
709 )
710 }
711 }
712 #[inline(always)]
713 pub const fn p112pfs_by(
714 &self,
715 ) -> &'static crate::common::Reg<self::P1PfsBy_SPEC, crate::common::RW> {
716 unsafe {
717 crate::common::Reg::<self::P1PfsBy_SPEC, crate::common::RW>::from_ptr(
718 self._svd2pac_as_ptr().add(0x73usize),
719 )
720 }
721 }
722 #[inline(always)]
723 pub const fn p113pfs_by(
724 &self,
725 ) -> &'static crate::common::Reg<self::P1PfsBy_SPEC, crate::common::RW> {
726 unsafe {
727 crate::common::Reg::<self::P1PfsBy_SPEC, crate::common::RW>::from_ptr(
728 self._svd2pac_as_ptr().add(0x77usize),
729 )
730 }
731 }
732
733 #[doc = "Port 1n200 Pin Function Select Register"]
734 #[inline(always)]
735 pub const fn p200pfs(
736 &self,
737 ) -> &'static crate::common::Reg<self::P200Pfs_SPEC, crate::common::RW> {
738 unsafe {
739 crate::common::Reg::<self::P200Pfs_SPEC, crate::common::RW>::from_ptr(
740 self._svd2pac_as_ptr().add(128usize),
741 )
742 }
743 }
744
745 #[doc = "Port 1n200 Pin Function Select Register"]
746 #[inline(always)]
747 pub const fn p200pfs_ha(
748 &self,
749 ) -> &'static crate::common::Reg<self::P200PfsHa_SPEC, crate::common::RW> {
750 unsafe {
751 crate::common::Reg::<self::P200PfsHa_SPEC, crate::common::RW>::from_ptr(
752 self._svd2pac_as_ptr().add(130usize),
753 )
754 }
755 }
756
757 #[doc = "Port 1n200 Pin Function Select Register"]
758 #[inline(always)]
759 pub const fn p200pfs_by(
760 &self,
761 ) -> &'static crate::common::Reg<self::P200PfsBy_SPEC, crate::common::RW> {
762 unsafe {
763 crate::common::Reg::<self::P200PfsBy_SPEC, crate::common::RW>::from_ptr(
764 self._svd2pac_as_ptr().add(131usize),
765 )
766 }
767 }
768
769 #[doc = "Port 1n201 Pin Function Select Register"]
770 #[inline(always)]
771 pub const fn p201pfs(
772 &self,
773 ) -> &'static crate::common::Reg<self::P201Pfs_SPEC, crate::common::RW> {
774 unsafe {
775 crate::common::Reg::<self::P201Pfs_SPEC, crate::common::RW>::from_ptr(
776 self._svd2pac_as_ptr().add(132usize),
777 )
778 }
779 }
780
781 #[doc = "Port 1n201 Pin Function Select Register"]
782 #[inline(always)]
783 pub const fn p201pfs_ha(
784 &self,
785 ) -> &'static crate::common::Reg<self::P201PfsHa_SPEC, crate::common::RW> {
786 unsafe {
787 crate::common::Reg::<self::P201PfsHa_SPEC, crate::common::RW>::from_ptr(
788 self._svd2pac_as_ptr().add(134usize),
789 )
790 }
791 }
792
793 #[doc = "Port 1n201 Pin Function Select Register"]
794 #[inline(always)]
795 pub const fn p201pfs_by(
796 &self,
797 ) -> &'static crate::common::Reg<self::P201PfsBy_SPEC, crate::common::RW> {
798 unsafe {
799 crate::common::Reg::<self::P201PfsBy_SPEC, crate::common::RW>::from_ptr(
800 self._svd2pac_as_ptr().add(135usize),
801 )
802 }
803 }
804
805 #[doc = "Port 1n205 Pin Function Select Register"]
806 #[inline(always)]
807 pub const fn p205pfs(
808 &self,
809 ) -> &'static crate::common::Reg<self::P205Pfs_SPEC, crate::common::RW> {
810 unsafe {
811 crate::common::Reg::<self::P205Pfs_SPEC, crate::common::RW>::from_ptr(
812 self._svd2pac_as_ptr().add(148usize),
813 )
814 }
815 }
816
817 #[doc = "Port 1n205 Pin Function Select Register"]
818 #[inline(always)]
819 pub const fn p205pfs_ha(
820 &self,
821 ) -> &'static crate::common::Reg<self::P205PfsHa_SPEC, crate::common::RW> {
822 unsafe {
823 crate::common::Reg::<self::P205PfsHa_SPEC, crate::common::RW>::from_ptr(
824 self._svd2pac_as_ptr().add(150usize),
825 )
826 }
827 }
828
829 #[doc = "Port 1n205 Pin Function Select Register"]
830 #[inline(always)]
831 pub const fn p205pfs_by(
832 &self,
833 ) -> &'static crate::common::Reg<self::P205PfsBy_SPEC, crate::common::RW> {
834 unsafe {
835 crate::common::Reg::<self::P205PfsBy_SPEC, crate::common::RW>::from_ptr(
836 self._svd2pac_as_ptr().add(151usize),
837 )
838 }
839 }
840
841 #[doc = "Port 1n206 Pin Function Select Register"]
842 #[inline(always)]
843 pub const fn p206pfs(
844 &self,
845 ) -> &'static crate::common::Reg<self::P206Pfs_SPEC, crate::common::RW> {
846 unsafe {
847 crate::common::Reg::<self::P206Pfs_SPEC, crate::common::RW>::from_ptr(
848 self._svd2pac_as_ptr().add(152usize),
849 )
850 }
851 }
852
853 #[doc = "Port 1n206 Pin Function Select Register"]
854 #[inline(always)]
855 pub const fn p206pfs_ha(
856 &self,
857 ) -> &'static crate::common::Reg<self::P206PfsHa_SPEC, crate::common::RW> {
858 unsafe {
859 crate::common::Reg::<self::P206PfsHa_SPEC, crate::common::RW>::from_ptr(
860 self._svd2pac_as_ptr().add(154usize),
861 )
862 }
863 }
864
865 #[doc = "Port 1n206 Pin Function Select Register"]
866 #[inline(always)]
867 pub const fn p206pfs_by(
868 &self,
869 ) -> &'static crate::common::Reg<self::P206PfsBy_SPEC, crate::common::RW> {
870 unsafe {
871 crate::common::Reg::<self::P206PfsBy_SPEC, crate::common::RW>::from_ptr(
872 self._svd2pac_as_ptr().add(155usize),
873 )
874 }
875 }
876
877 #[doc = "Port 1n207 Pin Function Select Register"]
878 #[inline(always)]
879 pub const fn p207pfs(
880 &self,
881 ) -> &'static crate::common::Reg<self::P207Pfs_SPEC, crate::common::RW> {
882 unsafe {
883 crate::common::Reg::<self::P207Pfs_SPEC, crate::common::RW>::from_ptr(
884 self._svd2pac_as_ptr().add(156usize),
885 )
886 }
887 }
888
889 #[doc = "Port 1n207 Pin Function Select Register"]
890 #[inline(always)]
891 pub const fn p207pfs_ha(
892 &self,
893 ) -> &'static crate::common::Reg<self::P207PfsHa_SPEC, crate::common::RW> {
894 unsafe {
895 crate::common::Reg::<self::P207PfsHa_SPEC, crate::common::RW>::from_ptr(
896 self._svd2pac_as_ptr().add(158usize),
897 )
898 }
899 }
900
901 #[doc = "Port 1n207 Pin Function Select Register"]
902 #[inline(always)]
903 pub const fn p207pfs_by(
904 &self,
905 ) -> &'static crate::common::Reg<self::P207PfsBy_SPEC, crate::common::RW> {
906 unsafe {
907 crate::common::Reg::<self::P207PfsBy_SPEC, crate::common::RW>::from_ptr(
908 self._svd2pac_as_ptr().add(159usize),
909 )
910 }
911 }
912
913 #[doc = "Port 1n208 Pin Function Select Register"]
914 #[inline(always)]
915 pub const fn p208pfs(
916 &self,
917 ) -> &'static crate::common::Reg<self::P208Pfs_SPEC, crate::common::RW> {
918 unsafe {
919 crate::common::Reg::<self::P208Pfs_SPEC, crate::common::RW>::from_ptr(
920 self._svd2pac_as_ptr().add(160usize),
921 )
922 }
923 }
924
925 #[doc = "Port 1n208 Pin Function Select Register"]
926 #[inline(always)]
927 pub const fn p208pfs_ha(
928 &self,
929 ) -> &'static crate::common::Reg<self::P208PfsHa_SPEC, crate::common::RW> {
930 unsafe {
931 crate::common::Reg::<self::P208PfsHa_SPEC, crate::common::RW>::from_ptr(
932 self._svd2pac_as_ptr().add(162usize),
933 )
934 }
935 }
936
937 #[doc = "Port 1n208 Pin Function Select Register"]
938 #[inline(always)]
939 pub const fn p208pfs_by(
940 &self,
941 ) -> &'static crate::common::Reg<self::P208PfsBy_SPEC, crate::common::RW> {
942 unsafe {
943 crate::common::Reg::<self::P208PfsBy_SPEC, crate::common::RW>::from_ptr(
944 self._svd2pac_as_ptr().add(163usize),
945 )
946 }
947 }
948
949 #[doc = "Port 1n212 Pin Function Select Register"]
950 #[inline(always)]
951 pub const fn p212pfs(
952 &self,
953 ) -> &'static crate::common::Reg<self::P212Pfs_SPEC, crate::common::RW> {
954 unsafe {
955 crate::common::Reg::<self::P212Pfs_SPEC, crate::common::RW>::from_ptr(
956 self._svd2pac_as_ptr().add(176usize),
957 )
958 }
959 }
960
961 #[doc = "Port 1n212 Pin Function Select Register"]
962 #[inline(always)]
963 pub const fn p212pfs_ha(
964 &self,
965 ) -> &'static crate::common::Reg<self::P212PfsHa_SPEC, crate::common::RW> {
966 unsafe {
967 crate::common::Reg::<self::P212PfsHa_SPEC, crate::common::RW>::from_ptr(
968 self._svd2pac_as_ptr().add(178usize),
969 )
970 }
971 }
972
973 #[doc = "Port 1n212 Pin Function Select Register"]
974 #[inline(always)]
975 pub const fn p212pfs_by(
976 &self,
977 ) -> &'static crate::common::Reg<self::P212PfsBy_SPEC, crate::common::RW> {
978 unsafe {
979 crate::common::Reg::<self::P212PfsBy_SPEC, crate::common::RW>::from_ptr(
980 self._svd2pac_as_ptr().add(179usize),
981 )
982 }
983 }
984
985 #[doc = "Port 1n213 Pin Function Select Register"]
986 #[inline(always)]
987 pub const fn p213pfs(
988 &self,
989 ) -> &'static crate::common::Reg<self::P213Pfs_SPEC, crate::common::RW> {
990 unsafe {
991 crate::common::Reg::<self::P213Pfs_SPEC, crate::common::RW>::from_ptr(
992 self._svd2pac_as_ptr().add(180usize),
993 )
994 }
995 }
996
997 #[doc = "Port 1n213 Pin Function Select Register"]
998 #[inline(always)]
999 pub const fn p213pfs_ha(
1000 &self,
1001 ) -> &'static crate::common::Reg<self::P213PfsHa_SPEC, crate::common::RW> {
1002 unsafe {
1003 crate::common::Reg::<self::P213PfsHa_SPEC, crate::common::RW>::from_ptr(
1004 self._svd2pac_as_ptr().add(182usize),
1005 )
1006 }
1007 }
1008
1009 #[doc = "Port 1n213 Pin Function Select Register"]
1010 #[inline(always)]
1011 pub const fn p213pfs_by(
1012 &self,
1013 ) -> &'static crate::common::Reg<self::P213PfsBy_SPEC, crate::common::RW> {
1014 unsafe {
1015 crate::common::Reg::<self::P213PfsBy_SPEC, crate::common::RW>::from_ptr(
1016 self._svd2pac_as_ptr().add(183usize),
1017 )
1018 }
1019 }
1020
1021 #[doc = "Port 30%s Pin Function Select Register"]
1022 #[inline(always)]
1023 pub const fn p30pfs(
1024 &self,
1025 ) -> &'static crate::common::ClusterRegisterArray<
1026 crate::common::Reg<self::P30Pfs_SPEC, crate::common::RW>,
1027 5,
1028 0x4,
1029 > {
1030 unsafe {
1031 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xc0usize))
1032 }
1033 }
1034 #[inline(always)]
1035 pub const fn p300pfs(
1036 &self,
1037 ) -> &'static crate::common::Reg<self::P30Pfs_SPEC, crate::common::RW> {
1038 unsafe {
1039 crate::common::Reg::<self::P30Pfs_SPEC, crate::common::RW>::from_ptr(
1040 self._svd2pac_as_ptr().add(0xc0usize),
1041 )
1042 }
1043 }
1044 #[inline(always)]
1045 pub const fn p301pfs(
1046 &self,
1047 ) -> &'static crate::common::Reg<self::P30Pfs_SPEC, crate::common::RW> {
1048 unsafe {
1049 crate::common::Reg::<self::P30Pfs_SPEC, crate::common::RW>::from_ptr(
1050 self._svd2pac_as_ptr().add(0xc4usize),
1051 )
1052 }
1053 }
1054 #[inline(always)]
1055 pub const fn p302pfs(
1056 &self,
1057 ) -> &'static crate::common::Reg<self::P30Pfs_SPEC, crate::common::RW> {
1058 unsafe {
1059 crate::common::Reg::<self::P30Pfs_SPEC, crate::common::RW>::from_ptr(
1060 self._svd2pac_as_ptr().add(0xc8usize),
1061 )
1062 }
1063 }
1064 #[inline(always)]
1065 pub const fn p303pfs(
1066 &self,
1067 ) -> &'static crate::common::Reg<self::P30Pfs_SPEC, crate::common::RW> {
1068 unsafe {
1069 crate::common::Reg::<self::P30Pfs_SPEC, crate::common::RW>::from_ptr(
1070 self._svd2pac_as_ptr().add(0xccusize),
1071 )
1072 }
1073 }
1074 #[inline(always)]
1075 pub const fn p304pfs(
1076 &self,
1077 ) -> &'static crate::common::Reg<self::P30Pfs_SPEC, crate::common::RW> {
1078 unsafe {
1079 crate::common::Reg::<self::P30Pfs_SPEC, crate::common::RW>::from_ptr(
1080 self._svd2pac_as_ptr().add(0xd0usize),
1081 )
1082 }
1083 }
1084
1085 #[doc = "Port 30%s Pin Function Select Register"]
1086 #[inline(always)]
1087 pub const fn p30pfs_ha(
1088 &self,
1089 ) -> &'static crate::common::ClusterRegisterArray<
1090 crate::common::Reg<self::P30PfsHa_SPEC, crate::common::RW>,
1091 5,
1092 0x4,
1093 > {
1094 unsafe {
1095 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xc2usize))
1096 }
1097 }
1098 #[inline(always)]
1099 pub const fn p300pfs_ha(
1100 &self,
1101 ) -> &'static crate::common::Reg<self::P30PfsHa_SPEC, crate::common::RW> {
1102 unsafe {
1103 crate::common::Reg::<self::P30PfsHa_SPEC, crate::common::RW>::from_ptr(
1104 self._svd2pac_as_ptr().add(0xc2usize),
1105 )
1106 }
1107 }
1108 #[inline(always)]
1109 pub const fn p301pfs_ha(
1110 &self,
1111 ) -> &'static crate::common::Reg<self::P30PfsHa_SPEC, crate::common::RW> {
1112 unsafe {
1113 crate::common::Reg::<self::P30PfsHa_SPEC, crate::common::RW>::from_ptr(
1114 self._svd2pac_as_ptr().add(0xc6usize),
1115 )
1116 }
1117 }
1118 #[inline(always)]
1119 pub const fn p302pfs_ha(
1120 &self,
1121 ) -> &'static crate::common::Reg<self::P30PfsHa_SPEC, crate::common::RW> {
1122 unsafe {
1123 crate::common::Reg::<self::P30PfsHa_SPEC, crate::common::RW>::from_ptr(
1124 self._svd2pac_as_ptr().add(0xcausize),
1125 )
1126 }
1127 }
1128 #[inline(always)]
1129 pub const fn p303pfs_ha(
1130 &self,
1131 ) -> &'static crate::common::Reg<self::P30PfsHa_SPEC, crate::common::RW> {
1132 unsafe {
1133 crate::common::Reg::<self::P30PfsHa_SPEC, crate::common::RW>::from_ptr(
1134 self._svd2pac_as_ptr().add(0xceusize),
1135 )
1136 }
1137 }
1138 #[inline(always)]
1139 pub const fn p304pfs_ha(
1140 &self,
1141 ) -> &'static crate::common::Reg<self::P30PfsHa_SPEC, crate::common::RW> {
1142 unsafe {
1143 crate::common::Reg::<self::P30PfsHa_SPEC, crate::common::RW>::from_ptr(
1144 self._svd2pac_as_ptr().add(0xd2usize),
1145 )
1146 }
1147 }
1148
1149 #[doc = "Port 30%s Pin Function Select Register"]
1150 #[inline(always)]
1151 pub const fn p30pfs_by(
1152 &self,
1153 ) -> &'static crate::common::ClusterRegisterArray<
1154 crate::common::Reg<self::P30PfsBy_SPEC, crate::common::RW>,
1155 5,
1156 0x4,
1157 > {
1158 unsafe {
1159 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xc3usize))
1160 }
1161 }
1162 #[inline(always)]
1163 pub const fn p300pfs_by(
1164 &self,
1165 ) -> &'static crate::common::Reg<self::P30PfsBy_SPEC, crate::common::RW> {
1166 unsafe {
1167 crate::common::Reg::<self::P30PfsBy_SPEC, crate::common::RW>::from_ptr(
1168 self._svd2pac_as_ptr().add(0xc3usize),
1169 )
1170 }
1171 }
1172 #[inline(always)]
1173 pub const fn p301pfs_by(
1174 &self,
1175 ) -> &'static crate::common::Reg<self::P30PfsBy_SPEC, crate::common::RW> {
1176 unsafe {
1177 crate::common::Reg::<self::P30PfsBy_SPEC, crate::common::RW>::from_ptr(
1178 self._svd2pac_as_ptr().add(0xc7usize),
1179 )
1180 }
1181 }
1182 #[inline(always)]
1183 pub const fn p302pfs_by(
1184 &self,
1185 ) -> &'static crate::common::Reg<self::P30PfsBy_SPEC, crate::common::RW> {
1186 unsafe {
1187 crate::common::Reg::<self::P30PfsBy_SPEC, crate::common::RW>::from_ptr(
1188 self._svd2pac_as_ptr().add(0xcbusize),
1189 )
1190 }
1191 }
1192 #[inline(always)]
1193 pub const fn p303pfs_by(
1194 &self,
1195 ) -> &'static crate::common::Reg<self::P30PfsBy_SPEC, crate::common::RW> {
1196 unsafe {
1197 crate::common::Reg::<self::P30PfsBy_SPEC, crate::common::RW>::from_ptr(
1198 self._svd2pac_as_ptr().add(0xcfusize),
1199 )
1200 }
1201 }
1202 #[inline(always)]
1203 pub const fn p304pfs_by(
1204 &self,
1205 ) -> &'static crate::common::Reg<self::P30PfsBy_SPEC, crate::common::RW> {
1206 unsafe {
1207 crate::common::Reg::<self::P30PfsBy_SPEC, crate::common::RW>::from_ptr(
1208 self._svd2pac_as_ptr().add(0xd3usize),
1209 )
1210 }
1211 }
1212
1213 #[doc = "Port 400 Pin Function Select Register"]
1214 #[inline(always)]
1215 pub const fn p400pfs(
1216 &self,
1217 ) -> &'static crate::common::Reg<self::P400Pfs_SPEC, crate::common::RW> {
1218 unsafe {
1219 crate::common::Reg::<self::P400Pfs_SPEC, crate::common::RW>::from_ptr(
1220 self._svd2pac_as_ptr().add(256usize),
1221 )
1222 }
1223 }
1224
1225 #[doc = "Port 400 Pin Function Select Register"]
1226 #[inline(always)]
1227 pub const fn p400pfs_ha(
1228 &self,
1229 ) -> &'static crate::common::Reg<self::P400PfsHa_SPEC, crate::common::RW> {
1230 unsafe {
1231 crate::common::Reg::<self::P400PfsHa_SPEC, crate::common::RW>::from_ptr(
1232 self._svd2pac_as_ptr().add(258usize),
1233 )
1234 }
1235 }
1236
1237 #[doc = "Port 400 Pin Function Select Register"]
1238 #[inline(always)]
1239 pub const fn p400pfs_by(
1240 &self,
1241 ) -> &'static crate::common::Reg<self::P400PfsBy_SPEC, crate::common::RW> {
1242 unsafe {
1243 crate::common::Reg::<self::P400PfsBy_SPEC, crate::common::RW>::from_ptr(
1244 self._svd2pac_as_ptr().add(259usize),
1245 )
1246 }
1247 }
1248
1249 #[doc = "Port 401 Pin Function Select Register"]
1250 #[inline(always)]
1251 pub const fn p401pfs(
1252 &self,
1253 ) -> &'static crate::common::Reg<self::P401Pfs_SPEC, crate::common::RW> {
1254 unsafe {
1255 crate::common::Reg::<self::P401Pfs_SPEC, crate::common::RW>::from_ptr(
1256 self._svd2pac_as_ptr().add(260usize),
1257 )
1258 }
1259 }
1260
1261 #[doc = "Port 401 Pin Function Select Register"]
1262 #[inline(always)]
1263 pub const fn p401pfs_ha(
1264 &self,
1265 ) -> &'static crate::common::Reg<self::P401PfsHa_SPEC, crate::common::RW> {
1266 unsafe {
1267 crate::common::Reg::<self::P401PfsHa_SPEC, crate::common::RW>::from_ptr(
1268 self._svd2pac_as_ptr().add(262usize),
1269 )
1270 }
1271 }
1272
1273 #[doc = "Port 401 Pin Function Select Register"]
1274 #[inline(always)]
1275 pub const fn p401pfs_by(
1276 &self,
1277 ) -> &'static crate::common::Reg<self::P401PfsBy_SPEC, crate::common::RW> {
1278 unsafe {
1279 crate::common::Reg::<self::P401PfsBy_SPEC, crate::common::RW>::from_ptr(
1280 self._svd2pac_as_ptr().add(263usize),
1281 )
1282 }
1283 }
1284
1285 #[doc = "Port 402 Pin Function Select Register"]
1286 #[inline(always)]
1287 pub const fn p402pfs(
1288 &self,
1289 ) -> &'static crate::common::Reg<self::P402Pfs_SPEC, crate::common::RW> {
1290 unsafe {
1291 crate::common::Reg::<self::P402Pfs_SPEC, crate::common::RW>::from_ptr(
1292 self._svd2pac_as_ptr().add(264usize),
1293 )
1294 }
1295 }
1296
1297 #[doc = "Port 402 Pin Function Select Register"]
1298 #[inline(always)]
1299 pub const fn p402pfs_ha(
1300 &self,
1301 ) -> &'static crate::common::Reg<self::P402PfsHa_SPEC, crate::common::RW> {
1302 unsafe {
1303 crate::common::Reg::<self::P402PfsHa_SPEC, crate::common::RW>::from_ptr(
1304 self._svd2pac_as_ptr().add(266usize),
1305 )
1306 }
1307 }
1308
1309 #[doc = "Port 402 Pin Function Select Register"]
1310 #[inline(always)]
1311 pub const fn p402pfs_by(
1312 &self,
1313 ) -> &'static crate::common::Reg<self::P402PfsBy_SPEC, crate::common::RW> {
1314 unsafe {
1315 crate::common::Reg::<self::P402PfsBy_SPEC, crate::common::RW>::from_ptr(
1316 self._svd2pac_as_ptr().add(267usize),
1317 )
1318 }
1319 }
1320
1321 #[doc = "Port 40%s Pin Function Select Register"]
1322 #[inline(always)]
1323 pub const fn p40pfs(
1324 &self,
1325 ) -> &'static crate::common::ClusterRegisterArray<
1326 crate::common::Reg<self::P40Pfs_SPEC, crate::common::RW>,
1327 3,
1328 0x4,
1329 > {
1330 unsafe {
1331 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x11cusize))
1332 }
1333 }
1334 #[inline(always)]
1335 pub const fn p407pfs(
1336 &self,
1337 ) -> &'static crate::common::Reg<self::P40Pfs_SPEC, crate::common::RW> {
1338 unsafe {
1339 crate::common::Reg::<self::P40Pfs_SPEC, crate::common::RW>::from_ptr(
1340 self._svd2pac_as_ptr().add(0x11cusize),
1341 )
1342 }
1343 }
1344 #[inline(always)]
1345 pub const fn p408pfs(
1346 &self,
1347 ) -> &'static crate::common::Reg<self::P40Pfs_SPEC, crate::common::RW> {
1348 unsafe {
1349 crate::common::Reg::<self::P40Pfs_SPEC, crate::common::RW>::from_ptr(
1350 self._svd2pac_as_ptr().add(0x120usize),
1351 )
1352 }
1353 }
1354 #[inline(always)]
1355 pub const fn p409pfs(
1356 &self,
1357 ) -> &'static crate::common::Reg<self::P40Pfs_SPEC, crate::common::RW> {
1358 unsafe {
1359 crate::common::Reg::<self::P40Pfs_SPEC, crate::common::RW>::from_ptr(
1360 self._svd2pac_as_ptr().add(0x124usize),
1361 )
1362 }
1363 }
1364
1365 #[doc = "Port 40%s Pin Function Select Register"]
1366 #[inline(always)]
1367 pub const fn p40pfs_ha(
1368 &self,
1369 ) -> &'static crate::common::ClusterRegisterArray<
1370 crate::common::Reg<self::P40PfsHa_SPEC, crate::common::RW>,
1371 3,
1372 0x4,
1373 > {
1374 unsafe {
1375 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x11eusize))
1376 }
1377 }
1378 #[inline(always)]
1379 pub const fn p407pfs_ha(
1380 &self,
1381 ) -> &'static crate::common::Reg<self::P40PfsHa_SPEC, crate::common::RW> {
1382 unsafe {
1383 crate::common::Reg::<self::P40PfsHa_SPEC, crate::common::RW>::from_ptr(
1384 self._svd2pac_as_ptr().add(0x11eusize),
1385 )
1386 }
1387 }
1388 #[inline(always)]
1389 pub const fn p408pfs_ha(
1390 &self,
1391 ) -> &'static crate::common::Reg<self::P40PfsHa_SPEC, crate::common::RW> {
1392 unsafe {
1393 crate::common::Reg::<self::P40PfsHa_SPEC, crate::common::RW>::from_ptr(
1394 self._svd2pac_as_ptr().add(0x122usize),
1395 )
1396 }
1397 }
1398 #[inline(always)]
1399 pub const fn p409pfs_ha(
1400 &self,
1401 ) -> &'static crate::common::Reg<self::P40PfsHa_SPEC, crate::common::RW> {
1402 unsafe {
1403 crate::common::Reg::<self::P40PfsHa_SPEC, crate::common::RW>::from_ptr(
1404 self._svd2pac_as_ptr().add(0x126usize),
1405 )
1406 }
1407 }
1408
1409 #[doc = "Port 40%s Pin Function Select Register"]
1410 #[inline(always)]
1411 pub const fn p40pfs_by(
1412 &self,
1413 ) -> &'static crate::common::ClusterRegisterArray<
1414 crate::common::Reg<self::P40PfsBy_SPEC, crate::common::RW>,
1415 3,
1416 0x4,
1417 > {
1418 unsafe {
1419 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x11fusize))
1420 }
1421 }
1422 #[inline(always)]
1423 pub const fn p407pfs_by(
1424 &self,
1425 ) -> &'static crate::common::Reg<self::P40PfsBy_SPEC, crate::common::RW> {
1426 unsafe {
1427 crate::common::Reg::<self::P40PfsBy_SPEC, crate::common::RW>::from_ptr(
1428 self._svd2pac_as_ptr().add(0x11fusize),
1429 )
1430 }
1431 }
1432 #[inline(always)]
1433 pub const fn p408pfs_by(
1434 &self,
1435 ) -> &'static crate::common::Reg<self::P40PfsBy_SPEC, crate::common::RW> {
1436 unsafe {
1437 crate::common::Reg::<self::P40PfsBy_SPEC, crate::common::RW>::from_ptr(
1438 self._svd2pac_as_ptr().add(0x123usize),
1439 )
1440 }
1441 }
1442 #[inline(always)]
1443 pub const fn p409pfs_by(
1444 &self,
1445 ) -> &'static crate::common::Reg<self::P40PfsBy_SPEC, crate::common::RW> {
1446 unsafe {
1447 crate::common::Reg::<self::P40PfsBy_SPEC, crate::common::RW>::from_ptr(
1448 self._svd2pac_as_ptr().add(0x127usize),
1449 )
1450 }
1451 }
1452
1453 #[doc = "Port 410 Pin Function Select Register"]
1454 #[inline(always)]
1455 pub const fn p410pfs(
1456 &self,
1457 ) -> &'static crate::common::Reg<self::P410Pfs_SPEC, crate::common::RW> {
1458 unsafe {
1459 crate::common::Reg::<self::P410Pfs_SPEC, crate::common::RW>::from_ptr(
1460 self._svd2pac_as_ptr().add(296usize),
1461 )
1462 }
1463 }
1464
1465 #[doc = "Port 410 Pin Function Select Register"]
1466 #[inline(always)]
1467 pub const fn p410pfs_ha(
1468 &self,
1469 ) -> &'static crate::common::Reg<self::P410PfsHa_SPEC, crate::common::RW> {
1470 unsafe {
1471 crate::common::Reg::<self::P410PfsHa_SPEC, crate::common::RW>::from_ptr(
1472 self._svd2pac_as_ptr().add(298usize),
1473 )
1474 }
1475 }
1476
1477 #[doc = "Port 410 Pin Function Select Register"]
1478 #[inline(always)]
1479 pub const fn p410pfs_by(
1480 &self,
1481 ) -> &'static crate::common::Reg<self::P410PfsBy_SPEC, crate::common::RW> {
1482 unsafe {
1483 crate::common::Reg::<self::P410PfsBy_SPEC, crate::common::RW>::from_ptr(
1484 self._svd2pac_as_ptr().add(299usize),
1485 )
1486 }
1487 }
1488
1489 #[doc = "Port 411 Pin Function Select Register"]
1490 #[inline(always)]
1491 pub const fn p411pfs(
1492 &self,
1493 ) -> &'static crate::common::Reg<self::P411Pfs_SPEC, crate::common::RW> {
1494 unsafe {
1495 crate::common::Reg::<self::P411Pfs_SPEC, crate::common::RW>::from_ptr(
1496 self._svd2pac_as_ptr().add(300usize),
1497 )
1498 }
1499 }
1500
1501 #[doc = "Port 411 Pin Function Select Register"]
1502 #[inline(always)]
1503 pub const fn p411pfs_ha(
1504 &self,
1505 ) -> &'static crate::common::Reg<self::P411PfsHa_SPEC, crate::common::RW> {
1506 unsafe {
1507 crate::common::Reg::<self::P411PfsHa_SPEC, crate::common::RW>::from_ptr(
1508 self._svd2pac_as_ptr().add(302usize),
1509 )
1510 }
1511 }
1512
1513 #[doc = "Port 411 Pin Function Select Register"]
1514 #[inline(always)]
1515 pub const fn p411pfs_by(
1516 &self,
1517 ) -> &'static crate::common::Reg<self::P411PfsBy_SPEC, crate::common::RW> {
1518 unsafe {
1519 crate::common::Reg::<self::P411PfsBy_SPEC, crate::common::RW>::from_ptr(
1520 self._svd2pac_as_ptr().add(303usize),
1521 )
1522 }
1523 }
1524
1525 #[doc = "Port 500 Pin Function Select Register"]
1526 #[inline(always)]
1527 pub const fn p500pfs(
1528 &self,
1529 ) -> &'static crate::common::Reg<self::P500Pfs_SPEC, crate::common::RW> {
1530 unsafe {
1531 crate::common::Reg::<self::P500Pfs_SPEC, crate::common::RW>::from_ptr(
1532 self._svd2pac_as_ptr().add(320usize),
1533 )
1534 }
1535 }
1536
1537 #[doc = "Port 500 Pin Function Select Register"]
1538 #[inline(always)]
1539 pub const fn p500pfs_ha(
1540 &self,
1541 ) -> &'static crate::common::Reg<self::P500PfsHa_SPEC, crate::common::RW> {
1542 unsafe {
1543 crate::common::Reg::<self::P500PfsHa_SPEC, crate::common::RW>::from_ptr(
1544 self._svd2pac_as_ptr().add(322usize),
1545 )
1546 }
1547 }
1548
1549 #[doc = "Port 500 Pin Function Select Register"]
1550 #[inline(always)]
1551 pub const fn p500pfs_by(
1552 &self,
1553 ) -> &'static crate::common::Reg<self::P500PfsBy_SPEC, crate::common::RW> {
1554 unsafe {
1555 crate::common::Reg::<self::P500PfsBy_SPEC, crate::common::RW>::from_ptr(
1556 self._svd2pac_as_ptr().add(323usize),
1557 )
1558 }
1559 }
1560
1561 #[doc = "Write-Protect Register"]
1562 #[inline(always)]
1563 pub const fn pwpr(&self) -> &'static crate::common::Reg<self::Pwpr_SPEC, crate::common::RW> {
1564 unsafe {
1565 crate::common::Reg::<self::Pwpr_SPEC, crate::common::RW>::from_ptr(
1566 self._svd2pac_as_ptr().add(1283usize),
1567 )
1568 }
1569 }
1570
1571 #[doc = "Write-Protect Register for Secure"]
1572 #[inline(always)]
1573 pub const fn pwprs(&self) -> &'static crate::common::Reg<self::Pwprs_SPEC, crate::common::RW> {
1574 unsafe {
1575 crate::common::Reg::<self::Pwprs_SPEC, crate::common::RW>::from_ptr(
1576 self._svd2pac_as_ptr().add(1285usize),
1577 )
1578 }
1579 }
1580
1581 #[doc = "Port Security Attribution register"]
1582 #[inline(always)]
1583 pub const fn psar(
1584 &self,
1585 ) -> &'static crate::common::ClusterRegisterArray<
1586 crate::common::Reg<self::Psar_SPEC, crate::common::RW>,
1587 6,
1588 0x2,
1589 > {
1590 unsafe {
1591 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x510usize))
1592 }
1593 }
1594 #[inline(always)]
1595 pub const fn p0sar(&self) -> &'static crate::common::Reg<self::Psar_SPEC, crate::common::RW> {
1596 unsafe {
1597 crate::common::Reg::<self::Psar_SPEC, crate::common::RW>::from_ptr(
1598 self._svd2pac_as_ptr().add(0x510usize),
1599 )
1600 }
1601 }
1602 #[inline(always)]
1603 pub const fn p1sar(&self) -> &'static crate::common::Reg<self::Psar_SPEC, crate::common::RW> {
1604 unsafe {
1605 crate::common::Reg::<self::Psar_SPEC, crate::common::RW>::from_ptr(
1606 self._svd2pac_as_ptr().add(0x512usize),
1607 )
1608 }
1609 }
1610 #[inline(always)]
1611 pub const fn p2sar(&self) -> &'static crate::common::Reg<self::Psar_SPEC, crate::common::RW> {
1612 unsafe {
1613 crate::common::Reg::<self::Psar_SPEC, crate::common::RW>::from_ptr(
1614 self._svd2pac_as_ptr().add(0x514usize),
1615 )
1616 }
1617 }
1618 #[inline(always)]
1619 pub const fn p3sar(&self) -> &'static crate::common::Reg<self::Psar_SPEC, crate::common::RW> {
1620 unsafe {
1621 crate::common::Reg::<self::Psar_SPEC, crate::common::RW>::from_ptr(
1622 self._svd2pac_as_ptr().add(0x516usize),
1623 )
1624 }
1625 }
1626 #[inline(always)]
1627 pub const fn p4sar(&self) -> &'static crate::common::Reg<self::Psar_SPEC, crate::common::RW> {
1628 unsafe {
1629 crate::common::Reg::<self::Psar_SPEC, crate::common::RW>::from_ptr(
1630 self._svd2pac_as_ptr().add(0x518usize),
1631 )
1632 }
1633 }
1634 #[inline(always)]
1635 pub const fn p5sar(&self) -> &'static crate::common::Reg<self::Psar_SPEC, crate::common::RW> {
1636 unsafe {
1637 crate::common::Reg::<self::Psar_SPEC, crate::common::RW>::from_ptr(
1638 self._svd2pac_as_ptr().add(0x51ausize),
1639 )
1640 }
1641 }
1642}
1643#[doc(hidden)]
1644#[derive(Copy, Clone, Eq, PartialEq)]
1645pub struct P00Pfs_SPEC;
1646impl crate::sealed::RegSpec for P00Pfs_SPEC {
1647 type DataType = u32;
1648}
1649
1650#[doc = "Port 00%s Pin Function Select Register"]
1651pub type P00Pfs = crate::RegValueT<P00Pfs_SPEC>;
1652
1653impl P00Pfs {
1654 #[doc = "Port Output Data"]
1655 #[inline(always)]
1656 pub fn podr(
1657 self,
1658 ) -> crate::common::RegisterField<
1659 0,
1660 0x1,
1661 1,
1662 0,
1663 p00pfs::Podr,
1664 p00pfs::Podr,
1665 P00Pfs_SPEC,
1666 crate::common::RW,
1667 > {
1668 crate::common::RegisterField::<
1669 0,
1670 0x1,
1671 1,
1672 0,
1673 p00pfs::Podr,
1674 p00pfs::Podr,
1675 P00Pfs_SPEC,
1676 crate::common::RW,
1677 >::from_register(self, 0)
1678 }
1679
1680 #[doc = "Port State"]
1681 #[inline(always)]
1682 pub fn pidr(
1683 self,
1684 ) -> crate::common::RegisterField<
1685 1,
1686 0x1,
1687 1,
1688 0,
1689 p00pfs::Pidr,
1690 p00pfs::Pidr,
1691 P00Pfs_SPEC,
1692 crate::common::R,
1693 > {
1694 crate::common::RegisterField::<
1695 1,
1696 0x1,
1697 1,
1698 0,
1699 p00pfs::Pidr,
1700 p00pfs::Pidr,
1701 P00Pfs_SPEC,
1702 crate::common::R,
1703 >::from_register(self, 0)
1704 }
1705
1706 #[doc = "Port Direction"]
1707 #[inline(always)]
1708 pub fn pdr(
1709 self,
1710 ) -> crate::common::RegisterField<
1711 2,
1712 0x1,
1713 1,
1714 0,
1715 p00pfs::Pdr,
1716 p00pfs::Pdr,
1717 P00Pfs_SPEC,
1718 crate::common::RW,
1719 > {
1720 crate::common::RegisterField::<
1721 2,
1722 0x1,
1723 1,
1724 0,
1725 p00pfs::Pdr,
1726 p00pfs::Pdr,
1727 P00Pfs_SPEC,
1728 crate::common::RW,
1729 >::from_register(self, 0)
1730 }
1731
1732 #[doc = "Pull-up Control"]
1733 #[inline(always)]
1734 pub fn pcr(
1735 self,
1736 ) -> crate::common::RegisterField<
1737 4,
1738 0x1,
1739 1,
1740 0,
1741 p00pfs::Pcr,
1742 p00pfs::Pcr,
1743 P00Pfs_SPEC,
1744 crate::common::RW,
1745 > {
1746 crate::common::RegisterField::<
1747 4,
1748 0x1,
1749 1,
1750 0,
1751 p00pfs::Pcr,
1752 p00pfs::Pcr,
1753 P00Pfs_SPEC,
1754 crate::common::RW,
1755 >::from_register(self, 0)
1756 }
1757
1758 #[doc = "N-Channel Open-Drain Control"]
1759 #[inline(always)]
1760 pub fn ncodr(
1761 self,
1762 ) -> crate::common::RegisterField<
1763 6,
1764 0x1,
1765 1,
1766 0,
1767 p00pfs::Ncodr,
1768 p00pfs::Ncodr,
1769 P00Pfs_SPEC,
1770 crate::common::RW,
1771 > {
1772 crate::common::RegisterField::<
1773 6,
1774 0x1,
1775 1,
1776 0,
1777 p00pfs::Ncodr,
1778 p00pfs::Ncodr,
1779 P00Pfs_SPEC,
1780 crate::common::RW,
1781 >::from_register(self, 0)
1782 }
1783
1784 #[doc = "IRQ Input Enable"]
1785 #[inline(always)]
1786 pub fn isel(
1787 self,
1788 ) -> crate::common::RegisterField<
1789 14,
1790 0x1,
1791 1,
1792 0,
1793 p00pfs::Isel,
1794 p00pfs::Isel,
1795 P00Pfs_SPEC,
1796 crate::common::RW,
1797 > {
1798 crate::common::RegisterField::<
1799 14,
1800 0x1,
1801 1,
1802 0,
1803 p00pfs::Isel,
1804 p00pfs::Isel,
1805 P00Pfs_SPEC,
1806 crate::common::RW,
1807 >::from_register(self, 0)
1808 }
1809
1810 #[doc = "Analog Input Enable"]
1811 #[inline(always)]
1812 pub fn asel(
1813 self,
1814 ) -> crate::common::RegisterField<
1815 15,
1816 0x1,
1817 1,
1818 0,
1819 p00pfs::Asel,
1820 p00pfs::Asel,
1821 P00Pfs_SPEC,
1822 crate::common::RW,
1823 > {
1824 crate::common::RegisterField::<
1825 15,
1826 0x1,
1827 1,
1828 0,
1829 p00pfs::Asel,
1830 p00pfs::Asel,
1831 P00Pfs_SPEC,
1832 crate::common::RW,
1833 >::from_register(self, 0)
1834 }
1835
1836 #[doc = "Port Mode Control"]
1837 #[inline(always)]
1838 pub fn pmr(
1839 self,
1840 ) -> crate::common::RegisterField<
1841 16,
1842 0x1,
1843 1,
1844 0,
1845 p00pfs::Pmr,
1846 p00pfs::Pmr,
1847 P00Pfs_SPEC,
1848 crate::common::RW,
1849 > {
1850 crate::common::RegisterField::<
1851 16,
1852 0x1,
1853 1,
1854 0,
1855 p00pfs::Pmr,
1856 p00pfs::Pmr,
1857 P00Pfs_SPEC,
1858 crate::common::RW,
1859 >::from_register(self, 0)
1860 }
1861
1862 #[doc = "Peripheral Select"]
1863 #[inline(always)]
1864 pub fn psel(
1865 self,
1866 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P00Pfs_SPEC, crate::common::RW> {
1867 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P00Pfs_SPEC,crate::common::RW>::from_register(self,0)
1868 }
1869}
1870impl ::core::default::Default for P00Pfs {
1871 #[inline(always)]
1872 fn default() -> P00Pfs {
1873 <crate::RegValueT<P00Pfs_SPEC> as RegisterValue<_>>::new(0)
1874 }
1875}
1876pub mod p00pfs {
1877
1878 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1879 pub struct Podr_SPEC;
1880 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
1881 impl Podr {
1882 #[doc = "Output low"]
1883 pub const _0: Self = Self::new(0);
1884
1885 #[doc = "Output high"]
1886 pub const _1: Self = Self::new(1);
1887 }
1888 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1889 pub struct Pidr_SPEC;
1890 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
1891 impl Pidr {
1892 #[doc = "Low level"]
1893 pub const _0: Self = Self::new(0);
1894
1895 #[doc = "High level"]
1896 pub const _1: Self = Self::new(1);
1897 }
1898 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1899 pub struct Pdr_SPEC;
1900 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
1901 impl Pdr {
1902 #[doc = "Input (functions as an input pin)"]
1903 pub const _0: Self = Self::new(0);
1904
1905 #[doc = "Output (functions as an output pin)"]
1906 pub const _1: Self = Self::new(1);
1907 }
1908 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1909 pub struct Pcr_SPEC;
1910 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
1911 impl Pcr {
1912 #[doc = "Disable input pull-up"]
1913 pub const _0: Self = Self::new(0);
1914
1915 #[doc = "Enable input pull-up"]
1916 pub const _1: Self = Self::new(1);
1917 }
1918 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1919 pub struct Ncodr_SPEC;
1920 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
1921 impl Ncodr {
1922 #[doc = "Output CMOS"]
1923 pub const _0: Self = Self::new(0);
1924
1925 #[doc = "Output NMOS open-drain"]
1926 pub const _1: Self = Self::new(1);
1927 }
1928 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1929 pub struct Isel_SPEC;
1930 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
1931 impl Isel {
1932 #[doc = "Do not use as IRQn input pin"]
1933 pub const _0: Self = Self::new(0);
1934
1935 #[doc = "Use as IRQn input pin"]
1936 pub const _1: Self = Self::new(1);
1937 }
1938 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1939 pub struct Asel_SPEC;
1940 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
1941 impl Asel {
1942 #[doc = "Do not use as analog pin"]
1943 pub const _0: Self = Self::new(0);
1944
1945 #[doc = "Use as analog pin"]
1946 pub const _1: Self = Self::new(1);
1947 }
1948 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1949 pub struct Pmr_SPEC;
1950 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
1951 impl Pmr {
1952 #[doc = "Use as general I/O pin"]
1953 pub const _0: Self = Self::new(0);
1954
1955 #[doc = "Use as I/O port for peripheral functions"]
1956 pub const _1: Self = Self::new(1);
1957 }
1958}
1959#[doc(hidden)]
1960#[derive(Copy, Clone, Eq, PartialEq)]
1961pub struct P00PfsHa_SPEC;
1962impl crate::sealed::RegSpec for P00PfsHa_SPEC {
1963 type DataType = u16;
1964}
1965
1966#[doc = "Port 00%s Pin Function Select Register"]
1967pub type P00PfsHa = crate::RegValueT<P00PfsHa_SPEC>;
1968
1969impl P00PfsHa {
1970 #[doc = "Port Output Data"]
1971 #[inline(always)]
1972 pub fn podr(
1973 self,
1974 ) -> crate::common::RegisterField<
1975 0,
1976 0x1,
1977 1,
1978 0,
1979 p00pfs_ha::Podr,
1980 p00pfs_ha::Podr,
1981 P00PfsHa_SPEC,
1982 crate::common::RW,
1983 > {
1984 crate::common::RegisterField::<
1985 0,
1986 0x1,
1987 1,
1988 0,
1989 p00pfs_ha::Podr,
1990 p00pfs_ha::Podr,
1991 P00PfsHa_SPEC,
1992 crate::common::RW,
1993 >::from_register(self, 0)
1994 }
1995
1996 #[doc = "Port State"]
1997 #[inline(always)]
1998 pub fn pidr(
1999 self,
2000 ) -> crate::common::RegisterField<
2001 1,
2002 0x1,
2003 1,
2004 0,
2005 p00pfs_ha::Pidr,
2006 p00pfs_ha::Pidr,
2007 P00PfsHa_SPEC,
2008 crate::common::R,
2009 > {
2010 crate::common::RegisterField::<
2011 1,
2012 0x1,
2013 1,
2014 0,
2015 p00pfs_ha::Pidr,
2016 p00pfs_ha::Pidr,
2017 P00PfsHa_SPEC,
2018 crate::common::R,
2019 >::from_register(self, 0)
2020 }
2021
2022 #[doc = "Port Direction"]
2023 #[inline(always)]
2024 pub fn pdr(
2025 self,
2026 ) -> crate::common::RegisterField<
2027 2,
2028 0x1,
2029 1,
2030 0,
2031 p00pfs_ha::Pdr,
2032 p00pfs_ha::Pdr,
2033 P00PfsHa_SPEC,
2034 crate::common::RW,
2035 > {
2036 crate::common::RegisterField::<
2037 2,
2038 0x1,
2039 1,
2040 0,
2041 p00pfs_ha::Pdr,
2042 p00pfs_ha::Pdr,
2043 P00PfsHa_SPEC,
2044 crate::common::RW,
2045 >::from_register(self, 0)
2046 }
2047
2048 #[doc = "Pull-up Control"]
2049 #[inline(always)]
2050 pub fn pcr(
2051 self,
2052 ) -> crate::common::RegisterField<
2053 4,
2054 0x1,
2055 1,
2056 0,
2057 p00pfs_ha::Pcr,
2058 p00pfs_ha::Pcr,
2059 P00PfsHa_SPEC,
2060 crate::common::RW,
2061 > {
2062 crate::common::RegisterField::<
2063 4,
2064 0x1,
2065 1,
2066 0,
2067 p00pfs_ha::Pcr,
2068 p00pfs_ha::Pcr,
2069 P00PfsHa_SPEC,
2070 crate::common::RW,
2071 >::from_register(self, 0)
2072 }
2073
2074 #[doc = "N-Channel Open-Drain Control"]
2075 #[inline(always)]
2076 pub fn ncodr(
2077 self,
2078 ) -> crate::common::RegisterField<
2079 6,
2080 0x1,
2081 1,
2082 0,
2083 p00pfs_ha::Ncodr,
2084 p00pfs_ha::Ncodr,
2085 P00PfsHa_SPEC,
2086 crate::common::RW,
2087 > {
2088 crate::common::RegisterField::<
2089 6,
2090 0x1,
2091 1,
2092 0,
2093 p00pfs_ha::Ncodr,
2094 p00pfs_ha::Ncodr,
2095 P00PfsHa_SPEC,
2096 crate::common::RW,
2097 >::from_register(self, 0)
2098 }
2099
2100 #[doc = "IRQ Input Enable"]
2101 #[inline(always)]
2102 pub fn isel(
2103 self,
2104 ) -> crate::common::RegisterField<
2105 14,
2106 0x1,
2107 1,
2108 0,
2109 p00pfs_ha::Isel,
2110 p00pfs_ha::Isel,
2111 P00PfsHa_SPEC,
2112 crate::common::RW,
2113 > {
2114 crate::common::RegisterField::<
2115 14,
2116 0x1,
2117 1,
2118 0,
2119 p00pfs_ha::Isel,
2120 p00pfs_ha::Isel,
2121 P00PfsHa_SPEC,
2122 crate::common::RW,
2123 >::from_register(self, 0)
2124 }
2125
2126 #[doc = "Analog Input Enable"]
2127 #[inline(always)]
2128 pub fn asel(
2129 self,
2130 ) -> crate::common::RegisterField<
2131 15,
2132 0x1,
2133 1,
2134 0,
2135 p00pfs_ha::Asel,
2136 p00pfs_ha::Asel,
2137 P00PfsHa_SPEC,
2138 crate::common::RW,
2139 > {
2140 crate::common::RegisterField::<
2141 15,
2142 0x1,
2143 1,
2144 0,
2145 p00pfs_ha::Asel,
2146 p00pfs_ha::Asel,
2147 P00PfsHa_SPEC,
2148 crate::common::RW,
2149 >::from_register(self, 0)
2150 }
2151}
2152impl ::core::default::Default for P00PfsHa {
2153 #[inline(always)]
2154 fn default() -> P00PfsHa {
2155 <crate::RegValueT<P00PfsHa_SPEC> as RegisterValue<_>>::new(0)
2156 }
2157}
2158pub mod p00pfs_ha {
2159
2160 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2161 pub struct Podr_SPEC;
2162 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
2163 impl Podr {
2164 #[doc = "Output low"]
2165 pub const _0: Self = Self::new(0);
2166
2167 #[doc = "Output high"]
2168 pub const _1: Self = Self::new(1);
2169 }
2170 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2171 pub struct Pidr_SPEC;
2172 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
2173 impl Pidr {
2174 #[doc = "Low level"]
2175 pub const _0: Self = Self::new(0);
2176
2177 #[doc = "High level"]
2178 pub const _1: Self = Self::new(1);
2179 }
2180 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2181 pub struct Pdr_SPEC;
2182 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
2183 impl Pdr {
2184 #[doc = "Input (functions as an input pin)"]
2185 pub const _0: Self = Self::new(0);
2186
2187 #[doc = "Output (functions as an output pin)"]
2188 pub const _1: Self = Self::new(1);
2189 }
2190 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2191 pub struct Pcr_SPEC;
2192 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
2193 impl Pcr {
2194 #[doc = "Disable input pull-up"]
2195 pub const _0: Self = Self::new(0);
2196
2197 #[doc = "Enable input pull-up"]
2198 pub const _1: Self = Self::new(1);
2199 }
2200 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2201 pub struct Ncodr_SPEC;
2202 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
2203 impl Ncodr {
2204 #[doc = "Output CMOS"]
2205 pub const _0: Self = Self::new(0);
2206
2207 #[doc = "Output NMOS open-drain"]
2208 pub const _1: Self = Self::new(1);
2209 }
2210 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2211 pub struct Isel_SPEC;
2212 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
2213 impl Isel {
2214 #[doc = "Do not use as IRQn input pin"]
2215 pub const _0: Self = Self::new(0);
2216
2217 #[doc = "Use as IRQn input pin"]
2218 pub const _1: Self = Self::new(1);
2219 }
2220 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2221 pub struct Asel_SPEC;
2222 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
2223 impl Asel {
2224 #[doc = "Do not use as analog pin"]
2225 pub const _0: Self = Self::new(0);
2226
2227 #[doc = "Use as analog pin"]
2228 pub const _1: Self = Self::new(1);
2229 }
2230}
2231#[doc(hidden)]
2232#[derive(Copy, Clone, Eq, PartialEq)]
2233pub struct P00PfsBy_SPEC;
2234impl crate::sealed::RegSpec for P00PfsBy_SPEC {
2235 type DataType = u8;
2236}
2237
2238#[doc = "Port 00%s Pin Function Select Register"]
2239pub type P00PfsBy = crate::RegValueT<P00PfsBy_SPEC>;
2240
2241impl P00PfsBy {
2242 #[doc = "Port Output Data"]
2243 #[inline(always)]
2244 pub fn podr(
2245 self,
2246 ) -> crate::common::RegisterField<
2247 0,
2248 0x1,
2249 1,
2250 0,
2251 p00pfs_by::Podr,
2252 p00pfs_by::Podr,
2253 P00PfsBy_SPEC,
2254 crate::common::RW,
2255 > {
2256 crate::common::RegisterField::<
2257 0,
2258 0x1,
2259 1,
2260 0,
2261 p00pfs_by::Podr,
2262 p00pfs_by::Podr,
2263 P00PfsBy_SPEC,
2264 crate::common::RW,
2265 >::from_register(self, 0)
2266 }
2267
2268 #[doc = "Port State"]
2269 #[inline(always)]
2270 pub fn pidr(
2271 self,
2272 ) -> crate::common::RegisterField<
2273 1,
2274 0x1,
2275 1,
2276 0,
2277 p00pfs_by::Pidr,
2278 p00pfs_by::Pidr,
2279 P00PfsBy_SPEC,
2280 crate::common::R,
2281 > {
2282 crate::common::RegisterField::<
2283 1,
2284 0x1,
2285 1,
2286 0,
2287 p00pfs_by::Pidr,
2288 p00pfs_by::Pidr,
2289 P00PfsBy_SPEC,
2290 crate::common::R,
2291 >::from_register(self, 0)
2292 }
2293
2294 #[doc = "Port Direction"]
2295 #[inline(always)]
2296 pub fn pdr(
2297 self,
2298 ) -> crate::common::RegisterField<
2299 2,
2300 0x1,
2301 1,
2302 0,
2303 p00pfs_by::Pdr,
2304 p00pfs_by::Pdr,
2305 P00PfsBy_SPEC,
2306 crate::common::RW,
2307 > {
2308 crate::common::RegisterField::<
2309 2,
2310 0x1,
2311 1,
2312 0,
2313 p00pfs_by::Pdr,
2314 p00pfs_by::Pdr,
2315 P00PfsBy_SPEC,
2316 crate::common::RW,
2317 >::from_register(self, 0)
2318 }
2319
2320 #[doc = "Pull-up Control"]
2321 #[inline(always)]
2322 pub fn pcr(
2323 self,
2324 ) -> crate::common::RegisterField<
2325 4,
2326 0x1,
2327 1,
2328 0,
2329 p00pfs_by::Pcr,
2330 p00pfs_by::Pcr,
2331 P00PfsBy_SPEC,
2332 crate::common::RW,
2333 > {
2334 crate::common::RegisterField::<
2335 4,
2336 0x1,
2337 1,
2338 0,
2339 p00pfs_by::Pcr,
2340 p00pfs_by::Pcr,
2341 P00PfsBy_SPEC,
2342 crate::common::RW,
2343 >::from_register(self, 0)
2344 }
2345
2346 #[doc = "N-Channel Open-Drain Control"]
2347 #[inline(always)]
2348 pub fn ncodr(
2349 self,
2350 ) -> crate::common::RegisterField<
2351 6,
2352 0x1,
2353 1,
2354 0,
2355 p00pfs_by::Ncodr,
2356 p00pfs_by::Ncodr,
2357 P00PfsBy_SPEC,
2358 crate::common::RW,
2359 > {
2360 crate::common::RegisterField::<
2361 6,
2362 0x1,
2363 1,
2364 0,
2365 p00pfs_by::Ncodr,
2366 p00pfs_by::Ncodr,
2367 P00PfsBy_SPEC,
2368 crate::common::RW,
2369 >::from_register(self, 0)
2370 }
2371}
2372impl ::core::default::Default for P00PfsBy {
2373 #[inline(always)]
2374 fn default() -> P00PfsBy {
2375 <crate::RegValueT<P00PfsBy_SPEC> as RegisterValue<_>>::new(0)
2376 }
2377}
2378pub mod p00pfs_by {
2379
2380 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2381 pub struct Podr_SPEC;
2382 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
2383 impl Podr {
2384 #[doc = "Output low"]
2385 pub const _0: Self = Self::new(0);
2386
2387 #[doc = "Output high"]
2388 pub const _1: Self = Self::new(1);
2389 }
2390 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2391 pub struct Pidr_SPEC;
2392 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
2393 impl Pidr {
2394 #[doc = "Low level"]
2395 pub const _0: Self = Self::new(0);
2396
2397 #[doc = "High level"]
2398 pub const _1: Self = Self::new(1);
2399 }
2400 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2401 pub struct Pdr_SPEC;
2402 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
2403 impl Pdr {
2404 #[doc = "Input (functions as an input pin)"]
2405 pub const _0: Self = Self::new(0);
2406
2407 #[doc = "Output (functions as an output pin)"]
2408 pub const _1: Self = Self::new(1);
2409 }
2410 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2411 pub struct Pcr_SPEC;
2412 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
2413 impl Pcr {
2414 #[doc = "Disable input pull-up"]
2415 pub const _0: Self = Self::new(0);
2416
2417 #[doc = "Enable input pull-up"]
2418 pub const _1: Self = Self::new(1);
2419 }
2420 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2421 pub struct Ncodr_SPEC;
2422 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
2423 impl Ncodr {
2424 #[doc = "Output CMOS"]
2425 pub const _0: Self = Self::new(0);
2426
2427 #[doc = "Output NMOS open-drain"]
2428 pub const _1: Self = Self::new(1);
2429 }
2430}
2431#[doc(hidden)]
2432#[derive(Copy, Clone, Eq, PartialEq)]
2433pub struct P10Pfs_SPEC;
2434impl crate::sealed::RegSpec for P10Pfs_SPEC {
2435 type DataType = u32;
2436}
2437
2438#[doc = "Port 10%s Pin Function Select Register"]
2439pub type P10Pfs = crate::RegValueT<P10Pfs_SPEC>;
2440
2441impl P10Pfs {
2442 #[doc = "Port Output Data"]
2443 #[inline(always)]
2444 pub fn podr(
2445 self,
2446 ) -> crate::common::RegisterField<
2447 0,
2448 0x1,
2449 1,
2450 0,
2451 p10pfs::Podr,
2452 p10pfs::Podr,
2453 P10Pfs_SPEC,
2454 crate::common::RW,
2455 > {
2456 crate::common::RegisterField::<
2457 0,
2458 0x1,
2459 1,
2460 0,
2461 p10pfs::Podr,
2462 p10pfs::Podr,
2463 P10Pfs_SPEC,
2464 crate::common::RW,
2465 >::from_register(self, 0)
2466 }
2467
2468 #[doc = "Port State"]
2469 #[inline(always)]
2470 pub fn pidr(
2471 self,
2472 ) -> crate::common::RegisterField<
2473 1,
2474 0x1,
2475 1,
2476 0,
2477 p10pfs::Pidr,
2478 p10pfs::Pidr,
2479 P10Pfs_SPEC,
2480 crate::common::R,
2481 > {
2482 crate::common::RegisterField::<
2483 1,
2484 0x1,
2485 1,
2486 0,
2487 p10pfs::Pidr,
2488 p10pfs::Pidr,
2489 P10Pfs_SPEC,
2490 crate::common::R,
2491 >::from_register(self, 0)
2492 }
2493
2494 #[doc = "Port Direction"]
2495 #[inline(always)]
2496 pub fn pdr(
2497 self,
2498 ) -> crate::common::RegisterField<
2499 2,
2500 0x1,
2501 1,
2502 0,
2503 p10pfs::Pdr,
2504 p10pfs::Pdr,
2505 P10Pfs_SPEC,
2506 crate::common::RW,
2507 > {
2508 crate::common::RegisterField::<
2509 2,
2510 0x1,
2511 1,
2512 0,
2513 p10pfs::Pdr,
2514 p10pfs::Pdr,
2515 P10Pfs_SPEC,
2516 crate::common::RW,
2517 >::from_register(self, 0)
2518 }
2519
2520 #[doc = "Pull-up Control"]
2521 #[inline(always)]
2522 pub fn pcr(
2523 self,
2524 ) -> crate::common::RegisterField<
2525 4,
2526 0x1,
2527 1,
2528 0,
2529 p10pfs::Pcr,
2530 p10pfs::Pcr,
2531 P10Pfs_SPEC,
2532 crate::common::RW,
2533 > {
2534 crate::common::RegisterField::<
2535 4,
2536 0x1,
2537 1,
2538 0,
2539 p10pfs::Pcr,
2540 p10pfs::Pcr,
2541 P10Pfs_SPEC,
2542 crate::common::RW,
2543 >::from_register(self, 0)
2544 }
2545
2546 #[doc = "N-Channel Open-Drain Control"]
2547 #[inline(always)]
2548 pub fn ncodr(
2549 self,
2550 ) -> crate::common::RegisterField<
2551 6,
2552 0x1,
2553 1,
2554 0,
2555 p10pfs::Ncodr,
2556 p10pfs::Ncodr,
2557 P10Pfs_SPEC,
2558 crate::common::RW,
2559 > {
2560 crate::common::RegisterField::<
2561 6,
2562 0x1,
2563 1,
2564 0,
2565 p10pfs::Ncodr,
2566 p10pfs::Ncodr,
2567 P10Pfs_SPEC,
2568 crate::common::RW,
2569 >::from_register(self, 0)
2570 }
2571
2572 #[doc = "Event on Falling/Event on Rising"]
2573 #[inline(always)]
2574 pub fn eofr(
2575 self,
2576 ) -> crate::common::RegisterField<
2577 12,
2578 0x3,
2579 1,
2580 0,
2581 p10pfs::Eofr,
2582 p10pfs::Eofr,
2583 P10Pfs_SPEC,
2584 crate::common::RW,
2585 > {
2586 crate::common::RegisterField::<
2587 12,
2588 0x3,
2589 1,
2590 0,
2591 p10pfs::Eofr,
2592 p10pfs::Eofr,
2593 P10Pfs_SPEC,
2594 crate::common::RW,
2595 >::from_register(self, 0)
2596 }
2597
2598 #[doc = "IRQ Input Enable"]
2599 #[inline(always)]
2600 pub fn isel(
2601 self,
2602 ) -> crate::common::RegisterField<
2603 14,
2604 0x1,
2605 1,
2606 0,
2607 p10pfs::Isel,
2608 p10pfs::Isel,
2609 P10Pfs_SPEC,
2610 crate::common::RW,
2611 > {
2612 crate::common::RegisterField::<
2613 14,
2614 0x1,
2615 1,
2616 0,
2617 p10pfs::Isel,
2618 p10pfs::Isel,
2619 P10Pfs_SPEC,
2620 crate::common::RW,
2621 >::from_register(self, 0)
2622 }
2623
2624 #[doc = "Analog Input Enable"]
2625 #[inline(always)]
2626 pub fn asel(
2627 self,
2628 ) -> crate::common::RegisterField<
2629 15,
2630 0x1,
2631 1,
2632 0,
2633 p10pfs::Asel,
2634 p10pfs::Asel,
2635 P10Pfs_SPEC,
2636 crate::common::RW,
2637 > {
2638 crate::common::RegisterField::<
2639 15,
2640 0x1,
2641 1,
2642 0,
2643 p10pfs::Asel,
2644 p10pfs::Asel,
2645 P10Pfs_SPEC,
2646 crate::common::RW,
2647 >::from_register(self, 0)
2648 }
2649
2650 #[doc = "Port Mode Control"]
2651 #[inline(always)]
2652 pub fn pmr(
2653 self,
2654 ) -> crate::common::RegisterField<
2655 16,
2656 0x1,
2657 1,
2658 0,
2659 p10pfs::Pmr,
2660 p10pfs::Pmr,
2661 P10Pfs_SPEC,
2662 crate::common::RW,
2663 > {
2664 crate::common::RegisterField::<
2665 16,
2666 0x1,
2667 1,
2668 0,
2669 p10pfs::Pmr,
2670 p10pfs::Pmr,
2671 P10Pfs_SPEC,
2672 crate::common::RW,
2673 >::from_register(self, 0)
2674 }
2675
2676 #[doc = "Peripheral Select"]
2677 #[inline(always)]
2678 pub fn psel(
2679 self,
2680 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P10Pfs_SPEC, crate::common::RW> {
2681 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P10Pfs_SPEC,crate::common::RW>::from_register(self,0)
2682 }
2683}
2684impl ::core::default::Default for P10Pfs {
2685 #[inline(always)]
2686 fn default() -> P10Pfs {
2687 <crate::RegValueT<P10Pfs_SPEC> as RegisterValue<_>>::new(0)
2688 }
2689}
2690pub mod p10pfs {
2691
2692 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2693 pub struct Podr_SPEC;
2694 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
2695 impl Podr {
2696 #[doc = "Output low"]
2697 pub const _0: Self = Self::new(0);
2698
2699 #[doc = "Output high"]
2700 pub const _1: Self = Self::new(1);
2701 }
2702 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2703 pub struct Pidr_SPEC;
2704 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
2705 impl Pidr {
2706 #[doc = "Low level"]
2707 pub const _0: Self = Self::new(0);
2708
2709 #[doc = "High level"]
2710 pub const _1: Self = Self::new(1);
2711 }
2712 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2713 pub struct Pdr_SPEC;
2714 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
2715 impl Pdr {
2716 #[doc = "Input (functions as an input pin)"]
2717 pub const _0: Self = Self::new(0);
2718
2719 #[doc = "Output (functions as an output pin)"]
2720 pub const _1: Self = Self::new(1);
2721 }
2722 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2723 pub struct Pcr_SPEC;
2724 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
2725 impl Pcr {
2726 #[doc = "Disable input pull-up"]
2727 pub const _0: Self = Self::new(0);
2728
2729 #[doc = "Enable input pull-up"]
2730 pub const _1: Self = Self::new(1);
2731 }
2732 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2733 pub struct Ncodr_SPEC;
2734 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
2735 impl Ncodr {
2736 #[doc = "Output CMOS"]
2737 pub const _0: Self = Self::new(0);
2738
2739 #[doc = "Output NMOS open-drain"]
2740 pub const _1: Self = Self::new(1);
2741 }
2742 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2743 pub struct Eofr_SPEC;
2744 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
2745 impl Eofr {
2746 #[doc = "Don\'t care"]
2747 pub const _00: Self = Self::new(0);
2748
2749 #[doc = "Detect rising edge"]
2750 pub const _01: Self = Self::new(1);
2751
2752 #[doc = "Detect falling edge"]
2753 pub const _10: Self = Self::new(2);
2754
2755 #[doc = "Detect both edges"]
2756 pub const _11: Self = Self::new(3);
2757 }
2758 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2759 pub struct Isel_SPEC;
2760 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
2761 impl Isel {
2762 #[doc = "Do not use as IRQn input pin"]
2763 pub const _0: Self = Self::new(0);
2764
2765 #[doc = "Use as IRQn input pin"]
2766 pub const _1: Self = Self::new(1);
2767 }
2768 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2769 pub struct Asel_SPEC;
2770 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
2771 impl Asel {
2772 #[doc = "Do not use as analog pin"]
2773 pub const _0: Self = Self::new(0);
2774
2775 #[doc = "Use as analog pin"]
2776 pub const _1: Self = Self::new(1);
2777 }
2778 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2779 pub struct Pmr_SPEC;
2780 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
2781 impl Pmr {
2782 #[doc = "Use as general I/O pin"]
2783 pub const _0: Self = Self::new(0);
2784
2785 #[doc = "Use as I/O port for peripheral functions"]
2786 pub const _1: Self = Self::new(1);
2787 }
2788}
2789#[doc(hidden)]
2790#[derive(Copy, Clone, Eq, PartialEq)]
2791pub struct P10PfsHa_SPEC;
2792impl crate::sealed::RegSpec for P10PfsHa_SPEC {
2793 type DataType = u16;
2794}
2795
2796#[doc = "Port 10%s Pin Function Select Register"]
2797pub type P10PfsHa = crate::RegValueT<P10PfsHa_SPEC>;
2798
2799impl P10PfsHa {
2800 #[doc = "Port Output Data"]
2801 #[inline(always)]
2802 pub fn podr(
2803 self,
2804 ) -> crate::common::RegisterField<
2805 0,
2806 0x1,
2807 1,
2808 0,
2809 p10pfs_ha::Podr,
2810 p10pfs_ha::Podr,
2811 P10PfsHa_SPEC,
2812 crate::common::RW,
2813 > {
2814 crate::common::RegisterField::<
2815 0,
2816 0x1,
2817 1,
2818 0,
2819 p10pfs_ha::Podr,
2820 p10pfs_ha::Podr,
2821 P10PfsHa_SPEC,
2822 crate::common::RW,
2823 >::from_register(self, 0)
2824 }
2825
2826 #[doc = "Port State"]
2827 #[inline(always)]
2828 pub fn pidr(
2829 self,
2830 ) -> crate::common::RegisterField<
2831 1,
2832 0x1,
2833 1,
2834 0,
2835 p10pfs_ha::Pidr,
2836 p10pfs_ha::Pidr,
2837 P10PfsHa_SPEC,
2838 crate::common::R,
2839 > {
2840 crate::common::RegisterField::<
2841 1,
2842 0x1,
2843 1,
2844 0,
2845 p10pfs_ha::Pidr,
2846 p10pfs_ha::Pidr,
2847 P10PfsHa_SPEC,
2848 crate::common::R,
2849 >::from_register(self, 0)
2850 }
2851
2852 #[doc = "Port Direction"]
2853 #[inline(always)]
2854 pub fn pdr(
2855 self,
2856 ) -> crate::common::RegisterField<
2857 2,
2858 0x1,
2859 1,
2860 0,
2861 p10pfs_ha::Pdr,
2862 p10pfs_ha::Pdr,
2863 P10PfsHa_SPEC,
2864 crate::common::RW,
2865 > {
2866 crate::common::RegisterField::<
2867 2,
2868 0x1,
2869 1,
2870 0,
2871 p10pfs_ha::Pdr,
2872 p10pfs_ha::Pdr,
2873 P10PfsHa_SPEC,
2874 crate::common::RW,
2875 >::from_register(self, 0)
2876 }
2877
2878 #[doc = "Pull-up Control"]
2879 #[inline(always)]
2880 pub fn pcr(
2881 self,
2882 ) -> crate::common::RegisterField<
2883 4,
2884 0x1,
2885 1,
2886 0,
2887 p10pfs_ha::Pcr,
2888 p10pfs_ha::Pcr,
2889 P10PfsHa_SPEC,
2890 crate::common::RW,
2891 > {
2892 crate::common::RegisterField::<
2893 4,
2894 0x1,
2895 1,
2896 0,
2897 p10pfs_ha::Pcr,
2898 p10pfs_ha::Pcr,
2899 P10PfsHa_SPEC,
2900 crate::common::RW,
2901 >::from_register(self, 0)
2902 }
2903
2904 #[doc = "N-Channel Open-Drain Control"]
2905 #[inline(always)]
2906 pub fn ncodr(
2907 self,
2908 ) -> crate::common::RegisterField<
2909 6,
2910 0x1,
2911 1,
2912 0,
2913 p10pfs_ha::Ncodr,
2914 p10pfs_ha::Ncodr,
2915 P10PfsHa_SPEC,
2916 crate::common::RW,
2917 > {
2918 crate::common::RegisterField::<
2919 6,
2920 0x1,
2921 1,
2922 0,
2923 p10pfs_ha::Ncodr,
2924 p10pfs_ha::Ncodr,
2925 P10PfsHa_SPEC,
2926 crate::common::RW,
2927 >::from_register(self, 0)
2928 }
2929
2930 #[doc = "Event on Falling/Event on Rising"]
2931 #[inline(always)]
2932 pub fn eofr(
2933 self,
2934 ) -> crate::common::RegisterField<
2935 12,
2936 0x3,
2937 1,
2938 0,
2939 p10pfs_ha::Eofr,
2940 p10pfs_ha::Eofr,
2941 P10PfsHa_SPEC,
2942 crate::common::RW,
2943 > {
2944 crate::common::RegisterField::<
2945 12,
2946 0x3,
2947 1,
2948 0,
2949 p10pfs_ha::Eofr,
2950 p10pfs_ha::Eofr,
2951 P10PfsHa_SPEC,
2952 crate::common::RW,
2953 >::from_register(self, 0)
2954 }
2955
2956 #[doc = "IRQ Input Enable"]
2957 #[inline(always)]
2958 pub fn isel(
2959 self,
2960 ) -> crate::common::RegisterField<
2961 14,
2962 0x1,
2963 1,
2964 0,
2965 p10pfs_ha::Isel,
2966 p10pfs_ha::Isel,
2967 P10PfsHa_SPEC,
2968 crate::common::RW,
2969 > {
2970 crate::common::RegisterField::<
2971 14,
2972 0x1,
2973 1,
2974 0,
2975 p10pfs_ha::Isel,
2976 p10pfs_ha::Isel,
2977 P10PfsHa_SPEC,
2978 crate::common::RW,
2979 >::from_register(self, 0)
2980 }
2981
2982 #[doc = "Analog Input Enable"]
2983 #[inline(always)]
2984 pub fn asel(
2985 self,
2986 ) -> crate::common::RegisterField<
2987 15,
2988 0x1,
2989 1,
2990 0,
2991 p10pfs_ha::Asel,
2992 p10pfs_ha::Asel,
2993 P10PfsHa_SPEC,
2994 crate::common::RW,
2995 > {
2996 crate::common::RegisterField::<
2997 15,
2998 0x1,
2999 1,
3000 0,
3001 p10pfs_ha::Asel,
3002 p10pfs_ha::Asel,
3003 P10PfsHa_SPEC,
3004 crate::common::RW,
3005 >::from_register(self, 0)
3006 }
3007}
3008impl ::core::default::Default for P10PfsHa {
3009 #[inline(always)]
3010 fn default() -> P10PfsHa {
3011 <crate::RegValueT<P10PfsHa_SPEC> as RegisterValue<_>>::new(0)
3012 }
3013}
3014pub mod p10pfs_ha {
3015
3016 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3017 pub struct Podr_SPEC;
3018 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3019 impl Podr {
3020 #[doc = "Output low"]
3021 pub const _0: Self = Self::new(0);
3022
3023 #[doc = "Output high"]
3024 pub const _1: Self = Self::new(1);
3025 }
3026 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3027 pub struct Pidr_SPEC;
3028 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
3029 impl Pidr {
3030 #[doc = "Low level"]
3031 pub const _0: Self = Self::new(0);
3032
3033 #[doc = "High level"]
3034 pub const _1: Self = Self::new(1);
3035 }
3036 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3037 pub struct Pdr_SPEC;
3038 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
3039 impl Pdr {
3040 #[doc = "Input (functions as an input pin)"]
3041 pub const _0: Self = Self::new(0);
3042
3043 #[doc = "Output (functions as an output pin)"]
3044 pub const _1: Self = Self::new(1);
3045 }
3046 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3047 pub struct Pcr_SPEC;
3048 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
3049 impl Pcr {
3050 #[doc = "Disable input pull-up"]
3051 pub const _0: Self = Self::new(0);
3052
3053 #[doc = "Enable input pull-up"]
3054 pub const _1: Self = Self::new(1);
3055 }
3056 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3057 pub struct Ncodr_SPEC;
3058 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
3059 impl Ncodr {
3060 #[doc = "Output CMOS"]
3061 pub const _0: Self = Self::new(0);
3062
3063 #[doc = "Output NMOS open-drain"]
3064 pub const _1: Self = Self::new(1);
3065 }
3066 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3067 pub struct Eofr_SPEC;
3068 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
3069 impl Eofr {
3070 #[doc = "Don\'t care"]
3071 pub const _00: Self = Self::new(0);
3072
3073 #[doc = "Detect rising edge"]
3074 pub const _01: Self = Self::new(1);
3075
3076 #[doc = "Detect falling edge"]
3077 pub const _10: Self = Self::new(2);
3078
3079 #[doc = "Detect both edges"]
3080 pub const _11: Self = Self::new(3);
3081 }
3082 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3083 pub struct Isel_SPEC;
3084 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
3085 impl Isel {
3086 #[doc = "Do not use as IRQn input pin"]
3087 pub const _0: Self = Self::new(0);
3088
3089 #[doc = "Use as IRQn input pin"]
3090 pub const _1: Self = Self::new(1);
3091 }
3092 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3093 pub struct Asel_SPEC;
3094 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
3095 impl Asel {
3096 #[doc = "Do not use as analog pin"]
3097 pub const _0: Self = Self::new(0);
3098
3099 #[doc = "Use as analog pin"]
3100 pub const _1: Self = Self::new(1);
3101 }
3102}
3103#[doc(hidden)]
3104#[derive(Copy, Clone, Eq, PartialEq)]
3105pub struct P10PfsBy_SPEC;
3106impl crate::sealed::RegSpec for P10PfsBy_SPEC {
3107 type DataType = u8;
3108}
3109
3110#[doc = "Port 10%s Pin Function Select Register"]
3111pub type P10PfsBy = crate::RegValueT<P10PfsBy_SPEC>;
3112
3113impl P10PfsBy {
3114 #[doc = "Port Output Data"]
3115 #[inline(always)]
3116 pub fn podr(
3117 self,
3118 ) -> crate::common::RegisterField<
3119 0,
3120 0x1,
3121 1,
3122 0,
3123 p10pfs_by::Podr,
3124 p10pfs_by::Podr,
3125 P10PfsBy_SPEC,
3126 crate::common::RW,
3127 > {
3128 crate::common::RegisterField::<
3129 0,
3130 0x1,
3131 1,
3132 0,
3133 p10pfs_by::Podr,
3134 p10pfs_by::Podr,
3135 P10PfsBy_SPEC,
3136 crate::common::RW,
3137 >::from_register(self, 0)
3138 }
3139
3140 #[doc = "Port State"]
3141 #[inline(always)]
3142 pub fn pidr(
3143 self,
3144 ) -> crate::common::RegisterField<
3145 1,
3146 0x1,
3147 1,
3148 0,
3149 p10pfs_by::Pidr,
3150 p10pfs_by::Pidr,
3151 P10PfsBy_SPEC,
3152 crate::common::R,
3153 > {
3154 crate::common::RegisterField::<
3155 1,
3156 0x1,
3157 1,
3158 0,
3159 p10pfs_by::Pidr,
3160 p10pfs_by::Pidr,
3161 P10PfsBy_SPEC,
3162 crate::common::R,
3163 >::from_register(self, 0)
3164 }
3165
3166 #[doc = "Port Direction"]
3167 #[inline(always)]
3168 pub fn pdr(
3169 self,
3170 ) -> crate::common::RegisterField<
3171 2,
3172 0x1,
3173 1,
3174 0,
3175 p10pfs_by::Pdr,
3176 p10pfs_by::Pdr,
3177 P10PfsBy_SPEC,
3178 crate::common::RW,
3179 > {
3180 crate::common::RegisterField::<
3181 2,
3182 0x1,
3183 1,
3184 0,
3185 p10pfs_by::Pdr,
3186 p10pfs_by::Pdr,
3187 P10PfsBy_SPEC,
3188 crate::common::RW,
3189 >::from_register(self, 0)
3190 }
3191
3192 #[doc = "Pull-up Control"]
3193 #[inline(always)]
3194 pub fn pcr(
3195 self,
3196 ) -> crate::common::RegisterField<
3197 4,
3198 0x1,
3199 1,
3200 0,
3201 p10pfs_by::Pcr,
3202 p10pfs_by::Pcr,
3203 P10PfsBy_SPEC,
3204 crate::common::RW,
3205 > {
3206 crate::common::RegisterField::<
3207 4,
3208 0x1,
3209 1,
3210 0,
3211 p10pfs_by::Pcr,
3212 p10pfs_by::Pcr,
3213 P10PfsBy_SPEC,
3214 crate::common::RW,
3215 >::from_register(self, 0)
3216 }
3217
3218 #[doc = "N-Channel Open-Drain Control"]
3219 #[inline(always)]
3220 pub fn ncodr(
3221 self,
3222 ) -> crate::common::RegisterField<
3223 6,
3224 0x1,
3225 1,
3226 0,
3227 p10pfs_by::Ncodr,
3228 p10pfs_by::Ncodr,
3229 P10PfsBy_SPEC,
3230 crate::common::RW,
3231 > {
3232 crate::common::RegisterField::<
3233 6,
3234 0x1,
3235 1,
3236 0,
3237 p10pfs_by::Ncodr,
3238 p10pfs_by::Ncodr,
3239 P10PfsBy_SPEC,
3240 crate::common::RW,
3241 >::from_register(self, 0)
3242 }
3243}
3244impl ::core::default::Default for P10PfsBy {
3245 #[inline(always)]
3246 fn default() -> P10PfsBy {
3247 <crate::RegValueT<P10PfsBy_SPEC> as RegisterValue<_>>::new(0)
3248 }
3249}
3250pub mod p10pfs_by {
3251
3252 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3253 pub struct Podr_SPEC;
3254 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3255 impl Podr {
3256 #[doc = "Output low"]
3257 pub const _0: Self = Self::new(0);
3258
3259 #[doc = "Output high"]
3260 pub const _1: Self = Self::new(1);
3261 }
3262 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3263 pub struct Pidr_SPEC;
3264 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
3265 impl Pidr {
3266 #[doc = "Low level"]
3267 pub const _0: Self = Self::new(0);
3268
3269 #[doc = "High level"]
3270 pub const _1: Self = Self::new(1);
3271 }
3272 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3273 pub struct Pdr_SPEC;
3274 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
3275 impl Pdr {
3276 #[doc = "Input (functions as an input pin)"]
3277 pub const _0: Self = Self::new(0);
3278
3279 #[doc = "Output (functions as an output pin)"]
3280 pub const _1: Self = Self::new(1);
3281 }
3282 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3283 pub struct Pcr_SPEC;
3284 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
3285 impl Pcr {
3286 #[doc = "Disable input pull-up"]
3287 pub const _0: Self = Self::new(0);
3288
3289 #[doc = "Enable input pull-up"]
3290 pub const _1: Self = Self::new(1);
3291 }
3292 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3293 pub struct Ncodr_SPEC;
3294 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
3295 impl Ncodr {
3296 #[doc = "Output CMOS"]
3297 pub const _0: Self = Self::new(0);
3298
3299 #[doc = "Output NMOS open-drain"]
3300 pub const _1: Self = Self::new(1);
3301 }
3302}
3303#[doc(hidden)]
3304#[derive(Copy, Clone, Eq, PartialEq)]
3305pub struct P1Pfs_SPEC;
3306impl crate::sealed::RegSpec for P1Pfs_SPEC {
3307 type DataType = u32;
3308}
3309
3310#[doc = "Port 1%s Pin Function Select Register"]
3311pub type P1Pfs = crate::RegValueT<P1Pfs_SPEC>;
3312
3313impl P1Pfs {
3314 #[doc = "Port Output Data"]
3315 #[inline(always)]
3316 pub fn podr(
3317 self,
3318 ) -> crate::common::RegisterField<
3319 0,
3320 0x1,
3321 1,
3322 0,
3323 p1pfs::Podr,
3324 p1pfs::Podr,
3325 P1Pfs_SPEC,
3326 crate::common::RW,
3327 > {
3328 crate::common::RegisterField::<
3329 0,
3330 0x1,
3331 1,
3332 0,
3333 p1pfs::Podr,
3334 p1pfs::Podr,
3335 P1Pfs_SPEC,
3336 crate::common::RW,
3337 >::from_register(self, 0)
3338 }
3339
3340 #[doc = "Port State"]
3341 #[inline(always)]
3342 pub fn pidr(
3343 self,
3344 ) -> crate::common::RegisterField<
3345 1,
3346 0x1,
3347 1,
3348 0,
3349 p1pfs::Pidr,
3350 p1pfs::Pidr,
3351 P1Pfs_SPEC,
3352 crate::common::R,
3353 > {
3354 crate::common::RegisterField::<
3355 1,
3356 0x1,
3357 1,
3358 0,
3359 p1pfs::Pidr,
3360 p1pfs::Pidr,
3361 P1Pfs_SPEC,
3362 crate::common::R,
3363 >::from_register(self, 0)
3364 }
3365
3366 #[doc = "Port Direction"]
3367 #[inline(always)]
3368 pub fn pdr(
3369 self,
3370 ) -> crate::common::RegisterField<
3371 2,
3372 0x1,
3373 1,
3374 0,
3375 p1pfs::Pdr,
3376 p1pfs::Pdr,
3377 P1Pfs_SPEC,
3378 crate::common::RW,
3379 > {
3380 crate::common::RegisterField::<
3381 2,
3382 0x1,
3383 1,
3384 0,
3385 p1pfs::Pdr,
3386 p1pfs::Pdr,
3387 P1Pfs_SPEC,
3388 crate::common::RW,
3389 >::from_register(self, 0)
3390 }
3391
3392 #[doc = "Pull-up Control"]
3393 #[inline(always)]
3394 pub fn pcr(
3395 self,
3396 ) -> crate::common::RegisterField<
3397 4,
3398 0x1,
3399 1,
3400 0,
3401 p1pfs::Pcr,
3402 p1pfs::Pcr,
3403 P1Pfs_SPEC,
3404 crate::common::RW,
3405 > {
3406 crate::common::RegisterField::<
3407 4,
3408 0x1,
3409 1,
3410 0,
3411 p1pfs::Pcr,
3412 p1pfs::Pcr,
3413 P1Pfs_SPEC,
3414 crate::common::RW,
3415 >::from_register(self, 0)
3416 }
3417
3418 #[doc = "N-Channel Open-Drain Control"]
3419 #[inline(always)]
3420 pub fn ncodr(
3421 self,
3422 ) -> crate::common::RegisterField<
3423 6,
3424 0x1,
3425 1,
3426 0,
3427 p1pfs::Ncodr,
3428 p1pfs::Ncodr,
3429 P1Pfs_SPEC,
3430 crate::common::RW,
3431 > {
3432 crate::common::RegisterField::<
3433 6,
3434 0x1,
3435 1,
3436 0,
3437 p1pfs::Ncodr,
3438 p1pfs::Ncodr,
3439 P1Pfs_SPEC,
3440 crate::common::RW,
3441 >::from_register(self, 0)
3442 }
3443
3444 #[doc = "Event on Falling/Event on Rising"]
3445 #[inline(always)]
3446 pub fn eofr(
3447 self,
3448 ) -> crate::common::RegisterField<
3449 12,
3450 0x3,
3451 1,
3452 0,
3453 p1pfs::Eofr,
3454 p1pfs::Eofr,
3455 P1Pfs_SPEC,
3456 crate::common::RW,
3457 > {
3458 crate::common::RegisterField::<
3459 12,
3460 0x3,
3461 1,
3462 0,
3463 p1pfs::Eofr,
3464 p1pfs::Eofr,
3465 P1Pfs_SPEC,
3466 crate::common::RW,
3467 >::from_register(self, 0)
3468 }
3469
3470 #[doc = "IRQ Input Enable"]
3471 #[inline(always)]
3472 pub fn isel(
3473 self,
3474 ) -> crate::common::RegisterField<
3475 14,
3476 0x1,
3477 1,
3478 0,
3479 p1pfs::Isel,
3480 p1pfs::Isel,
3481 P1Pfs_SPEC,
3482 crate::common::RW,
3483 > {
3484 crate::common::RegisterField::<
3485 14,
3486 0x1,
3487 1,
3488 0,
3489 p1pfs::Isel,
3490 p1pfs::Isel,
3491 P1Pfs_SPEC,
3492 crate::common::RW,
3493 >::from_register(self, 0)
3494 }
3495
3496 #[doc = "Analog Input Enable"]
3497 #[inline(always)]
3498 pub fn asel(
3499 self,
3500 ) -> crate::common::RegisterField<
3501 15,
3502 0x1,
3503 1,
3504 0,
3505 p1pfs::Asel,
3506 p1pfs::Asel,
3507 P1Pfs_SPEC,
3508 crate::common::RW,
3509 > {
3510 crate::common::RegisterField::<
3511 15,
3512 0x1,
3513 1,
3514 0,
3515 p1pfs::Asel,
3516 p1pfs::Asel,
3517 P1Pfs_SPEC,
3518 crate::common::RW,
3519 >::from_register(self, 0)
3520 }
3521
3522 #[doc = "Port Mode Control"]
3523 #[inline(always)]
3524 pub fn pmr(
3525 self,
3526 ) -> crate::common::RegisterField<
3527 16,
3528 0x1,
3529 1,
3530 0,
3531 p1pfs::Pmr,
3532 p1pfs::Pmr,
3533 P1Pfs_SPEC,
3534 crate::common::RW,
3535 > {
3536 crate::common::RegisterField::<
3537 16,
3538 0x1,
3539 1,
3540 0,
3541 p1pfs::Pmr,
3542 p1pfs::Pmr,
3543 P1Pfs_SPEC,
3544 crate::common::RW,
3545 >::from_register(self, 0)
3546 }
3547
3548 #[doc = "Peripheral Select"]
3549 #[inline(always)]
3550 pub fn psel(
3551 self,
3552 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P1Pfs_SPEC, crate::common::RW> {
3553 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P1Pfs_SPEC,crate::common::RW>::from_register(self,0)
3554 }
3555}
3556impl ::core::default::Default for P1Pfs {
3557 #[inline(always)]
3558 fn default() -> P1Pfs {
3559 <crate::RegValueT<P1Pfs_SPEC> as RegisterValue<_>>::new(0)
3560 }
3561}
3562pub mod p1pfs {
3563
3564 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3565 pub struct Podr_SPEC;
3566 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3567 impl Podr {
3568 #[doc = "Output low"]
3569 pub const _0: Self = Self::new(0);
3570
3571 #[doc = "Output high"]
3572 pub const _1: Self = Self::new(1);
3573 }
3574 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3575 pub struct Pidr_SPEC;
3576 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
3577 impl Pidr {
3578 #[doc = "Low level"]
3579 pub const _0: Self = Self::new(0);
3580
3581 #[doc = "High level"]
3582 pub const _1: Self = Self::new(1);
3583 }
3584 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3585 pub struct Pdr_SPEC;
3586 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
3587 impl Pdr {
3588 #[doc = "Input (functions as an input pin)"]
3589 pub const _0: Self = Self::new(0);
3590
3591 #[doc = "Output (functions as an output pin)"]
3592 pub const _1: Self = Self::new(1);
3593 }
3594 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3595 pub struct Pcr_SPEC;
3596 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
3597 impl Pcr {
3598 #[doc = "Disable input pull-up"]
3599 pub const _0: Self = Self::new(0);
3600
3601 #[doc = "Enable input pull-up"]
3602 pub const _1: Self = Self::new(1);
3603 }
3604 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3605 pub struct Ncodr_SPEC;
3606 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
3607 impl Ncodr {
3608 #[doc = "Output CMOS"]
3609 pub const _0: Self = Self::new(0);
3610
3611 #[doc = "Output NMOS open-drain"]
3612 pub const _1: Self = Self::new(1);
3613 }
3614 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3615 pub struct Eofr_SPEC;
3616 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
3617 impl Eofr {
3618 #[doc = "Don\'t care"]
3619 pub const _00: Self = Self::new(0);
3620
3621 #[doc = "Detect rising edge"]
3622 pub const _01: Self = Self::new(1);
3623
3624 #[doc = "Detect falling edge"]
3625 pub const _10: Self = Self::new(2);
3626
3627 #[doc = "Detect both edges"]
3628 pub const _11: Self = Self::new(3);
3629 }
3630 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3631 pub struct Isel_SPEC;
3632 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
3633 impl Isel {
3634 #[doc = "Do not use as IRQn input pin"]
3635 pub const _0: Self = Self::new(0);
3636
3637 #[doc = "Use as IRQn input pin"]
3638 pub const _1: Self = Self::new(1);
3639 }
3640 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3641 pub struct Asel_SPEC;
3642 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
3643 impl Asel {
3644 #[doc = "Do not use as analog pin"]
3645 pub const _0: Self = Self::new(0);
3646
3647 #[doc = "Use as analog pin"]
3648 pub const _1: Self = Self::new(1);
3649 }
3650 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3651 pub struct Pmr_SPEC;
3652 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
3653 impl Pmr {
3654 #[doc = "Use as general I/O pin"]
3655 pub const _0: Self = Self::new(0);
3656
3657 #[doc = "Use as I/O port for peripheral functions"]
3658 pub const _1: Self = Self::new(1);
3659 }
3660}
3661#[doc(hidden)]
3662#[derive(Copy, Clone, Eq, PartialEq)]
3663pub struct P1PfsHa_SPEC;
3664impl crate::sealed::RegSpec for P1PfsHa_SPEC {
3665 type DataType = u16;
3666}
3667
3668#[doc = "Port 1%s Pin Function Select Register"]
3669pub type P1PfsHa = crate::RegValueT<P1PfsHa_SPEC>;
3670
3671impl P1PfsHa {
3672 #[doc = "Port Output Data"]
3673 #[inline(always)]
3674 pub fn podr(
3675 self,
3676 ) -> crate::common::RegisterField<
3677 0,
3678 0x1,
3679 1,
3680 0,
3681 p1pfs_ha::Podr,
3682 p1pfs_ha::Podr,
3683 P1PfsHa_SPEC,
3684 crate::common::RW,
3685 > {
3686 crate::common::RegisterField::<
3687 0,
3688 0x1,
3689 1,
3690 0,
3691 p1pfs_ha::Podr,
3692 p1pfs_ha::Podr,
3693 P1PfsHa_SPEC,
3694 crate::common::RW,
3695 >::from_register(self, 0)
3696 }
3697
3698 #[doc = "Port State"]
3699 #[inline(always)]
3700 pub fn pidr(
3701 self,
3702 ) -> crate::common::RegisterField<
3703 1,
3704 0x1,
3705 1,
3706 0,
3707 p1pfs_ha::Pidr,
3708 p1pfs_ha::Pidr,
3709 P1PfsHa_SPEC,
3710 crate::common::R,
3711 > {
3712 crate::common::RegisterField::<
3713 1,
3714 0x1,
3715 1,
3716 0,
3717 p1pfs_ha::Pidr,
3718 p1pfs_ha::Pidr,
3719 P1PfsHa_SPEC,
3720 crate::common::R,
3721 >::from_register(self, 0)
3722 }
3723
3724 #[doc = "Port Direction"]
3725 #[inline(always)]
3726 pub fn pdr(
3727 self,
3728 ) -> crate::common::RegisterField<
3729 2,
3730 0x1,
3731 1,
3732 0,
3733 p1pfs_ha::Pdr,
3734 p1pfs_ha::Pdr,
3735 P1PfsHa_SPEC,
3736 crate::common::RW,
3737 > {
3738 crate::common::RegisterField::<
3739 2,
3740 0x1,
3741 1,
3742 0,
3743 p1pfs_ha::Pdr,
3744 p1pfs_ha::Pdr,
3745 P1PfsHa_SPEC,
3746 crate::common::RW,
3747 >::from_register(self, 0)
3748 }
3749
3750 #[doc = "Pull-up Control"]
3751 #[inline(always)]
3752 pub fn pcr(
3753 self,
3754 ) -> crate::common::RegisterField<
3755 4,
3756 0x1,
3757 1,
3758 0,
3759 p1pfs_ha::Pcr,
3760 p1pfs_ha::Pcr,
3761 P1PfsHa_SPEC,
3762 crate::common::RW,
3763 > {
3764 crate::common::RegisterField::<
3765 4,
3766 0x1,
3767 1,
3768 0,
3769 p1pfs_ha::Pcr,
3770 p1pfs_ha::Pcr,
3771 P1PfsHa_SPEC,
3772 crate::common::RW,
3773 >::from_register(self, 0)
3774 }
3775
3776 #[doc = "N-Channel Open-Drain Control"]
3777 #[inline(always)]
3778 pub fn ncodr(
3779 self,
3780 ) -> crate::common::RegisterField<
3781 6,
3782 0x1,
3783 1,
3784 0,
3785 p1pfs_ha::Ncodr,
3786 p1pfs_ha::Ncodr,
3787 P1PfsHa_SPEC,
3788 crate::common::RW,
3789 > {
3790 crate::common::RegisterField::<
3791 6,
3792 0x1,
3793 1,
3794 0,
3795 p1pfs_ha::Ncodr,
3796 p1pfs_ha::Ncodr,
3797 P1PfsHa_SPEC,
3798 crate::common::RW,
3799 >::from_register(self, 0)
3800 }
3801
3802 #[doc = "Event on Falling/Event on Rising"]
3803 #[inline(always)]
3804 pub fn eofr(
3805 self,
3806 ) -> crate::common::RegisterField<
3807 12,
3808 0x3,
3809 1,
3810 0,
3811 p1pfs_ha::Eofr,
3812 p1pfs_ha::Eofr,
3813 P1PfsHa_SPEC,
3814 crate::common::RW,
3815 > {
3816 crate::common::RegisterField::<
3817 12,
3818 0x3,
3819 1,
3820 0,
3821 p1pfs_ha::Eofr,
3822 p1pfs_ha::Eofr,
3823 P1PfsHa_SPEC,
3824 crate::common::RW,
3825 >::from_register(self, 0)
3826 }
3827
3828 #[doc = "IRQ Input Enable"]
3829 #[inline(always)]
3830 pub fn isel(
3831 self,
3832 ) -> crate::common::RegisterField<
3833 14,
3834 0x1,
3835 1,
3836 0,
3837 p1pfs_ha::Isel,
3838 p1pfs_ha::Isel,
3839 P1PfsHa_SPEC,
3840 crate::common::RW,
3841 > {
3842 crate::common::RegisterField::<
3843 14,
3844 0x1,
3845 1,
3846 0,
3847 p1pfs_ha::Isel,
3848 p1pfs_ha::Isel,
3849 P1PfsHa_SPEC,
3850 crate::common::RW,
3851 >::from_register(self, 0)
3852 }
3853
3854 #[doc = "Analog Input Enable"]
3855 #[inline(always)]
3856 pub fn asel(
3857 self,
3858 ) -> crate::common::RegisterField<
3859 15,
3860 0x1,
3861 1,
3862 0,
3863 p1pfs_ha::Asel,
3864 p1pfs_ha::Asel,
3865 P1PfsHa_SPEC,
3866 crate::common::RW,
3867 > {
3868 crate::common::RegisterField::<
3869 15,
3870 0x1,
3871 1,
3872 0,
3873 p1pfs_ha::Asel,
3874 p1pfs_ha::Asel,
3875 P1PfsHa_SPEC,
3876 crate::common::RW,
3877 >::from_register(self, 0)
3878 }
3879}
3880impl ::core::default::Default for P1PfsHa {
3881 #[inline(always)]
3882 fn default() -> P1PfsHa {
3883 <crate::RegValueT<P1PfsHa_SPEC> as RegisterValue<_>>::new(0)
3884 }
3885}
3886pub mod p1pfs_ha {
3887
3888 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3889 pub struct Podr_SPEC;
3890 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
3891 impl Podr {
3892 #[doc = "Output low"]
3893 pub const _0: Self = Self::new(0);
3894
3895 #[doc = "Output high"]
3896 pub const _1: Self = Self::new(1);
3897 }
3898 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3899 pub struct Pidr_SPEC;
3900 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
3901 impl Pidr {
3902 #[doc = "Low level"]
3903 pub const _0: Self = Self::new(0);
3904
3905 #[doc = "High level"]
3906 pub const _1: Self = Self::new(1);
3907 }
3908 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3909 pub struct Pdr_SPEC;
3910 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
3911 impl Pdr {
3912 #[doc = "Input (functions as an input pin)"]
3913 pub const _0: Self = Self::new(0);
3914
3915 #[doc = "Output (functions as an output pin)"]
3916 pub const _1: Self = Self::new(1);
3917 }
3918 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3919 pub struct Pcr_SPEC;
3920 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
3921 impl Pcr {
3922 #[doc = "Disable input pull-up"]
3923 pub const _0: Self = Self::new(0);
3924
3925 #[doc = "Enable input pull-up"]
3926 pub const _1: Self = Self::new(1);
3927 }
3928 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3929 pub struct Ncodr_SPEC;
3930 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
3931 impl Ncodr {
3932 #[doc = "Output CMOS"]
3933 pub const _0: Self = Self::new(0);
3934
3935 #[doc = "Output NMOS open-drain"]
3936 pub const _1: Self = Self::new(1);
3937 }
3938 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3939 pub struct Eofr_SPEC;
3940 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
3941 impl Eofr {
3942 #[doc = "Don\'t care"]
3943 pub const _00: Self = Self::new(0);
3944
3945 #[doc = "Detect rising edge"]
3946 pub const _01: Self = Self::new(1);
3947
3948 #[doc = "Detect falling edge"]
3949 pub const _10: Self = Self::new(2);
3950
3951 #[doc = "Detect both edges"]
3952 pub const _11: Self = Self::new(3);
3953 }
3954 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3955 pub struct Isel_SPEC;
3956 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
3957 impl Isel {
3958 #[doc = "Do not use as IRQn input pin"]
3959 pub const _0: Self = Self::new(0);
3960
3961 #[doc = "Use as IRQn input pin"]
3962 pub const _1: Self = Self::new(1);
3963 }
3964 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3965 pub struct Asel_SPEC;
3966 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
3967 impl Asel {
3968 #[doc = "Do not use as analog pin"]
3969 pub const _0: Self = Self::new(0);
3970
3971 #[doc = "Use as analog pin"]
3972 pub const _1: Self = Self::new(1);
3973 }
3974}
3975#[doc(hidden)]
3976#[derive(Copy, Clone, Eq, PartialEq)]
3977pub struct P1PfsBy_SPEC;
3978impl crate::sealed::RegSpec for P1PfsBy_SPEC {
3979 type DataType = u8;
3980}
3981
3982#[doc = "Port 1%s Pin Function Select Register"]
3983pub type P1PfsBy = crate::RegValueT<P1PfsBy_SPEC>;
3984
3985impl P1PfsBy {
3986 #[doc = "Port Output Data"]
3987 #[inline(always)]
3988 pub fn podr(
3989 self,
3990 ) -> crate::common::RegisterField<
3991 0,
3992 0x1,
3993 1,
3994 0,
3995 p1pfs_by::Podr,
3996 p1pfs_by::Podr,
3997 P1PfsBy_SPEC,
3998 crate::common::RW,
3999 > {
4000 crate::common::RegisterField::<
4001 0,
4002 0x1,
4003 1,
4004 0,
4005 p1pfs_by::Podr,
4006 p1pfs_by::Podr,
4007 P1PfsBy_SPEC,
4008 crate::common::RW,
4009 >::from_register(self, 0)
4010 }
4011
4012 #[doc = "Port State"]
4013 #[inline(always)]
4014 pub fn pidr(
4015 self,
4016 ) -> crate::common::RegisterField<
4017 1,
4018 0x1,
4019 1,
4020 0,
4021 p1pfs_by::Pidr,
4022 p1pfs_by::Pidr,
4023 P1PfsBy_SPEC,
4024 crate::common::R,
4025 > {
4026 crate::common::RegisterField::<
4027 1,
4028 0x1,
4029 1,
4030 0,
4031 p1pfs_by::Pidr,
4032 p1pfs_by::Pidr,
4033 P1PfsBy_SPEC,
4034 crate::common::R,
4035 >::from_register(self, 0)
4036 }
4037
4038 #[doc = "Port Direction"]
4039 #[inline(always)]
4040 pub fn pdr(
4041 self,
4042 ) -> crate::common::RegisterField<
4043 2,
4044 0x1,
4045 1,
4046 0,
4047 p1pfs_by::Pdr,
4048 p1pfs_by::Pdr,
4049 P1PfsBy_SPEC,
4050 crate::common::RW,
4051 > {
4052 crate::common::RegisterField::<
4053 2,
4054 0x1,
4055 1,
4056 0,
4057 p1pfs_by::Pdr,
4058 p1pfs_by::Pdr,
4059 P1PfsBy_SPEC,
4060 crate::common::RW,
4061 >::from_register(self, 0)
4062 }
4063
4064 #[doc = "Pull-up Control"]
4065 #[inline(always)]
4066 pub fn pcr(
4067 self,
4068 ) -> crate::common::RegisterField<
4069 4,
4070 0x1,
4071 1,
4072 0,
4073 p1pfs_by::Pcr,
4074 p1pfs_by::Pcr,
4075 P1PfsBy_SPEC,
4076 crate::common::RW,
4077 > {
4078 crate::common::RegisterField::<
4079 4,
4080 0x1,
4081 1,
4082 0,
4083 p1pfs_by::Pcr,
4084 p1pfs_by::Pcr,
4085 P1PfsBy_SPEC,
4086 crate::common::RW,
4087 >::from_register(self, 0)
4088 }
4089
4090 #[doc = "N-Channel Open-Drain Control"]
4091 #[inline(always)]
4092 pub fn ncodr(
4093 self,
4094 ) -> crate::common::RegisterField<
4095 6,
4096 0x1,
4097 1,
4098 0,
4099 p1pfs_by::Ncodr,
4100 p1pfs_by::Ncodr,
4101 P1PfsBy_SPEC,
4102 crate::common::RW,
4103 > {
4104 crate::common::RegisterField::<
4105 6,
4106 0x1,
4107 1,
4108 0,
4109 p1pfs_by::Ncodr,
4110 p1pfs_by::Ncodr,
4111 P1PfsBy_SPEC,
4112 crate::common::RW,
4113 >::from_register(self, 0)
4114 }
4115}
4116impl ::core::default::Default for P1PfsBy {
4117 #[inline(always)]
4118 fn default() -> P1PfsBy {
4119 <crate::RegValueT<P1PfsBy_SPEC> as RegisterValue<_>>::new(0)
4120 }
4121}
4122pub mod p1pfs_by {
4123
4124 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4125 pub struct Podr_SPEC;
4126 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
4127 impl Podr {
4128 #[doc = "Output low"]
4129 pub const _0: Self = Self::new(0);
4130
4131 #[doc = "Output high"]
4132 pub const _1: Self = Self::new(1);
4133 }
4134 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4135 pub struct Pidr_SPEC;
4136 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
4137 impl Pidr {
4138 #[doc = "Low level"]
4139 pub const _0: Self = Self::new(0);
4140
4141 #[doc = "High level"]
4142 pub const _1: Self = Self::new(1);
4143 }
4144 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4145 pub struct Pdr_SPEC;
4146 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
4147 impl Pdr {
4148 #[doc = "Input (functions as an input pin)"]
4149 pub const _0: Self = Self::new(0);
4150
4151 #[doc = "Output (functions as an output pin)"]
4152 pub const _1: Self = Self::new(1);
4153 }
4154 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4155 pub struct Pcr_SPEC;
4156 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
4157 impl Pcr {
4158 #[doc = "Disable input pull-up"]
4159 pub const _0: Self = Self::new(0);
4160
4161 #[doc = "Enable input pull-up"]
4162 pub const _1: Self = Self::new(1);
4163 }
4164 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4165 pub struct Ncodr_SPEC;
4166 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
4167 impl Ncodr {
4168 #[doc = "Output CMOS"]
4169 pub const _0: Self = Self::new(0);
4170
4171 #[doc = "Output NMOS open-drain"]
4172 pub const _1: Self = Self::new(1);
4173 }
4174}
4175#[doc(hidden)]
4176#[derive(Copy, Clone, Eq, PartialEq)]
4177pub struct P200Pfs_SPEC;
4178impl crate::sealed::RegSpec for P200Pfs_SPEC {
4179 type DataType = u32;
4180}
4181
4182#[doc = "Port 1n200 Pin Function Select Register"]
4183pub type P200Pfs = crate::RegValueT<P200Pfs_SPEC>;
4184
4185impl P200Pfs {
4186 #[doc = "Port Output Data"]
4187 #[inline(always)]
4188 pub fn podr(
4189 self,
4190 ) -> crate::common::RegisterField<
4191 0,
4192 0x1,
4193 1,
4194 0,
4195 p200pfs::Podr,
4196 p200pfs::Podr,
4197 P200Pfs_SPEC,
4198 crate::common::RW,
4199 > {
4200 crate::common::RegisterField::<
4201 0,
4202 0x1,
4203 1,
4204 0,
4205 p200pfs::Podr,
4206 p200pfs::Podr,
4207 P200Pfs_SPEC,
4208 crate::common::RW,
4209 >::from_register(self, 0)
4210 }
4211
4212 #[doc = "Port State"]
4213 #[inline(always)]
4214 pub fn pidr(
4215 self,
4216 ) -> crate::common::RegisterField<
4217 1,
4218 0x1,
4219 1,
4220 0,
4221 p200pfs::Pidr,
4222 p200pfs::Pidr,
4223 P200Pfs_SPEC,
4224 crate::common::R,
4225 > {
4226 crate::common::RegisterField::<
4227 1,
4228 0x1,
4229 1,
4230 0,
4231 p200pfs::Pidr,
4232 p200pfs::Pidr,
4233 P200Pfs_SPEC,
4234 crate::common::R,
4235 >::from_register(self, 0)
4236 }
4237
4238 #[doc = "Port Direction"]
4239 #[inline(always)]
4240 pub fn pdr(
4241 self,
4242 ) -> crate::common::RegisterField<
4243 2,
4244 0x1,
4245 1,
4246 0,
4247 p200pfs::Pdr,
4248 p200pfs::Pdr,
4249 P200Pfs_SPEC,
4250 crate::common::RW,
4251 > {
4252 crate::common::RegisterField::<
4253 2,
4254 0x1,
4255 1,
4256 0,
4257 p200pfs::Pdr,
4258 p200pfs::Pdr,
4259 P200Pfs_SPEC,
4260 crate::common::RW,
4261 >::from_register(self, 0)
4262 }
4263
4264 #[doc = "Pull-up Control"]
4265 #[inline(always)]
4266 pub fn pcr(
4267 self,
4268 ) -> crate::common::RegisterField<
4269 4,
4270 0x1,
4271 1,
4272 0,
4273 p200pfs::Pcr,
4274 p200pfs::Pcr,
4275 P200Pfs_SPEC,
4276 crate::common::RW,
4277 > {
4278 crate::common::RegisterField::<
4279 4,
4280 0x1,
4281 1,
4282 0,
4283 p200pfs::Pcr,
4284 p200pfs::Pcr,
4285 P200Pfs_SPEC,
4286 crate::common::RW,
4287 >::from_register(self, 0)
4288 }
4289
4290 #[doc = "N-Channel Open-Drain Control"]
4291 #[inline(always)]
4292 pub fn ncodr(
4293 self,
4294 ) -> crate::common::RegisterField<
4295 6,
4296 0x1,
4297 1,
4298 0,
4299 p200pfs::Ncodr,
4300 p200pfs::Ncodr,
4301 P200Pfs_SPEC,
4302 crate::common::RW,
4303 > {
4304 crate::common::RegisterField::<
4305 6,
4306 0x1,
4307 1,
4308 0,
4309 p200pfs::Ncodr,
4310 p200pfs::Ncodr,
4311 P200Pfs_SPEC,
4312 crate::common::RW,
4313 >::from_register(self, 0)
4314 }
4315
4316 #[doc = "Event on Falling/Event on Rising"]
4317 #[inline(always)]
4318 pub fn eofr(
4319 self,
4320 ) -> crate::common::RegisterField<
4321 12,
4322 0x3,
4323 1,
4324 0,
4325 p200pfs::Eofr,
4326 p200pfs::Eofr,
4327 P200Pfs_SPEC,
4328 crate::common::RW,
4329 > {
4330 crate::common::RegisterField::<
4331 12,
4332 0x3,
4333 1,
4334 0,
4335 p200pfs::Eofr,
4336 p200pfs::Eofr,
4337 P200Pfs_SPEC,
4338 crate::common::RW,
4339 >::from_register(self, 0)
4340 }
4341
4342 #[doc = "IRQ Input Enable"]
4343 #[inline(always)]
4344 pub fn isel(
4345 self,
4346 ) -> crate::common::RegisterField<
4347 14,
4348 0x1,
4349 1,
4350 0,
4351 p200pfs::Isel,
4352 p200pfs::Isel,
4353 P200Pfs_SPEC,
4354 crate::common::RW,
4355 > {
4356 crate::common::RegisterField::<
4357 14,
4358 0x1,
4359 1,
4360 0,
4361 p200pfs::Isel,
4362 p200pfs::Isel,
4363 P200Pfs_SPEC,
4364 crate::common::RW,
4365 >::from_register(self, 0)
4366 }
4367
4368 #[doc = "Analog Input Enable"]
4369 #[inline(always)]
4370 pub fn asel(
4371 self,
4372 ) -> crate::common::RegisterField<
4373 15,
4374 0x1,
4375 1,
4376 0,
4377 p200pfs::Asel,
4378 p200pfs::Asel,
4379 P200Pfs_SPEC,
4380 crate::common::RW,
4381 > {
4382 crate::common::RegisterField::<
4383 15,
4384 0x1,
4385 1,
4386 0,
4387 p200pfs::Asel,
4388 p200pfs::Asel,
4389 P200Pfs_SPEC,
4390 crate::common::RW,
4391 >::from_register(self, 0)
4392 }
4393
4394 #[doc = "Port Mode Control"]
4395 #[inline(always)]
4396 pub fn pmr(
4397 self,
4398 ) -> crate::common::RegisterField<
4399 16,
4400 0x1,
4401 1,
4402 0,
4403 p200pfs::Pmr,
4404 p200pfs::Pmr,
4405 P200Pfs_SPEC,
4406 crate::common::RW,
4407 > {
4408 crate::common::RegisterField::<
4409 16,
4410 0x1,
4411 1,
4412 0,
4413 p200pfs::Pmr,
4414 p200pfs::Pmr,
4415 P200Pfs_SPEC,
4416 crate::common::RW,
4417 >::from_register(self, 0)
4418 }
4419
4420 #[doc = "Peripheral Select"]
4421 #[inline(always)]
4422 pub fn psel(
4423 self,
4424 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P200Pfs_SPEC, crate::common::RW> {
4425 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P200Pfs_SPEC,crate::common::RW>::from_register(self,0)
4426 }
4427}
4428impl ::core::default::Default for P200Pfs {
4429 #[inline(always)]
4430 fn default() -> P200Pfs {
4431 <crate::RegValueT<P200Pfs_SPEC> as RegisterValue<_>>::new(0)
4432 }
4433}
4434pub mod p200pfs {
4435
4436 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4437 pub struct Podr_SPEC;
4438 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
4439 impl Podr {
4440 #[doc = "Output low"]
4441 pub const _0: Self = Self::new(0);
4442
4443 #[doc = "Output high"]
4444 pub const _1: Self = Self::new(1);
4445 }
4446 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4447 pub struct Pidr_SPEC;
4448 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
4449 impl Pidr {
4450 #[doc = "Low level"]
4451 pub const _0: Self = Self::new(0);
4452
4453 #[doc = "High level"]
4454 pub const _1: Self = Self::new(1);
4455 }
4456 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4457 pub struct Pdr_SPEC;
4458 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
4459 impl Pdr {
4460 #[doc = "Input (functions as an input pin)"]
4461 pub const _0: Self = Self::new(0);
4462
4463 #[doc = "Output (functions as an output pin)"]
4464 pub const _1: Self = Self::new(1);
4465 }
4466 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4467 pub struct Pcr_SPEC;
4468 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
4469 impl Pcr {
4470 #[doc = "Disable input pull-up"]
4471 pub const _0: Self = Self::new(0);
4472
4473 #[doc = "Enable input pull-up"]
4474 pub const _1: Self = Self::new(1);
4475 }
4476 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4477 pub struct Ncodr_SPEC;
4478 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
4479 impl Ncodr {
4480 #[doc = "Output CMOS"]
4481 pub const _0: Self = Self::new(0);
4482
4483 #[doc = "Output NMOS open-drain"]
4484 pub const _1: Self = Self::new(1);
4485 }
4486 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4487 pub struct Eofr_SPEC;
4488 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
4489 impl Eofr {
4490 #[doc = "Don\'t care"]
4491 pub const _00: Self = Self::new(0);
4492
4493 #[doc = "Detect rising edge"]
4494 pub const _01: Self = Self::new(1);
4495
4496 #[doc = "Detect falling edge"]
4497 pub const _10: Self = Self::new(2);
4498
4499 #[doc = "Detect both edges"]
4500 pub const _11: Self = Self::new(3);
4501 }
4502 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4503 pub struct Isel_SPEC;
4504 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
4505 impl Isel {
4506 #[doc = "Do not use as IRQn input pin"]
4507 pub const _0: Self = Self::new(0);
4508
4509 #[doc = "Use as IRQn input pin"]
4510 pub const _1: Self = Self::new(1);
4511 }
4512 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4513 pub struct Asel_SPEC;
4514 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
4515 impl Asel {
4516 #[doc = "Do not use as analog pin"]
4517 pub const _0: Self = Self::new(0);
4518
4519 #[doc = "Use as analog pin"]
4520 pub const _1: Self = Self::new(1);
4521 }
4522 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4523 pub struct Pmr_SPEC;
4524 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
4525 impl Pmr {
4526 #[doc = "Use as general I/O pin"]
4527 pub const _0: Self = Self::new(0);
4528
4529 #[doc = "Use as I/O port for peripheral functions"]
4530 pub const _1: Self = Self::new(1);
4531 }
4532}
4533#[doc(hidden)]
4534#[derive(Copy, Clone, Eq, PartialEq)]
4535pub struct P200PfsHa_SPEC;
4536impl crate::sealed::RegSpec for P200PfsHa_SPEC {
4537 type DataType = u16;
4538}
4539
4540#[doc = "Port 1n200 Pin Function Select Register"]
4541pub type P200PfsHa = crate::RegValueT<P200PfsHa_SPEC>;
4542
4543impl P200PfsHa {
4544 #[doc = "Port Output Data"]
4545 #[inline(always)]
4546 pub fn podr(
4547 self,
4548 ) -> crate::common::RegisterField<
4549 0,
4550 0x1,
4551 1,
4552 0,
4553 p200pfs_ha::Podr,
4554 p200pfs_ha::Podr,
4555 P200PfsHa_SPEC,
4556 crate::common::RW,
4557 > {
4558 crate::common::RegisterField::<
4559 0,
4560 0x1,
4561 1,
4562 0,
4563 p200pfs_ha::Podr,
4564 p200pfs_ha::Podr,
4565 P200PfsHa_SPEC,
4566 crate::common::RW,
4567 >::from_register(self, 0)
4568 }
4569
4570 #[doc = "Port State"]
4571 #[inline(always)]
4572 pub fn pidr(
4573 self,
4574 ) -> crate::common::RegisterField<
4575 1,
4576 0x1,
4577 1,
4578 0,
4579 p200pfs_ha::Pidr,
4580 p200pfs_ha::Pidr,
4581 P200PfsHa_SPEC,
4582 crate::common::R,
4583 > {
4584 crate::common::RegisterField::<
4585 1,
4586 0x1,
4587 1,
4588 0,
4589 p200pfs_ha::Pidr,
4590 p200pfs_ha::Pidr,
4591 P200PfsHa_SPEC,
4592 crate::common::R,
4593 >::from_register(self, 0)
4594 }
4595
4596 #[doc = "Port Direction"]
4597 #[inline(always)]
4598 pub fn pdr(
4599 self,
4600 ) -> crate::common::RegisterField<
4601 2,
4602 0x1,
4603 1,
4604 0,
4605 p200pfs_ha::Pdr,
4606 p200pfs_ha::Pdr,
4607 P200PfsHa_SPEC,
4608 crate::common::RW,
4609 > {
4610 crate::common::RegisterField::<
4611 2,
4612 0x1,
4613 1,
4614 0,
4615 p200pfs_ha::Pdr,
4616 p200pfs_ha::Pdr,
4617 P200PfsHa_SPEC,
4618 crate::common::RW,
4619 >::from_register(self, 0)
4620 }
4621
4622 #[doc = "Pull-up Control"]
4623 #[inline(always)]
4624 pub fn pcr(
4625 self,
4626 ) -> crate::common::RegisterField<
4627 4,
4628 0x1,
4629 1,
4630 0,
4631 p200pfs_ha::Pcr,
4632 p200pfs_ha::Pcr,
4633 P200PfsHa_SPEC,
4634 crate::common::RW,
4635 > {
4636 crate::common::RegisterField::<
4637 4,
4638 0x1,
4639 1,
4640 0,
4641 p200pfs_ha::Pcr,
4642 p200pfs_ha::Pcr,
4643 P200PfsHa_SPEC,
4644 crate::common::RW,
4645 >::from_register(self, 0)
4646 }
4647
4648 #[doc = "N-Channel Open-Drain Control"]
4649 #[inline(always)]
4650 pub fn ncodr(
4651 self,
4652 ) -> crate::common::RegisterField<
4653 6,
4654 0x1,
4655 1,
4656 0,
4657 p200pfs_ha::Ncodr,
4658 p200pfs_ha::Ncodr,
4659 P200PfsHa_SPEC,
4660 crate::common::RW,
4661 > {
4662 crate::common::RegisterField::<
4663 6,
4664 0x1,
4665 1,
4666 0,
4667 p200pfs_ha::Ncodr,
4668 p200pfs_ha::Ncodr,
4669 P200PfsHa_SPEC,
4670 crate::common::RW,
4671 >::from_register(self, 0)
4672 }
4673
4674 #[doc = "Event on Falling/Event on Rising"]
4675 #[inline(always)]
4676 pub fn eofr(
4677 self,
4678 ) -> crate::common::RegisterField<
4679 12,
4680 0x3,
4681 1,
4682 0,
4683 p200pfs_ha::Eofr,
4684 p200pfs_ha::Eofr,
4685 P200PfsHa_SPEC,
4686 crate::common::RW,
4687 > {
4688 crate::common::RegisterField::<
4689 12,
4690 0x3,
4691 1,
4692 0,
4693 p200pfs_ha::Eofr,
4694 p200pfs_ha::Eofr,
4695 P200PfsHa_SPEC,
4696 crate::common::RW,
4697 >::from_register(self, 0)
4698 }
4699
4700 #[doc = "IRQ Input Enable"]
4701 #[inline(always)]
4702 pub fn isel(
4703 self,
4704 ) -> crate::common::RegisterField<
4705 14,
4706 0x1,
4707 1,
4708 0,
4709 p200pfs_ha::Isel,
4710 p200pfs_ha::Isel,
4711 P200PfsHa_SPEC,
4712 crate::common::RW,
4713 > {
4714 crate::common::RegisterField::<
4715 14,
4716 0x1,
4717 1,
4718 0,
4719 p200pfs_ha::Isel,
4720 p200pfs_ha::Isel,
4721 P200PfsHa_SPEC,
4722 crate::common::RW,
4723 >::from_register(self, 0)
4724 }
4725
4726 #[doc = "Analog Input Enable"]
4727 #[inline(always)]
4728 pub fn asel(
4729 self,
4730 ) -> crate::common::RegisterField<
4731 15,
4732 0x1,
4733 1,
4734 0,
4735 p200pfs_ha::Asel,
4736 p200pfs_ha::Asel,
4737 P200PfsHa_SPEC,
4738 crate::common::RW,
4739 > {
4740 crate::common::RegisterField::<
4741 15,
4742 0x1,
4743 1,
4744 0,
4745 p200pfs_ha::Asel,
4746 p200pfs_ha::Asel,
4747 P200PfsHa_SPEC,
4748 crate::common::RW,
4749 >::from_register(self, 0)
4750 }
4751}
4752impl ::core::default::Default for P200PfsHa {
4753 #[inline(always)]
4754 fn default() -> P200PfsHa {
4755 <crate::RegValueT<P200PfsHa_SPEC> as RegisterValue<_>>::new(0)
4756 }
4757}
4758pub mod p200pfs_ha {
4759
4760 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4761 pub struct Podr_SPEC;
4762 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
4763 impl Podr {
4764 #[doc = "Output low"]
4765 pub const _0: Self = Self::new(0);
4766
4767 #[doc = "Output high"]
4768 pub const _1: Self = Self::new(1);
4769 }
4770 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4771 pub struct Pidr_SPEC;
4772 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
4773 impl Pidr {
4774 #[doc = "Low level"]
4775 pub const _0: Self = Self::new(0);
4776
4777 #[doc = "High level"]
4778 pub const _1: Self = Self::new(1);
4779 }
4780 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4781 pub struct Pdr_SPEC;
4782 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
4783 impl Pdr {
4784 #[doc = "Input (functions as an input pin)"]
4785 pub const _0: Self = Self::new(0);
4786
4787 #[doc = "Output (functions as an output pin)"]
4788 pub const _1: Self = Self::new(1);
4789 }
4790 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4791 pub struct Pcr_SPEC;
4792 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
4793 impl Pcr {
4794 #[doc = "Disable input pull-up"]
4795 pub const _0: Self = Self::new(0);
4796
4797 #[doc = "Enable input pull-up"]
4798 pub const _1: Self = Self::new(1);
4799 }
4800 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4801 pub struct Ncodr_SPEC;
4802 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
4803 impl Ncodr {
4804 #[doc = "Output CMOS"]
4805 pub const _0: Self = Self::new(0);
4806
4807 #[doc = "Output NMOS open-drain"]
4808 pub const _1: Self = Self::new(1);
4809 }
4810 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4811 pub struct Eofr_SPEC;
4812 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
4813 impl Eofr {
4814 #[doc = "Don\'t care"]
4815 pub const _00: Self = Self::new(0);
4816
4817 #[doc = "Detect rising edge"]
4818 pub const _01: Self = Self::new(1);
4819
4820 #[doc = "Detect falling edge"]
4821 pub const _10: Self = Self::new(2);
4822
4823 #[doc = "Detect both edges"]
4824 pub const _11: Self = Self::new(3);
4825 }
4826 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4827 pub struct Isel_SPEC;
4828 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
4829 impl Isel {
4830 #[doc = "Do not use as IRQn input pin"]
4831 pub const _0: Self = Self::new(0);
4832
4833 #[doc = "Use as IRQn input pin"]
4834 pub const _1: Self = Self::new(1);
4835 }
4836 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4837 pub struct Asel_SPEC;
4838 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
4839 impl Asel {
4840 #[doc = "Do not use as analog pin"]
4841 pub const _0: Self = Self::new(0);
4842
4843 #[doc = "Use as analog pin"]
4844 pub const _1: Self = Self::new(1);
4845 }
4846}
4847#[doc(hidden)]
4848#[derive(Copy, Clone, Eq, PartialEq)]
4849pub struct P200PfsBy_SPEC;
4850impl crate::sealed::RegSpec for P200PfsBy_SPEC {
4851 type DataType = u8;
4852}
4853
4854#[doc = "Port 1n200 Pin Function Select Register"]
4855pub type P200PfsBy = crate::RegValueT<P200PfsBy_SPEC>;
4856
4857impl P200PfsBy {
4858 #[doc = "Port Output Data"]
4859 #[inline(always)]
4860 pub fn podr(
4861 self,
4862 ) -> crate::common::RegisterField<
4863 0,
4864 0x1,
4865 1,
4866 0,
4867 p200pfs_by::Podr,
4868 p200pfs_by::Podr,
4869 P200PfsBy_SPEC,
4870 crate::common::RW,
4871 > {
4872 crate::common::RegisterField::<
4873 0,
4874 0x1,
4875 1,
4876 0,
4877 p200pfs_by::Podr,
4878 p200pfs_by::Podr,
4879 P200PfsBy_SPEC,
4880 crate::common::RW,
4881 >::from_register(self, 0)
4882 }
4883
4884 #[doc = "Port State"]
4885 #[inline(always)]
4886 pub fn pidr(
4887 self,
4888 ) -> crate::common::RegisterField<
4889 1,
4890 0x1,
4891 1,
4892 0,
4893 p200pfs_by::Pidr,
4894 p200pfs_by::Pidr,
4895 P200PfsBy_SPEC,
4896 crate::common::R,
4897 > {
4898 crate::common::RegisterField::<
4899 1,
4900 0x1,
4901 1,
4902 0,
4903 p200pfs_by::Pidr,
4904 p200pfs_by::Pidr,
4905 P200PfsBy_SPEC,
4906 crate::common::R,
4907 >::from_register(self, 0)
4908 }
4909
4910 #[doc = "Port Direction"]
4911 #[inline(always)]
4912 pub fn pdr(
4913 self,
4914 ) -> crate::common::RegisterField<
4915 2,
4916 0x1,
4917 1,
4918 0,
4919 p200pfs_by::Pdr,
4920 p200pfs_by::Pdr,
4921 P200PfsBy_SPEC,
4922 crate::common::RW,
4923 > {
4924 crate::common::RegisterField::<
4925 2,
4926 0x1,
4927 1,
4928 0,
4929 p200pfs_by::Pdr,
4930 p200pfs_by::Pdr,
4931 P200PfsBy_SPEC,
4932 crate::common::RW,
4933 >::from_register(self, 0)
4934 }
4935
4936 #[doc = "Pull-up Control"]
4937 #[inline(always)]
4938 pub fn pcr(
4939 self,
4940 ) -> crate::common::RegisterField<
4941 4,
4942 0x1,
4943 1,
4944 0,
4945 p200pfs_by::Pcr,
4946 p200pfs_by::Pcr,
4947 P200PfsBy_SPEC,
4948 crate::common::RW,
4949 > {
4950 crate::common::RegisterField::<
4951 4,
4952 0x1,
4953 1,
4954 0,
4955 p200pfs_by::Pcr,
4956 p200pfs_by::Pcr,
4957 P200PfsBy_SPEC,
4958 crate::common::RW,
4959 >::from_register(self, 0)
4960 }
4961
4962 #[doc = "N-Channel Open-Drain Control"]
4963 #[inline(always)]
4964 pub fn ncodr(
4965 self,
4966 ) -> crate::common::RegisterField<
4967 6,
4968 0x1,
4969 1,
4970 0,
4971 p200pfs_by::Ncodr,
4972 p200pfs_by::Ncodr,
4973 P200PfsBy_SPEC,
4974 crate::common::RW,
4975 > {
4976 crate::common::RegisterField::<
4977 6,
4978 0x1,
4979 1,
4980 0,
4981 p200pfs_by::Ncodr,
4982 p200pfs_by::Ncodr,
4983 P200PfsBy_SPEC,
4984 crate::common::RW,
4985 >::from_register(self, 0)
4986 }
4987}
4988impl ::core::default::Default for P200PfsBy {
4989 #[inline(always)]
4990 fn default() -> P200PfsBy {
4991 <crate::RegValueT<P200PfsBy_SPEC> as RegisterValue<_>>::new(0)
4992 }
4993}
4994pub mod p200pfs_by {
4995
4996 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4997 pub struct Podr_SPEC;
4998 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
4999 impl Podr {
5000 #[doc = "Output low"]
5001 pub const _0: Self = Self::new(0);
5002
5003 #[doc = "Output high"]
5004 pub const _1: Self = Self::new(1);
5005 }
5006 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5007 pub struct Pidr_SPEC;
5008 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
5009 impl Pidr {
5010 #[doc = "Low level"]
5011 pub const _0: Self = Self::new(0);
5012
5013 #[doc = "High level"]
5014 pub const _1: Self = Self::new(1);
5015 }
5016 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5017 pub struct Pdr_SPEC;
5018 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
5019 impl Pdr {
5020 #[doc = "Input (functions as an input pin)"]
5021 pub const _0: Self = Self::new(0);
5022
5023 #[doc = "Output (functions as an output pin)"]
5024 pub const _1: Self = Self::new(1);
5025 }
5026 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5027 pub struct Pcr_SPEC;
5028 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
5029 impl Pcr {
5030 #[doc = "Disable input pull-up"]
5031 pub const _0: Self = Self::new(0);
5032
5033 #[doc = "Enable input pull-up"]
5034 pub const _1: Self = Self::new(1);
5035 }
5036 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5037 pub struct Ncodr_SPEC;
5038 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
5039 impl Ncodr {
5040 #[doc = "Output CMOS"]
5041 pub const _0: Self = Self::new(0);
5042
5043 #[doc = "Output NMOS open-drain"]
5044 pub const _1: Self = Self::new(1);
5045 }
5046}
5047#[doc(hidden)]
5048#[derive(Copy, Clone, Eq, PartialEq)]
5049pub struct P201Pfs_SPEC;
5050impl crate::sealed::RegSpec for P201Pfs_SPEC {
5051 type DataType = u32;
5052}
5053
5054#[doc = "Port 1n201 Pin Function Select Register"]
5055pub type P201Pfs = crate::RegValueT<P201Pfs_SPEC>;
5056
5057impl P201Pfs {
5058 #[doc = "Port Output Data"]
5059 #[inline(always)]
5060 pub fn podr(
5061 self,
5062 ) -> crate::common::RegisterField<
5063 0,
5064 0x1,
5065 1,
5066 0,
5067 p201pfs::Podr,
5068 p201pfs::Podr,
5069 P201Pfs_SPEC,
5070 crate::common::RW,
5071 > {
5072 crate::common::RegisterField::<
5073 0,
5074 0x1,
5075 1,
5076 0,
5077 p201pfs::Podr,
5078 p201pfs::Podr,
5079 P201Pfs_SPEC,
5080 crate::common::RW,
5081 >::from_register(self, 0)
5082 }
5083
5084 #[doc = "Port State"]
5085 #[inline(always)]
5086 pub fn pidr(
5087 self,
5088 ) -> crate::common::RegisterField<
5089 1,
5090 0x1,
5091 1,
5092 0,
5093 p201pfs::Pidr,
5094 p201pfs::Pidr,
5095 P201Pfs_SPEC,
5096 crate::common::R,
5097 > {
5098 crate::common::RegisterField::<
5099 1,
5100 0x1,
5101 1,
5102 0,
5103 p201pfs::Pidr,
5104 p201pfs::Pidr,
5105 P201Pfs_SPEC,
5106 crate::common::R,
5107 >::from_register(self, 0)
5108 }
5109
5110 #[doc = "Port Direction"]
5111 #[inline(always)]
5112 pub fn pdr(
5113 self,
5114 ) -> crate::common::RegisterField<
5115 2,
5116 0x1,
5117 1,
5118 0,
5119 p201pfs::Pdr,
5120 p201pfs::Pdr,
5121 P201Pfs_SPEC,
5122 crate::common::RW,
5123 > {
5124 crate::common::RegisterField::<
5125 2,
5126 0x1,
5127 1,
5128 0,
5129 p201pfs::Pdr,
5130 p201pfs::Pdr,
5131 P201Pfs_SPEC,
5132 crate::common::RW,
5133 >::from_register(self, 0)
5134 }
5135
5136 #[doc = "Pull-up Control"]
5137 #[inline(always)]
5138 pub fn pcr(
5139 self,
5140 ) -> crate::common::RegisterField<
5141 4,
5142 0x1,
5143 1,
5144 0,
5145 p201pfs::Pcr,
5146 p201pfs::Pcr,
5147 P201Pfs_SPEC,
5148 crate::common::RW,
5149 > {
5150 crate::common::RegisterField::<
5151 4,
5152 0x1,
5153 1,
5154 0,
5155 p201pfs::Pcr,
5156 p201pfs::Pcr,
5157 P201Pfs_SPEC,
5158 crate::common::RW,
5159 >::from_register(self, 0)
5160 }
5161
5162 #[doc = "N-Channel Open-Drain Control"]
5163 #[inline(always)]
5164 pub fn ncodr(
5165 self,
5166 ) -> crate::common::RegisterField<
5167 6,
5168 0x1,
5169 1,
5170 0,
5171 p201pfs::Ncodr,
5172 p201pfs::Ncodr,
5173 P201Pfs_SPEC,
5174 crate::common::RW,
5175 > {
5176 crate::common::RegisterField::<
5177 6,
5178 0x1,
5179 1,
5180 0,
5181 p201pfs::Ncodr,
5182 p201pfs::Ncodr,
5183 P201Pfs_SPEC,
5184 crate::common::RW,
5185 >::from_register(self, 0)
5186 }
5187
5188 #[doc = "Event on Falling/Event on Rising"]
5189 #[inline(always)]
5190 pub fn eofr(
5191 self,
5192 ) -> crate::common::RegisterField<
5193 12,
5194 0x3,
5195 1,
5196 0,
5197 p201pfs::Eofr,
5198 p201pfs::Eofr,
5199 P201Pfs_SPEC,
5200 crate::common::RW,
5201 > {
5202 crate::common::RegisterField::<
5203 12,
5204 0x3,
5205 1,
5206 0,
5207 p201pfs::Eofr,
5208 p201pfs::Eofr,
5209 P201Pfs_SPEC,
5210 crate::common::RW,
5211 >::from_register(self, 0)
5212 }
5213
5214 #[doc = "IRQ Input Enable"]
5215 #[inline(always)]
5216 pub fn isel(
5217 self,
5218 ) -> crate::common::RegisterField<
5219 14,
5220 0x1,
5221 1,
5222 0,
5223 p201pfs::Isel,
5224 p201pfs::Isel,
5225 P201Pfs_SPEC,
5226 crate::common::RW,
5227 > {
5228 crate::common::RegisterField::<
5229 14,
5230 0x1,
5231 1,
5232 0,
5233 p201pfs::Isel,
5234 p201pfs::Isel,
5235 P201Pfs_SPEC,
5236 crate::common::RW,
5237 >::from_register(self, 0)
5238 }
5239
5240 #[doc = "Analog Input Enable"]
5241 #[inline(always)]
5242 pub fn asel(
5243 self,
5244 ) -> crate::common::RegisterField<
5245 15,
5246 0x1,
5247 1,
5248 0,
5249 p201pfs::Asel,
5250 p201pfs::Asel,
5251 P201Pfs_SPEC,
5252 crate::common::RW,
5253 > {
5254 crate::common::RegisterField::<
5255 15,
5256 0x1,
5257 1,
5258 0,
5259 p201pfs::Asel,
5260 p201pfs::Asel,
5261 P201Pfs_SPEC,
5262 crate::common::RW,
5263 >::from_register(self, 0)
5264 }
5265
5266 #[doc = "Port Mode Control"]
5267 #[inline(always)]
5268 pub fn pmr(
5269 self,
5270 ) -> crate::common::RegisterField<
5271 16,
5272 0x1,
5273 1,
5274 0,
5275 p201pfs::Pmr,
5276 p201pfs::Pmr,
5277 P201Pfs_SPEC,
5278 crate::common::RW,
5279 > {
5280 crate::common::RegisterField::<
5281 16,
5282 0x1,
5283 1,
5284 0,
5285 p201pfs::Pmr,
5286 p201pfs::Pmr,
5287 P201Pfs_SPEC,
5288 crate::common::RW,
5289 >::from_register(self, 0)
5290 }
5291
5292 #[doc = "Peripheral Select"]
5293 #[inline(always)]
5294 pub fn psel(
5295 self,
5296 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P201Pfs_SPEC, crate::common::RW> {
5297 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P201Pfs_SPEC,crate::common::RW>::from_register(self,0)
5298 }
5299}
5300impl ::core::default::Default for P201Pfs {
5301 #[inline(always)]
5302 fn default() -> P201Pfs {
5303 <crate::RegValueT<P201Pfs_SPEC> as RegisterValue<_>>::new(16)
5304 }
5305}
5306pub mod p201pfs {
5307
5308 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5309 pub struct Podr_SPEC;
5310 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
5311 impl Podr {
5312 #[doc = "Output low"]
5313 pub const _0: Self = Self::new(0);
5314
5315 #[doc = "Output high"]
5316 pub const _1: Self = Self::new(1);
5317 }
5318 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5319 pub struct Pidr_SPEC;
5320 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
5321 impl Pidr {
5322 #[doc = "Low level"]
5323 pub const _0: Self = Self::new(0);
5324
5325 #[doc = "High level"]
5326 pub const _1: Self = Self::new(1);
5327 }
5328 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5329 pub struct Pdr_SPEC;
5330 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
5331 impl Pdr {
5332 #[doc = "Input (functions as an input pin)"]
5333 pub const _0: Self = Self::new(0);
5334
5335 #[doc = "Output (functions as an output pin)"]
5336 pub const _1: Self = Self::new(1);
5337 }
5338 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5339 pub struct Pcr_SPEC;
5340 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
5341 impl Pcr {
5342 #[doc = "Disable input pull-up"]
5343 pub const _0: Self = Self::new(0);
5344
5345 #[doc = "Enable input pull-up"]
5346 pub const _1: Self = Self::new(1);
5347 }
5348 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5349 pub struct Ncodr_SPEC;
5350 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
5351 impl Ncodr {
5352 #[doc = "Output CMOS"]
5353 pub const _0: Self = Self::new(0);
5354
5355 #[doc = "Output NMOS open-drain"]
5356 pub const _1: Self = Self::new(1);
5357 }
5358 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5359 pub struct Eofr_SPEC;
5360 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
5361 impl Eofr {
5362 #[doc = "Don\'t care"]
5363 pub const _00: Self = Self::new(0);
5364
5365 #[doc = "Detect rising edge"]
5366 pub const _01: Self = Self::new(1);
5367
5368 #[doc = "Detect falling edge"]
5369 pub const _10: Self = Self::new(2);
5370
5371 #[doc = "Detect both edges"]
5372 pub const _11: Self = Self::new(3);
5373 }
5374 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5375 pub struct Isel_SPEC;
5376 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
5377 impl Isel {
5378 #[doc = "Do not use as IRQn input pin"]
5379 pub const _0: Self = Self::new(0);
5380
5381 #[doc = "Use as IRQn input pin"]
5382 pub const _1: Self = Self::new(1);
5383 }
5384 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5385 pub struct Asel_SPEC;
5386 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
5387 impl Asel {
5388 #[doc = "Do not use as analog pin"]
5389 pub const _0: Self = Self::new(0);
5390
5391 #[doc = "Use as analog pin"]
5392 pub const _1: Self = Self::new(1);
5393 }
5394 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5395 pub struct Pmr_SPEC;
5396 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
5397 impl Pmr {
5398 #[doc = "Use as general I/O pin"]
5399 pub const _0: Self = Self::new(0);
5400
5401 #[doc = "Use as I/O port for peripheral functions"]
5402 pub const _1: Self = Self::new(1);
5403 }
5404}
5405#[doc(hidden)]
5406#[derive(Copy, Clone, Eq, PartialEq)]
5407pub struct P201PfsHa_SPEC;
5408impl crate::sealed::RegSpec for P201PfsHa_SPEC {
5409 type DataType = u16;
5410}
5411
5412#[doc = "Port 1n201 Pin Function Select Register"]
5413pub type P201PfsHa = crate::RegValueT<P201PfsHa_SPEC>;
5414
5415impl P201PfsHa {
5416 #[doc = "Port Output Data"]
5417 #[inline(always)]
5418 pub fn podr(
5419 self,
5420 ) -> crate::common::RegisterField<
5421 0,
5422 0x1,
5423 1,
5424 0,
5425 p201pfs_ha::Podr,
5426 p201pfs_ha::Podr,
5427 P201PfsHa_SPEC,
5428 crate::common::RW,
5429 > {
5430 crate::common::RegisterField::<
5431 0,
5432 0x1,
5433 1,
5434 0,
5435 p201pfs_ha::Podr,
5436 p201pfs_ha::Podr,
5437 P201PfsHa_SPEC,
5438 crate::common::RW,
5439 >::from_register(self, 0)
5440 }
5441
5442 #[doc = "Port State"]
5443 #[inline(always)]
5444 pub fn pidr(
5445 self,
5446 ) -> crate::common::RegisterField<
5447 1,
5448 0x1,
5449 1,
5450 0,
5451 p201pfs_ha::Pidr,
5452 p201pfs_ha::Pidr,
5453 P201PfsHa_SPEC,
5454 crate::common::R,
5455 > {
5456 crate::common::RegisterField::<
5457 1,
5458 0x1,
5459 1,
5460 0,
5461 p201pfs_ha::Pidr,
5462 p201pfs_ha::Pidr,
5463 P201PfsHa_SPEC,
5464 crate::common::R,
5465 >::from_register(self, 0)
5466 }
5467
5468 #[doc = "Port Direction"]
5469 #[inline(always)]
5470 pub fn pdr(
5471 self,
5472 ) -> crate::common::RegisterField<
5473 2,
5474 0x1,
5475 1,
5476 0,
5477 p201pfs_ha::Pdr,
5478 p201pfs_ha::Pdr,
5479 P201PfsHa_SPEC,
5480 crate::common::RW,
5481 > {
5482 crate::common::RegisterField::<
5483 2,
5484 0x1,
5485 1,
5486 0,
5487 p201pfs_ha::Pdr,
5488 p201pfs_ha::Pdr,
5489 P201PfsHa_SPEC,
5490 crate::common::RW,
5491 >::from_register(self, 0)
5492 }
5493
5494 #[doc = "Pull-up Control"]
5495 #[inline(always)]
5496 pub fn pcr(
5497 self,
5498 ) -> crate::common::RegisterField<
5499 4,
5500 0x1,
5501 1,
5502 0,
5503 p201pfs_ha::Pcr,
5504 p201pfs_ha::Pcr,
5505 P201PfsHa_SPEC,
5506 crate::common::RW,
5507 > {
5508 crate::common::RegisterField::<
5509 4,
5510 0x1,
5511 1,
5512 0,
5513 p201pfs_ha::Pcr,
5514 p201pfs_ha::Pcr,
5515 P201PfsHa_SPEC,
5516 crate::common::RW,
5517 >::from_register(self, 0)
5518 }
5519
5520 #[doc = "N-Channel Open-Drain Control"]
5521 #[inline(always)]
5522 pub fn ncodr(
5523 self,
5524 ) -> crate::common::RegisterField<
5525 6,
5526 0x1,
5527 1,
5528 0,
5529 p201pfs_ha::Ncodr,
5530 p201pfs_ha::Ncodr,
5531 P201PfsHa_SPEC,
5532 crate::common::RW,
5533 > {
5534 crate::common::RegisterField::<
5535 6,
5536 0x1,
5537 1,
5538 0,
5539 p201pfs_ha::Ncodr,
5540 p201pfs_ha::Ncodr,
5541 P201PfsHa_SPEC,
5542 crate::common::RW,
5543 >::from_register(self, 0)
5544 }
5545
5546 #[doc = "Event on Falling/Event on Rising"]
5547 #[inline(always)]
5548 pub fn eofr(
5549 self,
5550 ) -> crate::common::RegisterField<
5551 12,
5552 0x3,
5553 1,
5554 0,
5555 p201pfs_ha::Eofr,
5556 p201pfs_ha::Eofr,
5557 P201PfsHa_SPEC,
5558 crate::common::RW,
5559 > {
5560 crate::common::RegisterField::<
5561 12,
5562 0x3,
5563 1,
5564 0,
5565 p201pfs_ha::Eofr,
5566 p201pfs_ha::Eofr,
5567 P201PfsHa_SPEC,
5568 crate::common::RW,
5569 >::from_register(self, 0)
5570 }
5571
5572 #[doc = "IRQ Input Enable"]
5573 #[inline(always)]
5574 pub fn isel(
5575 self,
5576 ) -> crate::common::RegisterField<
5577 14,
5578 0x1,
5579 1,
5580 0,
5581 p201pfs_ha::Isel,
5582 p201pfs_ha::Isel,
5583 P201PfsHa_SPEC,
5584 crate::common::RW,
5585 > {
5586 crate::common::RegisterField::<
5587 14,
5588 0x1,
5589 1,
5590 0,
5591 p201pfs_ha::Isel,
5592 p201pfs_ha::Isel,
5593 P201PfsHa_SPEC,
5594 crate::common::RW,
5595 >::from_register(self, 0)
5596 }
5597
5598 #[doc = "Analog Input Enable"]
5599 #[inline(always)]
5600 pub fn asel(
5601 self,
5602 ) -> crate::common::RegisterField<
5603 15,
5604 0x1,
5605 1,
5606 0,
5607 p201pfs_ha::Asel,
5608 p201pfs_ha::Asel,
5609 P201PfsHa_SPEC,
5610 crate::common::RW,
5611 > {
5612 crate::common::RegisterField::<
5613 15,
5614 0x1,
5615 1,
5616 0,
5617 p201pfs_ha::Asel,
5618 p201pfs_ha::Asel,
5619 P201PfsHa_SPEC,
5620 crate::common::RW,
5621 >::from_register(self, 0)
5622 }
5623}
5624impl ::core::default::Default for P201PfsHa {
5625 #[inline(always)]
5626 fn default() -> P201PfsHa {
5627 <crate::RegValueT<P201PfsHa_SPEC> as RegisterValue<_>>::new(16)
5628 }
5629}
5630pub mod p201pfs_ha {
5631
5632 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5633 pub struct Podr_SPEC;
5634 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
5635 impl Podr {
5636 #[doc = "Output low"]
5637 pub const _0: Self = Self::new(0);
5638
5639 #[doc = "Output high"]
5640 pub const _1: Self = Self::new(1);
5641 }
5642 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5643 pub struct Pidr_SPEC;
5644 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
5645 impl Pidr {
5646 #[doc = "Low level"]
5647 pub const _0: Self = Self::new(0);
5648
5649 #[doc = "High level"]
5650 pub const _1: Self = Self::new(1);
5651 }
5652 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5653 pub struct Pdr_SPEC;
5654 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
5655 impl Pdr {
5656 #[doc = "Input (functions as an input pin)"]
5657 pub const _0: Self = Self::new(0);
5658
5659 #[doc = "Output (functions as an output pin)"]
5660 pub const _1: Self = Self::new(1);
5661 }
5662 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5663 pub struct Pcr_SPEC;
5664 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
5665 impl Pcr {
5666 #[doc = "Disable input pull-up"]
5667 pub const _0: Self = Self::new(0);
5668
5669 #[doc = "Enable input pull-up"]
5670 pub const _1: Self = Self::new(1);
5671 }
5672 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5673 pub struct Ncodr_SPEC;
5674 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
5675 impl Ncodr {
5676 #[doc = "Output CMOS"]
5677 pub const _0: Self = Self::new(0);
5678
5679 #[doc = "Output NMOS open-drain"]
5680 pub const _1: Self = Self::new(1);
5681 }
5682 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5683 pub struct Eofr_SPEC;
5684 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
5685 impl Eofr {
5686 #[doc = "Don\'t care"]
5687 pub const _00: Self = Self::new(0);
5688
5689 #[doc = "Detect rising edge"]
5690 pub const _01: Self = Self::new(1);
5691
5692 #[doc = "Detect falling edge"]
5693 pub const _10: Self = Self::new(2);
5694
5695 #[doc = "Detect both edges"]
5696 pub const _11: Self = Self::new(3);
5697 }
5698 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5699 pub struct Isel_SPEC;
5700 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
5701 impl Isel {
5702 #[doc = "Do not use as IRQn input pin"]
5703 pub const _0: Self = Self::new(0);
5704
5705 #[doc = "Use as IRQn input pin"]
5706 pub const _1: Self = Self::new(1);
5707 }
5708 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5709 pub struct Asel_SPEC;
5710 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
5711 impl Asel {
5712 #[doc = "Do not use as analog pin"]
5713 pub const _0: Self = Self::new(0);
5714
5715 #[doc = "Use as analog pin"]
5716 pub const _1: Self = Self::new(1);
5717 }
5718}
5719#[doc(hidden)]
5720#[derive(Copy, Clone, Eq, PartialEq)]
5721pub struct P201PfsBy_SPEC;
5722impl crate::sealed::RegSpec for P201PfsBy_SPEC {
5723 type DataType = u8;
5724}
5725
5726#[doc = "Port 1n201 Pin Function Select Register"]
5727pub type P201PfsBy = crate::RegValueT<P201PfsBy_SPEC>;
5728
5729impl P201PfsBy {
5730 #[doc = "Port Output Data"]
5731 #[inline(always)]
5732 pub fn podr(
5733 self,
5734 ) -> crate::common::RegisterField<
5735 0,
5736 0x1,
5737 1,
5738 0,
5739 p201pfs_by::Podr,
5740 p201pfs_by::Podr,
5741 P201PfsBy_SPEC,
5742 crate::common::RW,
5743 > {
5744 crate::common::RegisterField::<
5745 0,
5746 0x1,
5747 1,
5748 0,
5749 p201pfs_by::Podr,
5750 p201pfs_by::Podr,
5751 P201PfsBy_SPEC,
5752 crate::common::RW,
5753 >::from_register(self, 0)
5754 }
5755
5756 #[doc = "Port State"]
5757 #[inline(always)]
5758 pub fn pidr(
5759 self,
5760 ) -> crate::common::RegisterField<
5761 1,
5762 0x1,
5763 1,
5764 0,
5765 p201pfs_by::Pidr,
5766 p201pfs_by::Pidr,
5767 P201PfsBy_SPEC,
5768 crate::common::R,
5769 > {
5770 crate::common::RegisterField::<
5771 1,
5772 0x1,
5773 1,
5774 0,
5775 p201pfs_by::Pidr,
5776 p201pfs_by::Pidr,
5777 P201PfsBy_SPEC,
5778 crate::common::R,
5779 >::from_register(self, 0)
5780 }
5781
5782 #[doc = "Port Direction"]
5783 #[inline(always)]
5784 pub fn pdr(
5785 self,
5786 ) -> crate::common::RegisterField<
5787 2,
5788 0x1,
5789 1,
5790 0,
5791 p201pfs_by::Pdr,
5792 p201pfs_by::Pdr,
5793 P201PfsBy_SPEC,
5794 crate::common::RW,
5795 > {
5796 crate::common::RegisterField::<
5797 2,
5798 0x1,
5799 1,
5800 0,
5801 p201pfs_by::Pdr,
5802 p201pfs_by::Pdr,
5803 P201PfsBy_SPEC,
5804 crate::common::RW,
5805 >::from_register(self, 0)
5806 }
5807
5808 #[doc = "Pull-up Control"]
5809 #[inline(always)]
5810 pub fn pcr(
5811 self,
5812 ) -> crate::common::RegisterField<
5813 4,
5814 0x1,
5815 1,
5816 0,
5817 p201pfs_by::Pcr,
5818 p201pfs_by::Pcr,
5819 P201PfsBy_SPEC,
5820 crate::common::RW,
5821 > {
5822 crate::common::RegisterField::<
5823 4,
5824 0x1,
5825 1,
5826 0,
5827 p201pfs_by::Pcr,
5828 p201pfs_by::Pcr,
5829 P201PfsBy_SPEC,
5830 crate::common::RW,
5831 >::from_register(self, 0)
5832 }
5833
5834 #[doc = "N-Channel Open-Drain Control"]
5835 #[inline(always)]
5836 pub fn ncodr(
5837 self,
5838 ) -> crate::common::RegisterField<
5839 6,
5840 0x1,
5841 1,
5842 0,
5843 p201pfs_by::Ncodr,
5844 p201pfs_by::Ncodr,
5845 P201PfsBy_SPEC,
5846 crate::common::RW,
5847 > {
5848 crate::common::RegisterField::<
5849 6,
5850 0x1,
5851 1,
5852 0,
5853 p201pfs_by::Ncodr,
5854 p201pfs_by::Ncodr,
5855 P201PfsBy_SPEC,
5856 crate::common::RW,
5857 >::from_register(self, 0)
5858 }
5859}
5860impl ::core::default::Default for P201PfsBy {
5861 #[inline(always)]
5862 fn default() -> P201PfsBy {
5863 <crate::RegValueT<P201PfsBy_SPEC> as RegisterValue<_>>::new(16)
5864 }
5865}
5866pub mod p201pfs_by {
5867
5868 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5869 pub struct Podr_SPEC;
5870 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
5871 impl Podr {
5872 #[doc = "Output low"]
5873 pub const _0: Self = Self::new(0);
5874
5875 #[doc = "Output high"]
5876 pub const _1: Self = Self::new(1);
5877 }
5878 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5879 pub struct Pidr_SPEC;
5880 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
5881 impl Pidr {
5882 #[doc = "Low level"]
5883 pub const _0: Self = Self::new(0);
5884
5885 #[doc = "High level"]
5886 pub const _1: Self = Self::new(1);
5887 }
5888 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5889 pub struct Pdr_SPEC;
5890 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
5891 impl Pdr {
5892 #[doc = "Input (functions as an input pin)"]
5893 pub const _0: Self = Self::new(0);
5894
5895 #[doc = "Output (functions as an output pin)"]
5896 pub const _1: Self = Self::new(1);
5897 }
5898 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5899 pub struct Pcr_SPEC;
5900 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
5901 impl Pcr {
5902 #[doc = "Disable input pull-up"]
5903 pub const _0: Self = Self::new(0);
5904
5905 #[doc = "Enable input pull-up"]
5906 pub const _1: Self = Self::new(1);
5907 }
5908 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5909 pub struct Ncodr_SPEC;
5910 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
5911 impl Ncodr {
5912 #[doc = "Output CMOS"]
5913 pub const _0: Self = Self::new(0);
5914
5915 #[doc = "Output NMOS open-drain"]
5916 pub const _1: Self = Self::new(1);
5917 }
5918}
5919#[doc(hidden)]
5920#[derive(Copy, Clone, Eq, PartialEq)]
5921pub struct P205Pfs_SPEC;
5922impl crate::sealed::RegSpec for P205Pfs_SPEC {
5923 type DataType = u32;
5924}
5925
5926#[doc = "Port 1n205 Pin Function Select Register"]
5927pub type P205Pfs = crate::RegValueT<P205Pfs_SPEC>;
5928
5929impl P205Pfs {
5930 #[doc = "Port Output Data"]
5931 #[inline(always)]
5932 pub fn podr(
5933 self,
5934 ) -> crate::common::RegisterField<
5935 0,
5936 0x1,
5937 1,
5938 0,
5939 p205pfs::Podr,
5940 p205pfs::Podr,
5941 P205Pfs_SPEC,
5942 crate::common::RW,
5943 > {
5944 crate::common::RegisterField::<
5945 0,
5946 0x1,
5947 1,
5948 0,
5949 p205pfs::Podr,
5950 p205pfs::Podr,
5951 P205Pfs_SPEC,
5952 crate::common::RW,
5953 >::from_register(self, 0)
5954 }
5955
5956 #[doc = "Port State"]
5957 #[inline(always)]
5958 pub fn pidr(
5959 self,
5960 ) -> crate::common::RegisterField<
5961 1,
5962 0x1,
5963 1,
5964 0,
5965 p205pfs::Pidr,
5966 p205pfs::Pidr,
5967 P205Pfs_SPEC,
5968 crate::common::R,
5969 > {
5970 crate::common::RegisterField::<
5971 1,
5972 0x1,
5973 1,
5974 0,
5975 p205pfs::Pidr,
5976 p205pfs::Pidr,
5977 P205Pfs_SPEC,
5978 crate::common::R,
5979 >::from_register(self, 0)
5980 }
5981
5982 #[doc = "Port Direction"]
5983 #[inline(always)]
5984 pub fn pdr(
5985 self,
5986 ) -> crate::common::RegisterField<
5987 2,
5988 0x1,
5989 1,
5990 0,
5991 p205pfs::Pdr,
5992 p205pfs::Pdr,
5993 P205Pfs_SPEC,
5994 crate::common::RW,
5995 > {
5996 crate::common::RegisterField::<
5997 2,
5998 0x1,
5999 1,
6000 0,
6001 p205pfs::Pdr,
6002 p205pfs::Pdr,
6003 P205Pfs_SPEC,
6004 crate::common::RW,
6005 >::from_register(self, 0)
6006 }
6007
6008 #[doc = "Pull-up Control"]
6009 #[inline(always)]
6010 pub fn pcr(
6011 self,
6012 ) -> crate::common::RegisterField<
6013 4,
6014 0x1,
6015 1,
6016 0,
6017 p205pfs::Pcr,
6018 p205pfs::Pcr,
6019 P205Pfs_SPEC,
6020 crate::common::RW,
6021 > {
6022 crate::common::RegisterField::<
6023 4,
6024 0x1,
6025 1,
6026 0,
6027 p205pfs::Pcr,
6028 p205pfs::Pcr,
6029 P205Pfs_SPEC,
6030 crate::common::RW,
6031 >::from_register(self, 0)
6032 }
6033
6034 #[doc = "N-Channel Open-Drain Control"]
6035 #[inline(always)]
6036 pub fn ncodr(
6037 self,
6038 ) -> crate::common::RegisterField<
6039 6,
6040 0x1,
6041 1,
6042 0,
6043 p205pfs::Ncodr,
6044 p205pfs::Ncodr,
6045 P205Pfs_SPEC,
6046 crate::common::RW,
6047 > {
6048 crate::common::RegisterField::<
6049 6,
6050 0x1,
6051 1,
6052 0,
6053 p205pfs::Ncodr,
6054 p205pfs::Ncodr,
6055 P205Pfs_SPEC,
6056 crate::common::RW,
6057 >::from_register(self, 0)
6058 }
6059
6060 #[doc = "Event on Falling/Event on Rising"]
6061 #[inline(always)]
6062 pub fn eofr(
6063 self,
6064 ) -> crate::common::RegisterField<
6065 12,
6066 0x3,
6067 1,
6068 0,
6069 p205pfs::Eofr,
6070 p205pfs::Eofr,
6071 P205Pfs_SPEC,
6072 crate::common::RW,
6073 > {
6074 crate::common::RegisterField::<
6075 12,
6076 0x3,
6077 1,
6078 0,
6079 p205pfs::Eofr,
6080 p205pfs::Eofr,
6081 P205Pfs_SPEC,
6082 crate::common::RW,
6083 >::from_register(self, 0)
6084 }
6085
6086 #[doc = "IRQ Input Enable"]
6087 #[inline(always)]
6088 pub fn isel(
6089 self,
6090 ) -> crate::common::RegisterField<
6091 14,
6092 0x1,
6093 1,
6094 0,
6095 p205pfs::Isel,
6096 p205pfs::Isel,
6097 P205Pfs_SPEC,
6098 crate::common::RW,
6099 > {
6100 crate::common::RegisterField::<
6101 14,
6102 0x1,
6103 1,
6104 0,
6105 p205pfs::Isel,
6106 p205pfs::Isel,
6107 P205Pfs_SPEC,
6108 crate::common::RW,
6109 >::from_register(self, 0)
6110 }
6111
6112 #[doc = "Analog Input Enable"]
6113 #[inline(always)]
6114 pub fn asel(
6115 self,
6116 ) -> crate::common::RegisterField<
6117 15,
6118 0x1,
6119 1,
6120 0,
6121 p205pfs::Asel,
6122 p205pfs::Asel,
6123 P205Pfs_SPEC,
6124 crate::common::RW,
6125 > {
6126 crate::common::RegisterField::<
6127 15,
6128 0x1,
6129 1,
6130 0,
6131 p205pfs::Asel,
6132 p205pfs::Asel,
6133 P205Pfs_SPEC,
6134 crate::common::RW,
6135 >::from_register(self, 0)
6136 }
6137
6138 #[doc = "Port Mode Control"]
6139 #[inline(always)]
6140 pub fn pmr(
6141 self,
6142 ) -> crate::common::RegisterField<
6143 16,
6144 0x1,
6145 1,
6146 0,
6147 p205pfs::Pmr,
6148 p205pfs::Pmr,
6149 P205Pfs_SPEC,
6150 crate::common::RW,
6151 > {
6152 crate::common::RegisterField::<
6153 16,
6154 0x1,
6155 1,
6156 0,
6157 p205pfs::Pmr,
6158 p205pfs::Pmr,
6159 P205Pfs_SPEC,
6160 crate::common::RW,
6161 >::from_register(self, 0)
6162 }
6163
6164 #[doc = "Peripheral Select"]
6165 #[inline(always)]
6166 pub fn psel(
6167 self,
6168 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P205Pfs_SPEC, crate::common::RW> {
6169 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P205Pfs_SPEC,crate::common::RW>::from_register(self,0)
6170 }
6171}
6172impl ::core::default::Default for P205Pfs {
6173 #[inline(always)]
6174 fn default() -> P205Pfs {
6175 <crate::RegValueT<P205Pfs_SPEC> as RegisterValue<_>>::new(0)
6176 }
6177}
6178pub mod p205pfs {
6179
6180 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6181 pub struct Podr_SPEC;
6182 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
6183 impl Podr {
6184 #[doc = "Output low"]
6185 pub const _0: Self = Self::new(0);
6186
6187 #[doc = "Output high"]
6188 pub const _1: Self = Self::new(1);
6189 }
6190 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6191 pub struct Pidr_SPEC;
6192 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
6193 impl Pidr {
6194 #[doc = "Low level"]
6195 pub const _0: Self = Self::new(0);
6196
6197 #[doc = "High level"]
6198 pub const _1: Self = Self::new(1);
6199 }
6200 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6201 pub struct Pdr_SPEC;
6202 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
6203 impl Pdr {
6204 #[doc = "Input (functions as an input pin)"]
6205 pub const _0: Self = Self::new(0);
6206
6207 #[doc = "Output (functions as an output pin)"]
6208 pub const _1: Self = Self::new(1);
6209 }
6210 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6211 pub struct Pcr_SPEC;
6212 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
6213 impl Pcr {
6214 #[doc = "Disable input pull-up"]
6215 pub const _0: Self = Self::new(0);
6216
6217 #[doc = "Enable input pull-up"]
6218 pub const _1: Self = Self::new(1);
6219 }
6220 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6221 pub struct Ncodr_SPEC;
6222 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
6223 impl Ncodr {
6224 #[doc = "Output CMOS"]
6225 pub const _0: Self = Self::new(0);
6226
6227 #[doc = "Output NMOS open-drain"]
6228 pub const _1: Self = Self::new(1);
6229 }
6230 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6231 pub struct Eofr_SPEC;
6232 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
6233 impl Eofr {
6234 #[doc = "Don\'t care"]
6235 pub const _00: Self = Self::new(0);
6236
6237 #[doc = "Detect rising edge"]
6238 pub const _01: Self = Self::new(1);
6239
6240 #[doc = "Detect falling edge"]
6241 pub const _10: Self = Self::new(2);
6242
6243 #[doc = "Detect both edges"]
6244 pub const _11: Self = Self::new(3);
6245 }
6246 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6247 pub struct Isel_SPEC;
6248 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
6249 impl Isel {
6250 #[doc = "Do not use as IRQn input pin"]
6251 pub const _0: Self = Self::new(0);
6252
6253 #[doc = "Use as IRQn input pin"]
6254 pub const _1: Self = Self::new(1);
6255 }
6256 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6257 pub struct Asel_SPEC;
6258 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
6259 impl Asel {
6260 #[doc = "Do not use as analog pin"]
6261 pub const _0: Self = Self::new(0);
6262
6263 #[doc = "Use as analog pin"]
6264 pub const _1: Self = Self::new(1);
6265 }
6266 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6267 pub struct Pmr_SPEC;
6268 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
6269 impl Pmr {
6270 #[doc = "Use as general I/O pin"]
6271 pub const _0: Self = Self::new(0);
6272
6273 #[doc = "Use as I/O port for peripheral functions"]
6274 pub const _1: Self = Self::new(1);
6275 }
6276}
6277#[doc(hidden)]
6278#[derive(Copy, Clone, Eq, PartialEq)]
6279pub struct P205PfsHa_SPEC;
6280impl crate::sealed::RegSpec for P205PfsHa_SPEC {
6281 type DataType = u16;
6282}
6283
6284#[doc = "Port 1n205 Pin Function Select Register"]
6285pub type P205PfsHa = crate::RegValueT<P205PfsHa_SPEC>;
6286
6287impl P205PfsHa {
6288 #[doc = "Port Output Data"]
6289 #[inline(always)]
6290 pub fn podr(
6291 self,
6292 ) -> crate::common::RegisterField<
6293 0,
6294 0x1,
6295 1,
6296 0,
6297 p205pfs_ha::Podr,
6298 p205pfs_ha::Podr,
6299 P205PfsHa_SPEC,
6300 crate::common::RW,
6301 > {
6302 crate::common::RegisterField::<
6303 0,
6304 0x1,
6305 1,
6306 0,
6307 p205pfs_ha::Podr,
6308 p205pfs_ha::Podr,
6309 P205PfsHa_SPEC,
6310 crate::common::RW,
6311 >::from_register(self, 0)
6312 }
6313
6314 #[doc = "Port State"]
6315 #[inline(always)]
6316 pub fn pidr(
6317 self,
6318 ) -> crate::common::RegisterField<
6319 1,
6320 0x1,
6321 1,
6322 0,
6323 p205pfs_ha::Pidr,
6324 p205pfs_ha::Pidr,
6325 P205PfsHa_SPEC,
6326 crate::common::R,
6327 > {
6328 crate::common::RegisterField::<
6329 1,
6330 0x1,
6331 1,
6332 0,
6333 p205pfs_ha::Pidr,
6334 p205pfs_ha::Pidr,
6335 P205PfsHa_SPEC,
6336 crate::common::R,
6337 >::from_register(self, 0)
6338 }
6339
6340 #[doc = "Port Direction"]
6341 #[inline(always)]
6342 pub fn pdr(
6343 self,
6344 ) -> crate::common::RegisterField<
6345 2,
6346 0x1,
6347 1,
6348 0,
6349 p205pfs_ha::Pdr,
6350 p205pfs_ha::Pdr,
6351 P205PfsHa_SPEC,
6352 crate::common::RW,
6353 > {
6354 crate::common::RegisterField::<
6355 2,
6356 0x1,
6357 1,
6358 0,
6359 p205pfs_ha::Pdr,
6360 p205pfs_ha::Pdr,
6361 P205PfsHa_SPEC,
6362 crate::common::RW,
6363 >::from_register(self, 0)
6364 }
6365
6366 #[doc = "Pull-up Control"]
6367 #[inline(always)]
6368 pub fn pcr(
6369 self,
6370 ) -> crate::common::RegisterField<
6371 4,
6372 0x1,
6373 1,
6374 0,
6375 p205pfs_ha::Pcr,
6376 p205pfs_ha::Pcr,
6377 P205PfsHa_SPEC,
6378 crate::common::RW,
6379 > {
6380 crate::common::RegisterField::<
6381 4,
6382 0x1,
6383 1,
6384 0,
6385 p205pfs_ha::Pcr,
6386 p205pfs_ha::Pcr,
6387 P205PfsHa_SPEC,
6388 crate::common::RW,
6389 >::from_register(self, 0)
6390 }
6391
6392 #[doc = "N-Channel Open-Drain Control"]
6393 #[inline(always)]
6394 pub fn ncodr(
6395 self,
6396 ) -> crate::common::RegisterField<
6397 6,
6398 0x1,
6399 1,
6400 0,
6401 p205pfs_ha::Ncodr,
6402 p205pfs_ha::Ncodr,
6403 P205PfsHa_SPEC,
6404 crate::common::RW,
6405 > {
6406 crate::common::RegisterField::<
6407 6,
6408 0x1,
6409 1,
6410 0,
6411 p205pfs_ha::Ncodr,
6412 p205pfs_ha::Ncodr,
6413 P205PfsHa_SPEC,
6414 crate::common::RW,
6415 >::from_register(self, 0)
6416 }
6417
6418 #[doc = "Event on Falling/Event on Rising"]
6419 #[inline(always)]
6420 pub fn eofr(
6421 self,
6422 ) -> crate::common::RegisterField<
6423 12,
6424 0x3,
6425 1,
6426 0,
6427 p205pfs_ha::Eofr,
6428 p205pfs_ha::Eofr,
6429 P205PfsHa_SPEC,
6430 crate::common::RW,
6431 > {
6432 crate::common::RegisterField::<
6433 12,
6434 0x3,
6435 1,
6436 0,
6437 p205pfs_ha::Eofr,
6438 p205pfs_ha::Eofr,
6439 P205PfsHa_SPEC,
6440 crate::common::RW,
6441 >::from_register(self, 0)
6442 }
6443
6444 #[doc = "IRQ Input Enable"]
6445 #[inline(always)]
6446 pub fn isel(
6447 self,
6448 ) -> crate::common::RegisterField<
6449 14,
6450 0x1,
6451 1,
6452 0,
6453 p205pfs_ha::Isel,
6454 p205pfs_ha::Isel,
6455 P205PfsHa_SPEC,
6456 crate::common::RW,
6457 > {
6458 crate::common::RegisterField::<
6459 14,
6460 0x1,
6461 1,
6462 0,
6463 p205pfs_ha::Isel,
6464 p205pfs_ha::Isel,
6465 P205PfsHa_SPEC,
6466 crate::common::RW,
6467 >::from_register(self, 0)
6468 }
6469
6470 #[doc = "Analog Input Enable"]
6471 #[inline(always)]
6472 pub fn asel(
6473 self,
6474 ) -> crate::common::RegisterField<
6475 15,
6476 0x1,
6477 1,
6478 0,
6479 p205pfs_ha::Asel,
6480 p205pfs_ha::Asel,
6481 P205PfsHa_SPEC,
6482 crate::common::RW,
6483 > {
6484 crate::common::RegisterField::<
6485 15,
6486 0x1,
6487 1,
6488 0,
6489 p205pfs_ha::Asel,
6490 p205pfs_ha::Asel,
6491 P205PfsHa_SPEC,
6492 crate::common::RW,
6493 >::from_register(self, 0)
6494 }
6495}
6496impl ::core::default::Default for P205PfsHa {
6497 #[inline(always)]
6498 fn default() -> P205PfsHa {
6499 <crate::RegValueT<P205PfsHa_SPEC> as RegisterValue<_>>::new(0)
6500 }
6501}
6502pub mod p205pfs_ha {
6503
6504 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6505 pub struct Podr_SPEC;
6506 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
6507 impl Podr {
6508 #[doc = "Output low"]
6509 pub const _0: Self = Self::new(0);
6510
6511 #[doc = "Output high"]
6512 pub const _1: Self = Self::new(1);
6513 }
6514 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6515 pub struct Pidr_SPEC;
6516 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
6517 impl Pidr {
6518 #[doc = "Low level"]
6519 pub const _0: Self = Self::new(0);
6520
6521 #[doc = "High level"]
6522 pub const _1: Self = Self::new(1);
6523 }
6524 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6525 pub struct Pdr_SPEC;
6526 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
6527 impl Pdr {
6528 #[doc = "Input (functions as an input pin)"]
6529 pub const _0: Self = Self::new(0);
6530
6531 #[doc = "Output (functions as an output pin)"]
6532 pub const _1: Self = Self::new(1);
6533 }
6534 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6535 pub struct Pcr_SPEC;
6536 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
6537 impl Pcr {
6538 #[doc = "Disable input pull-up"]
6539 pub const _0: Self = Self::new(0);
6540
6541 #[doc = "Enable input pull-up"]
6542 pub const _1: Self = Self::new(1);
6543 }
6544 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6545 pub struct Ncodr_SPEC;
6546 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
6547 impl Ncodr {
6548 #[doc = "Output CMOS"]
6549 pub const _0: Self = Self::new(0);
6550
6551 #[doc = "Output NMOS open-drain"]
6552 pub const _1: Self = Self::new(1);
6553 }
6554 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6555 pub struct Eofr_SPEC;
6556 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
6557 impl Eofr {
6558 #[doc = "Don\'t care"]
6559 pub const _00: Self = Self::new(0);
6560
6561 #[doc = "Detect rising edge"]
6562 pub const _01: Self = Self::new(1);
6563
6564 #[doc = "Detect falling edge"]
6565 pub const _10: Self = Self::new(2);
6566
6567 #[doc = "Detect both edges"]
6568 pub const _11: Self = Self::new(3);
6569 }
6570 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6571 pub struct Isel_SPEC;
6572 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
6573 impl Isel {
6574 #[doc = "Do not use as IRQn input pin"]
6575 pub const _0: Self = Self::new(0);
6576
6577 #[doc = "Use as IRQn input pin"]
6578 pub const _1: Self = Self::new(1);
6579 }
6580 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6581 pub struct Asel_SPEC;
6582 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
6583 impl Asel {
6584 #[doc = "Do not use as analog pin"]
6585 pub const _0: Self = Self::new(0);
6586
6587 #[doc = "Use as analog pin"]
6588 pub const _1: Self = Self::new(1);
6589 }
6590}
6591#[doc(hidden)]
6592#[derive(Copy, Clone, Eq, PartialEq)]
6593pub struct P205PfsBy_SPEC;
6594impl crate::sealed::RegSpec for P205PfsBy_SPEC {
6595 type DataType = u8;
6596}
6597
6598#[doc = "Port 1n205 Pin Function Select Register"]
6599pub type P205PfsBy = crate::RegValueT<P205PfsBy_SPEC>;
6600
6601impl P205PfsBy {
6602 #[doc = "Port Output Data"]
6603 #[inline(always)]
6604 pub fn podr(
6605 self,
6606 ) -> crate::common::RegisterField<
6607 0,
6608 0x1,
6609 1,
6610 0,
6611 p205pfs_by::Podr,
6612 p205pfs_by::Podr,
6613 P205PfsBy_SPEC,
6614 crate::common::RW,
6615 > {
6616 crate::common::RegisterField::<
6617 0,
6618 0x1,
6619 1,
6620 0,
6621 p205pfs_by::Podr,
6622 p205pfs_by::Podr,
6623 P205PfsBy_SPEC,
6624 crate::common::RW,
6625 >::from_register(self, 0)
6626 }
6627
6628 #[doc = "Port State"]
6629 #[inline(always)]
6630 pub fn pidr(
6631 self,
6632 ) -> crate::common::RegisterField<
6633 1,
6634 0x1,
6635 1,
6636 0,
6637 p205pfs_by::Pidr,
6638 p205pfs_by::Pidr,
6639 P205PfsBy_SPEC,
6640 crate::common::R,
6641 > {
6642 crate::common::RegisterField::<
6643 1,
6644 0x1,
6645 1,
6646 0,
6647 p205pfs_by::Pidr,
6648 p205pfs_by::Pidr,
6649 P205PfsBy_SPEC,
6650 crate::common::R,
6651 >::from_register(self, 0)
6652 }
6653
6654 #[doc = "Port Direction"]
6655 #[inline(always)]
6656 pub fn pdr(
6657 self,
6658 ) -> crate::common::RegisterField<
6659 2,
6660 0x1,
6661 1,
6662 0,
6663 p205pfs_by::Pdr,
6664 p205pfs_by::Pdr,
6665 P205PfsBy_SPEC,
6666 crate::common::RW,
6667 > {
6668 crate::common::RegisterField::<
6669 2,
6670 0x1,
6671 1,
6672 0,
6673 p205pfs_by::Pdr,
6674 p205pfs_by::Pdr,
6675 P205PfsBy_SPEC,
6676 crate::common::RW,
6677 >::from_register(self, 0)
6678 }
6679
6680 #[doc = "Pull-up Control"]
6681 #[inline(always)]
6682 pub fn pcr(
6683 self,
6684 ) -> crate::common::RegisterField<
6685 4,
6686 0x1,
6687 1,
6688 0,
6689 p205pfs_by::Pcr,
6690 p205pfs_by::Pcr,
6691 P205PfsBy_SPEC,
6692 crate::common::RW,
6693 > {
6694 crate::common::RegisterField::<
6695 4,
6696 0x1,
6697 1,
6698 0,
6699 p205pfs_by::Pcr,
6700 p205pfs_by::Pcr,
6701 P205PfsBy_SPEC,
6702 crate::common::RW,
6703 >::from_register(self, 0)
6704 }
6705
6706 #[doc = "N-Channel Open-Drain Control"]
6707 #[inline(always)]
6708 pub fn ncodr(
6709 self,
6710 ) -> crate::common::RegisterField<
6711 6,
6712 0x1,
6713 1,
6714 0,
6715 p205pfs_by::Ncodr,
6716 p205pfs_by::Ncodr,
6717 P205PfsBy_SPEC,
6718 crate::common::RW,
6719 > {
6720 crate::common::RegisterField::<
6721 6,
6722 0x1,
6723 1,
6724 0,
6725 p205pfs_by::Ncodr,
6726 p205pfs_by::Ncodr,
6727 P205PfsBy_SPEC,
6728 crate::common::RW,
6729 >::from_register(self, 0)
6730 }
6731}
6732impl ::core::default::Default for P205PfsBy {
6733 #[inline(always)]
6734 fn default() -> P205PfsBy {
6735 <crate::RegValueT<P205PfsBy_SPEC> as RegisterValue<_>>::new(0)
6736 }
6737}
6738pub mod p205pfs_by {
6739
6740 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6741 pub struct Podr_SPEC;
6742 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
6743 impl Podr {
6744 #[doc = "Output low"]
6745 pub const _0: Self = Self::new(0);
6746
6747 #[doc = "Output high"]
6748 pub const _1: Self = Self::new(1);
6749 }
6750 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6751 pub struct Pidr_SPEC;
6752 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
6753 impl Pidr {
6754 #[doc = "Low level"]
6755 pub const _0: Self = Self::new(0);
6756
6757 #[doc = "High level"]
6758 pub const _1: Self = Self::new(1);
6759 }
6760 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6761 pub struct Pdr_SPEC;
6762 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
6763 impl Pdr {
6764 #[doc = "Input (functions as an input pin)"]
6765 pub const _0: Self = Self::new(0);
6766
6767 #[doc = "Output (functions as an output pin)"]
6768 pub const _1: Self = Self::new(1);
6769 }
6770 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6771 pub struct Pcr_SPEC;
6772 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
6773 impl Pcr {
6774 #[doc = "Disable input pull-up"]
6775 pub const _0: Self = Self::new(0);
6776
6777 #[doc = "Enable input pull-up"]
6778 pub const _1: Self = Self::new(1);
6779 }
6780 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6781 pub struct Ncodr_SPEC;
6782 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
6783 impl Ncodr {
6784 #[doc = "Output CMOS"]
6785 pub const _0: Self = Self::new(0);
6786
6787 #[doc = "Output NMOS open-drain"]
6788 pub const _1: Self = Self::new(1);
6789 }
6790}
6791#[doc(hidden)]
6792#[derive(Copy, Clone, Eq, PartialEq)]
6793pub struct P206Pfs_SPEC;
6794impl crate::sealed::RegSpec for P206Pfs_SPEC {
6795 type DataType = u32;
6796}
6797
6798#[doc = "Port 1n206 Pin Function Select Register"]
6799pub type P206Pfs = crate::RegValueT<P206Pfs_SPEC>;
6800
6801impl P206Pfs {
6802 #[doc = "Port Output Data"]
6803 #[inline(always)]
6804 pub fn podr(
6805 self,
6806 ) -> crate::common::RegisterField<
6807 0,
6808 0x1,
6809 1,
6810 0,
6811 p206pfs::Podr,
6812 p206pfs::Podr,
6813 P206Pfs_SPEC,
6814 crate::common::RW,
6815 > {
6816 crate::common::RegisterField::<
6817 0,
6818 0x1,
6819 1,
6820 0,
6821 p206pfs::Podr,
6822 p206pfs::Podr,
6823 P206Pfs_SPEC,
6824 crate::common::RW,
6825 >::from_register(self, 0)
6826 }
6827
6828 #[doc = "Port State"]
6829 #[inline(always)]
6830 pub fn pidr(
6831 self,
6832 ) -> crate::common::RegisterField<
6833 1,
6834 0x1,
6835 1,
6836 0,
6837 p206pfs::Pidr,
6838 p206pfs::Pidr,
6839 P206Pfs_SPEC,
6840 crate::common::R,
6841 > {
6842 crate::common::RegisterField::<
6843 1,
6844 0x1,
6845 1,
6846 0,
6847 p206pfs::Pidr,
6848 p206pfs::Pidr,
6849 P206Pfs_SPEC,
6850 crate::common::R,
6851 >::from_register(self, 0)
6852 }
6853
6854 #[doc = "Port Direction"]
6855 #[inline(always)]
6856 pub fn pdr(
6857 self,
6858 ) -> crate::common::RegisterField<
6859 2,
6860 0x1,
6861 1,
6862 0,
6863 p206pfs::Pdr,
6864 p206pfs::Pdr,
6865 P206Pfs_SPEC,
6866 crate::common::RW,
6867 > {
6868 crate::common::RegisterField::<
6869 2,
6870 0x1,
6871 1,
6872 0,
6873 p206pfs::Pdr,
6874 p206pfs::Pdr,
6875 P206Pfs_SPEC,
6876 crate::common::RW,
6877 >::from_register(self, 0)
6878 }
6879
6880 #[doc = "Pull-up Control"]
6881 #[inline(always)]
6882 pub fn pcr(
6883 self,
6884 ) -> crate::common::RegisterField<
6885 4,
6886 0x1,
6887 1,
6888 0,
6889 p206pfs::Pcr,
6890 p206pfs::Pcr,
6891 P206Pfs_SPEC,
6892 crate::common::RW,
6893 > {
6894 crate::common::RegisterField::<
6895 4,
6896 0x1,
6897 1,
6898 0,
6899 p206pfs::Pcr,
6900 p206pfs::Pcr,
6901 P206Pfs_SPEC,
6902 crate::common::RW,
6903 >::from_register(self, 0)
6904 }
6905
6906 #[doc = "N-Channel Open-Drain Control"]
6907 #[inline(always)]
6908 pub fn ncodr(
6909 self,
6910 ) -> crate::common::RegisterField<
6911 6,
6912 0x1,
6913 1,
6914 0,
6915 p206pfs::Ncodr,
6916 p206pfs::Ncodr,
6917 P206Pfs_SPEC,
6918 crate::common::RW,
6919 > {
6920 crate::common::RegisterField::<
6921 6,
6922 0x1,
6923 1,
6924 0,
6925 p206pfs::Ncodr,
6926 p206pfs::Ncodr,
6927 P206Pfs_SPEC,
6928 crate::common::RW,
6929 >::from_register(self, 0)
6930 }
6931
6932 #[doc = "Event on Falling/Event on Rising"]
6933 #[inline(always)]
6934 pub fn eofr(
6935 self,
6936 ) -> crate::common::RegisterField<
6937 12,
6938 0x3,
6939 1,
6940 0,
6941 p206pfs::Eofr,
6942 p206pfs::Eofr,
6943 P206Pfs_SPEC,
6944 crate::common::RW,
6945 > {
6946 crate::common::RegisterField::<
6947 12,
6948 0x3,
6949 1,
6950 0,
6951 p206pfs::Eofr,
6952 p206pfs::Eofr,
6953 P206Pfs_SPEC,
6954 crate::common::RW,
6955 >::from_register(self, 0)
6956 }
6957
6958 #[doc = "IRQ Input Enable"]
6959 #[inline(always)]
6960 pub fn isel(
6961 self,
6962 ) -> crate::common::RegisterField<
6963 14,
6964 0x1,
6965 1,
6966 0,
6967 p206pfs::Isel,
6968 p206pfs::Isel,
6969 P206Pfs_SPEC,
6970 crate::common::RW,
6971 > {
6972 crate::common::RegisterField::<
6973 14,
6974 0x1,
6975 1,
6976 0,
6977 p206pfs::Isel,
6978 p206pfs::Isel,
6979 P206Pfs_SPEC,
6980 crate::common::RW,
6981 >::from_register(self, 0)
6982 }
6983
6984 #[doc = "Analog Input Enable"]
6985 #[inline(always)]
6986 pub fn asel(
6987 self,
6988 ) -> crate::common::RegisterField<
6989 15,
6990 0x1,
6991 1,
6992 0,
6993 p206pfs::Asel,
6994 p206pfs::Asel,
6995 P206Pfs_SPEC,
6996 crate::common::RW,
6997 > {
6998 crate::common::RegisterField::<
6999 15,
7000 0x1,
7001 1,
7002 0,
7003 p206pfs::Asel,
7004 p206pfs::Asel,
7005 P206Pfs_SPEC,
7006 crate::common::RW,
7007 >::from_register(self, 0)
7008 }
7009
7010 #[doc = "Port Mode Control"]
7011 #[inline(always)]
7012 pub fn pmr(
7013 self,
7014 ) -> crate::common::RegisterField<
7015 16,
7016 0x1,
7017 1,
7018 0,
7019 p206pfs::Pmr,
7020 p206pfs::Pmr,
7021 P206Pfs_SPEC,
7022 crate::common::RW,
7023 > {
7024 crate::common::RegisterField::<
7025 16,
7026 0x1,
7027 1,
7028 0,
7029 p206pfs::Pmr,
7030 p206pfs::Pmr,
7031 P206Pfs_SPEC,
7032 crate::common::RW,
7033 >::from_register(self, 0)
7034 }
7035
7036 #[doc = "Peripheral Select"]
7037 #[inline(always)]
7038 pub fn psel(
7039 self,
7040 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P206Pfs_SPEC, crate::common::RW> {
7041 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P206Pfs_SPEC,crate::common::RW>::from_register(self,0)
7042 }
7043}
7044impl ::core::default::Default for P206Pfs {
7045 #[inline(always)]
7046 fn default() -> P206Pfs {
7047 <crate::RegValueT<P206Pfs_SPEC> as RegisterValue<_>>::new(0)
7048 }
7049}
7050pub mod p206pfs {
7051
7052 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7053 pub struct Podr_SPEC;
7054 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
7055 impl Podr {
7056 #[doc = "Output low"]
7057 pub const _0: Self = Self::new(0);
7058
7059 #[doc = "Output high"]
7060 pub const _1: Self = Self::new(1);
7061 }
7062 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7063 pub struct Pidr_SPEC;
7064 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
7065 impl Pidr {
7066 #[doc = "Low level"]
7067 pub const _0: Self = Self::new(0);
7068
7069 #[doc = "High level"]
7070 pub const _1: Self = Self::new(1);
7071 }
7072 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7073 pub struct Pdr_SPEC;
7074 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
7075 impl Pdr {
7076 #[doc = "Input (functions as an input pin)"]
7077 pub const _0: Self = Self::new(0);
7078
7079 #[doc = "Output (functions as an output pin)"]
7080 pub const _1: Self = Self::new(1);
7081 }
7082 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7083 pub struct Pcr_SPEC;
7084 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
7085 impl Pcr {
7086 #[doc = "Disable input pull-up"]
7087 pub const _0: Self = Self::new(0);
7088
7089 #[doc = "Enable input pull-up"]
7090 pub const _1: Self = Self::new(1);
7091 }
7092 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7093 pub struct Ncodr_SPEC;
7094 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
7095 impl Ncodr {
7096 #[doc = "Output CMOS"]
7097 pub const _0: Self = Self::new(0);
7098
7099 #[doc = "Output NMOS open-drain"]
7100 pub const _1: Self = Self::new(1);
7101 }
7102 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7103 pub struct Eofr_SPEC;
7104 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
7105 impl Eofr {
7106 #[doc = "Don\'t care"]
7107 pub const _00: Self = Self::new(0);
7108
7109 #[doc = "Detect rising edge"]
7110 pub const _01: Self = Self::new(1);
7111
7112 #[doc = "Detect falling edge"]
7113 pub const _10: Self = Self::new(2);
7114
7115 #[doc = "Detect both edges"]
7116 pub const _11: Self = Self::new(3);
7117 }
7118 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7119 pub struct Isel_SPEC;
7120 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
7121 impl Isel {
7122 #[doc = "Do not use as IRQn input pin"]
7123 pub const _0: Self = Self::new(0);
7124
7125 #[doc = "Use as IRQn input pin"]
7126 pub const _1: Self = Self::new(1);
7127 }
7128 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7129 pub struct Asel_SPEC;
7130 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
7131 impl Asel {
7132 #[doc = "Do not use as analog pin"]
7133 pub const _0: Self = Self::new(0);
7134
7135 #[doc = "Use as analog pin"]
7136 pub const _1: Self = Self::new(1);
7137 }
7138 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7139 pub struct Pmr_SPEC;
7140 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
7141 impl Pmr {
7142 #[doc = "Use as general I/O pin"]
7143 pub const _0: Self = Self::new(0);
7144
7145 #[doc = "Use as I/O port for peripheral functions"]
7146 pub const _1: Self = Self::new(1);
7147 }
7148}
7149#[doc(hidden)]
7150#[derive(Copy, Clone, Eq, PartialEq)]
7151pub struct P206PfsHa_SPEC;
7152impl crate::sealed::RegSpec for P206PfsHa_SPEC {
7153 type DataType = u16;
7154}
7155
7156#[doc = "Port 1n206 Pin Function Select Register"]
7157pub type P206PfsHa = crate::RegValueT<P206PfsHa_SPEC>;
7158
7159impl P206PfsHa {
7160 #[doc = "Port Output Data"]
7161 #[inline(always)]
7162 pub fn podr(
7163 self,
7164 ) -> crate::common::RegisterField<
7165 0,
7166 0x1,
7167 1,
7168 0,
7169 p206pfs_ha::Podr,
7170 p206pfs_ha::Podr,
7171 P206PfsHa_SPEC,
7172 crate::common::RW,
7173 > {
7174 crate::common::RegisterField::<
7175 0,
7176 0x1,
7177 1,
7178 0,
7179 p206pfs_ha::Podr,
7180 p206pfs_ha::Podr,
7181 P206PfsHa_SPEC,
7182 crate::common::RW,
7183 >::from_register(self, 0)
7184 }
7185
7186 #[doc = "Port State"]
7187 #[inline(always)]
7188 pub fn pidr(
7189 self,
7190 ) -> crate::common::RegisterField<
7191 1,
7192 0x1,
7193 1,
7194 0,
7195 p206pfs_ha::Pidr,
7196 p206pfs_ha::Pidr,
7197 P206PfsHa_SPEC,
7198 crate::common::R,
7199 > {
7200 crate::common::RegisterField::<
7201 1,
7202 0x1,
7203 1,
7204 0,
7205 p206pfs_ha::Pidr,
7206 p206pfs_ha::Pidr,
7207 P206PfsHa_SPEC,
7208 crate::common::R,
7209 >::from_register(self, 0)
7210 }
7211
7212 #[doc = "Port Direction"]
7213 #[inline(always)]
7214 pub fn pdr(
7215 self,
7216 ) -> crate::common::RegisterField<
7217 2,
7218 0x1,
7219 1,
7220 0,
7221 p206pfs_ha::Pdr,
7222 p206pfs_ha::Pdr,
7223 P206PfsHa_SPEC,
7224 crate::common::RW,
7225 > {
7226 crate::common::RegisterField::<
7227 2,
7228 0x1,
7229 1,
7230 0,
7231 p206pfs_ha::Pdr,
7232 p206pfs_ha::Pdr,
7233 P206PfsHa_SPEC,
7234 crate::common::RW,
7235 >::from_register(self, 0)
7236 }
7237
7238 #[doc = "Pull-up Control"]
7239 #[inline(always)]
7240 pub fn pcr(
7241 self,
7242 ) -> crate::common::RegisterField<
7243 4,
7244 0x1,
7245 1,
7246 0,
7247 p206pfs_ha::Pcr,
7248 p206pfs_ha::Pcr,
7249 P206PfsHa_SPEC,
7250 crate::common::RW,
7251 > {
7252 crate::common::RegisterField::<
7253 4,
7254 0x1,
7255 1,
7256 0,
7257 p206pfs_ha::Pcr,
7258 p206pfs_ha::Pcr,
7259 P206PfsHa_SPEC,
7260 crate::common::RW,
7261 >::from_register(self, 0)
7262 }
7263
7264 #[doc = "N-Channel Open-Drain Control"]
7265 #[inline(always)]
7266 pub fn ncodr(
7267 self,
7268 ) -> crate::common::RegisterField<
7269 6,
7270 0x1,
7271 1,
7272 0,
7273 p206pfs_ha::Ncodr,
7274 p206pfs_ha::Ncodr,
7275 P206PfsHa_SPEC,
7276 crate::common::RW,
7277 > {
7278 crate::common::RegisterField::<
7279 6,
7280 0x1,
7281 1,
7282 0,
7283 p206pfs_ha::Ncodr,
7284 p206pfs_ha::Ncodr,
7285 P206PfsHa_SPEC,
7286 crate::common::RW,
7287 >::from_register(self, 0)
7288 }
7289
7290 #[doc = "Event on Falling/Event on Rising"]
7291 #[inline(always)]
7292 pub fn eofr(
7293 self,
7294 ) -> crate::common::RegisterField<
7295 12,
7296 0x3,
7297 1,
7298 0,
7299 p206pfs_ha::Eofr,
7300 p206pfs_ha::Eofr,
7301 P206PfsHa_SPEC,
7302 crate::common::RW,
7303 > {
7304 crate::common::RegisterField::<
7305 12,
7306 0x3,
7307 1,
7308 0,
7309 p206pfs_ha::Eofr,
7310 p206pfs_ha::Eofr,
7311 P206PfsHa_SPEC,
7312 crate::common::RW,
7313 >::from_register(self, 0)
7314 }
7315
7316 #[doc = "IRQ Input Enable"]
7317 #[inline(always)]
7318 pub fn isel(
7319 self,
7320 ) -> crate::common::RegisterField<
7321 14,
7322 0x1,
7323 1,
7324 0,
7325 p206pfs_ha::Isel,
7326 p206pfs_ha::Isel,
7327 P206PfsHa_SPEC,
7328 crate::common::RW,
7329 > {
7330 crate::common::RegisterField::<
7331 14,
7332 0x1,
7333 1,
7334 0,
7335 p206pfs_ha::Isel,
7336 p206pfs_ha::Isel,
7337 P206PfsHa_SPEC,
7338 crate::common::RW,
7339 >::from_register(self, 0)
7340 }
7341
7342 #[doc = "Analog Input Enable"]
7343 #[inline(always)]
7344 pub fn asel(
7345 self,
7346 ) -> crate::common::RegisterField<
7347 15,
7348 0x1,
7349 1,
7350 0,
7351 p206pfs_ha::Asel,
7352 p206pfs_ha::Asel,
7353 P206PfsHa_SPEC,
7354 crate::common::RW,
7355 > {
7356 crate::common::RegisterField::<
7357 15,
7358 0x1,
7359 1,
7360 0,
7361 p206pfs_ha::Asel,
7362 p206pfs_ha::Asel,
7363 P206PfsHa_SPEC,
7364 crate::common::RW,
7365 >::from_register(self, 0)
7366 }
7367}
7368impl ::core::default::Default for P206PfsHa {
7369 #[inline(always)]
7370 fn default() -> P206PfsHa {
7371 <crate::RegValueT<P206PfsHa_SPEC> as RegisterValue<_>>::new(0)
7372 }
7373}
7374pub mod p206pfs_ha {
7375
7376 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7377 pub struct Podr_SPEC;
7378 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
7379 impl Podr {
7380 #[doc = "Output low"]
7381 pub const _0: Self = Self::new(0);
7382
7383 #[doc = "Output high"]
7384 pub const _1: Self = Self::new(1);
7385 }
7386 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7387 pub struct Pidr_SPEC;
7388 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
7389 impl Pidr {
7390 #[doc = "Low level"]
7391 pub const _0: Self = Self::new(0);
7392
7393 #[doc = "High level"]
7394 pub const _1: Self = Self::new(1);
7395 }
7396 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7397 pub struct Pdr_SPEC;
7398 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
7399 impl Pdr {
7400 #[doc = "Input (functions as an input pin)"]
7401 pub const _0: Self = Self::new(0);
7402
7403 #[doc = "Output (functions as an output pin)"]
7404 pub const _1: Self = Self::new(1);
7405 }
7406 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7407 pub struct Pcr_SPEC;
7408 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
7409 impl Pcr {
7410 #[doc = "Disable input pull-up"]
7411 pub const _0: Self = Self::new(0);
7412
7413 #[doc = "Enable input pull-up"]
7414 pub const _1: Self = Self::new(1);
7415 }
7416 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7417 pub struct Ncodr_SPEC;
7418 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
7419 impl Ncodr {
7420 #[doc = "Output CMOS"]
7421 pub const _0: Self = Self::new(0);
7422
7423 #[doc = "Output NMOS open-drain"]
7424 pub const _1: Self = Self::new(1);
7425 }
7426 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7427 pub struct Eofr_SPEC;
7428 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
7429 impl Eofr {
7430 #[doc = "Don\'t care"]
7431 pub const _00: Self = Self::new(0);
7432
7433 #[doc = "Detect rising edge"]
7434 pub const _01: Self = Self::new(1);
7435
7436 #[doc = "Detect falling edge"]
7437 pub const _10: Self = Self::new(2);
7438
7439 #[doc = "Detect both edges"]
7440 pub const _11: Self = Self::new(3);
7441 }
7442 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7443 pub struct Isel_SPEC;
7444 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
7445 impl Isel {
7446 #[doc = "Do not use as IRQn input pin"]
7447 pub const _0: Self = Self::new(0);
7448
7449 #[doc = "Use as IRQn input pin"]
7450 pub const _1: Self = Self::new(1);
7451 }
7452 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7453 pub struct Asel_SPEC;
7454 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
7455 impl Asel {
7456 #[doc = "Do not use as analog pin"]
7457 pub const _0: Self = Self::new(0);
7458
7459 #[doc = "Use as analog pin"]
7460 pub const _1: Self = Self::new(1);
7461 }
7462}
7463#[doc(hidden)]
7464#[derive(Copy, Clone, Eq, PartialEq)]
7465pub struct P206PfsBy_SPEC;
7466impl crate::sealed::RegSpec for P206PfsBy_SPEC {
7467 type DataType = u8;
7468}
7469
7470#[doc = "Port 1n206 Pin Function Select Register"]
7471pub type P206PfsBy = crate::RegValueT<P206PfsBy_SPEC>;
7472
7473impl P206PfsBy {
7474 #[doc = "Port Output Data"]
7475 #[inline(always)]
7476 pub fn podr(
7477 self,
7478 ) -> crate::common::RegisterField<
7479 0,
7480 0x1,
7481 1,
7482 0,
7483 p206pfs_by::Podr,
7484 p206pfs_by::Podr,
7485 P206PfsBy_SPEC,
7486 crate::common::RW,
7487 > {
7488 crate::common::RegisterField::<
7489 0,
7490 0x1,
7491 1,
7492 0,
7493 p206pfs_by::Podr,
7494 p206pfs_by::Podr,
7495 P206PfsBy_SPEC,
7496 crate::common::RW,
7497 >::from_register(self, 0)
7498 }
7499
7500 #[doc = "Port State"]
7501 #[inline(always)]
7502 pub fn pidr(
7503 self,
7504 ) -> crate::common::RegisterField<
7505 1,
7506 0x1,
7507 1,
7508 0,
7509 p206pfs_by::Pidr,
7510 p206pfs_by::Pidr,
7511 P206PfsBy_SPEC,
7512 crate::common::R,
7513 > {
7514 crate::common::RegisterField::<
7515 1,
7516 0x1,
7517 1,
7518 0,
7519 p206pfs_by::Pidr,
7520 p206pfs_by::Pidr,
7521 P206PfsBy_SPEC,
7522 crate::common::R,
7523 >::from_register(self, 0)
7524 }
7525
7526 #[doc = "Port Direction"]
7527 #[inline(always)]
7528 pub fn pdr(
7529 self,
7530 ) -> crate::common::RegisterField<
7531 2,
7532 0x1,
7533 1,
7534 0,
7535 p206pfs_by::Pdr,
7536 p206pfs_by::Pdr,
7537 P206PfsBy_SPEC,
7538 crate::common::RW,
7539 > {
7540 crate::common::RegisterField::<
7541 2,
7542 0x1,
7543 1,
7544 0,
7545 p206pfs_by::Pdr,
7546 p206pfs_by::Pdr,
7547 P206PfsBy_SPEC,
7548 crate::common::RW,
7549 >::from_register(self, 0)
7550 }
7551
7552 #[doc = "Pull-up Control"]
7553 #[inline(always)]
7554 pub fn pcr(
7555 self,
7556 ) -> crate::common::RegisterField<
7557 4,
7558 0x1,
7559 1,
7560 0,
7561 p206pfs_by::Pcr,
7562 p206pfs_by::Pcr,
7563 P206PfsBy_SPEC,
7564 crate::common::RW,
7565 > {
7566 crate::common::RegisterField::<
7567 4,
7568 0x1,
7569 1,
7570 0,
7571 p206pfs_by::Pcr,
7572 p206pfs_by::Pcr,
7573 P206PfsBy_SPEC,
7574 crate::common::RW,
7575 >::from_register(self, 0)
7576 }
7577
7578 #[doc = "N-Channel Open-Drain Control"]
7579 #[inline(always)]
7580 pub fn ncodr(
7581 self,
7582 ) -> crate::common::RegisterField<
7583 6,
7584 0x1,
7585 1,
7586 0,
7587 p206pfs_by::Ncodr,
7588 p206pfs_by::Ncodr,
7589 P206PfsBy_SPEC,
7590 crate::common::RW,
7591 > {
7592 crate::common::RegisterField::<
7593 6,
7594 0x1,
7595 1,
7596 0,
7597 p206pfs_by::Ncodr,
7598 p206pfs_by::Ncodr,
7599 P206PfsBy_SPEC,
7600 crate::common::RW,
7601 >::from_register(self, 0)
7602 }
7603}
7604impl ::core::default::Default for P206PfsBy {
7605 #[inline(always)]
7606 fn default() -> P206PfsBy {
7607 <crate::RegValueT<P206PfsBy_SPEC> as RegisterValue<_>>::new(0)
7608 }
7609}
7610pub mod p206pfs_by {
7611
7612 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7613 pub struct Podr_SPEC;
7614 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
7615 impl Podr {
7616 #[doc = "Output low"]
7617 pub const _0: Self = Self::new(0);
7618
7619 #[doc = "Output high"]
7620 pub const _1: Self = Self::new(1);
7621 }
7622 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7623 pub struct Pidr_SPEC;
7624 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
7625 impl Pidr {
7626 #[doc = "Low level"]
7627 pub const _0: Self = Self::new(0);
7628
7629 #[doc = "High level"]
7630 pub const _1: Self = Self::new(1);
7631 }
7632 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7633 pub struct Pdr_SPEC;
7634 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
7635 impl Pdr {
7636 #[doc = "Input (functions as an input pin)"]
7637 pub const _0: Self = Self::new(0);
7638
7639 #[doc = "Output (functions as an output pin)"]
7640 pub const _1: Self = Self::new(1);
7641 }
7642 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7643 pub struct Pcr_SPEC;
7644 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
7645 impl Pcr {
7646 #[doc = "Disable input pull-up"]
7647 pub const _0: Self = Self::new(0);
7648
7649 #[doc = "Enable input pull-up"]
7650 pub const _1: Self = Self::new(1);
7651 }
7652 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7653 pub struct Ncodr_SPEC;
7654 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
7655 impl Ncodr {
7656 #[doc = "Output CMOS"]
7657 pub const _0: Self = Self::new(0);
7658
7659 #[doc = "Output NMOS open-drain"]
7660 pub const _1: Self = Self::new(1);
7661 }
7662}
7663#[doc(hidden)]
7664#[derive(Copy, Clone, Eq, PartialEq)]
7665pub struct P207Pfs_SPEC;
7666impl crate::sealed::RegSpec for P207Pfs_SPEC {
7667 type DataType = u32;
7668}
7669
7670#[doc = "Port 1n207 Pin Function Select Register"]
7671pub type P207Pfs = crate::RegValueT<P207Pfs_SPEC>;
7672
7673impl P207Pfs {
7674 #[doc = "Port Output Data"]
7675 #[inline(always)]
7676 pub fn podr(
7677 self,
7678 ) -> crate::common::RegisterField<
7679 0,
7680 0x1,
7681 1,
7682 0,
7683 p207pfs::Podr,
7684 p207pfs::Podr,
7685 P207Pfs_SPEC,
7686 crate::common::RW,
7687 > {
7688 crate::common::RegisterField::<
7689 0,
7690 0x1,
7691 1,
7692 0,
7693 p207pfs::Podr,
7694 p207pfs::Podr,
7695 P207Pfs_SPEC,
7696 crate::common::RW,
7697 >::from_register(self, 0)
7698 }
7699
7700 #[doc = "Port State"]
7701 #[inline(always)]
7702 pub fn pidr(
7703 self,
7704 ) -> crate::common::RegisterField<
7705 1,
7706 0x1,
7707 1,
7708 0,
7709 p207pfs::Pidr,
7710 p207pfs::Pidr,
7711 P207Pfs_SPEC,
7712 crate::common::R,
7713 > {
7714 crate::common::RegisterField::<
7715 1,
7716 0x1,
7717 1,
7718 0,
7719 p207pfs::Pidr,
7720 p207pfs::Pidr,
7721 P207Pfs_SPEC,
7722 crate::common::R,
7723 >::from_register(self, 0)
7724 }
7725
7726 #[doc = "Port Direction"]
7727 #[inline(always)]
7728 pub fn pdr(
7729 self,
7730 ) -> crate::common::RegisterField<
7731 2,
7732 0x1,
7733 1,
7734 0,
7735 p207pfs::Pdr,
7736 p207pfs::Pdr,
7737 P207Pfs_SPEC,
7738 crate::common::RW,
7739 > {
7740 crate::common::RegisterField::<
7741 2,
7742 0x1,
7743 1,
7744 0,
7745 p207pfs::Pdr,
7746 p207pfs::Pdr,
7747 P207Pfs_SPEC,
7748 crate::common::RW,
7749 >::from_register(self, 0)
7750 }
7751
7752 #[doc = "Pull-up Control"]
7753 #[inline(always)]
7754 pub fn pcr(
7755 self,
7756 ) -> crate::common::RegisterField<
7757 4,
7758 0x1,
7759 1,
7760 0,
7761 p207pfs::Pcr,
7762 p207pfs::Pcr,
7763 P207Pfs_SPEC,
7764 crate::common::RW,
7765 > {
7766 crate::common::RegisterField::<
7767 4,
7768 0x1,
7769 1,
7770 0,
7771 p207pfs::Pcr,
7772 p207pfs::Pcr,
7773 P207Pfs_SPEC,
7774 crate::common::RW,
7775 >::from_register(self, 0)
7776 }
7777
7778 #[doc = "N-Channel Open-Drain Control"]
7779 #[inline(always)]
7780 pub fn ncodr(
7781 self,
7782 ) -> crate::common::RegisterField<
7783 6,
7784 0x1,
7785 1,
7786 0,
7787 p207pfs::Ncodr,
7788 p207pfs::Ncodr,
7789 P207Pfs_SPEC,
7790 crate::common::RW,
7791 > {
7792 crate::common::RegisterField::<
7793 6,
7794 0x1,
7795 1,
7796 0,
7797 p207pfs::Ncodr,
7798 p207pfs::Ncodr,
7799 P207Pfs_SPEC,
7800 crate::common::RW,
7801 >::from_register(self, 0)
7802 }
7803
7804 #[doc = "Event on Falling/Event on Rising"]
7805 #[inline(always)]
7806 pub fn eofr(
7807 self,
7808 ) -> crate::common::RegisterField<
7809 12,
7810 0x3,
7811 1,
7812 0,
7813 p207pfs::Eofr,
7814 p207pfs::Eofr,
7815 P207Pfs_SPEC,
7816 crate::common::RW,
7817 > {
7818 crate::common::RegisterField::<
7819 12,
7820 0x3,
7821 1,
7822 0,
7823 p207pfs::Eofr,
7824 p207pfs::Eofr,
7825 P207Pfs_SPEC,
7826 crate::common::RW,
7827 >::from_register(self, 0)
7828 }
7829
7830 #[doc = "IRQ Input Enable"]
7831 #[inline(always)]
7832 pub fn isel(
7833 self,
7834 ) -> crate::common::RegisterField<
7835 14,
7836 0x1,
7837 1,
7838 0,
7839 p207pfs::Isel,
7840 p207pfs::Isel,
7841 P207Pfs_SPEC,
7842 crate::common::RW,
7843 > {
7844 crate::common::RegisterField::<
7845 14,
7846 0x1,
7847 1,
7848 0,
7849 p207pfs::Isel,
7850 p207pfs::Isel,
7851 P207Pfs_SPEC,
7852 crate::common::RW,
7853 >::from_register(self, 0)
7854 }
7855
7856 #[doc = "Analog Input Enable"]
7857 #[inline(always)]
7858 pub fn asel(
7859 self,
7860 ) -> crate::common::RegisterField<
7861 15,
7862 0x1,
7863 1,
7864 0,
7865 p207pfs::Asel,
7866 p207pfs::Asel,
7867 P207Pfs_SPEC,
7868 crate::common::RW,
7869 > {
7870 crate::common::RegisterField::<
7871 15,
7872 0x1,
7873 1,
7874 0,
7875 p207pfs::Asel,
7876 p207pfs::Asel,
7877 P207Pfs_SPEC,
7878 crate::common::RW,
7879 >::from_register(self, 0)
7880 }
7881
7882 #[doc = "Port Mode Control"]
7883 #[inline(always)]
7884 pub fn pmr(
7885 self,
7886 ) -> crate::common::RegisterField<
7887 16,
7888 0x1,
7889 1,
7890 0,
7891 p207pfs::Pmr,
7892 p207pfs::Pmr,
7893 P207Pfs_SPEC,
7894 crate::common::RW,
7895 > {
7896 crate::common::RegisterField::<
7897 16,
7898 0x1,
7899 1,
7900 0,
7901 p207pfs::Pmr,
7902 p207pfs::Pmr,
7903 P207Pfs_SPEC,
7904 crate::common::RW,
7905 >::from_register(self, 0)
7906 }
7907
7908 #[doc = "Peripheral Select"]
7909 #[inline(always)]
7910 pub fn psel(
7911 self,
7912 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P207Pfs_SPEC, crate::common::RW> {
7913 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P207Pfs_SPEC,crate::common::RW>::from_register(self,0)
7914 }
7915}
7916impl ::core::default::Default for P207Pfs {
7917 #[inline(always)]
7918 fn default() -> P207Pfs {
7919 <crate::RegValueT<P207Pfs_SPEC> as RegisterValue<_>>::new(0)
7920 }
7921}
7922pub mod p207pfs {
7923
7924 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7925 pub struct Podr_SPEC;
7926 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
7927 impl Podr {
7928 #[doc = "Output low"]
7929 pub const _0: Self = Self::new(0);
7930
7931 #[doc = "Output high"]
7932 pub const _1: Self = Self::new(1);
7933 }
7934 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7935 pub struct Pidr_SPEC;
7936 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
7937 impl Pidr {
7938 #[doc = "Low level"]
7939 pub const _0: Self = Self::new(0);
7940
7941 #[doc = "High level"]
7942 pub const _1: Self = Self::new(1);
7943 }
7944 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7945 pub struct Pdr_SPEC;
7946 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
7947 impl Pdr {
7948 #[doc = "Input (functions as an input pin)"]
7949 pub const _0: Self = Self::new(0);
7950
7951 #[doc = "Output (functions as an output pin)"]
7952 pub const _1: Self = Self::new(1);
7953 }
7954 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7955 pub struct Pcr_SPEC;
7956 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
7957 impl Pcr {
7958 #[doc = "Disable input pull-up"]
7959 pub const _0: Self = Self::new(0);
7960
7961 #[doc = "Enable input pull-up"]
7962 pub const _1: Self = Self::new(1);
7963 }
7964 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7965 pub struct Ncodr_SPEC;
7966 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
7967 impl Ncodr {
7968 #[doc = "Output CMOS"]
7969 pub const _0: Self = Self::new(0);
7970
7971 #[doc = "Output NMOS open-drain"]
7972 pub const _1: Self = Self::new(1);
7973 }
7974 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7975 pub struct Eofr_SPEC;
7976 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
7977 impl Eofr {
7978 #[doc = "Don\'t care"]
7979 pub const _00: Self = Self::new(0);
7980
7981 #[doc = "Detect rising edge"]
7982 pub const _01: Self = Self::new(1);
7983
7984 #[doc = "Detect falling edge"]
7985 pub const _10: Self = Self::new(2);
7986
7987 #[doc = "Detect both edges"]
7988 pub const _11: Self = Self::new(3);
7989 }
7990 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7991 pub struct Isel_SPEC;
7992 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
7993 impl Isel {
7994 #[doc = "Do not use as IRQn input pin"]
7995 pub const _0: Self = Self::new(0);
7996
7997 #[doc = "Use as IRQn input pin"]
7998 pub const _1: Self = Self::new(1);
7999 }
8000 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8001 pub struct Asel_SPEC;
8002 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
8003 impl Asel {
8004 #[doc = "Do not use as analog pin"]
8005 pub const _0: Self = Self::new(0);
8006
8007 #[doc = "Use as analog pin"]
8008 pub const _1: Self = Self::new(1);
8009 }
8010 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8011 pub struct Pmr_SPEC;
8012 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
8013 impl Pmr {
8014 #[doc = "Use as general I/O pin"]
8015 pub const _0: Self = Self::new(0);
8016
8017 #[doc = "Use as I/O port for peripheral functions"]
8018 pub const _1: Self = Self::new(1);
8019 }
8020}
8021#[doc(hidden)]
8022#[derive(Copy, Clone, Eq, PartialEq)]
8023pub struct P207PfsHa_SPEC;
8024impl crate::sealed::RegSpec for P207PfsHa_SPEC {
8025 type DataType = u16;
8026}
8027
8028#[doc = "Port 1n207 Pin Function Select Register"]
8029pub type P207PfsHa = crate::RegValueT<P207PfsHa_SPEC>;
8030
8031impl P207PfsHa {
8032 #[doc = "Port Output Data"]
8033 #[inline(always)]
8034 pub fn podr(
8035 self,
8036 ) -> crate::common::RegisterField<
8037 0,
8038 0x1,
8039 1,
8040 0,
8041 p207pfs_ha::Podr,
8042 p207pfs_ha::Podr,
8043 P207PfsHa_SPEC,
8044 crate::common::RW,
8045 > {
8046 crate::common::RegisterField::<
8047 0,
8048 0x1,
8049 1,
8050 0,
8051 p207pfs_ha::Podr,
8052 p207pfs_ha::Podr,
8053 P207PfsHa_SPEC,
8054 crate::common::RW,
8055 >::from_register(self, 0)
8056 }
8057
8058 #[doc = "Port State"]
8059 #[inline(always)]
8060 pub fn pidr(
8061 self,
8062 ) -> crate::common::RegisterField<
8063 1,
8064 0x1,
8065 1,
8066 0,
8067 p207pfs_ha::Pidr,
8068 p207pfs_ha::Pidr,
8069 P207PfsHa_SPEC,
8070 crate::common::R,
8071 > {
8072 crate::common::RegisterField::<
8073 1,
8074 0x1,
8075 1,
8076 0,
8077 p207pfs_ha::Pidr,
8078 p207pfs_ha::Pidr,
8079 P207PfsHa_SPEC,
8080 crate::common::R,
8081 >::from_register(self, 0)
8082 }
8083
8084 #[doc = "Port Direction"]
8085 #[inline(always)]
8086 pub fn pdr(
8087 self,
8088 ) -> crate::common::RegisterField<
8089 2,
8090 0x1,
8091 1,
8092 0,
8093 p207pfs_ha::Pdr,
8094 p207pfs_ha::Pdr,
8095 P207PfsHa_SPEC,
8096 crate::common::RW,
8097 > {
8098 crate::common::RegisterField::<
8099 2,
8100 0x1,
8101 1,
8102 0,
8103 p207pfs_ha::Pdr,
8104 p207pfs_ha::Pdr,
8105 P207PfsHa_SPEC,
8106 crate::common::RW,
8107 >::from_register(self, 0)
8108 }
8109
8110 #[doc = "Pull-up Control"]
8111 #[inline(always)]
8112 pub fn pcr(
8113 self,
8114 ) -> crate::common::RegisterField<
8115 4,
8116 0x1,
8117 1,
8118 0,
8119 p207pfs_ha::Pcr,
8120 p207pfs_ha::Pcr,
8121 P207PfsHa_SPEC,
8122 crate::common::RW,
8123 > {
8124 crate::common::RegisterField::<
8125 4,
8126 0x1,
8127 1,
8128 0,
8129 p207pfs_ha::Pcr,
8130 p207pfs_ha::Pcr,
8131 P207PfsHa_SPEC,
8132 crate::common::RW,
8133 >::from_register(self, 0)
8134 }
8135
8136 #[doc = "N-Channel Open-Drain Control"]
8137 #[inline(always)]
8138 pub fn ncodr(
8139 self,
8140 ) -> crate::common::RegisterField<
8141 6,
8142 0x1,
8143 1,
8144 0,
8145 p207pfs_ha::Ncodr,
8146 p207pfs_ha::Ncodr,
8147 P207PfsHa_SPEC,
8148 crate::common::RW,
8149 > {
8150 crate::common::RegisterField::<
8151 6,
8152 0x1,
8153 1,
8154 0,
8155 p207pfs_ha::Ncodr,
8156 p207pfs_ha::Ncodr,
8157 P207PfsHa_SPEC,
8158 crate::common::RW,
8159 >::from_register(self, 0)
8160 }
8161
8162 #[doc = "Event on Falling/Event on Rising"]
8163 #[inline(always)]
8164 pub fn eofr(
8165 self,
8166 ) -> crate::common::RegisterField<
8167 12,
8168 0x3,
8169 1,
8170 0,
8171 p207pfs_ha::Eofr,
8172 p207pfs_ha::Eofr,
8173 P207PfsHa_SPEC,
8174 crate::common::RW,
8175 > {
8176 crate::common::RegisterField::<
8177 12,
8178 0x3,
8179 1,
8180 0,
8181 p207pfs_ha::Eofr,
8182 p207pfs_ha::Eofr,
8183 P207PfsHa_SPEC,
8184 crate::common::RW,
8185 >::from_register(self, 0)
8186 }
8187
8188 #[doc = "IRQ Input Enable"]
8189 #[inline(always)]
8190 pub fn isel(
8191 self,
8192 ) -> crate::common::RegisterField<
8193 14,
8194 0x1,
8195 1,
8196 0,
8197 p207pfs_ha::Isel,
8198 p207pfs_ha::Isel,
8199 P207PfsHa_SPEC,
8200 crate::common::RW,
8201 > {
8202 crate::common::RegisterField::<
8203 14,
8204 0x1,
8205 1,
8206 0,
8207 p207pfs_ha::Isel,
8208 p207pfs_ha::Isel,
8209 P207PfsHa_SPEC,
8210 crate::common::RW,
8211 >::from_register(self, 0)
8212 }
8213
8214 #[doc = "Analog Input Enable"]
8215 #[inline(always)]
8216 pub fn asel(
8217 self,
8218 ) -> crate::common::RegisterField<
8219 15,
8220 0x1,
8221 1,
8222 0,
8223 p207pfs_ha::Asel,
8224 p207pfs_ha::Asel,
8225 P207PfsHa_SPEC,
8226 crate::common::RW,
8227 > {
8228 crate::common::RegisterField::<
8229 15,
8230 0x1,
8231 1,
8232 0,
8233 p207pfs_ha::Asel,
8234 p207pfs_ha::Asel,
8235 P207PfsHa_SPEC,
8236 crate::common::RW,
8237 >::from_register(self, 0)
8238 }
8239}
8240impl ::core::default::Default for P207PfsHa {
8241 #[inline(always)]
8242 fn default() -> P207PfsHa {
8243 <crate::RegValueT<P207PfsHa_SPEC> as RegisterValue<_>>::new(0)
8244 }
8245}
8246pub mod p207pfs_ha {
8247
8248 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8249 pub struct Podr_SPEC;
8250 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
8251 impl Podr {
8252 #[doc = "Output low"]
8253 pub const _0: Self = Self::new(0);
8254
8255 #[doc = "Output high"]
8256 pub const _1: Self = Self::new(1);
8257 }
8258 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8259 pub struct Pidr_SPEC;
8260 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
8261 impl Pidr {
8262 #[doc = "Low level"]
8263 pub const _0: Self = Self::new(0);
8264
8265 #[doc = "High level"]
8266 pub const _1: Self = Self::new(1);
8267 }
8268 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8269 pub struct Pdr_SPEC;
8270 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
8271 impl Pdr {
8272 #[doc = "Input (functions as an input pin)"]
8273 pub const _0: Self = Self::new(0);
8274
8275 #[doc = "Output (functions as an output pin)"]
8276 pub const _1: Self = Self::new(1);
8277 }
8278 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8279 pub struct Pcr_SPEC;
8280 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
8281 impl Pcr {
8282 #[doc = "Disable input pull-up"]
8283 pub const _0: Self = Self::new(0);
8284
8285 #[doc = "Enable input pull-up"]
8286 pub const _1: Self = Self::new(1);
8287 }
8288 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8289 pub struct Ncodr_SPEC;
8290 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
8291 impl Ncodr {
8292 #[doc = "Output CMOS"]
8293 pub const _0: Self = Self::new(0);
8294
8295 #[doc = "Output NMOS open-drain"]
8296 pub const _1: Self = Self::new(1);
8297 }
8298 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8299 pub struct Eofr_SPEC;
8300 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
8301 impl Eofr {
8302 #[doc = "Don\'t care"]
8303 pub const _00: Self = Self::new(0);
8304
8305 #[doc = "Detect rising edge"]
8306 pub const _01: Self = Self::new(1);
8307
8308 #[doc = "Detect falling edge"]
8309 pub const _10: Self = Self::new(2);
8310
8311 #[doc = "Detect both edges"]
8312 pub const _11: Self = Self::new(3);
8313 }
8314 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8315 pub struct Isel_SPEC;
8316 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
8317 impl Isel {
8318 #[doc = "Do not use as IRQn input pin"]
8319 pub const _0: Self = Self::new(0);
8320
8321 #[doc = "Use as IRQn input pin"]
8322 pub const _1: Self = Self::new(1);
8323 }
8324 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8325 pub struct Asel_SPEC;
8326 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
8327 impl Asel {
8328 #[doc = "Do not use as analog pin"]
8329 pub const _0: Self = Self::new(0);
8330
8331 #[doc = "Use as analog pin"]
8332 pub const _1: Self = Self::new(1);
8333 }
8334}
8335#[doc(hidden)]
8336#[derive(Copy, Clone, Eq, PartialEq)]
8337pub struct P207PfsBy_SPEC;
8338impl crate::sealed::RegSpec for P207PfsBy_SPEC {
8339 type DataType = u8;
8340}
8341
8342#[doc = "Port 1n207 Pin Function Select Register"]
8343pub type P207PfsBy = crate::RegValueT<P207PfsBy_SPEC>;
8344
8345impl P207PfsBy {
8346 #[doc = "Port Output Data"]
8347 #[inline(always)]
8348 pub fn podr(
8349 self,
8350 ) -> crate::common::RegisterField<
8351 0,
8352 0x1,
8353 1,
8354 0,
8355 p207pfs_by::Podr,
8356 p207pfs_by::Podr,
8357 P207PfsBy_SPEC,
8358 crate::common::RW,
8359 > {
8360 crate::common::RegisterField::<
8361 0,
8362 0x1,
8363 1,
8364 0,
8365 p207pfs_by::Podr,
8366 p207pfs_by::Podr,
8367 P207PfsBy_SPEC,
8368 crate::common::RW,
8369 >::from_register(self, 0)
8370 }
8371
8372 #[doc = "Port State"]
8373 #[inline(always)]
8374 pub fn pidr(
8375 self,
8376 ) -> crate::common::RegisterField<
8377 1,
8378 0x1,
8379 1,
8380 0,
8381 p207pfs_by::Pidr,
8382 p207pfs_by::Pidr,
8383 P207PfsBy_SPEC,
8384 crate::common::R,
8385 > {
8386 crate::common::RegisterField::<
8387 1,
8388 0x1,
8389 1,
8390 0,
8391 p207pfs_by::Pidr,
8392 p207pfs_by::Pidr,
8393 P207PfsBy_SPEC,
8394 crate::common::R,
8395 >::from_register(self, 0)
8396 }
8397
8398 #[doc = "Port Direction"]
8399 #[inline(always)]
8400 pub fn pdr(
8401 self,
8402 ) -> crate::common::RegisterField<
8403 2,
8404 0x1,
8405 1,
8406 0,
8407 p207pfs_by::Pdr,
8408 p207pfs_by::Pdr,
8409 P207PfsBy_SPEC,
8410 crate::common::RW,
8411 > {
8412 crate::common::RegisterField::<
8413 2,
8414 0x1,
8415 1,
8416 0,
8417 p207pfs_by::Pdr,
8418 p207pfs_by::Pdr,
8419 P207PfsBy_SPEC,
8420 crate::common::RW,
8421 >::from_register(self, 0)
8422 }
8423
8424 #[doc = "Pull-up Control"]
8425 #[inline(always)]
8426 pub fn pcr(
8427 self,
8428 ) -> crate::common::RegisterField<
8429 4,
8430 0x1,
8431 1,
8432 0,
8433 p207pfs_by::Pcr,
8434 p207pfs_by::Pcr,
8435 P207PfsBy_SPEC,
8436 crate::common::RW,
8437 > {
8438 crate::common::RegisterField::<
8439 4,
8440 0x1,
8441 1,
8442 0,
8443 p207pfs_by::Pcr,
8444 p207pfs_by::Pcr,
8445 P207PfsBy_SPEC,
8446 crate::common::RW,
8447 >::from_register(self, 0)
8448 }
8449
8450 #[doc = "N-Channel Open-Drain Control"]
8451 #[inline(always)]
8452 pub fn ncodr(
8453 self,
8454 ) -> crate::common::RegisterField<
8455 6,
8456 0x1,
8457 1,
8458 0,
8459 p207pfs_by::Ncodr,
8460 p207pfs_by::Ncodr,
8461 P207PfsBy_SPEC,
8462 crate::common::RW,
8463 > {
8464 crate::common::RegisterField::<
8465 6,
8466 0x1,
8467 1,
8468 0,
8469 p207pfs_by::Ncodr,
8470 p207pfs_by::Ncodr,
8471 P207PfsBy_SPEC,
8472 crate::common::RW,
8473 >::from_register(self, 0)
8474 }
8475}
8476impl ::core::default::Default for P207PfsBy {
8477 #[inline(always)]
8478 fn default() -> P207PfsBy {
8479 <crate::RegValueT<P207PfsBy_SPEC> as RegisterValue<_>>::new(0)
8480 }
8481}
8482pub mod p207pfs_by {
8483
8484 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8485 pub struct Podr_SPEC;
8486 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
8487 impl Podr {
8488 #[doc = "Output low"]
8489 pub const _0: Self = Self::new(0);
8490
8491 #[doc = "Output high"]
8492 pub const _1: Self = Self::new(1);
8493 }
8494 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8495 pub struct Pidr_SPEC;
8496 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
8497 impl Pidr {
8498 #[doc = "Low level"]
8499 pub const _0: Self = Self::new(0);
8500
8501 #[doc = "High level"]
8502 pub const _1: Self = Self::new(1);
8503 }
8504 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8505 pub struct Pdr_SPEC;
8506 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
8507 impl Pdr {
8508 #[doc = "Input (functions as an input pin)"]
8509 pub const _0: Self = Self::new(0);
8510
8511 #[doc = "Output (functions as an output pin)"]
8512 pub const _1: Self = Self::new(1);
8513 }
8514 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8515 pub struct Pcr_SPEC;
8516 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
8517 impl Pcr {
8518 #[doc = "Disable input pull-up"]
8519 pub const _0: Self = Self::new(0);
8520
8521 #[doc = "Enable input pull-up"]
8522 pub const _1: Self = Self::new(1);
8523 }
8524 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8525 pub struct Ncodr_SPEC;
8526 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
8527 impl Ncodr {
8528 #[doc = "Output CMOS"]
8529 pub const _0: Self = Self::new(0);
8530
8531 #[doc = "Output NMOS open-drain"]
8532 pub const _1: Self = Self::new(1);
8533 }
8534}
8535#[doc(hidden)]
8536#[derive(Copy, Clone, Eq, PartialEq)]
8537pub struct P208Pfs_SPEC;
8538impl crate::sealed::RegSpec for P208Pfs_SPEC {
8539 type DataType = u32;
8540}
8541
8542#[doc = "Port 1n208 Pin Function Select Register"]
8543pub type P208Pfs = crate::RegValueT<P208Pfs_SPEC>;
8544
8545impl P208Pfs {
8546 #[doc = "Port Output Data"]
8547 #[inline(always)]
8548 pub fn podr(
8549 self,
8550 ) -> crate::common::RegisterField<
8551 0,
8552 0x1,
8553 1,
8554 0,
8555 p208pfs::Podr,
8556 p208pfs::Podr,
8557 P208Pfs_SPEC,
8558 crate::common::RW,
8559 > {
8560 crate::common::RegisterField::<
8561 0,
8562 0x1,
8563 1,
8564 0,
8565 p208pfs::Podr,
8566 p208pfs::Podr,
8567 P208Pfs_SPEC,
8568 crate::common::RW,
8569 >::from_register(self, 0)
8570 }
8571
8572 #[doc = "Port State"]
8573 #[inline(always)]
8574 pub fn pidr(
8575 self,
8576 ) -> crate::common::RegisterField<
8577 1,
8578 0x1,
8579 1,
8580 0,
8581 p208pfs::Pidr,
8582 p208pfs::Pidr,
8583 P208Pfs_SPEC,
8584 crate::common::R,
8585 > {
8586 crate::common::RegisterField::<
8587 1,
8588 0x1,
8589 1,
8590 0,
8591 p208pfs::Pidr,
8592 p208pfs::Pidr,
8593 P208Pfs_SPEC,
8594 crate::common::R,
8595 >::from_register(self, 0)
8596 }
8597
8598 #[doc = "Port Direction"]
8599 #[inline(always)]
8600 pub fn pdr(
8601 self,
8602 ) -> crate::common::RegisterField<
8603 2,
8604 0x1,
8605 1,
8606 0,
8607 p208pfs::Pdr,
8608 p208pfs::Pdr,
8609 P208Pfs_SPEC,
8610 crate::common::RW,
8611 > {
8612 crate::common::RegisterField::<
8613 2,
8614 0x1,
8615 1,
8616 0,
8617 p208pfs::Pdr,
8618 p208pfs::Pdr,
8619 P208Pfs_SPEC,
8620 crate::common::RW,
8621 >::from_register(self, 0)
8622 }
8623
8624 #[doc = "Pull-up Control"]
8625 #[inline(always)]
8626 pub fn pcr(
8627 self,
8628 ) -> crate::common::RegisterField<
8629 4,
8630 0x1,
8631 1,
8632 0,
8633 p208pfs::Pcr,
8634 p208pfs::Pcr,
8635 P208Pfs_SPEC,
8636 crate::common::RW,
8637 > {
8638 crate::common::RegisterField::<
8639 4,
8640 0x1,
8641 1,
8642 0,
8643 p208pfs::Pcr,
8644 p208pfs::Pcr,
8645 P208Pfs_SPEC,
8646 crate::common::RW,
8647 >::from_register(self, 0)
8648 }
8649
8650 #[doc = "N-Channel Open-Drain Control"]
8651 #[inline(always)]
8652 pub fn ncodr(
8653 self,
8654 ) -> crate::common::RegisterField<
8655 6,
8656 0x1,
8657 1,
8658 0,
8659 p208pfs::Ncodr,
8660 p208pfs::Ncodr,
8661 P208Pfs_SPEC,
8662 crate::common::RW,
8663 > {
8664 crate::common::RegisterField::<
8665 6,
8666 0x1,
8667 1,
8668 0,
8669 p208pfs::Ncodr,
8670 p208pfs::Ncodr,
8671 P208Pfs_SPEC,
8672 crate::common::RW,
8673 >::from_register(self, 0)
8674 }
8675
8676 #[doc = "Event on Falling/Event on Rising"]
8677 #[inline(always)]
8678 pub fn eofr(
8679 self,
8680 ) -> crate::common::RegisterField<
8681 12,
8682 0x3,
8683 1,
8684 0,
8685 p208pfs::Eofr,
8686 p208pfs::Eofr,
8687 P208Pfs_SPEC,
8688 crate::common::RW,
8689 > {
8690 crate::common::RegisterField::<
8691 12,
8692 0x3,
8693 1,
8694 0,
8695 p208pfs::Eofr,
8696 p208pfs::Eofr,
8697 P208Pfs_SPEC,
8698 crate::common::RW,
8699 >::from_register(self, 0)
8700 }
8701
8702 #[doc = "IRQ Input Enable"]
8703 #[inline(always)]
8704 pub fn isel(
8705 self,
8706 ) -> crate::common::RegisterField<
8707 14,
8708 0x1,
8709 1,
8710 0,
8711 p208pfs::Isel,
8712 p208pfs::Isel,
8713 P208Pfs_SPEC,
8714 crate::common::RW,
8715 > {
8716 crate::common::RegisterField::<
8717 14,
8718 0x1,
8719 1,
8720 0,
8721 p208pfs::Isel,
8722 p208pfs::Isel,
8723 P208Pfs_SPEC,
8724 crate::common::RW,
8725 >::from_register(self, 0)
8726 }
8727
8728 #[doc = "Analog Input Enable"]
8729 #[inline(always)]
8730 pub fn asel(
8731 self,
8732 ) -> crate::common::RegisterField<
8733 15,
8734 0x1,
8735 1,
8736 0,
8737 p208pfs::Asel,
8738 p208pfs::Asel,
8739 P208Pfs_SPEC,
8740 crate::common::RW,
8741 > {
8742 crate::common::RegisterField::<
8743 15,
8744 0x1,
8745 1,
8746 0,
8747 p208pfs::Asel,
8748 p208pfs::Asel,
8749 P208Pfs_SPEC,
8750 crate::common::RW,
8751 >::from_register(self, 0)
8752 }
8753
8754 #[doc = "Port Mode Control"]
8755 #[inline(always)]
8756 pub fn pmr(
8757 self,
8758 ) -> crate::common::RegisterField<
8759 16,
8760 0x1,
8761 1,
8762 0,
8763 p208pfs::Pmr,
8764 p208pfs::Pmr,
8765 P208Pfs_SPEC,
8766 crate::common::RW,
8767 > {
8768 crate::common::RegisterField::<
8769 16,
8770 0x1,
8771 1,
8772 0,
8773 p208pfs::Pmr,
8774 p208pfs::Pmr,
8775 P208Pfs_SPEC,
8776 crate::common::RW,
8777 >::from_register(self, 0)
8778 }
8779
8780 #[doc = "Peripheral Select"]
8781 #[inline(always)]
8782 pub fn psel(
8783 self,
8784 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P208Pfs_SPEC, crate::common::RW> {
8785 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P208Pfs_SPEC,crate::common::RW>::from_register(self,0)
8786 }
8787}
8788impl ::core::default::Default for P208Pfs {
8789 #[inline(always)]
8790 fn default() -> P208Pfs {
8791 <crate::RegValueT<P208Pfs_SPEC> as RegisterValue<_>>::new(0)
8792 }
8793}
8794pub mod p208pfs {
8795
8796 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8797 pub struct Podr_SPEC;
8798 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
8799 impl Podr {
8800 #[doc = "Output low"]
8801 pub const _0: Self = Self::new(0);
8802
8803 #[doc = "Output high"]
8804 pub const _1: Self = Self::new(1);
8805 }
8806 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8807 pub struct Pidr_SPEC;
8808 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
8809 impl Pidr {
8810 #[doc = "Low level"]
8811 pub const _0: Self = Self::new(0);
8812
8813 #[doc = "High level"]
8814 pub const _1: Self = Self::new(1);
8815 }
8816 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8817 pub struct Pdr_SPEC;
8818 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
8819 impl Pdr {
8820 #[doc = "Input (functions as an input pin)"]
8821 pub const _0: Self = Self::new(0);
8822
8823 #[doc = "Output (functions as an output pin)"]
8824 pub const _1: Self = Self::new(1);
8825 }
8826 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8827 pub struct Pcr_SPEC;
8828 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
8829 impl Pcr {
8830 #[doc = "Disable input pull-up"]
8831 pub const _0: Self = Self::new(0);
8832
8833 #[doc = "Enable input pull-up"]
8834 pub const _1: Self = Self::new(1);
8835 }
8836 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8837 pub struct Ncodr_SPEC;
8838 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
8839 impl Ncodr {
8840 #[doc = "Output CMOS"]
8841 pub const _0: Self = Self::new(0);
8842
8843 #[doc = "Output NMOS open-drain"]
8844 pub const _1: Self = Self::new(1);
8845 }
8846 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8847 pub struct Eofr_SPEC;
8848 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
8849 impl Eofr {
8850 #[doc = "Don\'t care"]
8851 pub const _00: Self = Self::new(0);
8852
8853 #[doc = "Detect rising edge"]
8854 pub const _01: Self = Self::new(1);
8855
8856 #[doc = "Detect falling edge"]
8857 pub const _10: Self = Self::new(2);
8858
8859 #[doc = "Detect both edges"]
8860 pub const _11: Self = Self::new(3);
8861 }
8862 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8863 pub struct Isel_SPEC;
8864 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
8865 impl Isel {
8866 #[doc = "Do not use as IRQn input pin"]
8867 pub const _0: Self = Self::new(0);
8868
8869 #[doc = "Use as IRQn input pin"]
8870 pub const _1: Self = Self::new(1);
8871 }
8872 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8873 pub struct Asel_SPEC;
8874 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
8875 impl Asel {
8876 #[doc = "Do not use as analog pin"]
8877 pub const _0: Self = Self::new(0);
8878
8879 #[doc = "Use as analog pin"]
8880 pub const _1: Self = Self::new(1);
8881 }
8882 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
8883 pub struct Pmr_SPEC;
8884 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
8885 impl Pmr {
8886 #[doc = "Use as general I/O pin"]
8887 pub const _0: Self = Self::new(0);
8888
8889 #[doc = "Use as I/O port for peripheral functions"]
8890 pub const _1: Self = Self::new(1);
8891 }
8892}
8893#[doc(hidden)]
8894#[derive(Copy, Clone, Eq, PartialEq)]
8895pub struct P208PfsHa_SPEC;
8896impl crate::sealed::RegSpec for P208PfsHa_SPEC {
8897 type DataType = u16;
8898}
8899
8900#[doc = "Port 1n208 Pin Function Select Register"]
8901pub type P208PfsHa = crate::RegValueT<P208PfsHa_SPEC>;
8902
8903impl P208PfsHa {
8904 #[doc = "Port Output Data"]
8905 #[inline(always)]
8906 pub fn podr(
8907 self,
8908 ) -> crate::common::RegisterField<
8909 0,
8910 0x1,
8911 1,
8912 0,
8913 p208pfs_ha::Podr,
8914 p208pfs_ha::Podr,
8915 P208PfsHa_SPEC,
8916 crate::common::RW,
8917 > {
8918 crate::common::RegisterField::<
8919 0,
8920 0x1,
8921 1,
8922 0,
8923 p208pfs_ha::Podr,
8924 p208pfs_ha::Podr,
8925 P208PfsHa_SPEC,
8926 crate::common::RW,
8927 >::from_register(self, 0)
8928 }
8929
8930 #[doc = "Port State"]
8931 #[inline(always)]
8932 pub fn pidr(
8933 self,
8934 ) -> crate::common::RegisterField<
8935 1,
8936 0x1,
8937 1,
8938 0,
8939 p208pfs_ha::Pidr,
8940 p208pfs_ha::Pidr,
8941 P208PfsHa_SPEC,
8942 crate::common::R,
8943 > {
8944 crate::common::RegisterField::<
8945 1,
8946 0x1,
8947 1,
8948 0,
8949 p208pfs_ha::Pidr,
8950 p208pfs_ha::Pidr,
8951 P208PfsHa_SPEC,
8952 crate::common::R,
8953 >::from_register(self, 0)
8954 }
8955
8956 #[doc = "Port Direction"]
8957 #[inline(always)]
8958 pub fn pdr(
8959 self,
8960 ) -> crate::common::RegisterField<
8961 2,
8962 0x1,
8963 1,
8964 0,
8965 p208pfs_ha::Pdr,
8966 p208pfs_ha::Pdr,
8967 P208PfsHa_SPEC,
8968 crate::common::RW,
8969 > {
8970 crate::common::RegisterField::<
8971 2,
8972 0x1,
8973 1,
8974 0,
8975 p208pfs_ha::Pdr,
8976 p208pfs_ha::Pdr,
8977 P208PfsHa_SPEC,
8978 crate::common::RW,
8979 >::from_register(self, 0)
8980 }
8981
8982 #[doc = "Pull-up Control"]
8983 #[inline(always)]
8984 pub fn pcr(
8985 self,
8986 ) -> crate::common::RegisterField<
8987 4,
8988 0x1,
8989 1,
8990 0,
8991 p208pfs_ha::Pcr,
8992 p208pfs_ha::Pcr,
8993 P208PfsHa_SPEC,
8994 crate::common::RW,
8995 > {
8996 crate::common::RegisterField::<
8997 4,
8998 0x1,
8999 1,
9000 0,
9001 p208pfs_ha::Pcr,
9002 p208pfs_ha::Pcr,
9003 P208PfsHa_SPEC,
9004 crate::common::RW,
9005 >::from_register(self, 0)
9006 }
9007
9008 #[doc = "N-Channel Open-Drain Control"]
9009 #[inline(always)]
9010 pub fn ncodr(
9011 self,
9012 ) -> crate::common::RegisterField<
9013 6,
9014 0x1,
9015 1,
9016 0,
9017 p208pfs_ha::Ncodr,
9018 p208pfs_ha::Ncodr,
9019 P208PfsHa_SPEC,
9020 crate::common::RW,
9021 > {
9022 crate::common::RegisterField::<
9023 6,
9024 0x1,
9025 1,
9026 0,
9027 p208pfs_ha::Ncodr,
9028 p208pfs_ha::Ncodr,
9029 P208PfsHa_SPEC,
9030 crate::common::RW,
9031 >::from_register(self, 0)
9032 }
9033
9034 #[doc = "Event on Falling/Event on Rising"]
9035 #[inline(always)]
9036 pub fn eofr(
9037 self,
9038 ) -> crate::common::RegisterField<
9039 12,
9040 0x3,
9041 1,
9042 0,
9043 p208pfs_ha::Eofr,
9044 p208pfs_ha::Eofr,
9045 P208PfsHa_SPEC,
9046 crate::common::RW,
9047 > {
9048 crate::common::RegisterField::<
9049 12,
9050 0x3,
9051 1,
9052 0,
9053 p208pfs_ha::Eofr,
9054 p208pfs_ha::Eofr,
9055 P208PfsHa_SPEC,
9056 crate::common::RW,
9057 >::from_register(self, 0)
9058 }
9059
9060 #[doc = "IRQ Input Enable"]
9061 #[inline(always)]
9062 pub fn isel(
9063 self,
9064 ) -> crate::common::RegisterField<
9065 14,
9066 0x1,
9067 1,
9068 0,
9069 p208pfs_ha::Isel,
9070 p208pfs_ha::Isel,
9071 P208PfsHa_SPEC,
9072 crate::common::RW,
9073 > {
9074 crate::common::RegisterField::<
9075 14,
9076 0x1,
9077 1,
9078 0,
9079 p208pfs_ha::Isel,
9080 p208pfs_ha::Isel,
9081 P208PfsHa_SPEC,
9082 crate::common::RW,
9083 >::from_register(self, 0)
9084 }
9085
9086 #[doc = "Analog Input Enable"]
9087 #[inline(always)]
9088 pub fn asel(
9089 self,
9090 ) -> crate::common::RegisterField<
9091 15,
9092 0x1,
9093 1,
9094 0,
9095 p208pfs_ha::Asel,
9096 p208pfs_ha::Asel,
9097 P208PfsHa_SPEC,
9098 crate::common::RW,
9099 > {
9100 crate::common::RegisterField::<
9101 15,
9102 0x1,
9103 1,
9104 0,
9105 p208pfs_ha::Asel,
9106 p208pfs_ha::Asel,
9107 P208PfsHa_SPEC,
9108 crate::common::RW,
9109 >::from_register(self, 0)
9110 }
9111}
9112impl ::core::default::Default for P208PfsHa {
9113 #[inline(always)]
9114 fn default() -> P208PfsHa {
9115 <crate::RegValueT<P208PfsHa_SPEC> as RegisterValue<_>>::new(0)
9116 }
9117}
9118pub mod p208pfs_ha {
9119
9120 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9121 pub struct Podr_SPEC;
9122 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
9123 impl Podr {
9124 #[doc = "Output low"]
9125 pub const _0: Self = Self::new(0);
9126
9127 #[doc = "Output high"]
9128 pub const _1: Self = Self::new(1);
9129 }
9130 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9131 pub struct Pidr_SPEC;
9132 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
9133 impl Pidr {
9134 #[doc = "Low level"]
9135 pub const _0: Self = Self::new(0);
9136
9137 #[doc = "High level"]
9138 pub const _1: Self = Self::new(1);
9139 }
9140 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9141 pub struct Pdr_SPEC;
9142 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
9143 impl Pdr {
9144 #[doc = "Input (functions as an input pin)"]
9145 pub const _0: Self = Self::new(0);
9146
9147 #[doc = "Output (functions as an output pin)"]
9148 pub const _1: Self = Self::new(1);
9149 }
9150 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9151 pub struct Pcr_SPEC;
9152 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
9153 impl Pcr {
9154 #[doc = "Disable input pull-up"]
9155 pub const _0: Self = Self::new(0);
9156
9157 #[doc = "Enable input pull-up"]
9158 pub const _1: Self = Self::new(1);
9159 }
9160 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9161 pub struct Ncodr_SPEC;
9162 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
9163 impl Ncodr {
9164 #[doc = "Output CMOS"]
9165 pub const _0: Self = Self::new(0);
9166
9167 #[doc = "Output NMOS open-drain"]
9168 pub const _1: Self = Self::new(1);
9169 }
9170 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9171 pub struct Eofr_SPEC;
9172 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
9173 impl Eofr {
9174 #[doc = "Don\'t care"]
9175 pub const _00: Self = Self::new(0);
9176
9177 #[doc = "Detect rising edge"]
9178 pub const _01: Self = Self::new(1);
9179
9180 #[doc = "Detect falling edge"]
9181 pub const _10: Self = Self::new(2);
9182
9183 #[doc = "Detect both edges"]
9184 pub const _11: Self = Self::new(3);
9185 }
9186 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9187 pub struct Isel_SPEC;
9188 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
9189 impl Isel {
9190 #[doc = "Do not use as IRQn input pin"]
9191 pub const _0: Self = Self::new(0);
9192
9193 #[doc = "Use as IRQn input pin"]
9194 pub const _1: Self = Self::new(1);
9195 }
9196 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9197 pub struct Asel_SPEC;
9198 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
9199 impl Asel {
9200 #[doc = "Do not use as analog pin"]
9201 pub const _0: Self = Self::new(0);
9202
9203 #[doc = "Use as analog pin"]
9204 pub const _1: Self = Self::new(1);
9205 }
9206}
9207#[doc(hidden)]
9208#[derive(Copy, Clone, Eq, PartialEq)]
9209pub struct P208PfsBy_SPEC;
9210impl crate::sealed::RegSpec for P208PfsBy_SPEC {
9211 type DataType = u8;
9212}
9213
9214#[doc = "Port 1n208 Pin Function Select Register"]
9215pub type P208PfsBy = crate::RegValueT<P208PfsBy_SPEC>;
9216
9217impl P208PfsBy {
9218 #[doc = "Port Output Data"]
9219 #[inline(always)]
9220 pub fn podr(
9221 self,
9222 ) -> crate::common::RegisterField<
9223 0,
9224 0x1,
9225 1,
9226 0,
9227 p208pfs_by::Podr,
9228 p208pfs_by::Podr,
9229 P208PfsBy_SPEC,
9230 crate::common::RW,
9231 > {
9232 crate::common::RegisterField::<
9233 0,
9234 0x1,
9235 1,
9236 0,
9237 p208pfs_by::Podr,
9238 p208pfs_by::Podr,
9239 P208PfsBy_SPEC,
9240 crate::common::RW,
9241 >::from_register(self, 0)
9242 }
9243
9244 #[doc = "Port State"]
9245 #[inline(always)]
9246 pub fn pidr(
9247 self,
9248 ) -> crate::common::RegisterField<
9249 1,
9250 0x1,
9251 1,
9252 0,
9253 p208pfs_by::Pidr,
9254 p208pfs_by::Pidr,
9255 P208PfsBy_SPEC,
9256 crate::common::R,
9257 > {
9258 crate::common::RegisterField::<
9259 1,
9260 0x1,
9261 1,
9262 0,
9263 p208pfs_by::Pidr,
9264 p208pfs_by::Pidr,
9265 P208PfsBy_SPEC,
9266 crate::common::R,
9267 >::from_register(self, 0)
9268 }
9269
9270 #[doc = "Port Direction"]
9271 #[inline(always)]
9272 pub fn pdr(
9273 self,
9274 ) -> crate::common::RegisterField<
9275 2,
9276 0x1,
9277 1,
9278 0,
9279 p208pfs_by::Pdr,
9280 p208pfs_by::Pdr,
9281 P208PfsBy_SPEC,
9282 crate::common::RW,
9283 > {
9284 crate::common::RegisterField::<
9285 2,
9286 0x1,
9287 1,
9288 0,
9289 p208pfs_by::Pdr,
9290 p208pfs_by::Pdr,
9291 P208PfsBy_SPEC,
9292 crate::common::RW,
9293 >::from_register(self, 0)
9294 }
9295
9296 #[doc = "Pull-up Control"]
9297 #[inline(always)]
9298 pub fn pcr(
9299 self,
9300 ) -> crate::common::RegisterField<
9301 4,
9302 0x1,
9303 1,
9304 0,
9305 p208pfs_by::Pcr,
9306 p208pfs_by::Pcr,
9307 P208PfsBy_SPEC,
9308 crate::common::RW,
9309 > {
9310 crate::common::RegisterField::<
9311 4,
9312 0x1,
9313 1,
9314 0,
9315 p208pfs_by::Pcr,
9316 p208pfs_by::Pcr,
9317 P208PfsBy_SPEC,
9318 crate::common::RW,
9319 >::from_register(self, 0)
9320 }
9321
9322 #[doc = "N-Channel Open-Drain Control"]
9323 #[inline(always)]
9324 pub fn ncodr(
9325 self,
9326 ) -> crate::common::RegisterField<
9327 6,
9328 0x1,
9329 1,
9330 0,
9331 p208pfs_by::Ncodr,
9332 p208pfs_by::Ncodr,
9333 P208PfsBy_SPEC,
9334 crate::common::RW,
9335 > {
9336 crate::common::RegisterField::<
9337 6,
9338 0x1,
9339 1,
9340 0,
9341 p208pfs_by::Ncodr,
9342 p208pfs_by::Ncodr,
9343 P208PfsBy_SPEC,
9344 crate::common::RW,
9345 >::from_register(self, 0)
9346 }
9347}
9348impl ::core::default::Default for P208PfsBy {
9349 #[inline(always)]
9350 fn default() -> P208PfsBy {
9351 <crate::RegValueT<P208PfsBy_SPEC> as RegisterValue<_>>::new(0)
9352 }
9353}
9354pub mod p208pfs_by {
9355
9356 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9357 pub struct Podr_SPEC;
9358 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
9359 impl Podr {
9360 #[doc = "Output low"]
9361 pub const _0: Self = Self::new(0);
9362
9363 #[doc = "Output high"]
9364 pub const _1: Self = Self::new(1);
9365 }
9366 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9367 pub struct Pidr_SPEC;
9368 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
9369 impl Pidr {
9370 #[doc = "Low level"]
9371 pub const _0: Self = Self::new(0);
9372
9373 #[doc = "High level"]
9374 pub const _1: Self = Self::new(1);
9375 }
9376 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9377 pub struct Pdr_SPEC;
9378 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
9379 impl Pdr {
9380 #[doc = "Input (functions as an input pin)"]
9381 pub const _0: Self = Self::new(0);
9382
9383 #[doc = "Output (functions as an output pin)"]
9384 pub const _1: Self = Self::new(1);
9385 }
9386 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9387 pub struct Pcr_SPEC;
9388 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
9389 impl Pcr {
9390 #[doc = "Disable input pull-up"]
9391 pub const _0: Self = Self::new(0);
9392
9393 #[doc = "Enable input pull-up"]
9394 pub const _1: Self = Self::new(1);
9395 }
9396 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9397 pub struct Ncodr_SPEC;
9398 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
9399 impl Ncodr {
9400 #[doc = "Output CMOS"]
9401 pub const _0: Self = Self::new(0);
9402
9403 #[doc = "Output NMOS open-drain"]
9404 pub const _1: Self = Self::new(1);
9405 }
9406}
9407#[doc(hidden)]
9408#[derive(Copy, Clone, Eq, PartialEq)]
9409pub struct P212Pfs_SPEC;
9410impl crate::sealed::RegSpec for P212Pfs_SPEC {
9411 type DataType = u32;
9412}
9413
9414#[doc = "Port 1n212 Pin Function Select Register"]
9415pub type P212Pfs = crate::RegValueT<P212Pfs_SPEC>;
9416
9417impl P212Pfs {
9418 #[doc = "Port Output Data"]
9419 #[inline(always)]
9420 pub fn podr(
9421 self,
9422 ) -> crate::common::RegisterField<
9423 0,
9424 0x1,
9425 1,
9426 0,
9427 p212pfs::Podr,
9428 p212pfs::Podr,
9429 P212Pfs_SPEC,
9430 crate::common::RW,
9431 > {
9432 crate::common::RegisterField::<
9433 0,
9434 0x1,
9435 1,
9436 0,
9437 p212pfs::Podr,
9438 p212pfs::Podr,
9439 P212Pfs_SPEC,
9440 crate::common::RW,
9441 >::from_register(self, 0)
9442 }
9443
9444 #[doc = "Port State"]
9445 #[inline(always)]
9446 pub fn pidr(
9447 self,
9448 ) -> crate::common::RegisterField<
9449 1,
9450 0x1,
9451 1,
9452 0,
9453 p212pfs::Pidr,
9454 p212pfs::Pidr,
9455 P212Pfs_SPEC,
9456 crate::common::R,
9457 > {
9458 crate::common::RegisterField::<
9459 1,
9460 0x1,
9461 1,
9462 0,
9463 p212pfs::Pidr,
9464 p212pfs::Pidr,
9465 P212Pfs_SPEC,
9466 crate::common::R,
9467 >::from_register(self, 0)
9468 }
9469
9470 #[doc = "Port Direction"]
9471 #[inline(always)]
9472 pub fn pdr(
9473 self,
9474 ) -> crate::common::RegisterField<
9475 2,
9476 0x1,
9477 1,
9478 0,
9479 p212pfs::Pdr,
9480 p212pfs::Pdr,
9481 P212Pfs_SPEC,
9482 crate::common::RW,
9483 > {
9484 crate::common::RegisterField::<
9485 2,
9486 0x1,
9487 1,
9488 0,
9489 p212pfs::Pdr,
9490 p212pfs::Pdr,
9491 P212Pfs_SPEC,
9492 crate::common::RW,
9493 >::from_register(self, 0)
9494 }
9495
9496 #[doc = "Pull-up Control"]
9497 #[inline(always)]
9498 pub fn pcr(
9499 self,
9500 ) -> crate::common::RegisterField<
9501 4,
9502 0x1,
9503 1,
9504 0,
9505 p212pfs::Pcr,
9506 p212pfs::Pcr,
9507 P212Pfs_SPEC,
9508 crate::common::RW,
9509 > {
9510 crate::common::RegisterField::<
9511 4,
9512 0x1,
9513 1,
9514 0,
9515 p212pfs::Pcr,
9516 p212pfs::Pcr,
9517 P212Pfs_SPEC,
9518 crate::common::RW,
9519 >::from_register(self, 0)
9520 }
9521
9522 #[doc = "N-Channel Open-Drain Control"]
9523 #[inline(always)]
9524 pub fn ncodr(
9525 self,
9526 ) -> crate::common::RegisterField<
9527 6,
9528 0x1,
9529 1,
9530 0,
9531 p212pfs::Ncodr,
9532 p212pfs::Ncodr,
9533 P212Pfs_SPEC,
9534 crate::common::RW,
9535 > {
9536 crate::common::RegisterField::<
9537 6,
9538 0x1,
9539 1,
9540 0,
9541 p212pfs::Ncodr,
9542 p212pfs::Ncodr,
9543 P212Pfs_SPEC,
9544 crate::common::RW,
9545 >::from_register(self, 0)
9546 }
9547
9548 #[doc = "Event on Falling/Event on Rising"]
9549 #[inline(always)]
9550 pub fn eofr(
9551 self,
9552 ) -> crate::common::RegisterField<
9553 12,
9554 0x3,
9555 1,
9556 0,
9557 p212pfs::Eofr,
9558 p212pfs::Eofr,
9559 P212Pfs_SPEC,
9560 crate::common::RW,
9561 > {
9562 crate::common::RegisterField::<
9563 12,
9564 0x3,
9565 1,
9566 0,
9567 p212pfs::Eofr,
9568 p212pfs::Eofr,
9569 P212Pfs_SPEC,
9570 crate::common::RW,
9571 >::from_register(self, 0)
9572 }
9573
9574 #[doc = "IRQ Input Enable"]
9575 #[inline(always)]
9576 pub fn isel(
9577 self,
9578 ) -> crate::common::RegisterField<
9579 14,
9580 0x1,
9581 1,
9582 0,
9583 p212pfs::Isel,
9584 p212pfs::Isel,
9585 P212Pfs_SPEC,
9586 crate::common::RW,
9587 > {
9588 crate::common::RegisterField::<
9589 14,
9590 0x1,
9591 1,
9592 0,
9593 p212pfs::Isel,
9594 p212pfs::Isel,
9595 P212Pfs_SPEC,
9596 crate::common::RW,
9597 >::from_register(self, 0)
9598 }
9599
9600 #[doc = "Analog Input Enable"]
9601 #[inline(always)]
9602 pub fn asel(
9603 self,
9604 ) -> crate::common::RegisterField<
9605 15,
9606 0x1,
9607 1,
9608 0,
9609 p212pfs::Asel,
9610 p212pfs::Asel,
9611 P212Pfs_SPEC,
9612 crate::common::RW,
9613 > {
9614 crate::common::RegisterField::<
9615 15,
9616 0x1,
9617 1,
9618 0,
9619 p212pfs::Asel,
9620 p212pfs::Asel,
9621 P212Pfs_SPEC,
9622 crate::common::RW,
9623 >::from_register(self, 0)
9624 }
9625
9626 #[doc = "Port Mode Control"]
9627 #[inline(always)]
9628 pub fn pmr(
9629 self,
9630 ) -> crate::common::RegisterField<
9631 16,
9632 0x1,
9633 1,
9634 0,
9635 p212pfs::Pmr,
9636 p212pfs::Pmr,
9637 P212Pfs_SPEC,
9638 crate::common::RW,
9639 > {
9640 crate::common::RegisterField::<
9641 16,
9642 0x1,
9643 1,
9644 0,
9645 p212pfs::Pmr,
9646 p212pfs::Pmr,
9647 P212Pfs_SPEC,
9648 crate::common::RW,
9649 >::from_register(self, 0)
9650 }
9651
9652 #[doc = "Peripheral Select"]
9653 #[inline(always)]
9654 pub fn psel(
9655 self,
9656 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P212Pfs_SPEC, crate::common::RW> {
9657 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P212Pfs_SPEC,crate::common::RW>::from_register(self,0)
9658 }
9659}
9660impl ::core::default::Default for P212Pfs {
9661 #[inline(always)]
9662 fn default() -> P212Pfs {
9663 <crate::RegValueT<P212Pfs_SPEC> as RegisterValue<_>>::new(0)
9664 }
9665}
9666pub mod p212pfs {
9667
9668 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9669 pub struct Podr_SPEC;
9670 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
9671 impl Podr {
9672 #[doc = "Output low"]
9673 pub const _0: Self = Self::new(0);
9674
9675 #[doc = "Output high"]
9676 pub const _1: Self = Self::new(1);
9677 }
9678 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9679 pub struct Pidr_SPEC;
9680 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
9681 impl Pidr {
9682 #[doc = "Low level"]
9683 pub const _0: Self = Self::new(0);
9684
9685 #[doc = "High level"]
9686 pub const _1: Self = Self::new(1);
9687 }
9688 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9689 pub struct Pdr_SPEC;
9690 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
9691 impl Pdr {
9692 #[doc = "Input (functions as an input pin)"]
9693 pub const _0: Self = Self::new(0);
9694
9695 #[doc = "Output (functions as an output pin)"]
9696 pub const _1: Self = Self::new(1);
9697 }
9698 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9699 pub struct Pcr_SPEC;
9700 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
9701 impl Pcr {
9702 #[doc = "Disable input pull-up"]
9703 pub const _0: Self = Self::new(0);
9704
9705 #[doc = "Enable input pull-up"]
9706 pub const _1: Self = Self::new(1);
9707 }
9708 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9709 pub struct Ncodr_SPEC;
9710 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
9711 impl Ncodr {
9712 #[doc = "Output CMOS"]
9713 pub const _0: Self = Self::new(0);
9714
9715 #[doc = "Output NMOS open-drain"]
9716 pub const _1: Self = Self::new(1);
9717 }
9718 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9719 pub struct Eofr_SPEC;
9720 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
9721 impl Eofr {
9722 #[doc = "Don\'t care"]
9723 pub const _00: Self = Self::new(0);
9724
9725 #[doc = "Detect rising edge"]
9726 pub const _01: Self = Self::new(1);
9727
9728 #[doc = "Detect falling edge"]
9729 pub const _10: Self = Self::new(2);
9730
9731 #[doc = "Detect both edges"]
9732 pub const _11: Self = Self::new(3);
9733 }
9734 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9735 pub struct Isel_SPEC;
9736 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
9737 impl Isel {
9738 #[doc = "Do not use as IRQn input pin"]
9739 pub const _0: Self = Self::new(0);
9740
9741 #[doc = "Use as IRQn input pin"]
9742 pub const _1: Self = Self::new(1);
9743 }
9744 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9745 pub struct Asel_SPEC;
9746 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
9747 impl Asel {
9748 #[doc = "Do not use as analog pin"]
9749 pub const _0: Self = Self::new(0);
9750
9751 #[doc = "Use as analog pin"]
9752 pub const _1: Self = Self::new(1);
9753 }
9754 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9755 pub struct Pmr_SPEC;
9756 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
9757 impl Pmr {
9758 #[doc = "Use as general I/O pin"]
9759 pub const _0: Self = Self::new(0);
9760
9761 #[doc = "Use as I/O port for peripheral functions"]
9762 pub const _1: Self = Self::new(1);
9763 }
9764}
9765#[doc(hidden)]
9766#[derive(Copy, Clone, Eq, PartialEq)]
9767pub struct P212PfsHa_SPEC;
9768impl crate::sealed::RegSpec for P212PfsHa_SPEC {
9769 type DataType = u16;
9770}
9771
9772#[doc = "Port 1n212 Pin Function Select Register"]
9773pub type P212PfsHa = crate::RegValueT<P212PfsHa_SPEC>;
9774
9775impl P212PfsHa {
9776 #[doc = "Port Output Data"]
9777 #[inline(always)]
9778 pub fn podr(
9779 self,
9780 ) -> crate::common::RegisterField<
9781 0,
9782 0x1,
9783 1,
9784 0,
9785 p212pfs_ha::Podr,
9786 p212pfs_ha::Podr,
9787 P212PfsHa_SPEC,
9788 crate::common::RW,
9789 > {
9790 crate::common::RegisterField::<
9791 0,
9792 0x1,
9793 1,
9794 0,
9795 p212pfs_ha::Podr,
9796 p212pfs_ha::Podr,
9797 P212PfsHa_SPEC,
9798 crate::common::RW,
9799 >::from_register(self, 0)
9800 }
9801
9802 #[doc = "Port State"]
9803 #[inline(always)]
9804 pub fn pidr(
9805 self,
9806 ) -> crate::common::RegisterField<
9807 1,
9808 0x1,
9809 1,
9810 0,
9811 p212pfs_ha::Pidr,
9812 p212pfs_ha::Pidr,
9813 P212PfsHa_SPEC,
9814 crate::common::R,
9815 > {
9816 crate::common::RegisterField::<
9817 1,
9818 0x1,
9819 1,
9820 0,
9821 p212pfs_ha::Pidr,
9822 p212pfs_ha::Pidr,
9823 P212PfsHa_SPEC,
9824 crate::common::R,
9825 >::from_register(self, 0)
9826 }
9827
9828 #[doc = "Port Direction"]
9829 #[inline(always)]
9830 pub fn pdr(
9831 self,
9832 ) -> crate::common::RegisterField<
9833 2,
9834 0x1,
9835 1,
9836 0,
9837 p212pfs_ha::Pdr,
9838 p212pfs_ha::Pdr,
9839 P212PfsHa_SPEC,
9840 crate::common::RW,
9841 > {
9842 crate::common::RegisterField::<
9843 2,
9844 0x1,
9845 1,
9846 0,
9847 p212pfs_ha::Pdr,
9848 p212pfs_ha::Pdr,
9849 P212PfsHa_SPEC,
9850 crate::common::RW,
9851 >::from_register(self, 0)
9852 }
9853
9854 #[doc = "Pull-up Control"]
9855 #[inline(always)]
9856 pub fn pcr(
9857 self,
9858 ) -> crate::common::RegisterField<
9859 4,
9860 0x1,
9861 1,
9862 0,
9863 p212pfs_ha::Pcr,
9864 p212pfs_ha::Pcr,
9865 P212PfsHa_SPEC,
9866 crate::common::RW,
9867 > {
9868 crate::common::RegisterField::<
9869 4,
9870 0x1,
9871 1,
9872 0,
9873 p212pfs_ha::Pcr,
9874 p212pfs_ha::Pcr,
9875 P212PfsHa_SPEC,
9876 crate::common::RW,
9877 >::from_register(self, 0)
9878 }
9879
9880 #[doc = "N-Channel Open-Drain Control"]
9881 #[inline(always)]
9882 pub fn ncodr(
9883 self,
9884 ) -> crate::common::RegisterField<
9885 6,
9886 0x1,
9887 1,
9888 0,
9889 p212pfs_ha::Ncodr,
9890 p212pfs_ha::Ncodr,
9891 P212PfsHa_SPEC,
9892 crate::common::RW,
9893 > {
9894 crate::common::RegisterField::<
9895 6,
9896 0x1,
9897 1,
9898 0,
9899 p212pfs_ha::Ncodr,
9900 p212pfs_ha::Ncodr,
9901 P212PfsHa_SPEC,
9902 crate::common::RW,
9903 >::from_register(self, 0)
9904 }
9905
9906 #[doc = "Event on Falling/Event on Rising"]
9907 #[inline(always)]
9908 pub fn eofr(
9909 self,
9910 ) -> crate::common::RegisterField<
9911 12,
9912 0x3,
9913 1,
9914 0,
9915 p212pfs_ha::Eofr,
9916 p212pfs_ha::Eofr,
9917 P212PfsHa_SPEC,
9918 crate::common::RW,
9919 > {
9920 crate::common::RegisterField::<
9921 12,
9922 0x3,
9923 1,
9924 0,
9925 p212pfs_ha::Eofr,
9926 p212pfs_ha::Eofr,
9927 P212PfsHa_SPEC,
9928 crate::common::RW,
9929 >::from_register(self, 0)
9930 }
9931
9932 #[doc = "IRQ Input Enable"]
9933 #[inline(always)]
9934 pub fn isel(
9935 self,
9936 ) -> crate::common::RegisterField<
9937 14,
9938 0x1,
9939 1,
9940 0,
9941 p212pfs_ha::Isel,
9942 p212pfs_ha::Isel,
9943 P212PfsHa_SPEC,
9944 crate::common::RW,
9945 > {
9946 crate::common::RegisterField::<
9947 14,
9948 0x1,
9949 1,
9950 0,
9951 p212pfs_ha::Isel,
9952 p212pfs_ha::Isel,
9953 P212PfsHa_SPEC,
9954 crate::common::RW,
9955 >::from_register(self, 0)
9956 }
9957
9958 #[doc = "Analog Input Enable"]
9959 #[inline(always)]
9960 pub fn asel(
9961 self,
9962 ) -> crate::common::RegisterField<
9963 15,
9964 0x1,
9965 1,
9966 0,
9967 p212pfs_ha::Asel,
9968 p212pfs_ha::Asel,
9969 P212PfsHa_SPEC,
9970 crate::common::RW,
9971 > {
9972 crate::common::RegisterField::<
9973 15,
9974 0x1,
9975 1,
9976 0,
9977 p212pfs_ha::Asel,
9978 p212pfs_ha::Asel,
9979 P212PfsHa_SPEC,
9980 crate::common::RW,
9981 >::from_register(self, 0)
9982 }
9983}
9984impl ::core::default::Default for P212PfsHa {
9985 #[inline(always)]
9986 fn default() -> P212PfsHa {
9987 <crate::RegValueT<P212PfsHa_SPEC> as RegisterValue<_>>::new(0)
9988 }
9989}
9990pub mod p212pfs_ha {
9991
9992 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
9993 pub struct Podr_SPEC;
9994 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
9995 impl Podr {
9996 #[doc = "Output low"]
9997 pub const _0: Self = Self::new(0);
9998
9999 #[doc = "Output high"]
10000 pub const _1: Self = Self::new(1);
10001 }
10002 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10003 pub struct Pidr_SPEC;
10004 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
10005 impl Pidr {
10006 #[doc = "Low level"]
10007 pub const _0: Self = Self::new(0);
10008
10009 #[doc = "High level"]
10010 pub const _1: Self = Self::new(1);
10011 }
10012 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10013 pub struct Pdr_SPEC;
10014 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
10015 impl Pdr {
10016 #[doc = "Input (functions as an input pin)"]
10017 pub const _0: Self = Self::new(0);
10018
10019 #[doc = "Output (functions as an output pin)"]
10020 pub const _1: Self = Self::new(1);
10021 }
10022 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10023 pub struct Pcr_SPEC;
10024 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
10025 impl Pcr {
10026 #[doc = "Disable input pull-up"]
10027 pub const _0: Self = Self::new(0);
10028
10029 #[doc = "Enable input pull-up"]
10030 pub const _1: Self = Self::new(1);
10031 }
10032 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10033 pub struct Ncodr_SPEC;
10034 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
10035 impl Ncodr {
10036 #[doc = "Output CMOS"]
10037 pub const _0: Self = Self::new(0);
10038
10039 #[doc = "Output NMOS open-drain"]
10040 pub const _1: Self = Self::new(1);
10041 }
10042 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10043 pub struct Eofr_SPEC;
10044 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
10045 impl Eofr {
10046 #[doc = "Don\'t care"]
10047 pub const _00: Self = Self::new(0);
10048
10049 #[doc = "Detect rising edge"]
10050 pub const _01: Self = Self::new(1);
10051
10052 #[doc = "Detect falling edge"]
10053 pub const _10: Self = Self::new(2);
10054
10055 #[doc = "Detect both edges"]
10056 pub const _11: Self = Self::new(3);
10057 }
10058 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10059 pub struct Isel_SPEC;
10060 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
10061 impl Isel {
10062 #[doc = "Do not use as IRQn input pin"]
10063 pub const _0: Self = Self::new(0);
10064
10065 #[doc = "Use as IRQn input pin"]
10066 pub const _1: Self = Self::new(1);
10067 }
10068 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10069 pub struct Asel_SPEC;
10070 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
10071 impl Asel {
10072 #[doc = "Do not use as analog pin"]
10073 pub const _0: Self = Self::new(0);
10074
10075 #[doc = "Use as analog pin"]
10076 pub const _1: Self = Self::new(1);
10077 }
10078}
10079#[doc(hidden)]
10080#[derive(Copy, Clone, Eq, PartialEq)]
10081pub struct P212PfsBy_SPEC;
10082impl crate::sealed::RegSpec for P212PfsBy_SPEC {
10083 type DataType = u8;
10084}
10085
10086#[doc = "Port 1n212 Pin Function Select Register"]
10087pub type P212PfsBy = crate::RegValueT<P212PfsBy_SPEC>;
10088
10089impl P212PfsBy {
10090 #[doc = "Port Output Data"]
10091 #[inline(always)]
10092 pub fn podr(
10093 self,
10094 ) -> crate::common::RegisterField<
10095 0,
10096 0x1,
10097 1,
10098 0,
10099 p212pfs_by::Podr,
10100 p212pfs_by::Podr,
10101 P212PfsBy_SPEC,
10102 crate::common::RW,
10103 > {
10104 crate::common::RegisterField::<
10105 0,
10106 0x1,
10107 1,
10108 0,
10109 p212pfs_by::Podr,
10110 p212pfs_by::Podr,
10111 P212PfsBy_SPEC,
10112 crate::common::RW,
10113 >::from_register(self, 0)
10114 }
10115
10116 #[doc = "Port State"]
10117 #[inline(always)]
10118 pub fn pidr(
10119 self,
10120 ) -> crate::common::RegisterField<
10121 1,
10122 0x1,
10123 1,
10124 0,
10125 p212pfs_by::Pidr,
10126 p212pfs_by::Pidr,
10127 P212PfsBy_SPEC,
10128 crate::common::R,
10129 > {
10130 crate::common::RegisterField::<
10131 1,
10132 0x1,
10133 1,
10134 0,
10135 p212pfs_by::Pidr,
10136 p212pfs_by::Pidr,
10137 P212PfsBy_SPEC,
10138 crate::common::R,
10139 >::from_register(self, 0)
10140 }
10141
10142 #[doc = "Port Direction"]
10143 #[inline(always)]
10144 pub fn pdr(
10145 self,
10146 ) -> crate::common::RegisterField<
10147 2,
10148 0x1,
10149 1,
10150 0,
10151 p212pfs_by::Pdr,
10152 p212pfs_by::Pdr,
10153 P212PfsBy_SPEC,
10154 crate::common::RW,
10155 > {
10156 crate::common::RegisterField::<
10157 2,
10158 0x1,
10159 1,
10160 0,
10161 p212pfs_by::Pdr,
10162 p212pfs_by::Pdr,
10163 P212PfsBy_SPEC,
10164 crate::common::RW,
10165 >::from_register(self, 0)
10166 }
10167
10168 #[doc = "Pull-up Control"]
10169 #[inline(always)]
10170 pub fn pcr(
10171 self,
10172 ) -> crate::common::RegisterField<
10173 4,
10174 0x1,
10175 1,
10176 0,
10177 p212pfs_by::Pcr,
10178 p212pfs_by::Pcr,
10179 P212PfsBy_SPEC,
10180 crate::common::RW,
10181 > {
10182 crate::common::RegisterField::<
10183 4,
10184 0x1,
10185 1,
10186 0,
10187 p212pfs_by::Pcr,
10188 p212pfs_by::Pcr,
10189 P212PfsBy_SPEC,
10190 crate::common::RW,
10191 >::from_register(self, 0)
10192 }
10193
10194 #[doc = "N-Channel Open-Drain Control"]
10195 #[inline(always)]
10196 pub fn ncodr(
10197 self,
10198 ) -> crate::common::RegisterField<
10199 6,
10200 0x1,
10201 1,
10202 0,
10203 p212pfs_by::Ncodr,
10204 p212pfs_by::Ncodr,
10205 P212PfsBy_SPEC,
10206 crate::common::RW,
10207 > {
10208 crate::common::RegisterField::<
10209 6,
10210 0x1,
10211 1,
10212 0,
10213 p212pfs_by::Ncodr,
10214 p212pfs_by::Ncodr,
10215 P212PfsBy_SPEC,
10216 crate::common::RW,
10217 >::from_register(self, 0)
10218 }
10219}
10220impl ::core::default::Default for P212PfsBy {
10221 #[inline(always)]
10222 fn default() -> P212PfsBy {
10223 <crate::RegValueT<P212PfsBy_SPEC> as RegisterValue<_>>::new(0)
10224 }
10225}
10226pub mod p212pfs_by {
10227
10228 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10229 pub struct Podr_SPEC;
10230 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
10231 impl Podr {
10232 #[doc = "Output low"]
10233 pub const _0: Self = Self::new(0);
10234
10235 #[doc = "Output high"]
10236 pub const _1: Self = Self::new(1);
10237 }
10238 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10239 pub struct Pidr_SPEC;
10240 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
10241 impl Pidr {
10242 #[doc = "Low level"]
10243 pub const _0: Self = Self::new(0);
10244
10245 #[doc = "High level"]
10246 pub const _1: Self = Self::new(1);
10247 }
10248 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10249 pub struct Pdr_SPEC;
10250 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
10251 impl Pdr {
10252 #[doc = "Input (functions as an input pin)"]
10253 pub const _0: Self = Self::new(0);
10254
10255 #[doc = "Output (functions as an output pin)"]
10256 pub const _1: Self = Self::new(1);
10257 }
10258 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10259 pub struct Pcr_SPEC;
10260 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
10261 impl Pcr {
10262 #[doc = "Disable input pull-up"]
10263 pub const _0: Self = Self::new(0);
10264
10265 #[doc = "Enable input pull-up"]
10266 pub const _1: Self = Self::new(1);
10267 }
10268 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10269 pub struct Ncodr_SPEC;
10270 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
10271 impl Ncodr {
10272 #[doc = "Output CMOS"]
10273 pub const _0: Self = Self::new(0);
10274
10275 #[doc = "Output NMOS open-drain"]
10276 pub const _1: Self = Self::new(1);
10277 }
10278}
10279#[doc(hidden)]
10280#[derive(Copy, Clone, Eq, PartialEq)]
10281pub struct P213Pfs_SPEC;
10282impl crate::sealed::RegSpec for P213Pfs_SPEC {
10283 type DataType = u32;
10284}
10285
10286#[doc = "Port 1n213 Pin Function Select Register"]
10287pub type P213Pfs = crate::RegValueT<P213Pfs_SPEC>;
10288
10289impl P213Pfs {
10290 #[doc = "Port Output Data"]
10291 #[inline(always)]
10292 pub fn podr(
10293 self,
10294 ) -> crate::common::RegisterField<
10295 0,
10296 0x1,
10297 1,
10298 0,
10299 p213pfs::Podr,
10300 p213pfs::Podr,
10301 P213Pfs_SPEC,
10302 crate::common::RW,
10303 > {
10304 crate::common::RegisterField::<
10305 0,
10306 0x1,
10307 1,
10308 0,
10309 p213pfs::Podr,
10310 p213pfs::Podr,
10311 P213Pfs_SPEC,
10312 crate::common::RW,
10313 >::from_register(self, 0)
10314 }
10315
10316 #[doc = "Port State"]
10317 #[inline(always)]
10318 pub fn pidr(
10319 self,
10320 ) -> crate::common::RegisterField<
10321 1,
10322 0x1,
10323 1,
10324 0,
10325 p213pfs::Pidr,
10326 p213pfs::Pidr,
10327 P213Pfs_SPEC,
10328 crate::common::R,
10329 > {
10330 crate::common::RegisterField::<
10331 1,
10332 0x1,
10333 1,
10334 0,
10335 p213pfs::Pidr,
10336 p213pfs::Pidr,
10337 P213Pfs_SPEC,
10338 crate::common::R,
10339 >::from_register(self, 0)
10340 }
10341
10342 #[doc = "Port Direction"]
10343 #[inline(always)]
10344 pub fn pdr(
10345 self,
10346 ) -> crate::common::RegisterField<
10347 2,
10348 0x1,
10349 1,
10350 0,
10351 p213pfs::Pdr,
10352 p213pfs::Pdr,
10353 P213Pfs_SPEC,
10354 crate::common::RW,
10355 > {
10356 crate::common::RegisterField::<
10357 2,
10358 0x1,
10359 1,
10360 0,
10361 p213pfs::Pdr,
10362 p213pfs::Pdr,
10363 P213Pfs_SPEC,
10364 crate::common::RW,
10365 >::from_register(self, 0)
10366 }
10367
10368 #[doc = "Pull-up Control"]
10369 #[inline(always)]
10370 pub fn pcr(
10371 self,
10372 ) -> crate::common::RegisterField<
10373 4,
10374 0x1,
10375 1,
10376 0,
10377 p213pfs::Pcr,
10378 p213pfs::Pcr,
10379 P213Pfs_SPEC,
10380 crate::common::RW,
10381 > {
10382 crate::common::RegisterField::<
10383 4,
10384 0x1,
10385 1,
10386 0,
10387 p213pfs::Pcr,
10388 p213pfs::Pcr,
10389 P213Pfs_SPEC,
10390 crate::common::RW,
10391 >::from_register(self, 0)
10392 }
10393
10394 #[doc = "N-Channel Open-Drain Control"]
10395 #[inline(always)]
10396 pub fn ncodr(
10397 self,
10398 ) -> crate::common::RegisterField<
10399 6,
10400 0x1,
10401 1,
10402 0,
10403 p213pfs::Ncodr,
10404 p213pfs::Ncodr,
10405 P213Pfs_SPEC,
10406 crate::common::RW,
10407 > {
10408 crate::common::RegisterField::<
10409 6,
10410 0x1,
10411 1,
10412 0,
10413 p213pfs::Ncodr,
10414 p213pfs::Ncodr,
10415 P213Pfs_SPEC,
10416 crate::common::RW,
10417 >::from_register(self, 0)
10418 }
10419
10420 #[doc = "Event on Falling/Event on Rising"]
10421 #[inline(always)]
10422 pub fn eofr(
10423 self,
10424 ) -> crate::common::RegisterField<
10425 12,
10426 0x3,
10427 1,
10428 0,
10429 p213pfs::Eofr,
10430 p213pfs::Eofr,
10431 P213Pfs_SPEC,
10432 crate::common::RW,
10433 > {
10434 crate::common::RegisterField::<
10435 12,
10436 0x3,
10437 1,
10438 0,
10439 p213pfs::Eofr,
10440 p213pfs::Eofr,
10441 P213Pfs_SPEC,
10442 crate::common::RW,
10443 >::from_register(self, 0)
10444 }
10445
10446 #[doc = "IRQ Input Enable"]
10447 #[inline(always)]
10448 pub fn isel(
10449 self,
10450 ) -> crate::common::RegisterField<
10451 14,
10452 0x1,
10453 1,
10454 0,
10455 p213pfs::Isel,
10456 p213pfs::Isel,
10457 P213Pfs_SPEC,
10458 crate::common::RW,
10459 > {
10460 crate::common::RegisterField::<
10461 14,
10462 0x1,
10463 1,
10464 0,
10465 p213pfs::Isel,
10466 p213pfs::Isel,
10467 P213Pfs_SPEC,
10468 crate::common::RW,
10469 >::from_register(self, 0)
10470 }
10471
10472 #[doc = "Analog Input Enable"]
10473 #[inline(always)]
10474 pub fn asel(
10475 self,
10476 ) -> crate::common::RegisterField<
10477 15,
10478 0x1,
10479 1,
10480 0,
10481 p213pfs::Asel,
10482 p213pfs::Asel,
10483 P213Pfs_SPEC,
10484 crate::common::RW,
10485 > {
10486 crate::common::RegisterField::<
10487 15,
10488 0x1,
10489 1,
10490 0,
10491 p213pfs::Asel,
10492 p213pfs::Asel,
10493 P213Pfs_SPEC,
10494 crate::common::RW,
10495 >::from_register(self, 0)
10496 }
10497
10498 #[doc = "Port Mode Control"]
10499 #[inline(always)]
10500 pub fn pmr(
10501 self,
10502 ) -> crate::common::RegisterField<
10503 16,
10504 0x1,
10505 1,
10506 0,
10507 p213pfs::Pmr,
10508 p213pfs::Pmr,
10509 P213Pfs_SPEC,
10510 crate::common::RW,
10511 > {
10512 crate::common::RegisterField::<
10513 16,
10514 0x1,
10515 1,
10516 0,
10517 p213pfs::Pmr,
10518 p213pfs::Pmr,
10519 P213Pfs_SPEC,
10520 crate::common::RW,
10521 >::from_register(self, 0)
10522 }
10523
10524 #[doc = "Peripheral Select"]
10525 #[inline(always)]
10526 pub fn psel(
10527 self,
10528 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P213Pfs_SPEC, crate::common::RW> {
10529 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P213Pfs_SPEC,crate::common::RW>::from_register(self,0)
10530 }
10531}
10532impl ::core::default::Default for P213Pfs {
10533 #[inline(always)]
10534 fn default() -> P213Pfs {
10535 <crate::RegValueT<P213Pfs_SPEC> as RegisterValue<_>>::new(0)
10536 }
10537}
10538pub mod p213pfs {
10539
10540 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10541 pub struct Podr_SPEC;
10542 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
10543 impl Podr {
10544 #[doc = "Output low"]
10545 pub const _0: Self = Self::new(0);
10546
10547 #[doc = "Output high"]
10548 pub const _1: Self = Self::new(1);
10549 }
10550 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10551 pub struct Pidr_SPEC;
10552 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
10553 impl Pidr {
10554 #[doc = "Low level"]
10555 pub const _0: Self = Self::new(0);
10556
10557 #[doc = "High level"]
10558 pub const _1: Self = Self::new(1);
10559 }
10560 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10561 pub struct Pdr_SPEC;
10562 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
10563 impl Pdr {
10564 #[doc = "Input (functions as an input pin)"]
10565 pub const _0: Self = Self::new(0);
10566
10567 #[doc = "Output (functions as an output pin)"]
10568 pub const _1: Self = Self::new(1);
10569 }
10570 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10571 pub struct Pcr_SPEC;
10572 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
10573 impl Pcr {
10574 #[doc = "Disable input pull-up"]
10575 pub const _0: Self = Self::new(0);
10576
10577 #[doc = "Enable input pull-up"]
10578 pub const _1: Self = Self::new(1);
10579 }
10580 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10581 pub struct Ncodr_SPEC;
10582 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
10583 impl Ncodr {
10584 #[doc = "Output CMOS"]
10585 pub const _0: Self = Self::new(0);
10586
10587 #[doc = "Output NMOS open-drain"]
10588 pub const _1: Self = Self::new(1);
10589 }
10590 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10591 pub struct Eofr_SPEC;
10592 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
10593 impl Eofr {
10594 #[doc = "Don\'t care"]
10595 pub const _00: Self = Self::new(0);
10596
10597 #[doc = "Detect rising edge"]
10598 pub const _01: Self = Self::new(1);
10599
10600 #[doc = "Detect falling edge"]
10601 pub const _10: Self = Self::new(2);
10602
10603 #[doc = "Detect both edges"]
10604 pub const _11: Self = Self::new(3);
10605 }
10606 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10607 pub struct Isel_SPEC;
10608 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
10609 impl Isel {
10610 #[doc = "Do not use as IRQn input pin"]
10611 pub const _0: Self = Self::new(0);
10612
10613 #[doc = "Use as IRQn input pin"]
10614 pub const _1: Self = Self::new(1);
10615 }
10616 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10617 pub struct Asel_SPEC;
10618 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
10619 impl Asel {
10620 #[doc = "Do not use as analog pin"]
10621 pub const _0: Self = Self::new(0);
10622
10623 #[doc = "Use as analog pin"]
10624 pub const _1: Self = Self::new(1);
10625 }
10626 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10627 pub struct Pmr_SPEC;
10628 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
10629 impl Pmr {
10630 #[doc = "Use as general I/O pin"]
10631 pub const _0: Self = Self::new(0);
10632
10633 #[doc = "Use as I/O port for peripheral functions"]
10634 pub const _1: Self = Self::new(1);
10635 }
10636}
10637#[doc(hidden)]
10638#[derive(Copy, Clone, Eq, PartialEq)]
10639pub struct P213PfsHa_SPEC;
10640impl crate::sealed::RegSpec for P213PfsHa_SPEC {
10641 type DataType = u16;
10642}
10643
10644#[doc = "Port 1n213 Pin Function Select Register"]
10645pub type P213PfsHa = crate::RegValueT<P213PfsHa_SPEC>;
10646
10647impl P213PfsHa {
10648 #[doc = "Port Output Data"]
10649 #[inline(always)]
10650 pub fn podr(
10651 self,
10652 ) -> crate::common::RegisterField<
10653 0,
10654 0x1,
10655 1,
10656 0,
10657 p213pfs_ha::Podr,
10658 p213pfs_ha::Podr,
10659 P213PfsHa_SPEC,
10660 crate::common::RW,
10661 > {
10662 crate::common::RegisterField::<
10663 0,
10664 0x1,
10665 1,
10666 0,
10667 p213pfs_ha::Podr,
10668 p213pfs_ha::Podr,
10669 P213PfsHa_SPEC,
10670 crate::common::RW,
10671 >::from_register(self, 0)
10672 }
10673
10674 #[doc = "Port State"]
10675 #[inline(always)]
10676 pub fn pidr(
10677 self,
10678 ) -> crate::common::RegisterField<
10679 1,
10680 0x1,
10681 1,
10682 0,
10683 p213pfs_ha::Pidr,
10684 p213pfs_ha::Pidr,
10685 P213PfsHa_SPEC,
10686 crate::common::R,
10687 > {
10688 crate::common::RegisterField::<
10689 1,
10690 0x1,
10691 1,
10692 0,
10693 p213pfs_ha::Pidr,
10694 p213pfs_ha::Pidr,
10695 P213PfsHa_SPEC,
10696 crate::common::R,
10697 >::from_register(self, 0)
10698 }
10699
10700 #[doc = "Port Direction"]
10701 #[inline(always)]
10702 pub fn pdr(
10703 self,
10704 ) -> crate::common::RegisterField<
10705 2,
10706 0x1,
10707 1,
10708 0,
10709 p213pfs_ha::Pdr,
10710 p213pfs_ha::Pdr,
10711 P213PfsHa_SPEC,
10712 crate::common::RW,
10713 > {
10714 crate::common::RegisterField::<
10715 2,
10716 0x1,
10717 1,
10718 0,
10719 p213pfs_ha::Pdr,
10720 p213pfs_ha::Pdr,
10721 P213PfsHa_SPEC,
10722 crate::common::RW,
10723 >::from_register(self, 0)
10724 }
10725
10726 #[doc = "Pull-up Control"]
10727 #[inline(always)]
10728 pub fn pcr(
10729 self,
10730 ) -> crate::common::RegisterField<
10731 4,
10732 0x1,
10733 1,
10734 0,
10735 p213pfs_ha::Pcr,
10736 p213pfs_ha::Pcr,
10737 P213PfsHa_SPEC,
10738 crate::common::RW,
10739 > {
10740 crate::common::RegisterField::<
10741 4,
10742 0x1,
10743 1,
10744 0,
10745 p213pfs_ha::Pcr,
10746 p213pfs_ha::Pcr,
10747 P213PfsHa_SPEC,
10748 crate::common::RW,
10749 >::from_register(self, 0)
10750 }
10751
10752 #[doc = "N-Channel Open-Drain Control"]
10753 #[inline(always)]
10754 pub fn ncodr(
10755 self,
10756 ) -> crate::common::RegisterField<
10757 6,
10758 0x1,
10759 1,
10760 0,
10761 p213pfs_ha::Ncodr,
10762 p213pfs_ha::Ncodr,
10763 P213PfsHa_SPEC,
10764 crate::common::RW,
10765 > {
10766 crate::common::RegisterField::<
10767 6,
10768 0x1,
10769 1,
10770 0,
10771 p213pfs_ha::Ncodr,
10772 p213pfs_ha::Ncodr,
10773 P213PfsHa_SPEC,
10774 crate::common::RW,
10775 >::from_register(self, 0)
10776 }
10777
10778 #[doc = "Event on Falling/Event on Rising"]
10779 #[inline(always)]
10780 pub fn eofr(
10781 self,
10782 ) -> crate::common::RegisterField<
10783 12,
10784 0x3,
10785 1,
10786 0,
10787 p213pfs_ha::Eofr,
10788 p213pfs_ha::Eofr,
10789 P213PfsHa_SPEC,
10790 crate::common::RW,
10791 > {
10792 crate::common::RegisterField::<
10793 12,
10794 0x3,
10795 1,
10796 0,
10797 p213pfs_ha::Eofr,
10798 p213pfs_ha::Eofr,
10799 P213PfsHa_SPEC,
10800 crate::common::RW,
10801 >::from_register(self, 0)
10802 }
10803
10804 #[doc = "IRQ Input Enable"]
10805 #[inline(always)]
10806 pub fn isel(
10807 self,
10808 ) -> crate::common::RegisterField<
10809 14,
10810 0x1,
10811 1,
10812 0,
10813 p213pfs_ha::Isel,
10814 p213pfs_ha::Isel,
10815 P213PfsHa_SPEC,
10816 crate::common::RW,
10817 > {
10818 crate::common::RegisterField::<
10819 14,
10820 0x1,
10821 1,
10822 0,
10823 p213pfs_ha::Isel,
10824 p213pfs_ha::Isel,
10825 P213PfsHa_SPEC,
10826 crate::common::RW,
10827 >::from_register(self, 0)
10828 }
10829
10830 #[doc = "Analog Input Enable"]
10831 #[inline(always)]
10832 pub fn asel(
10833 self,
10834 ) -> crate::common::RegisterField<
10835 15,
10836 0x1,
10837 1,
10838 0,
10839 p213pfs_ha::Asel,
10840 p213pfs_ha::Asel,
10841 P213PfsHa_SPEC,
10842 crate::common::RW,
10843 > {
10844 crate::common::RegisterField::<
10845 15,
10846 0x1,
10847 1,
10848 0,
10849 p213pfs_ha::Asel,
10850 p213pfs_ha::Asel,
10851 P213PfsHa_SPEC,
10852 crate::common::RW,
10853 >::from_register(self, 0)
10854 }
10855}
10856impl ::core::default::Default for P213PfsHa {
10857 #[inline(always)]
10858 fn default() -> P213PfsHa {
10859 <crate::RegValueT<P213PfsHa_SPEC> as RegisterValue<_>>::new(0)
10860 }
10861}
10862pub mod p213pfs_ha {
10863
10864 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10865 pub struct Podr_SPEC;
10866 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
10867 impl Podr {
10868 #[doc = "Output low"]
10869 pub const _0: Self = Self::new(0);
10870
10871 #[doc = "Output high"]
10872 pub const _1: Self = Self::new(1);
10873 }
10874 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10875 pub struct Pidr_SPEC;
10876 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
10877 impl Pidr {
10878 #[doc = "Low level"]
10879 pub const _0: Self = Self::new(0);
10880
10881 #[doc = "High level"]
10882 pub const _1: Self = Self::new(1);
10883 }
10884 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10885 pub struct Pdr_SPEC;
10886 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
10887 impl Pdr {
10888 #[doc = "Input (functions as an input pin)"]
10889 pub const _0: Self = Self::new(0);
10890
10891 #[doc = "Output (functions as an output pin)"]
10892 pub const _1: Self = Self::new(1);
10893 }
10894 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10895 pub struct Pcr_SPEC;
10896 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
10897 impl Pcr {
10898 #[doc = "Disable input pull-up"]
10899 pub const _0: Self = Self::new(0);
10900
10901 #[doc = "Enable input pull-up"]
10902 pub const _1: Self = Self::new(1);
10903 }
10904 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10905 pub struct Ncodr_SPEC;
10906 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
10907 impl Ncodr {
10908 #[doc = "Output CMOS"]
10909 pub const _0: Self = Self::new(0);
10910
10911 #[doc = "Output NMOS open-drain"]
10912 pub const _1: Self = Self::new(1);
10913 }
10914 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10915 pub struct Eofr_SPEC;
10916 pub type Eofr = crate::EnumBitfieldStruct<u8, Eofr_SPEC>;
10917 impl Eofr {
10918 #[doc = "Don\'t care"]
10919 pub const _00: Self = Self::new(0);
10920
10921 #[doc = "Detect rising edge"]
10922 pub const _01: Self = Self::new(1);
10923
10924 #[doc = "Detect falling edge"]
10925 pub const _10: Self = Self::new(2);
10926
10927 #[doc = "Detect both edges"]
10928 pub const _11: Self = Self::new(3);
10929 }
10930 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10931 pub struct Isel_SPEC;
10932 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
10933 impl Isel {
10934 #[doc = "Do not use as IRQn input pin"]
10935 pub const _0: Self = Self::new(0);
10936
10937 #[doc = "Use as IRQn input pin"]
10938 pub const _1: Self = Self::new(1);
10939 }
10940 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
10941 pub struct Asel_SPEC;
10942 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
10943 impl Asel {
10944 #[doc = "Do not use as analog pin"]
10945 pub const _0: Self = Self::new(0);
10946
10947 #[doc = "Use as analog pin"]
10948 pub const _1: Self = Self::new(1);
10949 }
10950}
10951#[doc(hidden)]
10952#[derive(Copy, Clone, Eq, PartialEq)]
10953pub struct P213PfsBy_SPEC;
10954impl crate::sealed::RegSpec for P213PfsBy_SPEC {
10955 type DataType = u8;
10956}
10957
10958#[doc = "Port 1n213 Pin Function Select Register"]
10959pub type P213PfsBy = crate::RegValueT<P213PfsBy_SPEC>;
10960
10961impl P213PfsBy {
10962 #[doc = "Port Output Data"]
10963 #[inline(always)]
10964 pub fn podr(
10965 self,
10966 ) -> crate::common::RegisterField<
10967 0,
10968 0x1,
10969 1,
10970 0,
10971 p213pfs_by::Podr,
10972 p213pfs_by::Podr,
10973 P213PfsBy_SPEC,
10974 crate::common::RW,
10975 > {
10976 crate::common::RegisterField::<
10977 0,
10978 0x1,
10979 1,
10980 0,
10981 p213pfs_by::Podr,
10982 p213pfs_by::Podr,
10983 P213PfsBy_SPEC,
10984 crate::common::RW,
10985 >::from_register(self, 0)
10986 }
10987
10988 #[doc = "Port State"]
10989 #[inline(always)]
10990 pub fn pidr(
10991 self,
10992 ) -> crate::common::RegisterField<
10993 1,
10994 0x1,
10995 1,
10996 0,
10997 p213pfs_by::Pidr,
10998 p213pfs_by::Pidr,
10999 P213PfsBy_SPEC,
11000 crate::common::R,
11001 > {
11002 crate::common::RegisterField::<
11003 1,
11004 0x1,
11005 1,
11006 0,
11007 p213pfs_by::Pidr,
11008 p213pfs_by::Pidr,
11009 P213PfsBy_SPEC,
11010 crate::common::R,
11011 >::from_register(self, 0)
11012 }
11013
11014 #[doc = "Port Direction"]
11015 #[inline(always)]
11016 pub fn pdr(
11017 self,
11018 ) -> crate::common::RegisterField<
11019 2,
11020 0x1,
11021 1,
11022 0,
11023 p213pfs_by::Pdr,
11024 p213pfs_by::Pdr,
11025 P213PfsBy_SPEC,
11026 crate::common::RW,
11027 > {
11028 crate::common::RegisterField::<
11029 2,
11030 0x1,
11031 1,
11032 0,
11033 p213pfs_by::Pdr,
11034 p213pfs_by::Pdr,
11035 P213PfsBy_SPEC,
11036 crate::common::RW,
11037 >::from_register(self, 0)
11038 }
11039
11040 #[doc = "Pull-up Control"]
11041 #[inline(always)]
11042 pub fn pcr(
11043 self,
11044 ) -> crate::common::RegisterField<
11045 4,
11046 0x1,
11047 1,
11048 0,
11049 p213pfs_by::Pcr,
11050 p213pfs_by::Pcr,
11051 P213PfsBy_SPEC,
11052 crate::common::RW,
11053 > {
11054 crate::common::RegisterField::<
11055 4,
11056 0x1,
11057 1,
11058 0,
11059 p213pfs_by::Pcr,
11060 p213pfs_by::Pcr,
11061 P213PfsBy_SPEC,
11062 crate::common::RW,
11063 >::from_register(self, 0)
11064 }
11065
11066 #[doc = "N-Channel Open-Drain Control"]
11067 #[inline(always)]
11068 pub fn ncodr(
11069 self,
11070 ) -> crate::common::RegisterField<
11071 6,
11072 0x1,
11073 1,
11074 0,
11075 p213pfs_by::Ncodr,
11076 p213pfs_by::Ncodr,
11077 P213PfsBy_SPEC,
11078 crate::common::RW,
11079 > {
11080 crate::common::RegisterField::<
11081 6,
11082 0x1,
11083 1,
11084 0,
11085 p213pfs_by::Ncodr,
11086 p213pfs_by::Ncodr,
11087 P213PfsBy_SPEC,
11088 crate::common::RW,
11089 >::from_register(self, 0)
11090 }
11091}
11092impl ::core::default::Default for P213PfsBy {
11093 #[inline(always)]
11094 fn default() -> P213PfsBy {
11095 <crate::RegValueT<P213PfsBy_SPEC> as RegisterValue<_>>::new(0)
11096 }
11097}
11098pub mod p213pfs_by {
11099
11100 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11101 pub struct Podr_SPEC;
11102 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
11103 impl Podr {
11104 #[doc = "Output low"]
11105 pub const _0: Self = Self::new(0);
11106
11107 #[doc = "Output high"]
11108 pub const _1: Self = Self::new(1);
11109 }
11110 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11111 pub struct Pidr_SPEC;
11112 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
11113 impl Pidr {
11114 #[doc = "Low level"]
11115 pub const _0: Self = Self::new(0);
11116
11117 #[doc = "High level"]
11118 pub const _1: Self = Self::new(1);
11119 }
11120 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11121 pub struct Pdr_SPEC;
11122 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
11123 impl Pdr {
11124 #[doc = "Input (functions as an input pin)"]
11125 pub const _0: Self = Self::new(0);
11126
11127 #[doc = "Output (functions as an output pin)"]
11128 pub const _1: Self = Self::new(1);
11129 }
11130 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11131 pub struct Pcr_SPEC;
11132 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
11133 impl Pcr {
11134 #[doc = "Disable input pull-up"]
11135 pub const _0: Self = Self::new(0);
11136
11137 #[doc = "Enable input pull-up"]
11138 pub const _1: Self = Self::new(1);
11139 }
11140 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11141 pub struct Ncodr_SPEC;
11142 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
11143 impl Ncodr {
11144 #[doc = "Output CMOS"]
11145 pub const _0: Self = Self::new(0);
11146
11147 #[doc = "Output NMOS open-drain"]
11148 pub const _1: Self = Self::new(1);
11149 }
11150}
11151#[doc(hidden)]
11152#[derive(Copy, Clone, Eq, PartialEq)]
11153pub struct P30Pfs_SPEC;
11154impl crate::sealed::RegSpec for P30Pfs_SPEC {
11155 type DataType = u32;
11156}
11157
11158#[doc = "Port 30%s Pin Function Select Register"]
11159pub type P30Pfs = crate::RegValueT<P30Pfs_SPEC>;
11160
11161impl P30Pfs {
11162 #[doc = "Port Output Data"]
11163 #[inline(always)]
11164 pub fn podr(
11165 self,
11166 ) -> crate::common::RegisterField<
11167 0,
11168 0x1,
11169 1,
11170 0,
11171 p30pfs::Podr,
11172 p30pfs::Podr,
11173 P30Pfs_SPEC,
11174 crate::common::RW,
11175 > {
11176 crate::common::RegisterField::<
11177 0,
11178 0x1,
11179 1,
11180 0,
11181 p30pfs::Podr,
11182 p30pfs::Podr,
11183 P30Pfs_SPEC,
11184 crate::common::RW,
11185 >::from_register(self, 0)
11186 }
11187
11188 #[doc = "Port State"]
11189 #[inline(always)]
11190 pub fn pidr(
11191 self,
11192 ) -> crate::common::RegisterField<
11193 1,
11194 0x1,
11195 1,
11196 0,
11197 p30pfs::Pidr,
11198 p30pfs::Pidr,
11199 P30Pfs_SPEC,
11200 crate::common::R,
11201 > {
11202 crate::common::RegisterField::<
11203 1,
11204 0x1,
11205 1,
11206 0,
11207 p30pfs::Pidr,
11208 p30pfs::Pidr,
11209 P30Pfs_SPEC,
11210 crate::common::R,
11211 >::from_register(self, 0)
11212 }
11213
11214 #[doc = "Port Direction"]
11215 #[inline(always)]
11216 pub fn pdr(
11217 self,
11218 ) -> crate::common::RegisterField<
11219 2,
11220 0x1,
11221 1,
11222 0,
11223 p30pfs::Pdr,
11224 p30pfs::Pdr,
11225 P30Pfs_SPEC,
11226 crate::common::RW,
11227 > {
11228 crate::common::RegisterField::<
11229 2,
11230 0x1,
11231 1,
11232 0,
11233 p30pfs::Pdr,
11234 p30pfs::Pdr,
11235 P30Pfs_SPEC,
11236 crate::common::RW,
11237 >::from_register(self, 0)
11238 }
11239
11240 #[doc = "Pull-up Control"]
11241 #[inline(always)]
11242 pub fn pcr(
11243 self,
11244 ) -> crate::common::RegisterField<
11245 4,
11246 0x1,
11247 1,
11248 0,
11249 p30pfs::Pcr,
11250 p30pfs::Pcr,
11251 P30Pfs_SPEC,
11252 crate::common::RW,
11253 > {
11254 crate::common::RegisterField::<
11255 4,
11256 0x1,
11257 1,
11258 0,
11259 p30pfs::Pcr,
11260 p30pfs::Pcr,
11261 P30Pfs_SPEC,
11262 crate::common::RW,
11263 >::from_register(self, 0)
11264 }
11265
11266 #[doc = "N-Channel Open-Drain Control"]
11267 #[inline(always)]
11268 pub fn ncodr(
11269 self,
11270 ) -> crate::common::RegisterField<
11271 6,
11272 0x1,
11273 1,
11274 0,
11275 p30pfs::Ncodr,
11276 p30pfs::Ncodr,
11277 P30Pfs_SPEC,
11278 crate::common::RW,
11279 > {
11280 crate::common::RegisterField::<
11281 6,
11282 0x1,
11283 1,
11284 0,
11285 p30pfs::Ncodr,
11286 p30pfs::Ncodr,
11287 P30Pfs_SPEC,
11288 crate::common::RW,
11289 >::from_register(self, 0)
11290 }
11291
11292 #[doc = "IRQ Input Enable"]
11293 #[inline(always)]
11294 pub fn isel(
11295 self,
11296 ) -> crate::common::RegisterField<
11297 14,
11298 0x1,
11299 1,
11300 0,
11301 p30pfs::Isel,
11302 p30pfs::Isel,
11303 P30Pfs_SPEC,
11304 crate::common::RW,
11305 > {
11306 crate::common::RegisterField::<
11307 14,
11308 0x1,
11309 1,
11310 0,
11311 p30pfs::Isel,
11312 p30pfs::Isel,
11313 P30Pfs_SPEC,
11314 crate::common::RW,
11315 >::from_register(self, 0)
11316 }
11317
11318 #[doc = "Analog Input Enable"]
11319 #[inline(always)]
11320 pub fn asel(
11321 self,
11322 ) -> crate::common::RegisterField<
11323 15,
11324 0x1,
11325 1,
11326 0,
11327 p30pfs::Asel,
11328 p30pfs::Asel,
11329 P30Pfs_SPEC,
11330 crate::common::RW,
11331 > {
11332 crate::common::RegisterField::<
11333 15,
11334 0x1,
11335 1,
11336 0,
11337 p30pfs::Asel,
11338 p30pfs::Asel,
11339 P30Pfs_SPEC,
11340 crate::common::RW,
11341 >::from_register(self, 0)
11342 }
11343
11344 #[doc = "Port Mode Control"]
11345 #[inline(always)]
11346 pub fn pmr(
11347 self,
11348 ) -> crate::common::RegisterField<
11349 16,
11350 0x1,
11351 1,
11352 0,
11353 p30pfs::Pmr,
11354 p30pfs::Pmr,
11355 P30Pfs_SPEC,
11356 crate::common::RW,
11357 > {
11358 crate::common::RegisterField::<
11359 16,
11360 0x1,
11361 1,
11362 0,
11363 p30pfs::Pmr,
11364 p30pfs::Pmr,
11365 P30Pfs_SPEC,
11366 crate::common::RW,
11367 >::from_register(self, 0)
11368 }
11369
11370 #[doc = "Peripheral Select"]
11371 #[inline(always)]
11372 pub fn psel(
11373 self,
11374 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P30Pfs_SPEC, crate::common::RW> {
11375 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P30Pfs_SPEC,crate::common::RW>::from_register(self,0)
11376 }
11377}
11378impl ::core::default::Default for P30Pfs {
11379 #[inline(always)]
11380 fn default() -> P30Pfs {
11381 <crate::RegValueT<P30Pfs_SPEC> as RegisterValue<_>>::new(0)
11382 }
11383}
11384pub mod p30pfs {
11385
11386 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11387 pub struct Podr_SPEC;
11388 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
11389 impl Podr {
11390 #[doc = "Output low"]
11391 pub const _0: Self = Self::new(0);
11392
11393 #[doc = "Output high"]
11394 pub const _1: Self = Self::new(1);
11395 }
11396 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11397 pub struct Pidr_SPEC;
11398 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
11399 impl Pidr {
11400 #[doc = "Low level"]
11401 pub const _0: Self = Self::new(0);
11402
11403 #[doc = "High level"]
11404 pub const _1: Self = Self::new(1);
11405 }
11406 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11407 pub struct Pdr_SPEC;
11408 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
11409 impl Pdr {
11410 #[doc = "Input (functions as an input pin)"]
11411 pub const _0: Self = Self::new(0);
11412
11413 #[doc = "Output (functions as an output pin)"]
11414 pub const _1: Self = Self::new(1);
11415 }
11416 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11417 pub struct Pcr_SPEC;
11418 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
11419 impl Pcr {
11420 #[doc = "Disable input pull-up"]
11421 pub const _0: Self = Self::new(0);
11422
11423 #[doc = "Enable input pull-up"]
11424 pub const _1: Self = Self::new(1);
11425 }
11426 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11427 pub struct Ncodr_SPEC;
11428 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
11429 impl Ncodr {
11430 #[doc = "Output CMOS"]
11431 pub const _0: Self = Self::new(0);
11432
11433 #[doc = "Output NMOS open-drain"]
11434 pub const _1: Self = Self::new(1);
11435 }
11436 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11437 pub struct Isel_SPEC;
11438 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
11439 impl Isel {
11440 #[doc = "Do not use as IRQn input pin"]
11441 pub const _0: Self = Self::new(0);
11442
11443 #[doc = "Use as IRQn input pin"]
11444 pub const _1: Self = Self::new(1);
11445 }
11446 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11447 pub struct Asel_SPEC;
11448 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
11449 impl Asel {
11450 #[doc = "Do not use as analog pin"]
11451 pub const _0: Self = Self::new(0);
11452
11453 #[doc = "Use as analog pin"]
11454 pub const _1: Self = Self::new(1);
11455 }
11456 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11457 pub struct Pmr_SPEC;
11458 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
11459 impl Pmr {
11460 #[doc = "Use as general I/O pin"]
11461 pub const _0: Self = Self::new(0);
11462
11463 #[doc = "Use as I/O port for peripheral functions"]
11464 pub const _1: Self = Self::new(1);
11465 }
11466}
11467#[doc(hidden)]
11468#[derive(Copy, Clone, Eq, PartialEq)]
11469pub struct P30PfsHa_SPEC;
11470impl crate::sealed::RegSpec for P30PfsHa_SPEC {
11471 type DataType = u16;
11472}
11473
11474#[doc = "Port 30%s Pin Function Select Register"]
11475pub type P30PfsHa = crate::RegValueT<P30PfsHa_SPEC>;
11476
11477impl P30PfsHa {
11478 #[doc = "Port Output Data"]
11479 #[inline(always)]
11480 pub fn podr(
11481 self,
11482 ) -> crate::common::RegisterField<
11483 0,
11484 0x1,
11485 1,
11486 0,
11487 p30pfs_ha::Podr,
11488 p30pfs_ha::Podr,
11489 P30PfsHa_SPEC,
11490 crate::common::RW,
11491 > {
11492 crate::common::RegisterField::<
11493 0,
11494 0x1,
11495 1,
11496 0,
11497 p30pfs_ha::Podr,
11498 p30pfs_ha::Podr,
11499 P30PfsHa_SPEC,
11500 crate::common::RW,
11501 >::from_register(self, 0)
11502 }
11503
11504 #[doc = "Port State"]
11505 #[inline(always)]
11506 pub fn pidr(
11507 self,
11508 ) -> crate::common::RegisterField<
11509 1,
11510 0x1,
11511 1,
11512 0,
11513 p30pfs_ha::Pidr,
11514 p30pfs_ha::Pidr,
11515 P30PfsHa_SPEC,
11516 crate::common::R,
11517 > {
11518 crate::common::RegisterField::<
11519 1,
11520 0x1,
11521 1,
11522 0,
11523 p30pfs_ha::Pidr,
11524 p30pfs_ha::Pidr,
11525 P30PfsHa_SPEC,
11526 crate::common::R,
11527 >::from_register(self, 0)
11528 }
11529
11530 #[doc = "Port Direction"]
11531 #[inline(always)]
11532 pub fn pdr(
11533 self,
11534 ) -> crate::common::RegisterField<
11535 2,
11536 0x1,
11537 1,
11538 0,
11539 p30pfs_ha::Pdr,
11540 p30pfs_ha::Pdr,
11541 P30PfsHa_SPEC,
11542 crate::common::RW,
11543 > {
11544 crate::common::RegisterField::<
11545 2,
11546 0x1,
11547 1,
11548 0,
11549 p30pfs_ha::Pdr,
11550 p30pfs_ha::Pdr,
11551 P30PfsHa_SPEC,
11552 crate::common::RW,
11553 >::from_register(self, 0)
11554 }
11555
11556 #[doc = "Pull-up Control"]
11557 #[inline(always)]
11558 pub fn pcr(
11559 self,
11560 ) -> crate::common::RegisterField<
11561 4,
11562 0x1,
11563 1,
11564 0,
11565 p30pfs_ha::Pcr,
11566 p30pfs_ha::Pcr,
11567 P30PfsHa_SPEC,
11568 crate::common::RW,
11569 > {
11570 crate::common::RegisterField::<
11571 4,
11572 0x1,
11573 1,
11574 0,
11575 p30pfs_ha::Pcr,
11576 p30pfs_ha::Pcr,
11577 P30PfsHa_SPEC,
11578 crate::common::RW,
11579 >::from_register(self, 0)
11580 }
11581
11582 #[doc = "N-Channel Open-Drain Control"]
11583 #[inline(always)]
11584 pub fn ncodr(
11585 self,
11586 ) -> crate::common::RegisterField<
11587 6,
11588 0x1,
11589 1,
11590 0,
11591 p30pfs_ha::Ncodr,
11592 p30pfs_ha::Ncodr,
11593 P30PfsHa_SPEC,
11594 crate::common::RW,
11595 > {
11596 crate::common::RegisterField::<
11597 6,
11598 0x1,
11599 1,
11600 0,
11601 p30pfs_ha::Ncodr,
11602 p30pfs_ha::Ncodr,
11603 P30PfsHa_SPEC,
11604 crate::common::RW,
11605 >::from_register(self, 0)
11606 }
11607
11608 #[doc = "IRQ Input Enable"]
11609 #[inline(always)]
11610 pub fn isel(
11611 self,
11612 ) -> crate::common::RegisterField<
11613 14,
11614 0x1,
11615 1,
11616 0,
11617 p30pfs_ha::Isel,
11618 p30pfs_ha::Isel,
11619 P30PfsHa_SPEC,
11620 crate::common::RW,
11621 > {
11622 crate::common::RegisterField::<
11623 14,
11624 0x1,
11625 1,
11626 0,
11627 p30pfs_ha::Isel,
11628 p30pfs_ha::Isel,
11629 P30PfsHa_SPEC,
11630 crate::common::RW,
11631 >::from_register(self, 0)
11632 }
11633
11634 #[doc = "Analog Input Enable"]
11635 #[inline(always)]
11636 pub fn asel(
11637 self,
11638 ) -> crate::common::RegisterField<
11639 15,
11640 0x1,
11641 1,
11642 0,
11643 p30pfs_ha::Asel,
11644 p30pfs_ha::Asel,
11645 P30PfsHa_SPEC,
11646 crate::common::RW,
11647 > {
11648 crate::common::RegisterField::<
11649 15,
11650 0x1,
11651 1,
11652 0,
11653 p30pfs_ha::Asel,
11654 p30pfs_ha::Asel,
11655 P30PfsHa_SPEC,
11656 crate::common::RW,
11657 >::from_register(self, 0)
11658 }
11659}
11660impl ::core::default::Default for P30PfsHa {
11661 #[inline(always)]
11662 fn default() -> P30PfsHa {
11663 <crate::RegValueT<P30PfsHa_SPEC> as RegisterValue<_>>::new(0)
11664 }
11665}
11666pub mod p30pfs_ha {
11667
11668 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11669 pub struct Podr_SPEC;
11670 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
11671 impl Podr {
11672 #[doc = "Output low"]
11673 pub const _0: Self = Self::new(0);
11674
11675 #[doc = "Output high"]
11676 pub const _1: Self = Self::new(1);
11677 }
11678 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11679 pub struct Pidr_SPEC;
11680 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
11681 impl Pidr {
11682 #[doc = "Low level"]
11683 pub const _0: Self = Self::new(0);
11684
11685 #[doc = "High level"]
11686 pub const _1: Self = Self::new(1);
11687 }
11688 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11689 pub struct Pdr_SPEC;
11690 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
11691 impl Pdr {
11692 #[doc = "Input (functions as an input pin)"]
11693 pub const _0: Self = Self::new(0);
11694
11695 #[doc = "Output (functions as an output pin)"]
11696 pub const _1: Self = Self::new(1);
11697 }
11698 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11699 pub struct Pcr_SPEC;
11700 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
11701 impl Pcr {
11702 #[doc = "Disable input pull-up"]
11703 pub const _0: Self = Self::new(0);
11704
11705 #[doc = "Enable input pull-up"]
11706 pub const _1: Self = Self::new(1);
11707 }
11708 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11709 pub struct Ncodr_SPEC;
11710 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
11711 impl Ncodr {
11712 #[doc = "Output CMOS"]
11713 pub const _0: Self = Self::new(0);
11714
11715 #[doc = "Output NMOS open-drain"]
11716 pub const _1: Self = Self::new(1);
11717 }
11718 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11719 pub struct Isel_SPEC;
11720 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
11721 impl Isel {
11722 #[doc = "Do not use as IRQn input pin"]
11723 pub const _0: Self = Self::new(0);
11724
11725 #[doc = "Use as IRQn input pin"]
11726 pub const _1: Self = Self::new(1);
11727 }
11728 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11729 pub struct Asel_SPEC;
11730 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
11731 impl Asel {
11732 #[doc = "Do not use as analog pin"]
11733 pub const _0: Self = Self::new(0);
11734
11735 #[doc = "Use as analog pin"]
11736 pub const _1: Self = Self::new(1);
11737 }
11738}
11739#[doc(hidden)]
11740#[derive(Copy, Clone, Eq, PartialEq)]
11741pub struct P30PfsBy_SPEC;
11742impl crate::sealed::RegSpec for P30PfsBy_SPEC {
11743 type DataType = u8;
11744}
11745
11746#[doc = "Port 30%s Pin Function Select Register"]
11747pub type P30PfsBy = crate::RegValueT<P30PfsBy_SPEC>;
11748
11749impl P30PfsBy {
11750 #[doc = "Port Output Data"]
11751 #[inline(always)]
11752 pub fn podr(
11753 self,
11754 ) -> crate::common::RegisterField<
11755 0,
11756 0x1,
11757 1,
11758 0,
11759 p30pfs_by::Podr,
11760 p30pfs_by::Podr,
11761 P30PfsBy_SPEC,
11762 crate::common::RW,
11763 > {
11764 crate::common::RegisterField::<
11765 0,
11766 0x1,
11767 1,
11768 0,
11769 p30pfs_by::Podr,
11770 p30pfs_by::Podr,
11771 P30PfsBy_SPEC,
11772 crate::common::RW,
11773 >::from_register(self, 0)
11774 }
11775
11776 #[doc = "Port State"]
11777 #[inline(always)]
11778 pub fn pidr(
11779 self,
11780 ) -> crate::common::RegisterField<
11781 1,
11782 0x1,
11783 1,
11784 0,
11785 p30pfs_by::Pidr,
11786 p30pfs_by::Pidr,
11787 P30PfsBy_SPEC,
11788 crate::common::R,
11789 > {
11790 crate::common::RegisterField::<
11791 1,
11792 0x1,
11793 1,
11794 0,
11795 p30pfs_by::Pidr,
11796 p30pfs_by::Pidr,
11797 P30PfsBy_SPEC,
11798 crate::common::R,
11799 >::from_register(self, 0)
11800 }
11801
11802 #[doc = "Port Direction"]
11803 #[inline(always)]
11804 pub fn pdr(
11805 self,
11806 ) -> crate::common::RegisterField<
11807 2,
11808 0x1,
11809 1,
11810 0,
11811 p30pfs_by::Pdr,
11812 p30pfs_by::Pdr,
11813 P30PfsBy_SPEC,
11814 crate::common::RW,
11815 > {
11816 crate::common::RegisterField::<
11817 2,
11818 0x1,
11819 1,
11820 0,
11821 p30pfs_by::Pdr,
11822 p30pfs_by::Pdr,
11823 P30PfsBy_SPEC,
11824 crate::common::RW,
11825 >::from_register(self, 0)
11826 }
11827
11828 #[doc = "Pull-up Control"]
11829 #[inline(always)]
11830 pub fn pcr(
11831 self,
11832 ) -> crate::common::RegisterField<
11833 4,
11834 0x1,
11835 1,
11836 0,
11837 p30pfs_by::Pcr,
11838 p30pfs_by::Pcr,
11839 P30PfsBy_SPEC,
11840 crate::common::RW,
11841 > {
11842 crate::common::RegisterField::<
11843 4,
11844 0x1,
11845 1,
11846 0,
11847 p30pfs_by::Pcr,
11848 p30pfs_by::Pcr,
11849 P30PfsBy_SPEC,
11850 crate::common::RW,
11851 >::from_register(self, 0)
11852 }
11853
11854 #[doc = "N-Channel Open-Drain Control"]
11855 #[inline(always)]
11856 pub fn ncodr(
11857 self,
11858 ) -> crate::common::RegisterField<
11859 6,
11860 0x1,
11861 1,
11862 0,
11863 p30pfs_by::Ncodr,
11864 p30pfs_by::Ncodr,
11865 P30PfsBy_SPEC,
11866 crate::common::RW,
11867 > {
11868 crate::common::RegisterField::<
11869 6,
11870 0x1,
11871 1,
11872 0,
11873 p30pfs_by::Ncodr,
11874 p30pfs_by::Ncodr,
11875 P30PfsBy_SPEC,
11876 crate::common::RW,
11877 >::from_register(self, 0)
11878 }
11879}
11880impl ::core::default::Default for P30PfsBy {
11881 #[inline(always)]
11882 fn default() -> P30PfsBy {
11883 <crate::RegValueT<P30PfsBy_SPEC> as RegisterValue<_>>::new(0)
11884 }
11885}
11886pub mod p30pfs_by {
11887
11888 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11889 pub struct Podr_SPEC;
11890 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
11891 impl Podr {
11892 #[doc = "Output low"]
11893 pub const _0: Self = Self::new(0);
11894
11895 #[doc = "Output high"]
11896 pub const _1: Self = Self::new(1);
11897 }
11898 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11899 pub struct Pidr_SPEC;
11900 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
11901 impl Pidr {
11902 #[doc = "Low level"]
11903 pub const _0: Self = Self::new(0);
11904
11905 #[doc = "High level"]
11906 pub const _1: Self = Self::new(1);
11907 }
11908 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11909 pub struct Pdr_SPEC;
11910 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
11911 impl Pdr {
11912 #[doc = "Input (functions as an input pin)"]
11913 pub const _0: Self = Self::new(0);
11914
11915 #[doc = "Output (functions as an output pin)"]
11916 pub const _1: Self = Self::new(1);
11917 }
11918 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11919 pub struct Pcr_SPEC;
11920 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
11921 impl Pcr {
11922 #[doc = "Disable input pull-up"]
11923 pub const _0: Self = Self::new(0);
11924
11925 #[doc = "Enable input pull-up"]
11926 pub const _1: Self = Self::new(1);
11927 }
11928 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
11929 pub struct Ncodr_SPEC;
11930 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
11931 impl Ncodr {
11932 #[doc = "Output CMOS"]
11933 pub const _0: Self = Self::new(0);
11934
11935 #[doc = "Output NMOS open-drain"]
11936 pub const _1: Self = Self::new(1);
11937 }
11938}
11939#[doc(hidden)]
11940#[derive(Copy, Clone, Eq, PartialEq)]
11941pub struct P400Pfs_SPEC;
11942impl crate::sealed::RegSpec for P400Pfs_SPEC {
11943 type DataType = u32;
11944}
11945
11946#[doc = "Port 400 Pin Function Select Register"]
11947pub type P400Pfs = crate::RegValueT<P400Pfs_SPEC>;
11948
11949impl P400Pfs {
11950 #[doc = "Port Output Data"]
11951 #[inline(always)]
11952 pub fn podr(
11953 self,
11954 ) -> crate::common::RegisterField<
11955 0,
11956 0x1,
11957 1,
11958 0,
11959 p400pfs::Podr,
11960 p400pfs::Podr,
11961 P400Pfs_SPEC,
11962 crate::common::RW,
11963 > {
11964 crate::common::RegisterField::<
11965 0,
11966 0x1,
11967 1,
11968 0,
11969 p400pfs::Podr,
11970 p400pfs::Podr,
11971 P400Pfs_SPEC,
11972 crate::common::RW,
11973 >::from_register(self, 0)
11974 }
11975
11976 #[doc = "Port State"]
11977 #[inline(always)]
11978 pub fn pidr(
11979 self,
11980 ) -> crate::common::RegisterField<
11981 1,
11982 0x1,
11983 1,
11984 0,
11985 p400pfs::Pidr,
11986 p400pfs::Pidr,
11987 P400Pfs_SPEC,
11988 crate::common::R,
11989 > {
11990 crate::common::RegisterField::<
11991 1,
11992 0x1,
11993 1,
11994 0,
11995 p400pfs::Pidr,
11996 p400pfs::Pidr,
11997 P400Pfs_SPEC,
11998 crate::common::R,
11999 >::from_register(self, 0)
12000 }
12001
12002 #[doc = "Port Direction"]
12003 #[inline(always)]
12004 pub fn pdr(
12005 self,
12006 ) -> crate::common::RegisterField<
12007 2,
12008 0x1,
12009 1,
12010 0,
12011 p400pfs::Pdr,
12012 p400pfs::Pdr,
12013 P400Pfs_SPEC,
12014 crate::common::RW,
12015 > {
12016 crate::common::RegisterField::<
12017 2,
12018 0x1,
12019 1,
12020 0,
12021 p400pfs::Pdr,
12022 p400pfs::Pdr,
12023 P400Pfs_SPEC,
12024 crate::common::RW,
12025 >::from_register(self, 0)
12026 }
12027
12028 #[doc = "Pull-up Control"]
12029 #[inline(always)]
12030 pub fn pcr(
12031 self,
12032 ) -> crate::common::RegisterField<
12033 4,
12034 0x1,
12035 1,
12036 0,
12037 p400pfs::Pcr,
12038 p400pfs::Pcr,
12039 P400Pfs_SPEC,
12040 crate::common::RW,
12041 > {
12042 crate::common::RegisterField::<
12043 4,
12044 0x1,
12045 1,
12046 0,
12047 p400pfs::Pcr,
12048 p400pfs::Pcr,
12049 P400Pfs_SPEC,
12050 crate::common::RW,
12051 >::from_register(self, 0)
12052 }
12053
12054 #[doc = "N-Channel Open-Drain Control"]
12055 #[inline(always)]
12056 pub fn ncodr(
12057 self,
12058 ) -> crate::common::RegisterField<
12059 6,
12060 0x1,
12061 1,
12062 0,
12063 p400pfs::Ncodr,
12064 p400pfs::Ncodr,
12065 P400Pfs_SPEC,
12066 crate::common::RW,
12067 > {
12068 crate::common::RegisterField::<
12069 6,
12070 0x1,
12071 1,
12072 0,
12073 p400pfs::Ncodr,
12074 p400pfs::Ncodr,
12075 P400Pfs_SPEC,
12076 crate::common::RW,
12077 >::from_register(self, 0)
12078 }
12079
12080 #[doc = "IRQ Input Enable"]
12081 #[inline(always)]
12082 pub fn isel(
12083 self,
12084 ) -> crate::common::RegisterField<
12085 14,
12086 0x1,
12087 1,
12088 0,
12089 p400pfs::Isel,
12090 p400pfs::Isel,
12091 P400Pfs_SPEC,
12092 crate::common::RW,
12093 > {
12094 crate::common::RegisterField::<
12095 14,
12096 0x1,
12097 1,
12098 0,
12099 p400pfs::Isel,
12100 p400pfs::Isel,
12101 P400Pfs_SPEC,
12102 crate::common::RW,
12103 >::from_register(self, 0)
12104 }
12105
12106 #[doc = "Analog Input Enable"]
12107 #[inline(always)]
12108 pub fn asel(
12109 self,
12110 ) -> crate::common::RegisterField<
12111 15,
12112 0x1,
12113 1,
12114 0,
12115 p400pfs::Asel,
12116 p400pfs::Asel,
12117 P400Pfs_SPEC,
12118 crate::common::RW,
12119 > {
12120 crate::common::RegisterField::<
12121 15,
12122 0x1,
12123 1,
12124 0,
12125 p400pfs::Asel,
12126 p400pfs::Asel,
12127 P400Pfs_SPEC,
12128 crate::common::RW,
12129 >::from_register(self, 0)
12130 }
12131
12132 #[doc = "Port Mode Control"]
12133 #[inline(always)]
12134 pub fn pmr(
12135 self,
12136 ) -> crate::common::RegisterField<
12137 16,
12138 0x1,
12139 1,
12140 0,
12141 p400pfs::Pmr,
12142 p400pfs::Pmr,
12143 P400Pfs_SPEC,
12144 crate::common::RW,
12145 > {
12146 crate::common::RegisterField::<
12147 16,
12148 0x1,
12149 1,
12150 0,
12151 p400pfs::Pmr,
12152 p400pfs::Pmr,
12153 P400Pfs_SPEC,
12154 crate::common::RW,
12155 >::from_register(self, 0)
12156 }
12157
12158 #[doc = "Peripheral Select"]
12159 #[inline(always)]
12160 pub fn psel(
12161 self,
12162 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P400Pfs_SPEC, crate::common::RW> {
12163 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P400Pfs_SPEC,crate::common::RW>::from_register(self,0)
12164 }
12165}
12166impl ::core::default::Default for P400Pfs {
12167 #[inline(always)]
12168 fn default() -> P400Pfs {
12169 <crate::RegValueT<P400Pfs_SPEC> as RegisterValue<_>>::new(0)
12170 }
12171}
12172pub mod p400pfs {
12173
12174 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12175 pub struct Podr_SPEC;
12176 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
12177 impl Podr {
12178 #[doc = "Output low"]
12179 pub const _0: Self = Self::new(0);
12180
12181 #[doc = "Output high"]
12182 pub const _1: Self = Self::new(1);
12183 }
12184 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12185 pub struct Pidr_SPEC;
12186 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
12187 impl Pidr {
12188 #[doc = "Low level"]
12189 pub const _0: Self = Self::new(0);
12190
12191 #[doc = "High level"]
12192 pub const _1: Self = Self::new(1);
12193 }
12194 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12195 pub struct Pdr_SPEC;
12196 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
12197 impl Pdr {
12198 #[doc = "Input (functions as an input pin)"]
12199 pub const _0: Self = Self::new(0);
12200
12201 #[doc = "Output (functions as an output pin)"]
12202 pub const _1: Self = Self::new(1);
12203 }
12204 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12205 pub struct Pcr_SPEC;
12206 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
12207 impl Pcr {
12208 #[doc = "Disable input pull-up"]
12209 pub const _0: Self = Self::new(0);
12210
12211 #[doc = "Enable input pull-up"]
12212 pub const _1: Self = Self::new(1);
12213 }
12214 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12215 pub struct Ncodr_SPEC;
12216 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
12217 impl Ncodr {
12218 #[doc = "Output CMOS"]
12219 pub const _0: Self = Self::new(0);
12220
12221 #[doc = "Output NMOS open-drain"]
12222 pub const _1: Self = Self::new(1);
12223 }
12224 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12225 pub struct Isel_SPEC;
12226 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
12227 impl Isel {
12228 #[doc = "Do not use as IRQn input pin"]
12229 pub const _0: Self = Self::new(0);
12230
12231 #[doc = "Use as IRQn input pin"]
12232 pub const _1: Self = Self::new(1);
12233 }
12234 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12235 pub struct Asel_SPEC;
12236 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
12237 impl Asel {
12238 #[doc = "Do not use as analog pin"]
12239 pub const _0: Self = Self::new(0);
12240
12241 #[doc = "Use as analog pin"]
12242 pub const _1: Self = Self::new(1);
12243 }
12244 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12245 pub struct Pmr_SPEC;
12246 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
12247 impl Pmr {
12248 #[doc = "Use as general I/O pin"]
12249 pub const _0: Self = Self::new(0);
12250
12251 #[doc = "Use as I/O port for peripheral functions"]
12252 pub const _1: Self = Self::new(1);
12253 }
12254}
12255#[doc(hidden)]
12256#[derive(Copy, Clone, Eq, PartialEq)]
12257pub struct P400PfsHa_SPEC;
12258impl crate::sealed::RegSpec for P400PfsHa_SPEC {
12259 type DataType = u16;
12260}
12261
12262#[doc = "Port 400 Pin Function Select Register"]
12263pub type P400PfsHa = crate::RegValueT<P400PfsHa_SPEC>;
12264
12265impl P400PfsHa {
12266 #[doc = "Port Output Data"]
12267 #[inline(always)]
12268 pub fn podr(
12269 self,
12270 ) -> crate::common::RegisterField<
12271 0,
12272 0x1,
12273 1,
12274 0,
12275 p400pfs_ha::Podr,
12276 p400pfs_ha::Podr,
12277 P400PfsHa_SPEC,
12278 crate::common::RW,
12279 > {
12280 crate::common::RegisterField::<
12281 0,
12282 0x1,
12283 1,
12284 0,
12285 p400pfs_ha::Podr,
12286 p400pfs_ha::Podr,
12287 P400PfsHa_SPEC,
12288 crate::common::RW,
12289 >::from_register(self, 0)
12290 }
12291
12292 #[doc = "Port State"]
12293 #[inline(always)]
12294 pub fn pidr(
12295 self,
12296 ) -> crate::common::RegisterField<
12297 1,
12298 0x1,
12299 1,
12300 0,
12301 p400pfs_ha::Pidr,
12302 p400pfs_ha::Pidr,
12303 P400PfsHa_SPEC,
12304 crate::common::R,
12305 > {
12306 crate::common::RegisterField::<
12307 1,
12308 0x1,
12309 1,
12310 0,
12311 p400pfs_ha::Pidr,
12312 p400pfs_ha::Pidr,
12313 P400PfsHa_SPEC,
12314 crate::common::R,
12315 >::from_register(self, 0)
12316 }
12317
12318 #[doc = "Port Direction"]
12319 #[inline(always)]
12320 pub fn pdr(
12321 self,
12322 ) -> crate::common::RegisterField<
12323 2,
12324 0x1,
12325 1,
12326 0,
12327 p400pfs_ha::Pdr,
12328 p400pfs_ha::Pdr,
12329 P400PfsHa_SPEC,
12330 crate::common::RW,
12331 > {
12332 crate::common::RegisterField::<
12333 2,
12334 0x1,
12335 1,
12336 0,
12337 p400pfs_ha::Pdr,
12338 p400pfs_ha::Pdr,
12339 P400PfsHa_SPEC,
12340 crate::common::RW,
12341 >::from_register(self, 0)
12342 }
12343
12344 #[doc = "Pull-up Control"]
12345 #[inline(always)]
12346 pub fn pcr(
12347 self,
12348 ) -> crate::common::RegisterField<
12349 4,
12350 0x1,
12351 1,
12352 0,
12353 p400pfs_ha::Pcr,
12354 p400pfs_ha::Pcr,
12355 P400PfsHa_SPEC,
12356 crate::common::RW,
12357 > {
12358 crate::common::RegisterField::<
12359 4,
12360 0x1,
12361 1,
12362 0,
12363 p400pfs_ha::Pcr,
12364 p400pfs_ha::Pcr,
12365 P400PfsHa_SPEC,
12366 crate::common::RW,
12367 >::from_register(self, 0)
12368 }
12369
12370 #[doc = "N-Channel Open-Drain Control"]
12371 #[inline(always)]
12372 pub fn ncodr(
12373 self,
12374 ) -> crate::common::RegisterField<
12375 6,
12376 0x1,
12377 1,
12378 0,
12379 p400pfs_ha::Ncodr,
12380 p400pfs_ha::Ncodr,
12381 P400PfsHa_SPEC,
12382 crate::common::RW,
12383 > {
12384 crate::common::RegisterField::<
12385 6,
12386 0x1,
12387 1,
12388 0,
12389 p400pfs_ha::Ncodr,
12390 p400pfs_ha::Ncodr,
12391 P400PfsHa_SPEC,
12392 crate::common::RW,
12393 >::from_register(self, 0)
12394 }
12395
12396 #[doc = "IRQ Input Enable"]
12397 #[inline(always)]
12398 pub fn isel(
12399 self,
12400 ) -> crate::common::RegisterField<
12401 14,
12402 0x1,
12403 1,
12404 0,
12405 p400pfs_ha::Isel,
12406 p400pfs_ha::Isel,
12407 P400PfsHa_SPEC,
12408 crate::common::RW,
12409 > {
12410 crate::common::RegisterField::<
12411 14,
12412 0x1,
12413 1,
12414 0,
12415 p400pfs_ha::Isel,
12416 p400pfs_ha::Isel,
12417 P400PfsHa_SPEC,
12418 crate::common::RW,
12419 >::from_register(self, 0)
12420 }
12421
12422 #[doc = "Analog Input Enable"]
12423 #[inline(always)]
12424 pub fn asel(
12425 self,
12426 ) -> crate::common::RegisterField<
12427 15,
12428 0x1,
12429 1,
12430 0,
12431 p400pfs_ha::Asel,
12432 p400pfs_ha::Asel,
12433 P400PfsHa_SPEC,
12434 crate::common::RW,
12435 > {
12436 crate::common::RegisterField::<
12437 15,
12438 0x1,
12439 1,
12440 0,
12441 p400pfs_ha::Asel,
12442 p400pfs_ha::Asel,
12443 P400PfsHa_SPEC,
12444 crate::common::RW,
12445 >::from_register(self, 0)
12446 }
12447}
12448impl ::core::default::Default for P400PfsHa {
12449 #[inline(always)]
12450 fn default() -> P400PfsHa {
12451 <crate::RegValueT<P400PfsHa_SPEC> as RegisterValue<_>>::new(0)
12452 }
12453}
12454pub mod p400pfs_ha {
12455
12456 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12457 pub struct Podr_SPEC;
12458 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
12459 impl Podr {
12460 #[doc = "Output low"]
12461 pub const _0: Self = Self::new(0);
12462
12463 #[doc = "Output high"]
12464 pub const _1: Self = Self::new(1);
12465 }
12466 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12467 pub struct Pidr_SPEC;
12468 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
12469 impl Pidr {
12470 #[doc = "Low level"]
12471 pub const _0: Self = Self::new(0);
12472
12473 #[doc = "High level"]
12474 pub const _1: Self = Self::new(1);
12475 }
12476 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12477 pub struct Pdr_SPEC;
12478 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
12479 impl Pdr {
12480 #[doc = "Input (functions as an input pin)"]
12481 pub const _0: Self = Self::new(0);
12482
12483 #[doc = "Output (functions as an output pin)"]
12484 pub const _1: Self = Self::new(1);
12485 }
12486 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12487 pub struct Pcr_SPEC;
12488 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
12489 impl Pcr {
12490 #[doc = "Disable input pull-up"]
12491 pub const _0: Self = Self::new(0);
12492
12493 #[doc = "Enable input pull-up"]
12494 pub const _1: Self = Self::new(1);
12495 }
12496 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12497 pub struct Ncodr_SPEC;
12498 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
12499 impl Ncodr {
12500 #[doc = "Output CMOS"]
12501 pub const _0: Self = Self::new(0);
12502
12503 #[doc = "Output NMOS open-drain"]
12504 pub const _1: Self = Self::new(1);
12505 }
12506 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12507 pub struct Isel_SPEC;
12508 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
12509 impl Isel {
12510 #[doc = "Do not use as IRQn input pin"]
12511 pub const _0: Self = Self::new(0);
12512
12513 #[doc = "Use as IRQn input pin"]
12514 pub const _1: Self = Self::new(1);
12515 }
12516 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12517 pub struct Asel_SPEC;
12518 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
12519 impl Asel {
12520 #[doc = "Do not use as analog pin"]
12521 pub const _0: Self = Self::new(0);
12522
12523 #[doc = "Use as analog pin"]
12524 pub const _1: Self = Self::new(1);
12525 }
12526}
12527#[doc(hidden)]
12528#[derive(Copy, Clone, Eq, PartialEq)]
12529pub struct P400PfsBy_SPEC;
12530impl crate::sealed::RegSpec for P400PfsBy_SPEC {
12531 type DataType = u8;
12532}
12533
12534#[doc = "Port 400 Pin Function Select Register"]
12535pub type P400PfsBy = crate::RegValueT<P400PfsBy_SPEC>;
12536
12537impl P400PfsBy {
12538 #[doc = "Port Output Data"]
12539 #[inline(always)]
12540 pub fn podr(
12541 self,
12542 ) -> crate::common::RegisterField<
12543 0,
12544 0x1,
12545 1,
12546 0,
12547 p400pfs_by::Podr,
12548 p400pfs_by::Podr,
12549 P400PfsBy_SPEC,
12550 crate::common::RW,
12551 > {
12552 crate::common::RegisterField::<
12553 0,
12554 0x1,
12555 1,
12556 0,
12557 p400pfs_by::Podr,
12558 p400pfs_by::Podr,
12559 P400PfsBy_SPEC,
12560 crate::common::RW,
12561 >::from_register(self, 0)
12562 }
12563
12564 #[doc = "Port State"]
12565 #[inline(always)]
12566 pub fn pidr(
12567 self,
12568 ) -> crate::common::RegisterField<
12569 1,
12570 0x1,
12571 1,
12572 0,
12573 p400pfs_by::Pidr,
12574 p400pfs_by::Pidr,
12575 P400PfsBy_SPEC,
12576 crate::common::R,
12577 > {
12578 crate::common::RegisterField::<
12579 1,
12580 0x1,
12581 1,
12582 0,
12583 p400pfs_by::Pidr,
12584 p400pfs_by::Pidr,
12585 P400PfsBy_SPEC,
12586 crate::common::R,
12587 >::from_register(self, 0)
12588 }
12589
12590 #[doc = "Port Direction"]
12591 #[inline(always)]
12592 pub fn pdr(
12593 self,
12594 ) -> crate::common::RegisterField<
12595 2,
12596 0x1,
12597 1,
12598 0,
12599 p400pfs_by::Pdr,
12600 p400pfs_by::Pdr,
12601 P400PfsBy_SPEC,
12602 crate::common::RW,
12603 > {
12604 crate::common::RegisterField::<
12605 2,
12606 0x1,
12607 1,
12608 0,
12609 p400pfs_by::Pdr,
12610 p400pfs_by::Pdr,
12611 P400PfsBy_SPEC,
12612 crate::common::RW,
12613 >::from_register(self, 0)
12614 }
12615
12616 #[doc = "Pull-up Control"]
12617 #[inline(always)]
12618 pub fn pcr(
12619 self,
12620 ) -> crate::common::RegisterField<
12621 4,
12622 0x1,
12623 1,
12624 0,
12625 p400pfs_by::Pcr,
12626 p400pfs_by::Pcr,
12627 P400PfsBy_SPEC,
12628 crate::common::RW,
12629 > {
12630 crate::common::RegisterField::<
12631 4,
12632 0x1,
12633 1,
12634 0,
12635 p400pfs_by::Pcr,
12636 p400pfs_by::Pcr,
12637 P400PfsBy_SPEC,
12638 crate::common::RW,
12639 >::from_register(self, 0)
12640 }
12641
12642 #[doc = "N-Channel Open-Drain Control"]
12643 #[inline(always)]
12644 pub fn ncodr(
12645 self,
12646 ) -> crate::common::RegisterField<
12647 6,
12648 0x1,
12649 1,
12650 0,
12651 p400pfs_by::Ncodr,
12652 p400pfs_by::Ncodr,
12653 P400PfsBy_SPEC,
12654 crate::common::RW,
12655 > {
12656 crate::common::RegisterField::<
12657 6,
12658 0x1,
12659 1,
12660 0,
12661 p400pfs_by::Ncodr,
12662 p400pfs_by::Ncodr,
12663 P400PfsBy_SPEC,
12664 crate::common::RW,
12665 >::from_register(self, 0)
12666 }
12667}
12668impl ::core::default::Default for P400PfsBy {
12669 #[inline(always)]
12670 fn default() -> P400PfsBy {
12671 <crate::RegValueT<P400PfsBy_SPEC> as RegisterValue<_>>::new(0)
12672 }
12673}
12674pub mod p400pfs_by {
12675
12676 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12677 pub struct Podr_SPEC;
12678 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
12679 impl Podr {
12680 #[doc = "Output low"]
12681 pub const _0: Self = Self::new(0);
12682
12683 #[doc = "Output high"]
12684 pub const _1: Self = Self::new(1);
12685 }
12686 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12687 pub struct Pidr_SPEC;
12688 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
12689 impl Pidr {
12690 #[doc = "Low level"]
12691 pub const _0: Self = Self::new(0);
12692
12693 #[doc = "High level"]
12694 pub const _1: Self = Self::new(1);
12695 }
12696 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12697 pub struct Pdr_SPEC;
12698 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
12699 impl Pdr {
12700 #[doc = "Input (functions as an input pin)"]
12701 pub const _0: Self = Self::new(0);
12702
12703 #[doc = "Output (functions as an output pin)"]
12704 pub const _1: Self = Self::new(1);
12705 }
12706 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12707 pub struct Pcr_SPEC;
12708 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
12709 impl Pcr {
12710 #[doc = "Disable input pull-up"]
12711 pub const _0: Self = Self::new(0);
12712
12713 #[doc = "Enable input pull-up"]
12714 pub const _1: Self = Self::new(1);
12715 }
12716 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12717 pub struct Ncodr_SPEC;
12718 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
12719 impl Ncodr {
12720 #[doc = "Output CMOS"]
12721 pub const _0: Self = Self::new(0);
12722
12723 #[doc = "Output NMOS open-drain"]
12724 pub const _1: Self = Self::new(1);
12725 }
12726}
12727#[doc(hidden)]
12728#[derive(Copy, Clone, Eq, PartialEq)]
12729pub struct P401Pfs_SPEC;
12730impl crate::sealed::RegSpec for P401Pfs_SPEC {
12731 type DataType = u32;
12732}
12733
12734#[doc = "Port 401 Pin Function Select Register"]
12735pub type P401Pfs = crate::RegValueT<P401Pfs_SPEC>;
12736
12737impl P401Pfs {
12738 #[doc = "Port Output Data"]
12739 #[inline(always)]
12740 pub fn podr(
12741 self,
12742 ) -> crate::common::RegisterField<
12743 0,
12744 0x1,
12745 1,
12746 0,
12747 p401pfs::Podr,
12748 p401pfs::Podr,
12749 P401Pfs_SPEC,
12750 crate::common::RW,
12751 > {
12752 crate::common::RegisterField::<
12753 0,
12754 0x1,
12755 1,
12756 0,
12757 p401pfs::Podr,
12758 p401pfs::Podr,
12759 P401Pfs_SPEC,
12760 crate::common::RW,
12761 >::from_register(self, 0)
12762 }
12763
12764 #[doc = "Port State"]
12765 #[inline(always)]
12766 pub fn pidr(
12767 self,
12768 ) -> crate::common::RegisterField<
12769 1,
12770 0x1,
12771 1,
12772 0,
12773 p401pfs::Pidr,
12774 p401pfs::Pidr,
12775 P401Pfs_SPEC,
12776 crate::common::R,
12777 > {
12778 crate::common::RegisterField::<
12779 1,
12780 0x1,
12781 1,
12782 0,
12783 p401pfs::Pidr,
12784 p401pfs::Pidr,
12785 P401Pfs_SPEC,
12786 crate::common::R,
12787 >::from_register(self, 0)
12788 }
12789
12790 #[doc = "Port Direction"]
12791 #[inline(always)]
12792 pub fn pdr(
12793 self,
12794 ) -> crate::common::RegisterField<
12795 2,
12796 0x1,
12797 1,
12798 0,
12799 p401pfs::Pdr,
12800 p401pfs::Pdr,
12801 P401Pfs_SPEC,
12802 crate::common::RW,
12803 > {
12804 crate::common::RegisterField::<
12805 2,
12806 0x1,
12807 1,
12808 0,
12809 p401pfs::Pdr,
12810 p401pfs::Pdr,
12811 P401Pfs_SPEC,
12812 crate::common::RW,
12813 >::from_register(self, 0)
12814 }
12815
12816 #[doc = "Pull-up Control"]
12817 #[inline(always)]
12818 pub fn pcr(
12819 self,
12820 ) -> crate::common::RegisterField<
12821 4,
12822 0x1,
12823 1,
12824 0,
12825 p401pfs::Pcr,
12826 p401pfs::Pcr,
12827 P401Pfs_SPEC,
12828 crate::common::RW,
12829 > {
12830 crate::common::RegisterField::<
12831 4,
12832 0x1,
12833 1,
12834 0,
12835 p401pfs::Pcr,
12836 p401pfs::Pcr,
12837 P401Pfs_SPEC,
12838 crate::common::RW,
12839 >::from_register(self, 0)
12840 }
12841
12842 #[doc = "N-Channel Open-Drain Control"]
12843 #[inline(always)]
12844 pub fn ncodr(
12845 self,
12846 ) -> crate::common::RegisterField<
12847 6,
12848 0x1,
12849 1,
12850 0,
12851 p401pfs::Ncodr,
12852 p401pfs::Ncodr,
12853 P401Pfs_SPEC,
12854 crate::common::RW,
12855 > {
12856 crate::common::RegisterField::<
12857 6,
12858 0x1,
12859 1,
12860 0,
12861 p401pfs::Ncodr,
12862 p401pfs::Ncodr,
12863 P401Pfs_SPEC,
12864 crate::common::RW,
12865 >::from_register(self, 0)
12866 }
12867
12868 #[doc = "IRQ Input Enable"]
12869 #[inline(always)]
12870 pub fn isel(
12871 self,
12872 ) -> crate::common::RegisterField<
12873 14,
12874 0x1,
12875 1,
12876 0,
12877 p401pfs::Isel,
12878 p401pfs::Isel,
12879 P401Pfs_SPEC,
12880 crate::common::RW,
12881 > {
12882 crate::common::RegisterField::<
12883 14,
12884 0x1,
12885 1,
12886 0,
12887 p401pfs::Isel,
12888 p401pfs::Isel,
12889 P401Pfs_SPEC,
12890 crate::common::RW,
12891 >::from_register(self, 0)
12892 }
12893
12894 #[doc = "Analog Input Enable"]
12895 #[inline(always)]
12896 pub fn asel(
12897 self,
12898 ) -> crate::common::RegisterField<
12899 15,
12900 0x1,
12901 1,
12902 0,
12903 p401pfs::Asel,
12904 p401pfs::Asel,
12905 P401Pfs_SPEC,
12906 crate::common::RW,
12907 > {
12908 crate::common::RegisterField::<
12909 15,
12910 0x1,
12911 1,
12912 0,
12913 p401pfs::Asel,
12914 p401pfs::Asel,
12915 P401Pfs_SPEC,
12916 crate::common::RW,
12917 >::from_register(self, 0)
12918 }
12919
12920 #[doc = "Port Mode Control"]
12921 #[inline(always)]
12922 pub fn pmr(
12923 self,
12924 ) -> crate::common::RegisterField<
12925 16,
12926 0x1,
12927 1,
12928 0,
12929 p401pfs::Pmr,
12930 p401pfs::Pmr,
12931 P401Pfs_SPEC,
12932 crate::common::RW,
12933 > {
12934 crate::common::RegisterField::<
12935 16,
12936 0x1,
12937 1,
12938 0,
12939 p401pfs::Pmr,
12940 p401pfs::Pmr,
12941 P401Pfs_SPEC,
12942 crate::common::RW,
12943 >::from_register(self, 0)
12944 }
12945
12946 #[doc = "Peripheral Select"]
12947 #[inline(always)]
12948 pub fn psel(
12949 self,
12950 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P401Pfs_SPEC, crate::common::RW> {
12951 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P401Pfs_SPEC,crate::common::RW>::from_register(self,0)
12952 }
12953}
12954impl ::core::default::Default for P401Pfs {
12955 #[inline(always)]
12956 fn default() -> P401Pfs {
12957 <crate::RegValueT<P401Pfs_SPEC> as RegisterValue<_>>::new(0)
12958 }
12959}
12960pub mod p401pfs {
12961
12962 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12963 pub struct Podr_SPEC;
12964 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
12965 impl Podr {
12966 #[doc = "Output low"]
12967 pub const _0: Self = Self::new(0);
12968
12969 #[doc = "Output high"]
12970 pub const _1: Self = Self::new(1);
12971 }
12972 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12973 pub struct Pidr_SPEC;
12974 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
12975 impl Pidr {
12976 #[doc = "Low level"]
12977 pub const _0: Self = Self::new(0);
12978
12979 #[doc = "High level"]
12980 pub const _1: Self = Self::new(1);
12981 }
12982 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12983 pub struct Pdr_SPEC;
12984 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
12985 impl Pdr {
12986 #[doc = "Input (functions as an input pin)"]
12987 pub const _0: Self = Self::new(0);
12988
12989 #[doc = "Output (functions as an output pin)"]
12990 pub const _1: Self = Self::new(1);
12991 }
12992 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
12993 pub struct Pcr_SPEC;
12994 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
12995 impl Pcr {
12996 #[doc = "Disable input pull-up"]
12997 pub const _0: Self = Self::new(0);
12998
12999 #[doc = "Enable input pull-up"]
13000 pub const _1: Self = Self::new(1);
13001 }
13002 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13003 pub struct Ncodr_SPEC;
13004 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
13005 impl Ncodr {
13006 #[doc = "Output CMOS"]
13007 pub const _0: Self = Self::new(0);
13008
13009 #[doc = "Output NMOS open-drain"]
13010 pub const _1: Self = Self::new(1);
13011 }
13012 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13013 pub struct Isel_SPEC;
13014 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
13015 impl Isel {
13016 #[doc = "Do not use as IRQn input pin"]
13017 pub const _0: Self = Self::new(0);
13018
13019 #[doc = "Use as IRQn input pin"]
13020 pub const _1: Self = Self::new(1);
13021 }
13022 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13023 pub struct Asel_SPEC;
13024 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
13025 impl Asel {
13026 #[doc = "Do not use as analog pin"]
13027 pub const _0: Self = Self::new(0);
13028
13029 #[doc = "Use as analog pin"]
13030 pub const _1: Self = Self::new(1);
13031 }
13032 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13033 pub struct Pmr_SPEC;
13034 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
13035 impl Pmr {
13036 #[doc = "Use as general I/O pin"]
13037 pub const _0: Self = Self::new(0);
13038
13039 #[doc = "Use as I/O port for peripheral functions"]
13040 pub const _1: Self = Self::new(1);
13041 }
13042}
13043#[doc(hidden)]
13044#[derive(Copy, Clone, Eq, PartialEq)]
13045pub struct P401PfsHa_SPEC;
13046impl crate::sealed::RegSpec for P401PfsHa_SPEC {
13047 type DataType = u16;
13048}
13049
13050#[doc = "Port 401 Pin Function Select Register"]
13051pub type P401PfsHa = crate::RegValueT<P401PfsHa_SPEC>;
13052
13053impl P401PfsHa {
13054 #[doc = "Port Output Data"]
13055 #[inline(always)]
13056 pub fn podr(
13057 self,
13058 ) -> crate::common::RegisterField<
13059 0,
13060 0x1,
13061 1,
13062 0,
13063 p401pfs_ha::Podr,
13064 p401pfs_ha::Podr,
13065 P401PfsHa_SPEC,
13066 crate::common::RW,
13067 > {
13068 crate::common::RegisterField::<
13069 0,
13070 0x1,
13071 1,
13072 0,
13073 p401pfs_ha::Podr,
13074 p401pfs_ha::Podr,
13075 P401PfsHa_SPEC,
13076 crate::common::RW,
13077 >::from_register(self, 0)
13078 }
13079
13080 #[doc = "Port State"]
13081 #[inline(always)]
13082 pub fn pidr(
13083 self,
13084 ) -> crate::common::RegisterField<
13085 1,
13086 0x1,
13087 1,
13088 0,
13089 p401pfs_ha::Pidr,
13090 p401pfs_ha::Pidr,
13091 P401PfsHa_SPEC,
13092 crate::common::R,
13093 > {
13094 crate::common::RegisterField::<
13095 1,
13096 0x1,
13097 1,
13098 0,
13099 p401pfs_ha::Pidr,
13100 p401pfs_ha::Pidr,
13101 P401PfsHa_SPEC,
13102 crate::common::R,
13103 >::from_register(self, 0)
13104 }
13105
13106 #[doc = "Port Direction"]
13107 #[inline(always)]
13108 pub fn pdr(
13109 self,
13110 ) -> crate::common::RegisterField<
13111 2,
13112 0x1,
13113 1,
13114 0,
13115 p401pfs_ha::Pdr,
13116 p401pfs_ha::Pdr,
13117 P401PfsHa_SPEC,
13118 crate::common::RW,
13119 > {
13120 crate::common::RegisterField::<
13121 2,
13122 0x1,
13123 1,
13124 0,
13125 p401pfs_ha::Pdr,
13126 p401pfs_ha::Pdr,
13127 P401PfsHa_SPEC,
13128 crate::common::RW,
13129 >::from_register(self, 0)
13130 }
13131
13132 #[doc = "Pull-up Control"]
13133 #[inline(always)]
13134 pub fn pcr(
13135 self,
13136 ) -> crate::common::RegisterField<
13137 4,
13138 0x1,
13139 1,
13140 0,
13141 p401pfs_ha::Pcr,
13142 p401pfs_ha::Pcr,
13143 P401PfsHa_SPEC,
13144 crate::common::RW,
13145 > {
13146 crate::common::RegisterField::<
13147 4,
13148 0x1,
13149 1,
13150 0,
13151 p401pfs_ha::Pcr,
13152 p401pfs_ha::Pcr,
13153 P401PfsHa_SPEC,
13154 crate::common::RW,
13155 >::from_register(self, 0)
13156 }
13157
13158 #[doc = "N-Channel Open-Drain Control"]
13159 #[inline(always)]
13160 pub fn ncodr(
13161 self,
13162 ) -> crate::common::RegisterField<
13163 6,
13164 0x1,
13165 1,
13166 0,
13167 p401pfs_ha::Ncodr,
13168 p401pfs_ha::Ncodr,
13169 P401PfsHa_SPEC,
13170 crate::common::RW,
13171 > {
13172 crate::common::RegisterField::<
13173 6,
13174 0x1,
13175 1,
13176 0,
13177 p401pfs_ha::Ncodr,
13178 p401pfs_ha::Ncodr,
13179 P401PfsHa_SPEC,
13180 crate::common::RW,
13181 >::from_register(self, 0)
13182 }
13183
13184 #[doc = "IRQ Input Enable"]
13185 #[inline(always)]
13186 pub fn isel(
13187 self,
13188 ) -> crate::common::RegisterField<
13189 14,
13190 0x1,
13191 1,
13192 0,
13193 p401pfs_ha::Isel,
13194 p401pfs_ha::Isel,
13195 P401PfsHa_SPEC,
13196 crate::common::RW,
13197 > {
13198 crate::common::RegisterField::<
13199 14,
13200 0x1,
13201 1,
13202 0,
13203 p401pfs_ha::Isel,
13204 p401pfs_ha::Isel,
13205 P401PfsHa_SPEC,
13206 crate::common::RW,
13207 >::from_register(self, 0)
13208 }
13209
13210 #[doc = "Analog Input Enable"]
13211 #[inline(always)]
13212 pub fn asel(
13213 self,
13214 ) -> crate::common::RegisterField<
13215 15,
13216 0x1,
13217 1,
13218 0,
13219 p401pfs_ha::Asel,
13220 p401pfs_ha::Asel,
13221 P401PfsHa_SPEC,
13222 crate::common::RW,
13223 > {
13224 crate::common::RegisterField::<
13225 15,
13226 0x1,
13227 1,
13228 0,
13229 p401pfs_ha::Asel,
13230 p401pfs_ha::Asel,
13231 P401PfsHa_SPEC,
13232 crate::common::RW,
13233 >::from_register(self, 0)
13234 }
13235}
13236impl ::core::default::Default for P401PfsHa {
13237 #[inline(always)]
13238 fn default() -> P401PfsHa {
13239 <crate::RegValueT<P401PfsHa_SPEC> as RegisterValue<_>>::new(0)
13240 }
13241}
13242pub mod p401pfs_ha {
13243
13244 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13245 pub struct Podr_SPEC;
13246 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
13247 impl Podr {
13248 #[doc = "Output low"]
13249 pub const _0: Self = Self::new(0);
13250
13251 #[doc = "Output high"]
13252 pub const _1: Self = Self::new(1);
13253 }
13254 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13255 pub struct Pidr_SPEC;
13256 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
13257 impl Pidr {
13258 #[doc = "Low level"]
13259 pub const _0: Self = Self::new(0);
13260
13261 #[doc = "High level"]
13262 pub const _1: Self = Self::new(1);
13263 }
13264 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13265 pub struct Pdr_SPEC;
13266 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
13267 impl Pdr {
13268 #[doc = "Input (functions as an input pin)"]
13269 pub const _0: Self = Self::new(0);
13270
13271 #[doc = "Output (functions as an output pin)"]
13272 pub const _1: Self = Self::new(1);
13273 }
13274 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13275 pub struct Pcr_SPEC;
13276 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
13277 impl Pcr {
13278 #[doc = "Disable input pull-up"]
13279 pub const _0: Self = Self::new(0);
13280
13281 #[doc = "Enable input pull-up"]
13282 pub const _1: Self = Self::new(1);
13283 }
13284 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13285 pub struct Ncodr_SPEC;
13286 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
13287 impl Ncodr {
13288 #[doc = "Output CMOS"]
13289 pub const _0: Self = Self::new(0);
13290
13291 #[doc = "Output NMOS open-drain"]
13292 pub const _1: Self = Self::new(1);
13293 }
13294 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13295 pub struct Isel_SPEC;
13296 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
13297 impl Isel {
13298 #[doc = "Do not use as IRQn input pin"]
13299 pub const _0: Self = Self::new(0);
13300
13301 #[doc = "Use as IRQn input pin"]
13302 pub const _1: Self = Self::new(1);
13303 }
13304 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13305 pub struct Asel_SPEC;
13306 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
13307 impl Asel {
13308 #[doc = "Do not use as analog pin"]
13309 pub const _0: Self = Self::new(0);
13310
13311 #[doc = "Use as analog pin"]
13312 pub const _1: Self = Self::new(1);
13313 }
13314}
13315#[doc(hidden)]
13316#[derive(Copy, Clone, Eq, PartialEq)]
13317pub struct P401PfsBy_SPEC;
13318impl crate::sealed::RegSpec for P401PfsBy_SPEC {
13319 type DataType = u8;
13320}
13321
13322#[doc = "Port 401 Pin Function Select Register"]
13323pub type P401PfsBy = crate::RegValueT<P401PfsBy_SPEC>;
13324
13325impl P401PfsBy {
13326 #[doc = "Port Output Data"]
13327 #[inline(always)]
13328 pub fn podr(
13329 self,
13330 ) -> crate::common::RegisterField<
13331 0,
13332 0x1,
13333 1,
13334 0,
13335 p401pfs_by::Podr,
13336 p401pfs_by::Podr,
13337 P401PfsBy_SPEC,
13338 crate::common::RW,
13339 > {
13340 crate::common::RegisterField::<
13341 0,
13342 0x1,
13343 1,
13344 0,
13345 p401pfs_by::Podr,
13346 p401pfs_by::Podr,
13347 P401PfsBy_SPEC,
13348 crate::common::RW,
13349 >::from_register(self, 0)
13350 }
13351
13352 #[doc = "Port State"]
13353 #[inline(always)]
13354 pub fn pidr(
13355 self,
13356 ) -> crate::common::RegisterField<
13357 1,
13358 0x1,
13359 1,
13360 0,
13361 p401pfs_by::Pidr,
13362 p401pfs_by::Pidr,
13363 P401PfsBy_SPEC,
13364 crate::common::R,
13365 > {
13366 crate::common::RegisterField::<
13367 1,
13368 0x1,
13369 1,
13370 0,
13371 p401pfs_by::Pidr,
13372 p401pfs_by::Pidr,
13373 P401PfsBy_SPEC,
13374 crate::common::R,
13375 >::from_register(self, 0)
13376 }
13377
13378 #[doc = "Port Direction"]
13379 #[inline(always)]
13380 pub fn pdr(
13381 self,
13382 ) -> crate::common::RegisterField<
13383 2,
13384 0x1,
13385 1,
13386 0,
13387 p401pfs_by::Pdr,
13388 p401pfs_by::Pdr,
13389 P401PfsBy_SPEC,
13390 crate::common::RW,
13391 > {
13392 crate::common::RegisterField::<
13393 2,
13394 0x1,
13395 1,
13396 0,
13397 p401pfs_by::Pdr,
13398 p401pfs_by::Pdr,
13399 P401PfsBy_SPEC,
13400 crate::common::RW,
13401 >::from_register(self, 0)
13402 }
13403
13404 #[doc = "Pull-up Control"]
13405 #[inline(always)]
13406 pub fn pcr(
13407 self,
13408 ) -> crate::common::RegisterField<
13409 4,
13410 0x1,
13411 1,
13412 0,
13413 p401pfs_by::Pcr,
13414 p401pfs_by::Pcr,
13415 P401PfsBy_SPEC,
13416 crate::common::RW,
13417 > {
13418 crate::common::RegisterField::<
13419 4,
13420 0x1,
13421 1,
13422 0,
13423 p401pfs_by::Pcr,
13424 p401pfs_by::Pcr,
13425 P401PfsBy_SPEC,
13426 crate::common::RW,
13427 >::from_register(self, 0)
13428 }
13429
13430 #[doc = "N-Channel Open-Drain Control"]
13431 #[inline(always)]
13432 pub fn ncodr(
13433 self,
13434 ) -> crate::common::RegisterField<
13435 6,
13436 0x1,
13437 1,
13438 0,
13439 p401pfs_by::Ncodr,
13440 p401pfs_by::Ncodr,
13441 P401PfsBy_SPEC,
13442 crate::common::RW,
13443 > {
13444 crate::common::RegisterField::<
13445 6,
13446 0x1,
13447 1,
13448 0,
13449 p401pfs_by::Ncodr,
13450 p401pfs_by::Ncodr,
13451 P401PfsBy_SPEC,
13452 crate::common::RW,
13453 >::from_register(self, 0)
13454 }
13455}
13456impl ::core::default::Default for P401PfsBy {
13457 #[inline(always)]
13458 fn default() -> P401PfsBy {
13459 <crate::RegValueT<P401PfsBy_SPEC> as RegisterValue<_>>::new(0)
13460 }
13461}
13462pub mod p401pfs_by {
13463
13464 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13465 pub struct Podr_SPEC;
13466 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
13467 impl Podr {
13468 #[doc = "Output low"]
13469 pub const _0: Self = Self::new(0);
13470
13471 #[doc = "Output high"]
13472 pub const _1: Self = Self::new(1);
13473 }
13474 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13475 pub struct Pidr_SPEC;
13476 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
13477 impl Pidr {
13478 #[doc = "Low level"]
13479 pub const _0: Self = Self::new(0);
13480
13481 #[doc = "High level"]
13482 pub const _1: Self = Self::new(1);
13483 }
13484 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13485 pub struct Pdr_SPEC;
13486 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
13487 impl Pdr {
13488 #[doc = "Input (functions as an input pin)"]
13489 pub const _0: Self = Self::new(0);
13490
13491 #[doc = "Output (functions as an output pin)"]
13492 pub const _1: Self = Self::new(1);
13493 }
13494 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13495 pub struct Pcr_SPEC;
13496 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
13497 impl Pcr {
13498 #[doc = "Disable input pull-up"]
13499 pub const _0: Self = Self::new(0);
13500
13501 #[doc = "Enable input pull-up"]
13502 pub const _1: Self = Self::new(1);
13503 }
13504 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13505 pub struct Ncodr_SPEC;
13506 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
13507 impl Ncodr {
13508 #[doc = "Output CMOS"]
13509 pub const _0: Self = Self::new(0);
13510
13511 #[doc = "Output NMOS open-drain"]
13512 pub const _1: Self = Self::new(1);
13513 }
13514}
13515#[doc(hidden)]
13516#[derive(Copy, Clone, Eq, PartialEq)]
13517pub struct P402Pfs_SPEC;
13518impl crate::sealed::RegSpec for P402Pfs_SPEC {
13519 type DataType = u32;
13520}
13521
13522#[doc = "Port 402 Pin Function Select Register"]
13523pub type P402Pfs = crate::RegValueT<P402Pfs_SPEC>;
13524
13525impl P402Pfs {
13526 #[doc = "Port Output Data"]
13527 #[inline(always)]
13528 pub fn podr(
13529 self,
13530 ) -> crate::common::RegisterField<
13531 0,
13532 0x1,
13533 1,
13534 0,
13535 p402pfs::Podr,
13536 p402pfs::Podr,
13537 P402Pfs_SPEC,
13538 crate::common::RW,
13539 > {
13540 crate::common::RegisterField::<
13541 0,
13542 0x1,
13543 1,
13544 0,
13545 p402pfs::Podr,
13546 p402pfs::Podr,
13547 P402Pfs_SPEC,
13548 crate::common::RW,
13549 >::from_register(self, 0)
13550 }
13551
13552 #[doc = "Port State"]
13553 #[inline(always)]
13554 pub fn pidr(
13555 self,
13556 ) -> crate::common::RegisterField<
13557 1,
13558 0x1,
13559 1,
13560 0,
13561 p402pfs::Pidr,
13562 p402pfs::Pidr,
13563 P402Pfs_SPEC,
13564 crate::common::R,
13565 > {
13566 crate::common::RegisterField::<
13567 1,
13568 0x1,
13569 1,
13570 0,
13571 p402pfs::Pidr,
13572 p402pfs::Pidr,
13573 P402Pfs_SPEC,
13574 crate::common::R,
13575 >::from_register(self, 0)
13576 }
13577
13578 #[doc = "Port Direction"]
13579 #[inline(always)]
13580 pub fn pdr(
13581 self,
13582 ) -> crate::common::RegisterField<
13583 2,
13584 0x1,
13585 1,
13586 0,
13587 p402pfs::Pdr,
13588 p402pfs::Pdr,
13589 P402Pfs_SPEC,
13590 crate::common::RW,
13591 > {
13592 crate::common::RegisterField::<
13593 2,
13594 0x1,
13595 1,
13596 0,
13597 p402pfs::Pdr,
13598 p402pfs::Pdr,
13599 P402Pfs_SPEC,
13600 crate::common::RW,
13601 >::from_register(self, 0)
13602 }
13603
13604 #[doc = "Pull-up Control"]
13605 #[inline(always)]
13606 pub fn pcr(
13607 self,
13608 ) -> crate::common::RegisterField<
13609 4,
13610 0x1,
13611 1,
13612 0,
13613 p402pfs::Pcr,
13614 p402pfs::Pcr,
13615 P402Pfs_SPEC,
13616 crate::common::RW,
13617 > {
13618 crate::common::RegisterField::<
13619 4,
13620 0x1,
13621 1,
13622 0,
13623 p402pfs::Pcr,
13624 p402pfs::Pcr,
13625 P402Pfs_SPEC,
13626 crate::common::RW,
13627 >::from_register(self, 0)
13628 }
13629
13630 #[doc = "N-Channel Open-Drain Control"]
13631 #[inline(always)]
13632 pub fn ncodr(
13633 self,
13634 ) -> crate::common::RegisterField<
13635 6,
13636 0x1,
13637 1,
13638 0,
13639 p402pfs::Ncodr,
13640 p402pfs::Ncodr,
13641 P402Pfs_SPEC,
13642 crate::common::RW,
13643 > {
13644 crate::common::RegisterField::<
13645 6,
13646 0x1,
13647 1,
13648 0,
13649 p402pfs::Ncodr,
13650 p402pfs::Ncodr,
13651 P402Pfs_SPEC,
13652 crate::common::RW,
13653 >::from_register(self, 0)
13654 }
13655
13656 #[doc = "IRQ Input Enable"]
13657 #[inline(always)]
13658 pub fn isel(
13659 self,
13660 ) -> crate::common::RegisterField<
13661 14,
13662 0x1,
13663 1,
13664 0,
13665 p402pfs::Isel,
13666 p402pfs::Isel,
13667 P402Pfs_SPEC,
13668 crate::common::RW,
13669 > {
13670 crate::common::RegisterField::<
13671 14,
13672 0x1,
13673 1,
13674 0,
13675 p402pfs::Isel,
13676 p402pfs::Isel,
13677 P402Pfs_SPEC,
13678 crate::common::RW,
13679 >::from_register(self, 0)
13680 }
13681
13682 #[doc = "Analog Input Enable"]
13683 #[inline(always)]
13684 pub fn asel(
13685 self,
13686 ) -> crate::common::RegisterField<
13687 15,
13688 0x1,
13689 1,
13690 0,
13691 p402pfs::Asel,
13692 p402pfs::Asel,
13693 P402Pfs_SPEC,
13694 crate::common::RW,
13695 > {
13696 crate::common::RegisterField::<
13697 15,
13698 0x1,
13699 1,
13700 0,
13701 p402pfs::Asel,
13702 p402pfs::Asel,
13703 P402Pfs_SPEC,
13704 crate::common::RW,
13705 >::from_register(self, 0)
13706 }
13707
13708 #[doc = "Port Mode Control"]
13709 #[inline(always)]
13710 pub fn pmr(
13711 self,
13712 ) -> crate::common::RegisterField<
13713 16,
13714 0x1,
13715 1,
13716 0,
13717 p402pfs::Pmr,
13718 p402pfs::Pmr,
13719 P402Pfs_SPEC,
13720 crate::common::RW,
13721 > {
13722 crate::common::RegisterField::<
13723 16,
13724 0x1,
13725 1,
13726 0,
13727 p402pfs::Pmr,
13728 p402pfs::Pmr,
13729 P402Pfs_SPEC,
13730 crate::common::RW,
13731 >::from_register(self, 0)
13732 }
13733
13734 #[doc = "Peripheral Select"]
13735 #[inline(always)]
13736 pub fn psel(
13737 self,
13738 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P402Pfs_SPEC, crate::common::RW> {
13739 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P402Pfs_SPEC,crate::common::RW>::from_register(self,0)
13740 }
13741}
13742impl ::core::default::Default for P402Pfs {
13743 #[inline(always)]
13744 fn default() -> P402Pfs {
13745 <crate::RegValueT<P402Pfs_SPEC> as RegisterValue<_>>::new(0)
13746 }
13747}
13748pub mod p402pfs {
13749
13750 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13751 pub struct Podr_SPEC;
13752 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
13753 impl Podr {
13754 #[doc = "Output low"]
13755 pub const _0: Self = Self::new(0);
13756
13757 #[doc = "Output high"]
13758 pub const _1: Self = Self::new(1);
13759 }
13760 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13761 pub struct Pidr_SPEC;
13762 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
13763 impl Pidr {
13764 #[doc = "Low level"]
13765 pub const _0: Self = Self::new(0);
13766
13767 #[doc = "High level"]
13768 pub const _1: Self = Self::new(1);
13769 }
13770 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13771 pub struct Pdr_SPEC;
13772 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
13773 impl Pdr {
13774 #[doc = "Input (functions as an input pin)"]
13775 pub const _0: Self = Self::new(0);
13776
13777 #[doc = "Output (functions as an output pin)"]
13778 pub const _1: Self = Self::new(1);
13779 }
13780 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13781 pub struct Pcr_SPEC;
13782 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
13783 impl Pcr {
13784 #[doc = "Disable input pull-up"]
13785 pub const _0: Self = Self::new(0);
13786
13787 #[doc = "Enable input pull-up"]
13788 pub const _1: Self = Self::new(1);
13789 }
13790 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13791 pub struct Ncodr_SPEC;
13792 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
13793 impl Ncodr {
13794 #[doc = "Output CMOS"]
13795 pub const _0: Self = Self::new(0);
13796
13797 #[doc = "Output NMOS open-drain"]
13798 pub const _1: Self = Self::new(1);
13799 }
13800 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13801 pub struct Isel_SPEC;
13802 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
13803 impl Isel {
13804 #[doc = "Do not use as IRQn input pin"]
13805 pub const _0: Self = Self::new(0);
13806
13807 #[doc = "Use as IRQn input pin"]
13808 pub const _1: Self = Self::new(1);
13809 }
13810 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13811 pub struct Asel_SPEC;
13812 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
13813 impl Asel {
13814 #[doc = "Do not use as analog pin"]
13815 pub const _0: Self = Self::new(0);
13816
13817 #[doc = "Use as analog pin"]
13818 pub const _1: Self = Self::new(1);
13819 }
13820 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
13821 pub struct Pmr_SPEC;
13822 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
13823 impl Pmr {
13824 #[doc = "Use as general I/O pin"]
13825 pub const _0: Self = Self::new(0);
13826
13827 #[doc = "Use as I/O port for peripheral functions"]
13828 pub const _1: Self = Self::new(1);
13829 }
13830}
13831#[doc(hidden)]
13832#[derive(Copy, Clone, Eq, PartialEq)]
13833pub struct P402PfsHa_SPEC;
13834impl crate::sealed::RegSpec for P402PfsHa_SPEC {
13835 type DataType = u16;
13836}
13837
13838#[doc = "Port 402 Pin Function Select Register"]
13839pub type P402PfsHa = crate::RegValueT<P402PfsHa_SPEC>;
13840
13841impl P402PfsHa {
13842 #[doc = "Port Output Data"]
13843 #[inline(always)]
13844 pub fn podr(
13845 self,
13846 ) -> crate::common::RegisterField<
13847 0,
13848 0x1,
13849 1,
13850 0,
13851 p402pfs_ha::Podr,
13852 p402pfs_ha::Podr,
13853 P402PfsHa_SPEC,
13854 crate::common::RW,
13855 > {
13856 crate::common::RegisterField::<
13857 0,
13858 0x1,
13859 1,
13860 0,
13861 p402pfs_ha::Podr,
13862 p402pfs_ha::Podr,
13863 P402PfsHa_SPEC,
13864 crate::common::RW,
13865 >::from_register(self, 0)
13866 }
13867
13868 #[doc = "Port State"]
13869 #[inline(always)]
13870 pub fn pidr(
13871 self,
13872 ) -> crate::common::RegisterField<
13873 1,
13874 0x1,
13875 1,
13876 0,
13877 p402pfs_ha::Pidr,
13878 p402pfs_ha::Pidr,
13879 P402PfsHa_SPEC,
13880 crate::common::R,
13881 > {
13882 crate::common::RegisterField::<
13883 1,
13884 0x1,
13885 1,
13886 0,
13887 p402pfs_ha::Pidr,
13888 p402pfs_ha::Pidr,
13889 P402PfsHa_SPEC,
13890 crate::common::R,
13891 >::from_register(self, 0)
13892 }
13893
13894 #[doc = "Port Direction"]
13895 #[inline(always)]
13896 pub fn pdr(
13897 self,
13898 ) -> crate::common::RegisterField<
13899 2,
13900 0x1,
13901 1,
13902 0,
13903 p402pfs_ha::Pdr,
13904 p402pfs_ha::Pdr,
13905 P402PfsHa_SPEC,
13906 crate::common::RW,
13907 > {
13908 crate::common::RegisterField::<
13909 2,
13910 0x1,
13911 1,
13912 0,
13913 p402pfs_ha::Pdr,
13914 p402pfs_ha::Pdr,
13915 P402PfsHa_SPEC,
13916 crate::common::RW,
13917 >::from_register(self, 0)
13918 }
13919
13920 #[doc = "Pull-up Control"]
13921 #[inline(always)]
13922 pub fn pcr(
13923 self,
13924 ) -> crate::common::RegisterField<
13925 4,
13926 0x1,
13927 1,
13928 0,
13929 p402pfs_ha::Pcr,
13930 p402pfs_ha::Pcr,
13931 P402PfsHa_SPEC,
13932 crate::common::RW,
13933 > {
13934 crate::common::RegisterField::<
13935 4,
13936 0x1,
13937 1,
13938 0,
13939 p402pfs_ha::Pcr,
13940 p402pfs_ha::Pcr,
13941 P402PfsHa_SPEC,
13942 crate::common::RW,
13943 >::from_register(self, 0)
13944 }
13945
13946 #[doc = "N-Channel Open-Drain Control"]
13947 #[inline(always)]
13948 pub fn ncodr(
13949 self,
13950 ) -> crate::common::RegisterField<
13951 6,
13952 0x1,
13953 1,
13954 0,
13955 p402pfs_ha::Ncodr,
13956 p402pfs_ha::Ncodr,
13957 P402PfsHa_SPEC,
13958 crate::common::RW,
13959 > {
13960 crate::common::RegisterField::<
13961 6,
13962 0x1,
13963 1,
13964 0,
13965 p402pfs_ha::Ncodr,
13966 p402pfs_ha::Ncodr,
13967 P402PfsHa_SPEC,
13968 crate::common::RW,
13969 >::from_register(self, 0)
13970 }
13971
13972 #[doc = "IRQ Input Enable"]
13973 #[inline(always)]
13974 pub fn isel(
13975 self,
13976 ) -> crate::common::RegisterField<
13977 14,
13978 0x1,
13979 1,
13980 0,
13981 p402pfs_ha::Isel,
13982 p402pfs_ha::Isel,
13983 P402PfsHa_SPEC,
13984 crate::common::RW,
13985 > {
13986 crate::common::RegisterField::<
13987 14,
13988 0x1,
13989 1,
13990 0,
13991 p402pfs_ha::Isel,
13992 p402pfs_ha::Isel,
13993 P402PfsHa_SPEC,
13994 crate::common::RW,
13995 >::from_register(self, 0)
13996 }
13997
13998 #[doc = "Analog Input Enable"]
13999 #[inline(always)]
14000 pub fn asel(
14001 self,
14002 ) -> crate::common::RegisterField<
14003 15,
14004 0x1,
14005 1,
14006 0,
14007 p402pfs_ha::Asel,
14008 p402pfs_ha::Asel,
14009 P402PfsHa_SPEC,
14010 crate::common::RW,
14011 > {
14012 crate::common::RegisterField::<
14013 15,
14014 0x1,
14015 1,
14016 0,
14017 p402pfs_ha::Asel,
14018 p402pfs_ha::Asel,
14019 P402PfsHa_SPEC,
14020 crate::common::RW,
14021 >::from_register(self, 0)
14022 }
14023}
14024impl ::core::default::Default for P402PfsHa {
14025 #[inline(always)]
14026 fn default() -> P402PfsHa {
14027 <crate::RegValueT<P402PfsHa_SPEC> as RegisterValue<_>>::new(0)
14028 }
14029}
14030pub mod p402pfs_ha {
14031
14032 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14033 pub struct Podr_SPEC;
14034 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
14035 impl Podr {
14036 #[doc = "Output low"]
14037 pub const _0: Self = Self::new(0);
14038
14039 #[doc = "Output high"]
14040 pub const _1: Self = Self::new(1);
14041 }
14042 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14043 pub struct Pidr_SPEC;
14044 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
14045 impl Pidr {
14046 #[doc = "Low level"]
14047 pub const _0: Self = Self::new(0);
14048
14049 #[doc = "High level"]
14050 pub const _1: Self = Self::new(1);
14051 }
14052 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14053 pub struct Pdr_SPEC;
14054 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
14055 impl Pdr {
14056 #[doc = "Input (functions as an input pin)"]
14057 pub const _0: Self = Self::new(0);
14058
14059 #[doc = "Output (functions as an output pin)"]
14060 pub const _1: Self = Self::new(1);
14061 }
14062 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14063 pub struct Pcr_SPEC;
14064 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
14065 impl Pcr {
14066 #[doc = "Disable input pull-up"]
14067 pub const _0: Self = Self::new(0);
14068
14069 #[doc = "Enable input pull-up"]
14070 pub const _1: Self = Self::new(1);
14071 }
14072 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14073 pub struct Ncodr_SPEC;
14074 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
14075 impl Ncodr {
14076 #[doc = "Output CMOS"]
14077 pub const _0: Self = Self::new(0);
14078
14079 #[doc = "Output NMOS open-drain"]
14080 pub const _1: Self = Self::new(1);
14081 }
14082 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14083 pub struct Isel_SPEC;
14084 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
14085 impl Isel {
14086 #[doc = "Do not use as IRQn input pin"]
14087 pub const _0: Self = Self::new(0);
14088
14089 #[doc = "Use as IRQn input pin"]
14090 pub const _1: Self = Self::new(1);
14091 }
14092 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14093 pub struct Asel_SPEC;
14094 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
14095 impl Asel {
14096 #[doc = "Do not use as analog pin"]
14097 pub const _0: Self = Self::new(0);
14098
14099 #[doc = "Use as analog pin"]
14100 pub const _1: Self = Self::new(1);
14101 }
14102}
14103#[doc(hidden)]
14104#[derive(Copy, Clone, Eq, PartialEq)]
14105pub struct P402PfsBy_SPEC;
14106impl crate::sealed::RegSpec for P402PfsBy_SPEC {
14107 type DataType = u8;
14108}
14109
14110#[doc = "Port 402 Pin Function Select Register"]
14111pub type P402PfsBy = crate::RegValueT<P402PfsBy_SPEC>;
14112
14113impl P402PfsBy {
14114 #[doc = "Port Output Data"]
14115 #[inline(always)]
14116 pub fn podr(
14117 self,
14118 ) -> crate::common::RegisterField<
14119 0,
14120 0x1,
14121 1,
14122 0,
14123 p402pfs_by::Podr,
14124 p402pfs_by::Podr,
14125 P402PfsBy_SPEC,
14126 crate::common::RW,
14127 > {
14128 crate::common::RegisterField::<
14129 0,
14130 0x1,
14131 1,
14132 0,
14133 p402pfs_by::Podr,
14134 p402pfs_by::Podr,
14135 P402PfsBy_SPEC,
14136 crate::common::RW,
14137 >::from_register(self, 0)
14138 }
14139
14140 #[doc = "Port State"]
14141 #[inline(always)]
14142 pub fn pidr(
14143 self,
14144 ) -> crate::common::RegisterField<
14145 1,
14146 0x1,
14147 1,
14148 0,
14149 p402pfs_by::Pidr,
14150 p402pfs_by::Pidr,
14151 P402PfsBy_SPEC,
14152 crate::common::R,
14153 > {
14154 crate::common::RegisterField::<
14155 1,
14156 0x1,
14157 1,
14158 0,
14159 p402pfs_by::Pidr,
14160 p402pfs_by::Pidr,
14161 P402PfsBy_SPEC,
14162 crate::common::R,
14163 >::from_register(self, 0)
14164 }
14165
14166 #[doc = "Port Direction"]
14167 #[inline(always)]
14168 pub fn pdr(
14169 self,
14170 ) -> crate::common::RegisterField<
14171 2,
14172 0x1,
14173 1,
14174 0,
14175 p402pfs_by::Pdr,
14176 p402pfs_by::Pdr,
14177 P402PfsBy_SPEC,
14178 crate::common::RW,
14179 > {
14180 crate::common::RegisterField::<
14181 2,
14182 0x1,
14183 1,
14184 0,
14185 p402pfs_by::Pdr,
14186 p402pfs_by::Pdr,
14187 P402PfsBy_SPEC,
14188 crate::common::RW,
14189 >::from_register(self, 0)
14190 }
14191
14192 #[doc = "Pull-up Control"]
14193 #[inline(always)]
14194 pub fn pcr(
14195 self,
14196 ) -> crate::common::RegisterField<
14197 4,
14198 0x1,
14199 1,
14200 0,
14201 p402pfs_by::Pcr,
14202 p402pfs_by::Pcr,
14203 P402PfsBy_SPEC,
14204 crate::common::RW,
14205 > {
14206 crate::common::RegisterField::<
14207 4,
14208 0x1,
14209 1,
14210 0,
14211 p402pfs_by::Pcr,
14212 p402pfs_by::Pcr,
14213 P402PfsBy_SPEC,
14214 crate::common::RW,
14215 >::from_register(self, 0)
14216 }
14217
14218 #[doc = "N-Channel Open-Drain Control"]
14219 #[inline(always)]
14220 pub fn ncodr(
14221 self,
14222 ) -> crate::common::RegisterField<
14223 6,
14224 0x1,
14225 1,
14226 0,
14227 p402pfs_by::Ncodr,
14228 p402pfs_by::Ncodr,
14229 P402PfsBy_SPEC,
14230 crate::common::RW,
14231 > {
14232 crate::common::RegisterField::<
14233 6,
14234 0x1,
14235 1,
14236 0,
14237 p402pfs_by::Ncodr,
14238 p402pfs_by::Ncodr,
14239 P402PfsBy_SPEC,
14240 crate::common::RW,
14241 >::from_register(self, 0)
14242 }
14243}
14244impl ::core::default::Default for P402PfsBy {
14245 #[inline(always)]
14246 fn default() -> P402PfsBy {
14247 <crate::RegValueT<P402PfsBy_SPEC> as RegisterValue<_>>::new(0)
14248 }
14249}
14250pub mod p402pfs_by {
14251
14252 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14253 pub struct Podr_SPEC;
14254 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
14255 impl Podr {
14256 #[doc = "Output low"]
14257 pub const _0: Self = Self::new(0);
14258
14259 #[doc = "Output high"]
14260 pub const _1: Self = Self::new(1);
14261 }
14262 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14263 pub struct Pidr_SPEC;
14264 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
14265 impl Pidr {
14266 #[doc = "Low level"]
14267 pub const _0: Self = Self::new(0);
14268
14269 #[doc = "High level"]
14270 pub const _1: Self = Self::new(1);
14271 }
14272 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14273 pub struct Pdr_SPEC;
14274 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
14275 impl Pdr {
14276 #[doc = "Input (functions as an input pin)"]
14277 pub const _0: Self = Self::new(0);
14278
14279 #[doc = "Output (functions as an output pin)"]
14280 pub const _1: Self = Self::new(1);
14281 }
14282 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14283 pub struct Pcr_SPEC;
14284 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
14285 impl Pcr {
14286 #[doc = "Disable input pull-up"]
14287 pub const _0: Self = Self::new(0);
14288
14289 #[doc = "Enable input pull-up"]
14290 pub const _1: Self = Self::new(1);
14291 }
14292 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14293 pub struct Ncodr_SPEC;
14294 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
14295 impl Ncodr {
14296 #[doc = "Output CMOS"]
14297 pub const _0: Self = Self::new(0);
14298
14299 #[doc = "Output NMOS open-drain"]
14300 pub const _1: Self = Self::new(1);
14301 }
14302}
14303#[doc(hidden)]
14304#[derive(Copy, Clone, Eq, PartialEq)]
14305pub struct P40Pfs_SPEC;
14306impl crate::sealed::RegSpec for P40Pfs_SPEC {
14307 type DataType = u32;
14308}
14309
14310#[doc = "Port 40%s Pin Function Select Register"]
14311pub type P40Pfs = crate::RegValueT<P40Pfs_SPEC>;
14312
14313impl P40Pfs {
14314 #[doc = "Port Output Data"]
14315 #[inline(always)]
14316 pub fn podr(
14317 self,
14318 ) -> crate::common::RegisterField<
14319 0,
14320 0x1,
14321 1,
14322 0,
14323 p40pfs::Podr,
14324 p40pfs::Podr,
14325 P40Pfs_SPEC,
14326 crate::common::RW,
14327 > {
14328 crate::common::RegisterField::<
14329 0,
14330 0x1,
14331 1,
14332 0,
14333 p40pfs::Podr,
14334 p40pfs::Podr,
14335 P40Pfs_SPEC,
14336 crate::common::RW,
14337 >::from_register(self, 0)
14338 }
14339
14340 #[doc = "Port State"]
14341 #[inline(always)]
14342 pub fn pidr(
14343 self,
14344 ) -> crate::common::RegisterField<
14345 1,
14346 0x1,
14347 1,
14348 0,
14349 p40pfs::Pidr,
14350 p40pfs::Pidr,
14351 P40Pfs_SPEC,
14352 crate::common::R,
14353 > {
14354 crate::common::RegisterField::<
14355 1,
14356 0x1,
14357 1,
14358 0,
14359 p40pfs::Pidr,
14360 p40pfs::Pidr,
14361 P40Pfs_SPEC,
14362 crate::common::R,
14363 >::from_register(self, 0)
14364 }
14365
14366 #[doc = "Port Direction"]
14367 #[inline(always)]
14368 pub fn pdr(
14369 self,
14370 ) -> crate::common::RegisterField<
14371 2,
14372 0x1,
14373 1,
14374 0,
14375 p40pfs::Pdr,
14376 p40pfs::Pdr,
14377 P40Pfs_SPEC,
14378 crate::common::RW,
14379 > {
14380 crate::common::RegisterField::<
14381 2,
14382 0x1,
14383 1,
14384 0,
14385 p40pfs::Pdr,
14386 p40pfs::Pdr,
14387 P40Pfs_SPEC,
14388 crate::common::RW,
14389 >::from_register(self, 0)
14390 }
14391
14392 #[doc = "Pull-up Control"]
14393 #[inline(always)]
14394 pub fn pcr(
14395 self,
14396 ) -> crate::common::RegisterField<
14397 4,
14398 0x1,
14399 1,
14400 0,
14401 p40pfs::Pcr,
14402 p40pfs::Pcr,
14403 P40Pfs_SPEC,
14404 crate::common::RW,
14405 > {
14406 crate::common::RegisterField::<
14407 4,
14408 0x1,
14409 1,
14410 0,
14411 p40pfs::Pcr,
14412 p40pfs::Pcr,
14413 P40Pfs_SPEC,
14414 crate::common::RW,
14415 >::from_register(self, 0)
14416 }
14417
14418 #[doc = "N-Channel Open-Drain Control"]
14419 #[inline(always)]
14420 pub fn ncodr(
14421 self,
14422 ) -> crate::common::RegisterField<
14423 6,
14424 0x1,
14425 1,
14426 0,
14427 p40pfs::Ncodr,
14428 p40pfs::Ncodr,
14429 P40Pfs_SPEC,
14430 crate::common::RW,
14431 > {
14432 crate::common::RegisterField::<
14433 6,
14434 0x1,
14435 1,
14436 0,
14437 p40pfs::Ncodr,
14438 p40pfs::Ncodr,
14439 P40Pfs_SPEC,
14440 crate::common::RW,
14441 >::from_register(self, 0)
14442 }
14443
14444 #[doc = "IRQ Input Enable"]
14445 #[inline(always)]
14446 pub fn isel(
14447 self,
14448 ) -> crate::common::RegisterField<
14449 14,
14450 0x1,
14451 1,
14452 0,
14453 p40pfs::Isel,
14454 p40pfs::Isel,
14455 P40Pfs_SPEC,
14456 crate::common::RW,
14457 > {
14458 crate::common::RegisterField::<
14459 14,
14460 0x1,
14461 1,
14462 0,
14463 p40pfs::Isel,
14464 p40pfs::Isel,
14465 P40Pfs_SPEC,
14466 crate::common::RW,
14467 >::from_register(self, 0)
14468 }
14469
14470 #[doc = "Analog Input Enable"]
14471 #[inline(always)]
14472 pub fn asel(
14473 self,
14474 ) -> crate::common::RegisterField<
14475 15,
14476 0x1,
14477 1,
14478 0,
14479 p40pfs::Asel,
14480 p40pfs::Asel,
14481 P40Pfs_SPEC,
14482 crate::common::RW,
14483 > {
14484 crate::common::RegisterField::<
14485 15,
14486 0x1,
14487 1,
14488 0,
14489 p40pfs::Asel,
14490 p40pfs::Asel,
14491 P40Pfs_SPEC,
14492 crate::common::RW,
14493 >::from_register(self, 0)
14494 }
14495
14496 #[doc = "Port Mode Control"]
14497 #[inline(always)]
14498 pub fn pmr(
14499 self,
14500 ) -> crate::common::RegisterField<
14501 16,
14502 0x1,
14503 1,
14504 0,
14505 p40pfs::Pmr,
14506 p40pfs::Pmr,
14507 P40Pfs_SPEC,
14508 crate::common::RW,
14509 > {
14510 crate::common::RegisterField::<
14511 16,
14512 0x1,
14513 1,
14514 0,
14515 p40pfs::Pmr,
14516 p40pfs::Pmr,
14517 P40Pfs_SPEC,
14518 crate::common::RW,
14519 >::from_register(self, 0)
14520 }
14521
14522 #[doc = "Peripheral Select"]
14523 #[inline(always)]
14524 pub fn psel(
14525 self,
14526 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P40Pfs_SPEC, crate::common::RW> {
14527 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P40Pfs_SPEC,crate::common::RW>::from_register(self,0)
14528 }
14529}
14530impl ::core::default::Default for P40Pfs {
14531 #[inline(always)]
14532 fn default() -> P40Pfs {
14533 <crate::RegValueT<P40Pfs_SPEC> as RegisterValue<_>>::new(0)
14534 }
14535}
14536pub mod p40pfs {
14537
14538 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14539 pub struct Podr_SPEC;
14540 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
14541 impl Podr {
14542 #[doc = "Output low"]
14543 pub const _0: Self = Self::new(0);
14544
14545 #[doc = "Output high"]
14546 pub const _1: Self = Self::new(1);
14547 }
14548 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14549 pub struct Pidr_SPEC;
14550 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
14551 impl Pidr {
14552 #[doc = "Low level"]
14553 pub const _0: Self = Self::new(0);
14554
14555 #[doc = "High level"]
14556 pub const _1: Self = Self::new(1);
14557 }
14558 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14559 pub struct Pdr_SPEC;
14560 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
14561 impl Pdr {
14562 #[doc = "Input (functions as an input pin)"]
14563 pub const _0: Self = Self::new(0);
14564
14565 #[doc = "Output (functions as an output pin)"]
14566 pub const _1: Self = Self::new(1);
14567 }
14568 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14569 pub struct Pcr_SPEC;
14570 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
14571 impl Pcr {
14572 #[doc = "Disable input pull-up"]
14573 pub const _0: Self = Self::new(0);
14574
14575 #[doc = "Enable input pull-up"]
14576 pub const _1: Self = Self::new(1);
14577 }
14578 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14579 pub struct Ncodr_SPEC;
14580 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
14581 impl Ncodr {
14582 #[doc = "Output CMOS"]
14583 pub const _0: Self = Self::new(0);
14584
14585 #[doc = "Output NMOS open-drain"]
14586 pub const _1: Self = Self::new(1);
14587 }
14588 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14589 pub struct Isel_SPEC;
14590 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
14591 impl Isel {
14592 #[doc = "Do not use as IRQn input pin"]
14593 pub const _0: Self = Self::new(0);
14594
14595 #[doc = "Use as IRQn input pin"]
14596 pub const _1: Self = Self::new(1);
14597 }
14598 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14599 pub struct Asel_SPEC;
14600 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
14601 impl Asel {
14602 #[doc = "Do not use as analog pin"]
14603 pub const _0: Self = Self::new(0);
14604
14605 #[doc = "Use as analog pin"]
14606 pub const _1: Self = Self::new(1);
14607 }
14608 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14609 pub struct Pmr_SPEC;
14610 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
14611 impl Pmr {
14612 #[doc = "Use as general I/O pin"]
14613 pub const _0: Self = Self::new(0);
14614
14615 #[doc = "Use as I/O port for peripheral functions"]
14616 pub const _1: Self = Self::new(1);
14617 }
14618}
14619#[doc(hidden)]
14620#[derive(Copy, Clone, Eq, PartialEq)]
14621pub struct P40PfsHa_SPEC;
14622impl crate::sealed::RegSpec for P40PfsHa_SPEC {
14623 type DataType = u16;
14624}
14625
14626#[doc = "Port 40%s Pin Function Select Register"]
14627pub type P40PfsHa = crate::RegValueT<P40PfsHa_SPEC>;
14628
14629impl P40PfsHa {
14630 #[doc = "Port Output Data"]
14631 #[inline(always)]
14632 pub fn podr(
14633 self,
14634 ) -> crate::common::RegisterField<
14635 0,
14636 0x1,
14637 1,
14638 0,
14639 p40pfs_ha::Podr,
14640 p40pfs_ha::Podr,
14641 P40PfsHa_SPEC,
14642 crate::common::RW,
14643 > {
14644 crate::common::RegisterField::<
14645 0,
14646 0x1,
14647 1,
14648 0,
14649 p40pfs_ha::Podr,
14650 p40pfs_ha::Podr,
14651 P40PfsHa_SPEC,
14652 crate::common::RW,
14653 >::from_register(self, 0)
14654 }
14655
14656 #[doc = "Port State"]
14657 #[inline(always)]
14658 pub fn pidr(
14659 self,
14660 ) -> crate::common::RegisterField<
14661 1,
14662 0x1,
14663 1,
14664 0,
14665 p40pfs_ha::Pidr,
14666 p40pfs_ha::Pidr,
14667 P40PfsHa_SPEC,
14668 crate::common::R,
14669 > {
14670 crate::common::RegisterField::<
14671 1,
14672 0x1,
14673 1,
14674 0,
14675 p40pfs_ha::Pidr,
14676 p40pfs_ha::Pidr,
14677 P40PfsHa_SPEC,
14678 crate::common::R,
14679 >::from_register(self, 0)
14680 }
14681
14682 #[doc = "Port Direction"]
14683 #[inline(always)]
14684 pub fn pdr(
14685 self,
14686 ) -> crate::common::RegisterField<
14687 2,
14688 0x1,
14689 1,
14690 0,
14691 p40pfs_ha::Pdr,
14692 p40pfs_ha::Pdr,
14693 P40PfsHa_SPEC,
14694 crate::common::RW,
14695 > {
14696 crate::common::RegisterField::<
14697 2,
14698 0x1,
14699 1,
14700 0,
14701 p40pfs_ha::Pdr,
14702 p40pfs_ha::Pdr,
14703 P40PfsHa_SPEC,
14704 crate::common::RW,
14705 >::from_register(self, 0)
14706 }
14707
14708 #[doc = "Pull-up Control"]
14709 #[inline(always)]
14710 pub fn pcr(
14711 self,
14712 ) -> crate::common::RegisterField<
14713 4,
14714 0x1,
14715 1,
14716 0,
14717 p40pfs_ha::Pcr,
14718 p40pfs_ha::Pcr,
14719 P40PfsHa_SPEC,
14720 crate::common::RW,
14721 > {
14722 crate::common::RegisterField::<
14723 4,
14724 0x1,
14725 1,
14726 0,
14727 p40pfs_ha::Pcr,
14728 p40pfs_ha::Pcr,
14729 P40PfsHa_SPEC,
14730 crate::common::RW,
14731 >::from_register(self, 0)
14732 }
14733
14734 #[doc = "N-Channel Open-Drain Control"]
14735 #[inline(always)]
14736 pub fn ncodr(
14737 self,
14738 ) -> crate::common::RegisterField<
14739 6,
14740 0x1,
14741 1,
14742 0,
14743 p40pfs_ha::Ncodr,
14744 p40pfs_ha::Ncodr,
14745 P40PfsHa_SPEC,
14746 crate::common::RW,
14747 > {
14748 crate::common::RegisterField::<
14749 6,
14750 0x1,
14751 1,
14752 0,
14753 p40pfs_ha::Ncodr,
14754 p40pfs_ha::Ncodr,
14755 P40PfsHa_SPEC,
14756 crate::common::RW,
14757 >::from_register(self, 0)
14758 }
14759
14760 #[doc = "IRQ Input Enable"]
14761 #[inline(always)]
14762 pub fn isel(
14763 self,
14764 ) -> crate::common::RegisterField<
14765 14,
14766 0x1,
14767 1,
14768 0,
14769 p40pfs_ha::Isel,
14770 p40pfs_ha::Isel,
14771 P40PfsHa_SPEC,
14772 crate::common::RW,
14773 > {
14774 crate::common::RegisterField::<
14775 14,
14776 0x1,
14777 1,
14778 0,
14779 p40pfs_ha::Isel,
14780 p40pfs_ha::Isel,
14781 P40PfsHa_SPEC,
14782 crate::common::RW,
14783 >::from_register(self, 0)
14784 }
14785
14786 #[doc = "Analog Input Enable"]
14787 #[inline(always)]
14788 pub fn asel(
14789 self,
14790 ) -> crate::common::RegisterField<
14791 15,
14792 0x1,
14793 1,
14794 0,
14795 p40pfs_ha::Asel,
14796 p40pfs_ha::Asel,
14797 P40PfsHa_SPEC,
14798 crate::common::RW,
14799 > {
14800 crate::common::RegisterField::<
14801 15,
14802 0x1,
14803 1,
14804 0,
14805 p40pfs_ha::Asel,
14806 p40pfs_ha::Asel,
14807 P40PfsHa_SPEC,
14808 crate::common::RW,
14809 >::from_register(self, 0)
14810 }
14811}
14812impl ::core::default::Default for P40PfsHa {
14813 #[inline(always)]
14814 fn default() -> P40PfsHa {
14815 <crate::RegValueT<P40PfsHa_SPEC> as RegisterValue<_>>::new(0)
14816 }
14817}
14818pub mod p40pfs_ha {
14819
14820 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14821 pub struct Podr_SPEC;
14822 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
14823 impl Podr {
14824 #[doc = "Output low"]
14825 pub const _0: Self = Self::new(0);
14826
14827 #[doc = "Output high"]
14828 pub const _1: Self = Self::new(1);
14829 }
14830 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14831 pub struct Pidr_SPEC;
14832 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
14833 impl Pidr {
14834 #[doc = "Low level"]
14835 pub const _0: Self = Self::new(0);
14836
14837 #[doc = "High level"]
14838 pub const _1: Self = Self::new(1);
14839 }
14840 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14841 pub struct Pdr_SPEC;
14842 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
14843 impl Pdr {
14844 #[doc = "Input (functions as an input pin)"]
14845 pub const _0: Self = Self::new(0);
14846
14847 #[doc = "Output (functions as an output pin)"]
14848 pub const _1: Self = Self::new(1);
14849 }
14850 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14851 pub struct Pcr_SPEC;
14852 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
14853 impl Pcr {
14854 #[doc = "Disable input pull-up"]
14855 pub const _0: Self = Self::new(0);
14856
14857 #[doc = "Enable input pull-up"]
14858 pub const _1: Self = Self::new(1);
14859 }
14860 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14861 pub struct Ncodr_SPEC;
14862 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
14863 impl Ncodr {
14864 #[doc = "Output CMOS"]
14865 pub const _0: Self = Self::new(0);
14866
14867 #[doc = "Output NMOS open-drain"]
14868 pub const _1: Self = Self::new(1);
14869 }
14870 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14871 pub struct Isel_SPEC;
14872 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
14873 impl Isel {
14874 #[doc = "Do not use as IRQn input pin"]
14875 pub const _0: Self = Self::new(0);
14876
14877 #[doc = "Use as IRQn input pin"]
14878 pub const _1: Self = Self::new(1);
14879 }
14880 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
14881 pub struct Asel_SPEC;
14882 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
14883 impl Asel {
14884 #[doc = "Do not use as analog pin"]
14885 pub const _0: Self = Self::new(0);
14886
14887 #[doc = "Use as analog pin"]
14888 pub const _1: Self = Self::new(1);
14889 }
14890}
14891#[doc(hidden)]
14892#[derive(Copy, Clone, Eq, PartialEq)]
14893pub struct P40PfsBy_SPEC;
14894impl crate::sealed::RegSpec for P40PfsBy_SPEC {
14895 type DataType = u8;
14896}
14897
14898#[doc = "Port 40%s Pin Function Select Register"]
14899pub type P40PfsBy = crate::RegValueT<P40PfsBy_SPEC>;
14900
14901impl P40PfsBy {
14902 #[doc = "Port Output Data"]
14903 #[inline(always)]
14904 pub fn podr(
14905 self,
14906 ) -> crate::common::RegisterField<
14907 0,
14908 0x1,
14909 1,
14910 0,
14911 p40pfs_by::Podr,
14912 p40pfs_by::Podr,
14913 P40PfsBy_SPEC,
14914 crate::common::RW,
14915 > {
14916 crate::common::RegisterField::<
14917 0,
14918 0x1,
14919 1,
14920 0,
14921 p40pfs_by::Podr,
14922 p40pfs_by::Podr,
14923 P40PfsBy_SPEC,
14924 crate::common::RW,
14925 >::from_register(self, 0)
14926 }
14927
14928 #[doc = "Port State"]
14929 #[inline(always)]
14930 pub fn pidr(
14931 self,
14932 ) -> crate::common::RegisterField<
14933 1,
14934 0x1,
14935 1,
14936 0,
14937 p40pfs_by::Pidr,
14938 p40pfs_by::Pidr,
14939 P40PfsBy_SPEC,
14940 crate::common::R,
14941 > {
14942 crate::common::RegisterField::<
14943 1,
14944 0x1,
14945 1,
14946 0,
14947 p40pfs_by::Pidr,
14948 p40pfs_by::Pidr,
14949 P40PfsBy_SPEC,
14950 crate::common::R,
14951 >::from_register(self, 0)
14952 }
14953
14954 #[doc = "Port Direction"]
14955 #[inline(always)]
14956 pub fn pdr(
14957 self,
14958 ) -> crate::common::RegisterField<
14959 2,
14960 0x1,
14961 1,
14962 0,
14963 p40pfs_by::Pdr,
14964 p40pfs_by::Pdr,
14965 P40PfsBy_SPEC,
14966 crate::common::RW,
14967 > {
14968 crate::common::RegisterField::<
14969 2,
14970 0x1,
14971 1,
14972 0,
14973 p40pfs_by::Pdr,
14974 p40pfs_by::Pdr,
14975 P40PfsBy_SPEC,
14976 crate::common::RW,
14977 >::from_register(self, 0)
14978 }
14979
14980 #[doc = "Pull-up Control"]
14981 #[inline(always)]
14982 pub fn pcr(
14983 self,
14984 ) -> crate::common::RegisterField<
14985 4,
14986 0x1,
14987 1,
14988 0,
14989 p40pfs_by::Pcr,
14990 p40pfs_by::Pcr,
14991 P40PfsBy_SPEC,
14992 crate::common::RW,
14993 > {
14994 crate::common::RegisterField::<
14995 4,
14996 0x1,
14997 1,
14998 0,
14999 p40pfs_by::Pcr,
15000 p40pfs_by::Pcr,
15001 P40PfsBy_SPEC,
15002 crate::common::RW,
15003 >::from_register(self, 0)
15004 }
15005
15006 #[doc = "N-Channel Open-Drain Control"]
15007 #[inline(always)]
15008 pub fn ncodr(
15009 self,
15010 ) -> crate::common::RegisterField<
15011 6,
15012 0x1,
15013 1,
15014 0,
15015 p40pfs_by::Ncodr,
15016 p40pfs_by::Ncodr,
15017 P40PfsBy_SPEC,
15018 crate::common::RW,
15019 > {
15020 crate::common::RegisterField::<
15021 6,
15022 0x1,
15023 1,
15024 0,
15025 p40pfs_by::Ncodr,
15026 p40pfs_by::Ncodr,
15027 P40PfsBy_SPEC,
15028 crate::common::RW,
15029 >::from_register(self, 0)
15030 }
15031}
15032impl ::core::default::Default for P40PfsBy {
15033 #[inline(always)]
15034 fn default() -> P40PfsBy {
15035 <crate::RegValueT<P40PfsBy_SPEC> as RegisterValue<_>>::new(0)
15036 }
15037}
15038pub mod p40pfs_by {
15039
15040 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15041 pub struct Podr_SPEC;
15042 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
15043 impl Podr {
15044 #[doc = "Output low"]
15045 pub const _0: Self = Self::new(0);
15046
15047 #[doc = "Output high"]
15048 pub const _1: Self = Self::new(1);
15049 }
15050 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15051 pub struct Pidr_SPEC;
15052 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
15053 impl Pidr {
15054 #[doc = "Low level"]
15055 pub const _0: Self = Self::new(0);
15056
15057 #[doc = "High level"]
15058 pub const _1: Self = Self::new(1);
15059 }
15060 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15061 pub struct Pdr_SPEC;
15062 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
15063 impl Pdr {
15064 #[doc = "Input (functions as an input pin)"]
15065 pub const _0: Self = Self::new(0);
15066
15067 #[doc = "Output (functions as an output pin)"]
15068 pub const _1: Self = Self::new(1);
15069 }
15070 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15071 pub struct Pcr_SPEC;
15072 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
15073 impl Pcr {
15074 #[doc = "Disable input pull-up"]
15075 pub const _0: Self = Self::new(0);
15076
15077 #[doc = "Enable input pull-up"]
15078 pub const _1: Self = Self::new(1);
15079 }
15080 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15081 pub struct Ncodr_SPEC;
15082 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
15083 impl Ncodr {
15084 #[doc = "Output CMOS"]
15085 pub const _0: Self = Self::new(0);
15086
15087 #[doc = "Output NMOS open-drain"]
15088 pub const _1: Self = Self::new(1);
15089 }
15090}
15091#[doc(hidden)]
15092#[derive(Copy, Clone, Eq, PartialEq)]
15093pub struct P410Pfs_SPEC;
15094impl crate::sealed::RegSpec for P410Pfs_SPEC {
15095 type DataType = u32;
15096}
15097
15098#[doc = "Port 410 Pin Function Select Register"]
15099pub type P410Pfs = crate::RegValueT<P410Pfs_SPEC>;
15100
15101impl P410Pfs {
15102 #[doc = "Port Output Data"]
15103 #[inline(always)]
15104 pub fn podr(
15105 self,
15106 ) -> crate::common::RegisterField<
15107 0,
15108 0x1,
15109 1,
15110 0,
15111 p410pfs::Podr,
15112 p410pfs::Podr,
15113 P410Pfs_SPEC,
15114 crate::common::RW,
15115 > {
15116 crate::common::RegisterField::<
15117 0,
15118 0x1,
15119 1,
15120 0,
15121 p410pfs::Podr,
15122 p410pfs::Podr,
15123 P410Pfs_SPEC,
15124 crate::common::RW,
15125 >::from_register(self, 0)
15126 }
15127
15128 #[doc = "Port State"]
15129 #[inline(always)]
15130 pub fn pidr(
15131 self,
15132 ) -> crate::common::RegisterField<
15133 1,
15134 0x1,
15135 1,
15136 0,
15137 p410pfs::Pidr,
15138 p410pfs::Pidr,
15139 P410Pfs_SPEC,
15140 crate::common::R,
15141 > {
15142 crate::common::RegisterField::<
15143 1,
15144 0x1,
15145 1,
15146 0,
15147 p410pfs::Pidr,
15148 p410pfs::Pidr,
15149 P410Pfs_SPEC,
15150 crate::common::R,
15151 >::from_register(self, 0)
15152 }
15153
15154 #[doc = "Port Direction"]
15155 #[inline(always)]
15156 pub fn pdr(
15157 self,
15158 ) -> crate::common::RegisterField<
15159 2,
15160 0x1,
15161 1,
15162 0,
15163 p410pfs::Pdr,
15164 p410pfs::Pdr,
15165 P410Pfs_SPEC,
15166 crate::common::RW,
15167 > {
15168 crate::common::RegisterField::<
15169 2,
15170 0x1,
15171 1,
15172 0,
15173 p410pfs::Pdr,
15174 p410pfs::Pdr,
15175 P410Pfs_SPEC,
15176 crate::common::RW,
15177 >::from_register(self, 0)
15178 }
15179
15180 #[doc = "Pull-up Control"]
15181 #[inline(always)]
15182 pub fn pcr(
15183 self,
15184 ) -> crate::common::RegisterField<
15185 4,
15186 0x1,
15187 1,
15188 0,
15189 p410pfs::Pcr,
15190 p410pfs::Pcr,
15191 P410Pfs_SPEC,
15192 crate::common::RW,
15193 > {
15194 crate::common::RegisterField::<
15195 4,
15196 0x1,
15197 1,
15198 0,
15199 p410pfs::Pcr,
15200 p410pfs::Pcr,
15201 P410Pfs_SPEC,
15202 crate::common::RW,
15203 >::from_register(self, 0)
15204 }
15205
15206 #[doc = "N-Channel Open-Drain Control"]
15207 #[inline(always)]
15208 pub fn ncodr(
15209 self,
15210 ) -> crate::common::RegisterField<
15211 6,
15212 0x1,
15213 1,
15214 0,
15215 p410pfs::Ncodr,
15216 p410pfs::Ncodr,
15217 P410Pfs_SPEC,
15218 crate::common::RW,
15219 > {
15220 crate::common::RegisterField::<
15221 6,
15222 0x1,
15223 1,
15224 0,
15225 p410pfs::Ncodr,
15226 p410pfs::Ncodr,
15227 P410Pfs_SPEC,
15228 crate::common::RW,
15229 >::from_register(self, 0)
15230 }
15231
15232 #[doc = "IRQ Input Enable"]
15233 #[inline(always)]
15234 pub fn isel(
15235 self,
15236 ) -> crate::common::RegisterField<
15237 14,
15238 0x1,
15239 1,
15240 0,
15241 p410pfs::Isel,
15242 p410pfs::Isel,
15243 P410Pfs_SPEC,
15244 crate::common::RW,
15245 > {
15246 crate::common::RegisterField::<
15247 14,
15248 0x1,
15249 1,
15250 0,
15251 p410pfs::Isel,
15252 p410pfs::Isel,
15253 P410Pfs_SPEC,
15254 crate::common::RW,
15255 >::from_register(self, 0)
15256 }
15257
15258 #[doc = "Analog Input Enable"]
15259 #[inline(always)]
15260 pub fn asel(
15261 self,
15262 ) -> crate::common::RegisterField<
15263 15,
15264 0x1,
15265 1,
15266 0,
15267 p410pfs::Asel,
15268 p410pfs::Asel,
15269 P410Pfs_SPEC,
15270 crate::common::RW,
15271 > {
15272 crate::common::RegisterField::<
15273 15,
15274 0x1,
15275 1,
15276 0,
15277 p410pfs::Asel,
15278 p410pfs::Asel,
15279 P410Pfs_SPEC,
15280 crate::common::RW,
15281 >::from_register(self, 0)
15282 }
15283
15284 #[doc = "Port Mode Control"]
15285 #[inline(always)]
15286 pub fn pmr(
15287 self,
15288 ) -> crate::common::RegisterField<
15289 16,
15290 0x1,
15291 1,
15292 0,
15293 p410pfs::Pmr,
15294 p410pfs::Pmr,
15295 P410Pfs_SPEC,
15296 crate::common::RW,
15297 > {
15298 crate::common::RegisterField::<
15299 16,
15300 0x1,
15301 1,
15302 0,
15303 p410pfs::Pmr,
15304 p410pfs::Pmr,
15305 P410Pfs_SPEC,
15306 crate::common::RW,
15307 >::from_register(self, 0)
15308 }
15309
15310 #[doc = "Peripheral Select"]
15311 #[inline(always)]
15312 pub fn psel(
15313 self,
15314 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P410Pfs_SPEC, crate::common::RW> {
15315 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P410Pfs_SPEC,crate::common::RW>::from_register(self,0)
15316 }
15317}
15318impl ::core::default::Default for P410Pfs {
15319 #[inline(always)]
15320 fn default() -> P410Pfs {
15321 <crate::RegValueT<P410Pfs_SPEC> as RegisterValue<_>>::new(0)
15322 }
15323}
15324pub mod p410pfs {
15325
15326 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15327 pub struct Podr_SPEC;
15328 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
15329 impl Podr {
15330 #[doc = "Output low"]
15331 pub const _0: Self = Self::new(0);
15332
15333 #[doc = "Output high"]
15334 pub const _1: Self = Self::new(1);
15335 }
15336 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15337 pub struct Pidr_SPEC;
15338 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
15339 impl Pidr {
15340 #[doc = "Low level"]
15341 pub const _0: Self = Self::new(0);
15342
15343 #[doc = "High level"]
15344 pub const _1: Self = Self::new(1);
15345 }
15346 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15347 pub struct Pdr_SPEC;
15348 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
15349 impl Pdr {
15350 #[doc = "Input (functions as an input pin)"]
15351 pub const _0: Self = Self::new(0);
15352
15353 #[doc = "Output (functions as an output pin)"]
15354 pub const _1: Self = Self::new(1);
15355 }
15356 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15357 pub struct Pcr_SPEC;
15358 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
15359 impl Pcr {
15360 #[doc = "Disable input pull-up"]
15361 pub const _0: Self = Self::new(0);
15362
15363 #[doc = "Enable input pull-up"]
15364 pub const _1: Self = Self::new(1);
15365 }
15366 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15367 pub struct Ncodr_SPEC;
15368 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
15369 impl Ncodr {
15370 #[doc = "Output CMOS"]
15371 pub const _0: Self = Self::new(0);
15372
15373 #[doc = "Output NMOS open-drain"]
15374 pub const _1: Self = Self::new(1);
15375 }
15376 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15377 pub struct Isel_SPEC;
15378 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
15379 impl Isel {
15380 #[doc = "Do not use as IRQn input pin"]
15381 pub const _0: Self = Self::new(0);
15382
15383 #[doc = "Use as IRQn input pin"]
15384 pub const _1: Self = Self::new(1);
15385 }
15386 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15387 pub struct Asel_SPEC;
15388 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
15389 impl Asel {
15390 #[doc = "Do not use as analog pin"]
15391 pub const _0: Self = Self::new(0);
15392
15393 #[doc = "Use as analog pin"]
15394 pub const _1: Self = Self::new(1);
15395 }
15396 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15397 pub struct Pmr_SPEC;
15398 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
15399 impl Pmr {
15400 #[doc = "Use as general I/O pin"]
15401 pub const _0: Self = Self::new(0);
15402
15403 #[doc = "Use as I/O port for peripheral functions"]
15404 pub const _1: Self = Self::new(1);
15405 }
15406}
15407#[doc(hidden)]
15408#[derive(Copy, Clone, Eq, PartialEq)]
15409pub struct P410PfsHa_SPEC;
15410impl crate::sealed::RegSpec for P410PfsHa_SPEC {
15411 type DataType = u16;
15412}
15413
15414#[doc = "Port 410 Pin Function Select Register"]
15415pub type P410PfsHa = crate::RegValueT<P410PfsHa_SPEC>;
15416
15417impl P410PfsHa {
15418 #[doc = "Port Output Data"]
15419 #[inline(always)]
15420 pub fn podr(
15421 self,
15422 ) -> crate::common::RegisterField<
15423 0,
15424 0x1,
15425 1,
15426 0,
15427 p410pfs_ha::Podr,
15428 p410pfs_ha::Podr,
15429 P410PfsHa_SPEC,
15430 crate::common::RW,
15431 > {
15432 crate::common::RegisterField::<
15433 0,
15434 0x1,
15435 1,
15436 0,
15437 p410pfs_ha::Podr,
15438 p410pfs_ha::Podr,
15439 P410PfsHa_SPEC,
15440 crate::common::RW,
15441 >::from_register(self, 0)
15442 }
15443
15444 #[doc = "Port State"]
15445 #[inline(always)]
15446 pub fn pidr(
15447 self,
15448 ) -> crate::common::RegisterField<
15449 1,
15450 0x1,
15451 1,
15452 0,
15453 p410pfs_ha::Pidr,
15454 p410pfs_ha::Pidr,
15455 P410PfsHa_SPEC,
15456 crate::common::R,
15457 > {
15458 crate::common::RegisterField::<
15459 1,
15460 0x1,
15461 1,
15462 0,
15463 p410pfs_ha::Pidr,
15464 p410pfs_ha::Pidr,
15465 P410PfsHa_SPEC,
15466 crate::common::R,
15467 >::from_register(self, 0)
15468 }
15469
15470 #[doc = "Port Direction"]
15471 #[inline(always)]
15472 pub fn pdr(
15473 self,
15474 ) -> crate::common::RegisterField<
15475 2,
15476 0x1,
15477 1,
15478 0,
15479 p410pfs_ha::Pdr,
15480 p410pfs_ha::Pdr,
15481 P410PfsHa_SPEC,
15482 crate::common::RW,
15483 > {
15484 crate::common::RegisterField::<
15485 2,
15486 0x1,
15487 1,
15488 0,
15489 p410pfs_ha::Pdr,
15490 p410pfs_ha::Pdr,
15491 P410PfsHa_SPEC,
15492 crate::common::RW,
15493 >::from_register(self, 0)
15494 }
15495
15496 #[doc = "Pull-up Control"]
15497 #[inline(always)]
15498 pub fn pcr(
15499 self,
15500 ) -> crate::common::RegisterField<
15501 4,
15502 0x1,
15503 1,
15504 0,
15505 p410pfs_ha::Pcr,
15506 p410pfs_ha::Pcr,
15507 P410PfsHa_SPEC,
15508 crate::common::RW,
15509 > {
15510 crate::common::RegisterField::<
15511 4,
15512 0x1,
15513 1,
15514 0,
15515 p410pfs_ha::Pcr,
15516 p410pfs_ha::Pcr,
15517 P410PfsHa_SPEC,
15518 crate::common::RW,
15519 >::from_register(self, 0)
15520 }
15521
15522 #[doc = "N-Channel Open-Drain Control"]
15523 #[inline(always)]
15524 pub fn ncodr(
15525 self,
15526 ) -> crate::common::RegisterField<
15527 6,
15528 0x1,
15529 1,
15530 0,
15531 p410pfs_ha::Ncodr,
15532 p410pfs_ha::Ncodr,
15533 P410PfsHa_SPEC,
15534 crate::common::RW,
15535 > {
15536 crate::common::RegisterField::<
15537 6,
15538 0x1,
15539 1,
15540 0,
15541 p410pfs_ha::Ncodr,
15542 p410pfs_ha::Ncodr,
15543 P410PfsHa_SPEC,
15544 crate::common::RW,
15545 >::from_register(self, 0)
15546 }
15547
15548 #[doc = "IRQ Input Enable"]
15549 #[inline(always)]
15550 pub fn isel(
15551 self,
15552 ) -> crate::common::RegisterField<
15553 14,
15554 0x1,
15555 1,
15556 0,
15557 p410pfs_ha::Isel,
15558 p410pfs_ha::Isel,
15559 P410PfsHa_SPEC,
15560 crate::common::RW,
15561 > {
15562 crate::common::RegisterField::<
15563 14,
15564 0x1,
15565 1,
15566 0,
15567 p410pfs_ha::Isel,
15568 p410pfs_ha::Isel,
15569 P410PfsHa_SPEC,
15570 crate::common::RW,
15571 >::from_register(self, 0)
15572 }
15573
15574 #[doc = "Analog Input Enable"]
15575 #[inline(always)]
15576 pub fn asel(
15577 self,
15578 ) -> crate::common::RegisterField<
15579 15,
15580 0x1,
15581 1,
15582 0,
15583 p410pfs_ha::Asel,
15584 p410pfs_ha::Asel,
15585 P410PfsHa_SPEC,
15586 crate::common::RW,
15587 > {
15588 crate::common::RegisterField::<
15589 15,
15590 0x1,
15591 1,
15592 0,
15593 p410pfs_ha::Asel,
15594 p410pfs_ha::Asel,
15595 P410PfsHa_SPEC,
15596 crate::common::RW,
15597 >::from_register(self, 0)
15598 }
15599}
15600impl ::core::default::Default for P410PfsHa {
15601 #[inline(always)]
15602 fn default() -> P410PfsHa {
15603 <crate::RegValueT<P410PfsHa_SPEC> as RegisterValue<_>>::new(0)
15604 }
15605}
15606pub mod p410pfs_ha {
15607
15608 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15609 pub struct Podr_SPEC;
15610 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
15611 impl Podr {
15612 #[doc = "Output low"]
15613 pub const _0: Self = Self::new(0);
15614
15615 #[doc = "Output high"]
15616 pub const _1: Self = Self::new(1);
15617 }
15618 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15619 pub struct Pidr_SPEC;
15620 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
15621 impl Pidr {
15622 #[doc = "Low level"]
15623 pub const _0: Self = Self::new(0);
15624
15625 #[doc = "High level"]
15626 pub const _1: Self = Self::new(1);
15627 }
15628 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15629 pub struct Pdr_SPEC;
15630 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
15631 impl Pdr {
15632 #[doc = "Input (functions as an input pin)"]
15633 pub const _0: Self = Self::new(0);
15634
15635 #[doc = "Output (functions as an output pin)"]
15636 pub const _1: Self = Self::new(1);
15637 }
15638 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15639 pub struct Pcr_SPEC;
15640 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
15641 impl Pcr {
15642 #[doc = "Disable input pull-up"]
15643 pub const _0: Self = Self::new(0);
15644
15645 #[doc = "Enable input pull-up"]
15646 pub const _1: Self = Self::new(1);
15647 }
15648 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15649 pub struct Ncodr_SPEC;
15650 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
15651 impl Ncodr {
15652 #[doc = "Output CMOS"]
15653 pub const _0: Self = Self::new(0);
15654
15655 #[doc = "Output NMOS open-drain"]
15656 pub const _1: Self = Self::new(1);
15657 }
15658 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15659 pub struct Isel_SPEC;
15660 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
15661 impl Isel {
15662 #[doc = "Do not use as IRQn input pin"]
15663 pub const _0: Self = Self::new(0);
15664
15665 #[doc = "Use as IRQn input pin"]
15666 pub const _1: Self = Self::new(1);
15667 }
15668 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15669 pub struct Asel_SPEC;
15670 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
15671 impl Asel {
15672 #[doc = "Do not use as analog pin"]
15673 pub const _0: Self = Self::new(0);
15674
15675 #[doc = "Use as analog pin"]
15676 pub const _1: Self = Self::new(1);
15677 }
15678}
15679#[doc(hidden)]
15680#[derive(Copy, Clone, Eq, PartialEq)]
15681pub struct P410PfsBy_SPEC;
15682impl crate::sealed::RegSpec for P410PfsBy_SPEC {
15683 type DataType = u8;
15684}
15685
15686#[doc = "Port 410 Pin Function Select Register"]
15687pub type P410PfsBy = crate::RegValueT<P410PfsBy_SPEC>;
15688
15689impl P410PfsBy {
15690 #[doc = "Port Output Data"]
15691 #[inline(always)]
15692 pub fn podr(
15693 self,
15694 ) -> crate::common::RegisterField<
15695 0,
15696 0x1,
15697 1,
15698 0,
15699 p410pfs_by::Podr,
15700 p410pfs_by::Podr,
15701 P410PfsBy_SPEC,
15702 crate::common::RW,
15703 > {
15704 crate::common::RegisterField::<
15705 0,
15706 0x1,
15707 1,
15708 0,
15709 p410pfs_by::Podr,
15710 p410pfs_by::Podr,
15711 P410PfsBy_SPEC,
15712 crate::common::RW,
15713 >::from_register(self, 0)
15714 }
15715
15716 #[doc = "Port State"]
15717 #[inline(always)]
15718 pub fn pidr(
15719 self,
15720 ) -> crate::common::RegisterField<
15721 1,
15722 0x1,
15723 1,
15724 0,
15725 p410pfs_by::Pidr,
15726 p410pfs_by::Pidr,
15727 P410PfsBy_SPEC,
15728 crate::common::R,
15729 > {
15730 crate::common::RegisterField::<
15731 1,
15732 0x1,
15733 1,
15734 0,
15735 p410pfs_by::Pidr,
15736 p410pfs_by::Pidr,
15737 P410PfsBy_SPEC,
15738 crate::common::R,
15739 >::from_register(self, 0)
15740 }
15741
15742 #[doc = "Port Direction"]
15743 #[inline(always)]
15744 pub fn pdr(
15745 self,
15746 ) -> crate::common::RegisterField<
15747 2,
15748 0x1,
15749 1,
15750 0,
15751 p410pfs_by::Pdr,
15752 p410pfs_by::Pdr,
15753 P410PfsBy_SPEC,
15754 crate::common::RW,
15755 > {
15756 crate::common::RegisterField::<
15757 2,
15758 0x1,
15759 1,
15760 0,
15761 p410pfs_by::Pdr,
15762 p410pfs_by::Pdr,
15763 P410PfsBy_SPEC,
15764 crate::common::RW,
15765 >::from_register(self, 0)
15766 }
15767
15768 #[doc = "Pull-up Control"]
15769 #[inline(always)]
15770 pub fn pcr(
15771 self,
15772 ) -> crate::common::RegisterField<
15773 4,
15774 0x1,
15775 1,
15776 0,
15777 p410pfs_by::Pcr,
15778 p410pfs_by::Pcr,
15779 P410PfsBy_SPEC,
15780 crate::common::RW,
15781 > {
15782 crate::common::RegisterField::<
15783 4,
15784 0x1,
15785 1,
15786 0,
15787 p410pfs_by::Pcr,
15788 p410pfs_by::Pcr,
15789 P410PfsBy_SPEC,
15790 crate::common::RW,
15791 >::from_register(self, 0)
15792 }
15793
15794 #[doc = "N-Channel Open-Drain Control"]
15795 #[inline(always)]
15796 pub fn ncodr(
15797 self,
15798 ) -> crate::common::RegisterField<
15799 6,
15800 0x1,
15801 1,
15802 0,
15803 p410pfs_by::Ncodr,
15804 p410pfs_by::Ncodr,
15805 P410PfsBy_SPEC,
15806 crate::common::RW,
15807 > {
15808 crate::common::RegisterField::<
15809 6,
15810 0x1,
15811 1,
15812 0,
15813 p410pfs_by::Ncodr,
15814 p410pfs_by::Ncodr,
15815 P410PfsBy_SPEC,
15816 crate::common::RW,
15817 >::from_register(self, 0)
15818 }
15819}
15820impl ::core::default::Default for P410PfsBy {
15821 #[inline(always)]
15822 fn default() -> P410PfsBy {
15823 <crate::RegValueT<P410PfsBy_SPEC> as RegisterValue<_>>::new(0)
15824 }
15825}
15826pub mod p410pfs_by {
15827
15828 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15829 pub struct Podr_SPEC;
15830 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
15831 impl Podr {
15832 #[doc = "Output low"]
15833 pub const _0: Self = Self::new(0);
15834
15835 #[doc = "Output high"]
15836 pub const _1: Self = Self::new(1);
15837 }
15838 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15839 pub struct Pidr_SPEC;
15840 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
15841 impl Pidr {
15842 #[doc = "Low level"]
15843 pub const _0: Self = Self::new(0);
15844
15845 #[doc = "High level"]
15846 pub const _1: Self = Self::new(1);
15847 }
15848 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15849 pub struct Pdr_SPEC;
15850 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
15851 impl Pdr {
15852 #[doc = "Input (functions as an input pin)"]
15853 pub const _0: Self = Self::new(0);
15854
15855 #[doc = "Output (functions as an output pin)"]
15856 pub const _1: Self = Self::new(1);
15857 }
15858 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15859 pub struct Pcr_SPEC;
15860 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
15861 impl Pcr {
15862 #[doc = "Disable input pull-up"]
15863 pub const _0: Self = Self::new(0);
15864
15865 #[doc = "Enable input pull-up"]
15866 pub const _1: Self = Self::new(1);
15867 }
15868 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
15869 pub struct Ncodr_SPEC;
15870 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
15871 impl Ncodr {
15872 #[doc = "Output CMOS"]
15873 pub const _0: Self = Self::new(0);
15874
15875 #[doc = "Output NMOS open-drain"]
15876 pub const _1: Self = Self::new(1);
15877 }
15878}
15879#[doc(hidden)]
15880#[derive(Copy, Clone, Eq, PartialEq)]
15881pub struct P411Pfs_SPEC;
15882impl crate::sealed::RegSpec for P411Pfs_SPEC {
15883 type DataType = u32;
15884}
15885
15886#[doc = "Port 411 Pin Function Select Register"]
15887pub type P411Pfs = crate::RegValueT<P411Pfs_SPEC>;
15888
15889impl P411Pfs {
15890 #[doc = "Port Output Data"]
15891 #[inline(always)]
15892 pub fn podr(
15893 self,
15894 ) -> crate::common::RegisterField<
15895 0,
15896 0x1,
15897 1,
15898 0,
15899 p411pfs::Podr,
15900 p411pfs::Podr,
15901 P411Pfs_SPEC,
15902 crate::common::RW,
15903 > {
15904 crate::common::RegisterField::<
15905 0,
15906 0x1,
15907 1,
15908 0,
15909 p411pfs::Podr,
15910 p411pfs::Podr,
15911 P411Pfs_SPEC,
15912 crate::common::RW,
15913 >::from_register(self, 0)
15914 }
15915
15916 #[doc = "Port State"]
15917 #[inline(always)]
15918 pub fn pidr(
15919 self,
15920 ) -> crate::common::RegisterField<
15921 1,
15922 0x1,
15923 1,
15924 0,
15925 p411pfs::Pidr,
15926 p411pfs::Pidr,
15927 P411Pfs_SPEC,
15928 crate::common::R,
15929 > {
15930 crate::common::RegisterField::<
15931 1,
15932 0x1,
15933 1,
15934 0,
15935 p411pfs::Pidr,
15936 p411pfs::Pidr,
15937 P411Pfs_SPEC,
15938 crate::common::R,
15939 >::from_register(self, 0)
15940 }
15941
15942 #[doc = "Port Direction"]
15943 #[inline(always)]
15944 pub fn pdr(
15945 self,
15946 ) -> crate::common::RegisterField<
15947 2,
15948 0x1,
15949 1,
15950 0,
15951 p411pfs::Pdr,
15952 p411pfs::Pdr,
15953 P411Pfs_SPEC,
15954 crate::common::RW,
15955 > {
15956 crate::common::RegisterField::<
15957 2,
15958 0x1,
15959 1,
15960 0,
15961 p411pfs::Pdr,
15962 p411pfs::Pdr,
15963 P411Pfs_SPEC,
15964 crate::common::RW,
15965 >::from_register(self, 0)
15966 }
15967
15968 #[doc = "Pull-up Control"]
15969 #[inline(always)]
15970 pub fn pcr(
15971 self,
15972 ) -> crate::common::RegisterField<
15973 4,
15974 0x1,
15975 1,
15976 0,
15977 p411pfs::Pcr,
15978 p411pfs::Pcr,
15979 P411Pfs_SPEC,
15980 crate::common::RW,
15981 > {
15982 crate::common::RegisterField::<
15983 4,
15984 0x1,
15985 1,
15986 0,
15987 p411pfs::Pcr,
15988 p411pfs::Pcr,
15989 P411Pfs_SPEC,
15990 crate::common::RW,
15991 >::from_register(self, 0)
15992 }
15993
15994 #[doc = "N-Channel Open-Drain Control"]
15995 #[inline(always)]
15996 pub fn ncodr(
15997 self,
15998 ) -> crate::common::RegisterField<
15999 6,
16000 0x1,
16001 1,
16002 0,
16003 p411pfs::Ncodr,
16004 p411pfs::Ncodr,
16005 P411Pfs_SPEC,
16006 crate::common::RW,
16007 > {
16008 crate::common::RegisterField::<
16009 6,
16010 0x1,
16011 1,
16012 0,
16013 p411pfs::Ncodr,
16014 p411pfs::Ncodr,
16015 P411Pfs_SPEC,
16016 crate::common::RW,
16017 >::from_register(self, 0)
16018 }
16019
16020 #[doc = "IRQ Input Enable"]
16021 #[inline(always)]
16022 pub fn isel(
16023 self,
16024 ) -> crate::common::RegisterField<
16025 14,
16026 0x1,
16027 1,
16028 0,
16029 p411pfs::Isel,
16030 p411pfs::Isel,
16031 P411Pfs_SPEC,
16032 crate::common::RW,
16033 > {
16034 crate::common::RegisterField::<
16035 14,
16036 0x1,
16037 1,
16038 0,
16039 p411pfs::Isel,
16040 p411pfs::Isel,
16041 P411Pfs_SPEC,
16042 crate::common::RW,
16043 >::from_register(self, 0)
16044 }
16045
16046 #[doc = "Analog Input Enable"]
16047 #[inline(always)]
16048 pub fn asel(
16049 self,
16050 ) -> crate::common::RegisterField<
16051 15,
16052 0x1,
16053 1,
16054 0,
16055 p411pfs::Asel,
16056 p411pfs::Asel,
16057 P411Pfs_SPEC,
16058 crate::common::RW,
16059 > {
16060 crate::common::RegisterField::<
16061 15,
16062 0x1,
16063 1,
16064 0,
16065 p411pfs::Asel,
16066 p411pfs::Asel,
16067 P411Pfs_SPEC,
16068 crate::common::RW,
16069 >::from_register(self, 0)
16070 }
16071
16072 #[doc = "Port Mode Control"]
16073 #[inline(always)]
16074 pub fn pmr(
16075 self,
16076 ) -> crate::common::RegisterField<
16077 16,
16078 0x1,
16079 1,
16080 0,
16081 p411pfs::Pmr,
16082 p411pfs::Pmr,
16083 P411Pfs_SPEC,
16084 crate::common::RW,
16085 > {
16086 crate::common::RegisterField::<
16087 16,
16088 0x1,
16089 1,
16090 0,
16091 p411pfs::Pmr,
16092 p411pfs::Pmr,
16093 P411Pfs_SPEC,
16094 crate::common::RW,
16095 >::from_register(self, 0)
16096 }
16097
16098 #[doc = "Peripheral Select"]
16099 #[inline(always)]
16100 pub fn psel(
16101 self,
16102 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P411Pfs_SPEC, crate::common::RW> {
16103 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P411Pfs_SPEC,crate::common::RW>::from_register(self,0)
16104 }
16105}
16106impl ::core::default::Default for P411Pfs {
16107 #[inline(always)]
16108 fn default() -> P411Pfs {
16109 <crate::RegValueT<P411Pfs_SPEC> as RegisterValue<_>>::new(0)
16110 }
16111}
16112pub mod p411pfs {
16113
16114 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16115 pub struct Podr_SPEC;
16116 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
16117 impl Podr {
16118 #[doc = "Output low"]
16119 pub const _0: Self = Self::new(0);
16120
16121 #[doc = "Output high"]
16122 pub const _1: Self = Self::new(1);
16123 }
16124 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16125 pub struct Pidr_SPEC;
16126 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
16127 impl Pidr {
16128 #[doc = "Low level"]
16129 pub const _0: Self = Self::new(0);
16130
16131 #[doc = "High level"]
16132 pub const _1: Self = Self::new(1);
16133 }
16134 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16135 pub struct Pdr_SPEC;
16136 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
16137 impl Pdr {
16138 #[doc = "Input (functions as an input pin)"]
16139 pub const _0: Self = Self::new(0);
16140
16141 #[doc = "Output (functions as an output pin)"]
16142 pub const _1: Self = Self::new(1);
16143 }
16144 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16145 pub struct Pcr_SPEC;
16146 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
16147 impl Pcr {
16148 #[doc = "Disable input pull-up"]
16149 pub const _0: Self = Self::new(0);
16150
16151 #[doc = "Enable input pull-up"]
16152 pub const _1: Self = Self::new(1);
16153 }
16154 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16155 pub struct Ncodr_SPEC;
16156 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
16157 impl Ncodr {
16158 #[doc = "Output CMOS"]
16159 pub const _0: Self = Self::new(0);
16160
16161 #[doc = "Output NMOS open-drain"]
16162 pub const _1: Self = Self::new(1);
16163 }
16164 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16165 pub struct Isel_SPEC;
16166 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
16167 impl Isel {
16168 #[doc = "Do not use as IRQn input pin"]
16169 pub const _0: Self = Self::new(0);
16170
16171 #[doc = "Use as IRQn input pin"]
16172 pub const _1: Self = Self::new(1);
16173 }
16174 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16175 pub struct Asel_SPEC;
16176 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
16177 impl Asel {
16178 #[doc = "Do not use as analog pin"]
16179 pub const _0: Self = Self::new(0);
16180
16181 #[doc = "Use as analog pin"]
16182 pub const _1: Self = Self::new(1);
16183 }
16184 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16185 pub struct Pmr_SPEC;
16186 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
16187 impl Pmr {
16188 #[doc = "Use as general I/O pin"]
16189 pub const _0: Self = Self::new(0);
16190
16191 #[doc = "Use as I/O port for peripheral functions"]
16192 pub const _1: Self = Self::new(1);
16193 }
16194}
16195#[doc(hidden)]
16196#[derive(Copy, Clone, Eq, PartialEq)]
16197pub struct P411PfsHa_SPEC;
16198impl crate::sealed::RegSpec for P411PfsHa_SPEC {
16199 type DataType = u16;
16200}
16201
16202#[doc = "Port 411 Pin Function Select Register"]
16203pub type P411PfsHa = crate::RegValueT<P411PfsHa_SPEC>;
16204
16205impl P411PfsHa {
16206 #[doc = "Port Output Data"]
16207 #[inline(always)]
16208 pub fn podr(
16209 self,
16210 ) -> crate::common::RegisterField<
16211 0,
16212 0x1,
16213 1,
16214 0,
16215 p411pfs_ha::Podr,
16216 p411pfs_ha::Podr,
16217 P411PfsHa_SPEC,
16218 crate::common::RW,
16219 > {
16220 crate::common::RegisterField::<
16221 0,
16222 0x1,
16223 1,
16224 0,
16225 p411pfs_ha::Podr,
16226 p411pfs_ha::Podr,
16227 P411PfsHa_SPEC,
16228 crate::common::RW,
16229 >::from_register(self, 0)
16230 }
16231
16232 #[doc = "Port State"]
16233 #[inline(always)]
16234 pub fn pidr(
16235 self,
16236 ) -> crate::common::RegisterField<
16237 1,
16238 0x1,
16239 1,
16240 0,
16241 p411pfs_ha::Pidr,
16242 p411pfs_ha::Pidr,
16243 P411PfsHa_SPEC,
16244 crate::common::R,
16245 > {
16246 crate::common::RegisterField::<
16247 1,
16248 0x1,
16249 1,
16250 0,
16251 p411pfs_ha::Pidr,
16252 p411pfs_ha::Pidr,
16253 P411PfsHa_SPEC,
16254 crate::common::R,
16255 >::from_register(self, 0)
16256 }
16257
16258 #[doc = "Port Direction"]
16259 #[inline(always)]
16260 pub fn pdr(
16261 self,
16262 ) -> crate::common::RegisterField<
16263 2,
16264 0x1,
16265 1,
16266 0,
16267 p411pfs_ha::Pdr,
16268 p411pfs_ha::Pdr,
16269 P411PfsHa_SPEC,
16270 crate::common::RW,
16271 > {
16272 crate::common::RegisterField::<
16273 2,
16274 0x1,
16275 1,
16276 0,
16277 p411pfs_ha::Pdr,
16278 p411pfs_ha::Pdr,
16279 P411PfsHa_SPEC,
16280 crate::common::RW,
16281 >::from_register(self, 0)
16282 }
16283
16284 #[doc = "Pull-up Control"]
16285 #[inline(always)]
16286 pub fn pcr(
16287 self,
16288 ) -> crate::common::RegisterField<
16289 4,
16290 0x1,
16291 1,
16292 0,
16293 p411pfs_ha::Pcr,
16294 p411pfs_ha::Pcr,
16295 P411PfsHa_SPEC,
16296 crate::common::RW,
16297 > {
16298 crate::common::RegisterField::<
16299 4,
16300 0x1,
16301 1,
16302 0,
16303 p411pfs_ha::Pcr,
16304 p411pfs_ha::Pcr,
16305 P411PfsHa_SPEC,
16306 crate::common::RW,
16307 >::from_register(self, 0)
16308 }
16309
16310 #[doc = "N-Channel Open-Drain Control"]
16311 #[inline(always)]
16312 pub fn ncodr(
16313 self,
16314 ) -> crate::common::RegisterField<
16315 6,
16316 0x1,
16317 1,
16318 0,
16319 p411pfs_ha::Ncodr,
16320 p411pfs_ha::Ncodr,
16321 P411PfsHa_SPEC,
16322 crate::common::RW,
16323 > {
16324 crate::common::RegisterField::<
16325 6,
16326 0x1,
16327 1,
16328 0,
16329 p411pfs_ha::Ncodr,
16330 p411pfs_ha::Ncodr,
16331 P411PfsHa_SPEC,
16332 crate::common::RW,
16333 >::from_register(self, 0)
16334 }
16335
16336 #[doc = "IRQ Input Enable"]
16337 #[inline(always)]
16338 pub fn isel(
16339 self,
16340 ) -> crate::common::RegisterField<
16341 14,
16342 0x1,
16343 1,
16344 0,
16345 p411pfs_ha::Isel,
16346 p411pfs_ha::Isel,
16347 P411PfsHa_SPEC,
16348 crate::common::RW,
16349 > {
16350 crate::common::RegisterField::<
16351 14,
16352 0x1,
16353 1,
16354 0,
16355 p411pfs_ha::Isel,
16356 p411pfs_ha::Isel,
16357 P411PfsHa_SPEC,
16358 crate::common::RW,
16359 >::from_register(self, 0)
16360 }
16361
16362 #[doc = "Analog Input Enable"]
16363 #[inline(always)]
16364 pub fn asel(
16365 self,
16366 ) -> crate::common::RegisterField<
16367 15,
16368 0x1,
16369 1,
16370 0,
16371 p411pfs_ha::Asel,
16372 p411pfs_ha::Asel,
16373 P411PfsHa_SPEC,
16374 crate::common::RW,
16375 > {
16376 crate::common::RegisterField::<
16377 15,
16378 0x1,
16379 1,
16380 0,
16381 p411pfs_ha::Asel,
16382 p411pfs_ha::Asel,
16383 P411PfsHa_SPEC,
16384 crate::common::RW,
16385 >::from_register(self, 0)
16386 }
16387}
16388impl ::core::default::Default for P411PfsHa {
16389 #[inline(always)]
16390 fn default() -> P411PfsHa {
16391 <crate::RegValueT<P411PfsHa_SPEC> as RegisterValue<_>>::new(0)
16392 }
16393}
16394pub mod p411pfs_ha {
16395
16396 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16397 pub struct Podr_SPEC;
16398 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
16399 impl Podr {
16400 #[doc = "Output low"]
16401 pub const _0: Self = Self::new(0);
16402
16403 #[doc = "Output high"]
16404 pub const _1: Self = Self::new(1);
16405 }
16406 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16407 pub struct Pidr_SPEC;
16408 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
16409 impl Pidr {
16410 #[doc = "Low level"]
16411 pub const _0: Self = Self::new(0);
16412
16413 #[doc = "High level"]
16414 pub const _1: Self = Self::new(1);
16415 }
16416 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16417 pub struct Pdr_SPEC;
16418 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
16419 impl Pdr {
16420 #[doc = "Input (functions as an input pin)"]
16421 pub const _0: Self = Self::new(0);
16422
16423 #[doc = "Output (functions as an output pin)"]
16424 pub const _1: Self = Self::new(1);
16425 }
16426 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16427 pub struct Pcr_SPEC;
16428 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
16429 impl Pcr {
16430 #[doc = "Disable input pull-up"]
16431 pub const _0: Self = Self::new(0);
16432
16433 #[doc = "Enable input pull-up"]
16434 pub const _1: Self = Self::new(1);
16435 }
16436 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16437 pub struct Ncodr_SPEC;
16438 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
16439 impl Ncodr {
16440 #[doc = "Output CMOS"]
16441 pub const _0: Self = Self::new(0);
16442
16443 #[doc = "Output NMOS open-drain"]
16444 pub const _1: Self = Self::new(1);
16445 }
16446 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16447 pub struct Isel_SPEC;
16448 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
16449 impl Isel {
16450 #[doc = "Do not use as IRQn input pin"]
16451 pub const _0: Self = Self::new(0);
16452
16453 #[doc = "Use as IRQn input pin"]
16454 pub const _1: Self = Self::new(1);
16455 }
16456 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16457 pub struct Asel_SPEC;
16458 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
16459 impl Asel {
16460 #[doc = "Do not use as analog pin"]
16461 pub const _0: Self = Self::new(0);
16462
16463 #[doc = "Use as analog pin"]
16464 pub const _1: Self = Self::new(1);
16465 }
16466}
16467#[doc(hidden)]
16468#[derive(Copy, Clone, Eq, PartialEq)]
16469pub struct P411PfsBy_SPEC;
16470impl crate::sealed::RegSpec for P411PfsBy_SPEC {
16471 type DataType = u8;
16472}
16473
16474#[doc = "Port 411 Pin Function Select Register"]
16475pub type P411PfsBy = crate::RegValueT<P411PfsBy_SPEC>;
16476
16477impl P411PfsBy {
16478 #[doc = "Port Output Data"]
16479 #[inline(always)]
16480 pub fn podr(
16481 self,
16482 ) -> crate::common::RegisterField<
16483 0,
16484 0x1,
16485 1,
16486 0,
16487 p411pfs_by::Podr,
16488 p411pfs_by::Podr,
16489 P411PfsBy_SPEC,
16490 crate::common::RW,
16491 > {
16492 crate::common::RegisterField::<
16493 0,
16494 0x1,
16495 1,
16496 0,
16497 p411pfs_by::Podr,
16498 p411pfs_by::Podr,
16499 P411PfsBy_SPEC,
16500 crate::common::RW,
16501 >::from_register(self, 0)
16502 }
16503
16504 #[doc = "Port State"]
16505 #[inline(always)]
16506 pub fn pidr(
16507 self,
16508 ) -> crate::common::RegisterField<
16509 1,
16510 0x1,
16511 1,
16512 0,
16513 p411pfs_by::Pidr,
16514 p411pfs_by::Pidr,
16515 P411PfsBy_SPEC,
16516 crate::common::R,
16517 > {
16518 crate::common::RegisterField::<
16519 1,
16520 0x1,
16521 1,
16522 0,
16523 p411pfs_by::Pidr,
16524 p411pfs_by::Pidr,
16525 P411PfsBy_SPEC,
16526 crate::common::R,
16527 >::from_register(self, 0)
16528 }
16529
16530 #[doc = "Port Direction"]
16531 #[inline(always)]
16532 pub fn pdr(
16533 self,
16534 ) -> crate::common::RegisterField<
16535 2,
16536 0x1,
16537 1,
16538 0,
16539 p411pfs_by::Pdr,
16540 p411pfs_by::Pdr,
16541 P411PfsBy_SPEC,
16542 crate::common::RW,
16543 > {
16544 crate::common::RegisterField::<
16545 2,
16546 0x1,
16547 1,
16548 0,
16549 p411pfs_by::Pdr,
16550 p411pfs_by::Pdr,
16551 P411PfsBy_SPEC,
16552 crate::common::RW,
16553 >::from_register(self, 0)
16554 }
16555
16556 #[doc = "Pull-up Control"]
16557 #[inline(always)]
16558 pub fn pcr(
16559 self,
16560 ) -> crate::common::RegisterField<
16561 4,
16562 0x1,
16563 1,
16564 0,
16565 p411pfs_by::Pcr,
16566 p411pfs_by::Pcr,
16567 P411PfsBy_SPEC,
16568 crate::common::RW,
16569 > {
16570 crate::common::RegisterField::<
16571 4,
16572 0x1,
16573 1,
16574 0,
16575 p411pfs_by::Pcr,
16576 p411pfs_by::Pcr,
16577 P411PfsBy_SPEC,
16578 crate::common::RW,
16579 >::from_register(self, 0)
16580 }
16581
16582 #[doc = "N-Channel Open-Drain Control"]
16583 #[inline(always)]
16584 pub fn ncodr(
16585 self,
16586 ) -> crate::common::RegisterField<
16587 6,
16588 0x1,
16589 1,
16590 0,
16591 p411pfs_by::Ncodr,
16592 p411pfs_by::Ncodr,
16593 P411PfsBy_SPEC,
16594 crate::common::RW,
16595 > {
16596 crate::common::RegisterField::<
16597 6,
16598 0x1,
16599 1,
16600 0,
16601 p411pfs_by::Ncodr,
16602 p411pfs_by::Ncodr,
16603 P411PfsBy_SPEC,
16604 crate::common::RW,
16605 >::from_register(self, 0)
16606 }
16607}
16608impl ::core::default::Default for P411PfsBy {
16609 #[inline(always)]
16610 fn default() -> P411PfsBy {
16611 <crate::RegValueT<P411PfsBy_SPEC> as RegisterValue<_>>::new(0)
16612 }
16613}
16614pub mod p411pfs_by {
16615
16616 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16617 pub struct Podr_SPEC;
16618 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
16619 impl Podr {
16620 #[doc = "Output low"]
16621 pub const _0: Self = Self::new(0);
16622
16623 #[doc = "Output high"]
16624 pub const _1: Self = Self::new(1);
16625 }
16626 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16627 pub struct Pidr_SPEC;
16628 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
16629 impl Pidr {
16630 #[doc = "Low level"]
16631 pub const _0: Self = Self::new(0);
16632
16633 #[doc = "High level"]
16634 pub const _1: Self = Self::new(1);
16635 }
16636 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16637 pub struct Pdr_SPEC;
16638 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
16639 impl Pdr {
16640 #[doc = "Input (functions as an input pin)"]
16641 pub const _0: Self = Self::new(0);
16642
16643 #[doc = "Output (functions as an output pin)"]
16644 pub const _1: Self = Self::new(1);
16645 }
16646 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16647 pub struct Pcr_SPEC;
16648 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
16649 impl Pcr {
16650 #[doc = "Disable input pull-up"]
16651 pub const _0: Self = Self::new(0);
16652
16653 #[doc = "Enable input pull-up"]
16654 pub const _1: Self = Self::new(1);
16655 }
16656 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16657 pub struct Ncodr_SPEC;
16658 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
16659 impl Ncodr {
16660 #[doc = "Output CMOS"]
16661 pub const _0: Self = Self::new(0);
16662
16663 #[doc = "Output NMOS open-drain"]
16664 pub const _1: Self = Self::new(1);
16665 }
16666}
16667#[doc(hidden)]
16668#[derive(Copy, Clone, Eq, PartialEq)]
16669pub struct P500Pfs_SPEC;
16670impl crate::sealed::RegSpec for P500Pfs_SPEC {
16671 type DataType = u32;
16672}
16673
16674#[doc = "Port 500 Pin Function Select Register"]
16675pub type P500Pfs = crate::RegValueT<P500Pfs_SPEC>;
16676
16677impl P500Pfs {
16678 #[doc = "Port Output Data"]
16679 #[inline(always)]
16680 pub fn podr(
16681 self,
16682 ) -> crate::common::RegisterField<
16683 0,
16684 0x1,
16685 1,
16686 0,
16687 p500pfs::Podr,
16688 p500pfs::Podr,
16689 P500Pfs_SPEC,
16690 crate::common::RW,
16691 > {
16692 crate::common::RegisterField::<
16693 0,
16694 0x1,
16695 1,
16696 0,
16697 p500pfs::Podr,
16698 p500pfs::Podr,
16699 P500Pfs_SPEC,
16700 crate::common::RW,
16701 >::from_register(self, 0)
16702 }
16703
16704 #[doc = "Port State"]
16705 #[inline(always)]
16706 pub fn pidr(
16707 self,
16708 ) -> crate::common::RegisterField<
16709 1,
16710 0x1,
16711 1,
16712 0,
16713 p500pfs::Pidr,
16714 p500pfs::Pidr,
16715 P500Pfs_SPEC,
16716 crate::common::R,
16717 > {
16718 crate::common::RegisterField::<
16719 1,
16720 0x1,
16721 1,
16722 0,
16723 p500pfs::Pidr,
16724 p500pfs::Pidr,
16725 P500Pfs_SPEC,
16726 crate::common::R,
16727 >::from_register(self, 0)
16728 }
16729
16730 #[doc = "Port Direction"]
16731 #[inline(always)]
16732 pub fn pdr(
16733 self,
16734 ) -> crate::common::RegisterField<
16735 2,
16736 0x1,
16737 1,
16738 0,
16739 p500pfs::Pdr,
16740 p500pfs::Pdr,
16741 P500Pfs_SPEC,
16742 crate::common::RW,
16743 > {
16744 crate::common::RegisterField::<
16745 2,
16746 0x1,
16747 1,
16748 0,
16749 p500pfs::Pdr,
16750 p500pfs::Pdr,
16751 P500Pfs_SPEC,
16752 crate::common::RW,
16753 >::from_register(self, 0)
16754 }
16755
16756 #[doc = "Pull-up Control"]
16757 #[inline(always)]
16758 pub fn pcr(
16759 self,
16760 ) -> crate::common::RegisterField<
16761 4,
16762 0x1,
16763 1,
16764 0,
16765 p500pfs::Pcr,
16766 p500pfs::Pcr,
16767 P500Pfs_SPEC,
16768 crate::common::RW,
16769 > {
16770 crate::common::RegisterField::<
16771 4,
16772 0x1,
16773 1,
16774 0,
16775 p500pfs::Pcr,
16776 p500pfs::Pcr,
16777 P500Pfs_SPEC,
16778 crate::common::RW,
16779 >::from_register(self, 0)
16780 }
16781
16782 #[doc = "N-Channel Open-Drain Control"]
16783 #[inline(always)]
16784 pub fn ncodr(
16785 self,
16786 ) -> crate::common::RegisterField<
16787 6,
16788 0x1,
16789 1,
16790 0,
16791 p500pfs::Ncodr,
16792 p500pfs::Ncodr,
16793 P500Pfs_SPEC,
16794 crate::common::RW,
16795 > {
16796 crate::common::RegisterField::<
16797 6,
16798 0x1,
16799 1,
16800 0,
16801 p500pfs::Ncodr,
16802 p500pfs::Ncodr,
16803 P500Pfs_SPEC,
16804 crate::common::RW,
16805 >::from_register(self, 0)
16806 }
16807
16808 #[doc = "IRQ Input Enable"]
16809 #[inline(always)]
16810 pub fn isel(
16811 self,
16812 ) -> crate::common::RegisterField<
16813 14,
16814 0x1,
16815 1,
16816 0,
16817 p500pfs::Isel,
16818 p500pfs::Isel,
16819 P500Pfs_SPEC,
16820 crate::common::RW,
16821 > {
16822 crate::common::RegisterField::<
16823 14,
16824 0x1,
16825 1,
16826 0,
16827 p500pfs::Isel,
16828 p500pfs::Isel,
16829 P500Pfs_SPEC,
16830 crate::common::RW,
16831 >::from_register(self, 0)
16832 }
16833
16834 #[doc = "Analog Input Enable"]
16835 #[inline(always)]
16836 pub fn asel(
16837 self,
16838 ) -> crate::common::RegisterField<
16839 15,
16840 0x1,
16841 1,
16842 0,
16843 p500pfs::Asel,
16844 p500pfs::Asel,
16845 P500Pfs_SPEC,
16846 crate::common::RW,
16847 > {
16848 crate::common::RegisterField::<
16849 15,
16850 0x1,
16851 1,
16852 0,
16853 p500pfs::Asel,
16854 p500pfs::Asel,
16855 P500Pfs_SPEC,
16856 crate::common::RW,
16857 >::from_register(self, 0)
16858 }
16859
16860 #[doc = "Port Mode Control"]
16861 #[inline(always)]
16862 pub fn pmr(
16863 self,
16864 ) -> crate::common::RegisterField<
16865 16,
16866 0x1,
16867 1,
16868 0,
16869 p500pfs::Pmr,
16870 p500pfs::Pmr,
16871 P500Pfs_SPEC,
16872 crate::common::RW,
16873 > {
16874 crate::common::RegisterField::<
16875 16,
16876 0x1,
16877 1,
16878 0,
16879 p500pfs::Pmr,
16880 p500pfs::Pmr,
16881 P500Pfs_SPEC,
16882 crate::common::RW,
16883 >::from_register(self, 0)
16884 }
16885
16886 #[doc = "Peripheral Select"]
16887 #[inline(always)]
16888 pub fn psel(
16889 self,
16890 ) -> crate::common::RegisterField<24, 0x1f, 1, 0, u8, u8, P500Pfs_SPEC, crate::common::RW> {
16891 crate::common::RegisterField::<24,0x1f,1,0,u8,u8,P500Pfs_SPEC,crate::common::RW>::from_register(self,0)
16892 }
16893}
16894impl ::core::default::Default for P500Pfs {
16895 #[inline(always)]
16896 fn default() -> P500Pfs {
16897 <crate::RegValueT<P500Pfs_SPEC> as RegisterValue<_>>::new(0)
16898 }
16899}
16900pub mod p500pfs {
16901
16902 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16903 pub struct Podr_SPEC;
16904 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
16905 impl Podr {
16906 #[doc = "Output low"]
16907 pub const _0: Self = Self::new(0);
16908
16909 #[doc = "Output high"]
16910 pub const _1: Self = Self::new(1);
16911 }
16912 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16913 pub struct Pidr_SPEC;
16914 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
16915 impl Pidr {
16916 #[doc = "Low level"]
16917 pub const _0: Self = Self::new(0);
16918
16919 #[doc = "High level"]
16920 pub const _1: Self = Self::new(1);
16921 }
16922 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16923 pub struct Pdr_SPEC;
16924 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
16925 impl Pdr {
16926 #[doc = "Input (functions as an input pin)"]
16927 pub const _0: Self = Self::new(0);
16928
16929 #[doc = "Output (functions as an output pin)"]
16930 pub const _1: Self = Self::new(1);
16931 }
16932 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16933 pub struct Pcr_SPEC;
16934 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
16935 impl Pcr {
16936 #[doc = "Disable input pull-up"]
16937 pub const _0: Self = Self::new(0);
16938
16939 #[doc = "Enable input pull-up"]
16940 pub const _1: Self = Self::new(1);
16941 }
16942 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16943 pub struct Ncodr_SPEC;
16944 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
16945 impl Ncodr {
16946 #[doc = "Output CMOS"]
16947 pub const _0: Self = Self::new(0);
16948
16949 #[doc = "Output NMOS open-drain"]
16950 pub const _1: Self = Self::new(1);
16951 }
16952 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16953 pub struct Isel_SPEC;
16954 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
16955 impl Isel {
16956 #[doc = "Do not use as IRQn input pin"]
16957 pub const _0: Self = Self::new(0);
16958
16959 #[doc = "Use as IRQn input pin"]
16960 pub const _1: Self = Self::new(1);
16961 }
16962 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16963 pub struct Asel_SPEC;
16964 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
16965 impl Asel {
16966 #[doc = "Do not use as analog pin"]
16967 pub const _0: Self = Self::new(0);
16968
16969 #[doc = "Use as analog pin"]
16970 pub const _1: Self = Self::new(1);
16971 }
16972 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
16973 pub struct Pmr_SPEC;
16974 pub type Pmr = crate::EnumBitfieldStruct<u8, Pmr_SPEC>;
16975 impl Pmr {
16976 #[doc = "Use as general I/O pin"]
16977 pub const _0: Self = Self::new(0);
16978
16979 #[doc = "Use as I/O port for peripheral functions"]
16980 pub const _1: Self = Self::new(1);
16981 }
16982}
16983#[doc(hidden)]
16984#[derive(Copy, Clone, Eq, PartialEq)]
16985pub struct P500PfsHa_SPEC;
16986impl crate::sealed::RegSpec for P500PfsHa_SPEC {
16987 type DataType = u16;
16988}
16989
16990#[doc = "Port 500 Pin Function Select Register"]
16991pub type P500PfsHa = crate::RegValueT<P500PfsHa_SPEC>;
16992
16993impl P500PfsHa {
16994 #[doc = "Port Output Data"]
16995 #[inline(always)]
16996 pub fn podr(
16997 self,
16998 ) -> crate::common::RegisterField<
16999 0,
17000 0x1,
17001 1,
17002 0,
17003 p500pfs_ha::Podr,
17004 p500pfs_ha::Podr,
17005 P500PfsHa_SPEC,
17006 crate::common::RW,
17007 > {
17008 crate::common::RegisterField::<
17009 0,
17010 0x1,
17011 1,
17012 0,
17013 p500pfs_ha::Podr,
17014 p500pfs_ha::Podr,
17015 P500PfsHa_SPEC,
17016 crate::common::RW,
17017 >::from_register(self, 0)
17018 }
17019
17020 #[doc = "Port State"]
17021 #[inline(always)]
17022 pub fn pidr(
17023 self,
17024 ) -> crate::common::RegisterField<
17025 1,
17026 0x1,
17027 1,
17028 0,
17029 p500pfs_ha::Pidr,
17030 p500pfs_ha::Pidr,
17031 P500PfsHa_SPEC,
17032 crate::common::R,
17033 > {
17034 crate::common::RegisterField::<
17035 1,
17036 0x1,
17037 1,
17038 0,
17039 p500pfs_ha::Pidr,
17040 p500pfs_ha::Pidr,
17041 P500PfsHa_SPEC,
17042 crate::common::R,
17043 >::from_register(self, 0)
17044 }
17045
17046 #[doc = "Port Direction"]
17047 #[inline(always)]
17048 pub fn pdr(
17049 self,
17050 ) -> crate::common::RegisterField<
17051 2,
17052 0x1,
17053 1,
17054 0,
17055 p500pfs_ha::Pdr,
17056 p500pfs_ha::Pdr,
17057 P500PfsHa_SPEC,
17058 crate::common::RW,
17059 > {
17060 crate::common::RegisterField::<
17061 2,
17062 0x1,
17063 1,
17064 0,
17065 p500pfs_ha::Pdr,
17066 p500pfs_ha::Pdr,
17067 P500PfsHa_SPEC,
17068 crate::common::RW,
17069 >::from_register(self, 0)
17070 }
17071
17072 #[doc = "Pull-up Control"]
17073 #[inline(always)]
17074 pub fn pcr(
17075 self,
17076 ) -> crate::common::RegisterField<
17077 4,
17078 0x1,
17079 1,
17080 0,
17081 p500pfs_ha::Pcr,
17082 p500pfs_ha::Pcr,
17083 P500PfsHa_SPEC,
17084 crate::common::RW,
17085 > {
17086 crate::common::RegisterField::<
17087 4,
17088 0x1,
17089 1,
17090 0,
17091 p500pfs_ha::Pcr,
17092 p500pfs_ha::Pcr,
17093 P500PfsHa_SPEC,
17094 crate::common::RW,
17095 >::from_register(self, 0)
17096 }
17097
17098 #[doc = "N-Channel Open-Drain Control"]
17099 #[inline(always)]
17100 pub fn ncodr(
17101 self,
17102 ) -> crate::common::RegisterField<
17103 6,
17104 0x1,
17105 1,
17106 0,
17107 p500pfs_ha::Ncodr,
17108 p500pfs_ha::Ncodr,
17109 P500PfsHa_SPEC,
17110 crate::common::RW,
17111 > {
17112 crate::common::RegisterField::<
17113 6,
17114 0x1,
17115 1,
17116 0,
17117 p500pfs_ha::Ncodr,
17118 p500pfs_ha::Ncodr,
17119 P500PfsHa_SPEC,
17120 crate::common::RW,
17121 >::from_register(self, 0)
17122 }
17123
17124 #[doc = "IRQ Input Enable"]
17125 #[inline(always)]
17126 pub fn isel(
17127 self,
17128 ) -> crate::common::RegisterField<
17129 14,
17130 0x1,
17131 1,
17132 0,
17133 p500pfs_ha::Isel,
17134 p500pfs_ha::Isel,
17135 P500PfsHa_SPEC,
17136 crate::common::RW,
17137 > {
17138 crate::common::RegisterField::<
17139 14,
17140 0x1,
17141 1,
17142 0,
17143 p500pfs_ha::Isel,
17144 p500pfs_ha::Isel,
17145 P500PfsHa_SPEC,
17146 crate::common::RW,
17147 >::from_register(self, 0)
17148 }
17149
17150 #[doc = "Analog Input Enable"]
17151 #[inline(always)]
17152 pub fn asel(
17153 self,
17154 ) -> crate::common::RegisterField<
17155 15,
17156 0x1,
17157 1,
17158 0,
17159 p500pfs_ha::Asel,
17160 p500pfs_ha::Asel,
17161 P500PfsHa_SPEC,
17162 crate::common::RW,
17163 > {
17164 crate::common::RegisterField::<
17165 15,
17166 0x1,
17167 1,
17168 0,
17169 p500pfs_ha::Asel,
17170 p500pfs_ha::Asel,
17171 P500PfsHa_SPEC,
17172 crate::common::RW,
17173 >::from_register(self, 0)
17174 }
17175}
17176impl ::core::default::Default for P500PfsHa {
17177 #[inline(always)]
17178 fn default() -> P500PfsHa {
17179 <crate::RegValueT<P500PfsHa_SPEC> as RegisterValue<_>>::new(0)
17180 }
17181}
17182pub mod p500pfs_ha {
17183
17184 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17185 pub struct Podr_SPEC;
17186 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
17187 impl Podr {
17188 #[doc = "Output low"]
17189 pub const _0: Self = Self::new(0);
17190
17191 #[doc = "Output high"]
17192 pub const _1: Self = Self::new(1);
17193 }
17194 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17195 pub struct Pidr_SPEC;
17196 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
17197 impl Pidr {
17198 #[doc = "Low level"]
17199 pub const _0: Self = Self::new(0);
17200
17201 #[doc = "High level"]
17202 pub const _1: Self = Self::new(1);
17203 }
17204 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17205 pub struct Pdr_SPEC;
17206 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
17207 impl Pdr {
17208 #[doc = "Input (functions as an input pin)"]
17209 pub const _0: Self = Self::new(0);
17210
17211 #[doc = "Output (functions as an output pin)"]
17212 pub const _1: Self = Self::new(1);
17213 }
17214 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17215 pub struct Pcr_SPEC;
17216 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
17217 impl Pcr {
17218 #[doc = "Disable input pull-up"]
17219 pub const _0: Self = Self::new(0);
17220
17221 #[doc = "Enable input pull-up"]
17222 pub const _1: Self = Self::new(1);
17223 }
17224 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17225 pub struct Ncodr_SPEC;
17226 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
17227 impl Ncodr {
17228 #[doc = "Output CMOS"]
17229 pub const _0: Self = Self::new(0);
17230
17231 #[doc = "Output NMOS open-drain"]
17232 pub const _1: Self = Self::new(1);
17233 }
17234 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17235 pub struct Isel_SPEC;
17236 pub type Isel = crate::EnumBitfieldStruct<u8, Isel_SPEC>;
17237 impl Isel {
17238 #[doc = "Do not use as IRQn input pin"]
17239 pub const _0: Self = Self::new(0);
17240
17241 #[doc = "Use as IRQn input pin"]
17242 pub const _1: Self = Self::new(1);
17243 }
17244 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17245 pub struct Asel_SPEC;
17246 pub type Asel = crate::EnumBitfieldStruct<u8, Asel_SPEC>;
17247 impl Asel {
17248 #[doc = "Do not use as analog pin"]
17249 pub const _0: Self = Self::new(0);
17250
17251 #[doc = "Use as analog pin"]
17252 pub const _1: Self = Self::new(1);
17253 }
17254}
17255#[doc(hidden)]
17256#[derive(Copy, Clone, Eq, PartialEq)]
17257pub struct P500PfsBy_SPEC;
17258impl crate::sealed::RegSpec for P500PfsBy_SPEC {
17259 type DataType = u8;
17260}
17261
17262#[doc = "Port 500 Pin Function Select Register"]
17263pub type P500PfsBy = crate::RegValueT<P500PfsBy_SPEC>;
17264
17265impl P500PfsBy {
17266 #[doc = "Port Output Data"]
17267 #[inline(always)]
17268 pub fn podr(
17269 self,
17270 ) -> crate::common::RegisterField<
17271 0,
17272 0x1,
17273 1,
17274 0,
17275 p500pfs_by::Podr,
17276 p500pfs_by::Podr,
17277 P500PfsBy_SPEC,
17278 crate::common::RW,
17279 > {
17280 crate::common::RegisterField::<
17281 0,
17282 0x1,
17283 1,
17284 0,
17285 p500pfs_by::Podr,
17286 p500pfs_by::Podr,
17287 P500PfsBy_SPEC,
17288 crate::common::RW,
17289 >::from_register(self, 0)
17290 }
17291
17292 #[doc = "Port State"]
17293 #[inline(always)]
17294 pub fn pidr(
17295 self,
17296 ) -> crate::common::RegisterField<
17297 1,
17298 0x1,
17299 1,
17300 0,
17301 p500pfs_by::Pidr,
17302 p500pfs_by::Pidr,
17303 P500PfsBy_SPEC,
17304 crate::common::R,
17305 > {
17306 crate::common::RegisterField::<
17307 1,
17308 0x1,
17309 1,
17310 0,
17311 p500pfs_by::Pidr,
17312 p500pfs_by::Pidr,
17313 P500PfsBy_SPEC,
17314 crate::common::R,
17315 >::from_register(self, 0)
17316 }
17317
17318 #[doc = "Port Direction"]
17319 #[inline(always)]
17320 pub fn pdr(
17321 self,
17322 ) -> crate::common::RegisterField<
17323 2,
17324 0x1,
17325 1,
17326 0,
17327 p500pfs_by::Pdr,
17328 p500pfs_by::Pdr,
17329 P500PfsBy_SPEC,
17330 crate::common::RW,
17331 > {
17332 crate::common::RegisterField::<
17333 2,
17334 0x1,
17335 1,
17336 0,
17337 p500pfs_by::Pdr,
17338 p500pfs_by::Pdr,
17339 P500PfsBy_SPEC,
17340 crate::common::RW,
17341 >::from_register(self, 0)
17342 }
17343
17344 #[doc = "Pull-up Control"]
17345 #[inline(always)]
17346 pub fn pcr(
17347 self,
17348 ) -> crate::common::RegisterField<
17349 4,
17350 0x1,
17351 1,
17352 0,
17353 p500pfs_by::Pcr,
17354 p500pfs_by::Pcr,
17355 P500PfsBy_SPEC,
17356 crate::common::RW,
17357 > {
17358 crate::common::RegisterField::<
17359 4,
17360 0x1,
17361 1,
17362 0,
17363 p500pfs_by::Pcr,
17364 p500pfs_by::Pcr,
17365 P500PfsBy_SPEC,
17366 crate::common::RW,
17367 >::from_register(self, 0)
17368 }
17369
17370 #[doc = "N-Channel Open-Drain Control"]
17371 #[inline(always)]
17372 pub fn ncodr(
17373 self,
17374 ) -> crate::common::RegisterField<
17375 6,
17376 0x1,
17377 1,
17378 0,
17379 p500pfs_by::Ncodr,
17380 p500pfs_by::Ncodr,
17381 P500PfsBy_SPEC,
17382 crate::common::RW,
17383 > {
17384 crate::common::RegisterField::<
17385 6,
17386 0x1,
17387 1,
17388 0,
17389 p500pfs_by::Ncodr,
17390 p500pfs_by::Ncodr,
17391 P500PfsBy_SPEC,
17392 crate::common::RW,
17393 >::from_register(self, 0)
17394 }
17395}
17396impl ::core::default::Default for P500PfsBy {
17397 #[inline(always)]
17398 fn default() -> P500PfsBy {
17399 <crate::RegValueT<P500PfsBy_SPEC> as RegisterValue<_>>::new(0)
17400 }
17401}
17402pub mod p500pfs_by {
17403
17404 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17405 pub struct Podr_SPEC;
17406 pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
17407 impl Podr {
17408 #[doc = "Output low"]
17409 pub const _0: Self = Self::new(0);
17410
17411 #[doc = "Output high"]
17412 pub const _1: Self = Self::new(1);
17413 }
17414 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17415 pub struct Pidr_SPEC;
17416 pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
17417 impl Pidr {
17418 #[doc = "Low level"]
17419 pub const _0: Self = Self::new(0);
17420
17421 #[doc = "High level"]
17422 pub const _1: Self = Self::new(1);
17423 }
17424 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17425 pub struct Pdr_SPEC;
17426 pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
17427 impl Pdr {
17428 #[doc = "Input (functions as an input pin)"]
17429 pub const _0: Self = Self::new(0);
17430
17431 #[doc = "Output (functions as an output pin)"]
17432 pub const _1: Self = Self::new(1);
17433 }
17434 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17435 pub struct Pcr_SPEC;
17436 pub type Pcr = crate::EnumBitfieldStruct<u8, Pcr_SPEC>;
17437 impl Pcr {
17438 #[doc = "Disable input pull-up"]
17439 pub const _0: Self = Self::new(0);
17440
17441 #[doc = "Enable input pull-up"]
17442 pub const _1: Self = Self::new(1);
17443 }
17444 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17445 pub struct Ncodr_SPEC;
17446 pub type Ncodr = crate::EnumBitfieldStruct<u8, Ncodr_SPEC>;
17447 impl Ncodr {
17448 #[doc = "Output CMOS"]
17449 pub const _0: Self = Self::new(0);
17450
17451 #[doc = "Output NMOS open-drain"]
17452 pub const _1: Self = Self::new(1);
17453 }
17454}
17455#[doc(hidden)]
17456#[derive(Copy, Clone, Eq, PartialEq)]
17457pub struct Pwpr_SPEC;
17458impl crate::sealed::RegSpec for Pwpr_SPEC {
17459 type DataType = u8;
17460}
17461
17462#[doc = "Write-Protect Register"]
17463pub type Pwpr = crate::RegValueT<Pwpr_SPEC>;
17464
17465impl Pwpr {
17466 #[doc = "PmnPFS Register Write Enable"]
17467 #[inline(always)]
17468 pub fn pfswe(
17469 self,
17470 ) -> crate::common::RegisterField<
17471 6,
17472 0x1,
17473 1,
17474 0,
17475 pwpr::Pfswe,
17476 pwpr::Pfswe,
17477 Pwpr_SPEC,
17478 crate::common::RW,
17479 > {
17480 crate::common::RegisterField::<
17481 6,
17482 0x1,
17483 1,
17484 0,
17485 pwpr::Pfswe,
17486 pwpr::Pfswe,
17487 Pwpr_SPEC,
17488 crate::common::RW,
17489 >::from_register(self, 0)
17490 }
17491
17492 #[doc = "PFSWE Bit Write Disable"]
17493 #[inline(always)]
17494 pub fn b0wi(
17495 self,
17496 ) -> crate::common::RegisterField<
17497 7,
17498 0x1,
17499 1,
17500 0,
17501 pwpr::B0Wi,
17502 pwpr::B0Wi,
17503 Pwpr_SPEC,
17504 crate::common::RW,
17505 > {
17506 crate::common::RegisterField::<
17507 7,
17508 0x1,
17509 1,
17510 0,
17511 pwpr::B0Wi,
17512 pwpr::B0Wi,
17513 Pwpr_SPEC,
17514 crate::common::RW,
17515 >::from_register(self, 0)
17516 }
17517}
17518impl ::core::default::Default for Pwpr {
17519 #[inline(always)]
17520 fn default() -> Pwpr {
17521 <crate::RegValueT<Pwpr_SPEC> as RegisterValue<_>>::new(128)
17522 }
17523}
17524pub mod pwpr {
17525
17526 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17527 pub struct Pfswe_SPEC;
17528 pub type Pfswe = crate::EnumBitfieldStruct<u8, Pfswe_SPEC>;
17529 impl Pfswe {
17530 #[doc = "Writing to the PmnPFS register is disabled"]
17531 pub const _0: Self = Self::new(0);
17532
17533 #[doc = "Writing to the PmnPFS register is enabled"]
17534 pub const _1: Self = Self::new(1);
17535 }
17536 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17537 pub struct B0Wi_SPEC;
17538 pub type B0Wi = crate::EnumBitfieldStruct<u8, B0Wi_SPEC>;
17539 impl B0Wi {
17540 #[doc = "Writing to the PFSWE bit is enabled"]
17541 pub const _0: Self = Self::new(0);
17542
17543 #[doc = "Writing to the PFSWE bit is disabled"]
17544 pub const _1: Self = Self::new(1);
17545 }
17546}
17547#[doc(hidden)]
17548#[derive(Copy, Clone, Eq, PartialEq)]
17549pub struct Pwprs_SPEC;
17550impl crate::sealed::RegSpec for Pwprs_SPEC {
17551 type DataType = u8;
17552}
17553
17554#[doc = "Write-Protect Register for Secure"]
17555pub type Pwprs = crate::RegValueT<Pwprs_SPEC>;
17556
17557impl Pwprs {
17558 #[doc = "PmnPFS Register Write Enable"]
17559 #[inline(always)]
17560 pub fn pfswe(
17561 self,
17562 ) -> crate::common::RegisterField<
17563 6,
17564 0x1,
17565 1,
17566 0,
17567 pwprs::Pfswe,
17568 pwprs::Pfswe,
17569 Pwprs_SPEC,
17570 crate::common::RW,
17571 > {
17572 crate::common::RegisterField::<
17573 6,
17574 0x1,
17575 1,
17576 0,
17577 pwprs::Pfswe,
17578 pwprs::Pfswe,
17579 Pwprs_SPEC,
17580 crate::common::RW,
17581 >::from_register(self, 0)
17582 }
17583
17584 #[doc = "PFSWE Bit Write Disable"]
17585 #[inline(always)]
17586 pub fn b0wi(
17587 self,
17588 ) -> crate::common::RegisterField<
17589 7,
17590 0x1,
17591 1,
17592 0,
17593 pwprs::B0Wi,
17594 pwprs::B0Wi,
17595 Pwprs_SPEC,
17596 crate::common::RW,
17597 > {
17598 crate::common::RegisterField::<
17599 7,
17600 0x1,
17601 1,
17602 0,
17603 pwprs::B0Wi,
17604 pwprs::B0Wi,
17605 Pwprs_SPEC,
17606 crate::common::RW,
17607 >::from_register(self, 0)
17608 }
17609}
17610impl ::core::default::Default for Pwprs {
17611 #[inline(always)]
17612 fn default() -> Pwprs {
17613 <crate::RegValueT<Pwprs_SPEC> as RegisterValue<_>>::new(128)
17614 }
17615}
17616pub mod pwprs {
17617
17618 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17619 pub struct Pfswe_SPEC;
17620 pub type Pfswe = crate::EnumBitfieldStruct<u8, Pfswe_SPEC>;
17621 impl Pfswe {
17622 #[doc = "Disable writes to the PmnPFS register"]
17623 pub const _0: Self = Self::new(0);
17624
17625 #[doc = "Enable writes to the PmnPFS register"]
17626 pub const _1: Self = Self::new(1);
17627 }
17628 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17629 pub struct B0Wi_SPEC;
17630 pub type B0Wi = crate::EnumBitfieldStruct<u8, B0Wi_SPEC>;
17631 impl B0Wi {
17632 #[doc = "Enable writes the PFSWE bit"]
17633 pub const _0: Self = Self::new(0);
17634
17635 #[doc = "Disable writes to the PFSWE bit"]
17636 pub const _1: Self = Self::new(1);
17637 }
17638}
17639#[doc(hidden)]
17640#[derive(Copy, Clone, Eq, PartialEq)]
17641pub struct Psar_SPEC;
17642impl crate::sealed::RegSpec for Psar_SPEC {
17643 type DataType = u16;
17644}
17645
17646#[doc = "Port Security Attribution register"]
17647pub type Psar = crate::RegValueT<Psar_SPEC>;
17648
17649impl Psar {
17650 #[doc = "Pmn Security Attribution"]
17651 #[inline(always)]
17652 pub fn pmnsa(
17653 self,
17654 ) -> crate::common::RegisterField<
17655 0,
17656 0xffff,
17657 1,
17658 0,
17659 psar::Pmnsa,
17660 psar::Pmnsa,
17661 Psar_SPEC,
17662 crate::common::RW,
17663 > {
17664 crate::common::RegisterField::<
17665 0,
17666 0xffff,
17667 1,
17668 0,
17669 psar::Pmnsa,
17670 psar::Pmnsa,
17671 Psar_SPEC,
17672 crate::common::RW,
17673 >::from_register(self, 0)
17674 }
17675}
17676impl ::core::default::Default for Psar {
17677 #[inline(always)]
17678 fn default() -> Psar {
17679 <crate::RegValueT<Psar_SPEC> as RegisterValue<_>>::new(65535)
17680 }
17681}
17682pub mod psar {
17683
17684 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
17685 pub struct Pmnsa_SPEC;
17686 pub type Pmnsa = crate::EnumBitfieldStruct<u8, Pmnsa_SPEC>;
17687 impl Pmnsa {
17688 #[doc = "Secure"]
17689 pub const _0: Self = Self::new(0);
17690
17691 #[doc = "Non Secure"]
17692 pub const _1: Self = Self::new(1);
17693 }
17694}