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"Port Output Enable Module for GPT"]
28unsafe impl ::core::marker::Send for super::Poeg {}
29unsafe impl ::core::marker::Sync for super::Poeg {}
30impl super::Poeg {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "POEG Group %s Setting Register"]
38 #[inline(always)]
39 pub const fn poegg(
40 &self,
41 ) -> &'static crate::common::ClusterRegisterArray<
42 crate::common::Reg<self::Poegg_SPEC, crate::common::RW>,
43 4,
44 0x100,
45 > {
46 unsafe {
47 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x0usize))
48 }
49 }
50 #[inline(always)]
51 pub const fn poegga(&self) -> &'static crate::common::Reg<self::Poegg_SPEC, crate::common::RW> {
52 unsafe {
53 crate::common::Reg::<self::Poegg_SPEC, crate::common::RW>::from_ptr(
54 self._svd2pac_as_ptr().add(0x0usize),
55 )
56 }
57 }
58 #[inline(always)]
59 pub const fn poeggb(&self) -> &'static crate::common::Reg<self::Poegg_SPEC, crate::common::RW> {
60 unsafe {
61 crate::common::Reg::<self::Poegg_SPEC, crate::common::RW>::from_ptr(
62 self._svd2pac_as_ptr().add(0x100usize),
63 )
64 }
65 }
66 #[inline(always)]
67 pub const fn poeggc(&self) -> &'static crate::common::Reg<self::Poegg_SPEC, crate::common::RW> {
68 unsafe {
69 crate::common::Reg::<self::Poegg_SPEC, crate::common::RW>::from_ptr(
70 self._svd2pac_as_ptr().add(0x200usize),
71 )
72 }
73 }
74 #[inline(always)]
75 pub const fn poeggd(&self) -> &'static crate::common::Reg<self::Poegg_SPEC, crate::common::RW> {
76 unsafe {
77 crate::common::Reg::<self::Poegg_SPEC, crate::common::RW>::from_ptr(
78 self._svd2pac_as_ptr().add(0x300usize),
79 )
80 }
81 }
82}
83#[doc(hidden)]
84#[derive(Copy, Clone, Eq, PartialEq)]
85pub struct Poegg_SPEC;
86impl crate::sealed::RegSpec for Poegg_SPEC {
87 type DataType = u32;
88}
89
90#[doc = "POEG Group %s Setting Register"]
91pub type Poegg = crate::RegValueT<Poegg_SPEC>;
92
93impl Poegg {
94 #[doc = "Noise Filter Clock Select"]
95 #[inline(always)]
96 pub fn nfcs(
97 self,
98 ) -> crate::common::RegisterField<
99 30,
100 0x3,
101 1,
102 0,
103 poegg::Nfcs,
104 poegg::Nfcs,
105 Poegg_SPEC,
106 crate::common::RW,
107 > {
108 crate::common::RegisterField::<
109 30,
110 0x3,
111 1,
112 0,
113 poegg::Nfcs,
114 poegg::Nfcs,
115 Poegg_SPEC,
116 crate::common::RW,
117 >::from_register(self, 0)
118 }
119
120 #[doc = "Noise Filter Enable"]
121 #[inline(always)]
122 pub fn nfen(
123 self,
124 ) -> crate::common::RegisterField<
125 29,
126 0x1,
127 1,
128 0,
129 poegg::Nfen,
130 poegg::Nfen,
131 Poegg_SPEC,
132 crate::common::RW,
133 > {
134 crate::common::RegisterField::<
135 29,
136 0x1,
137 1,
138 0,
139 poegg::Nfen,
140 poegg::Nfen,
141 Poegg_SPEC,
142 crate::common::RW,
143 >::from_register(self, 0)
144 }
145
146 #[doc = "GTETRG Input Reverse"]
147 #[inline(always)]
148 pub fn inv(
149 self,
150 ) -> crate::common::RegisterField<
151 28,
152 0x1,
153 1,
154 0,
155 poegg::Inv,
156 poegg::Inv,
157 Poegg_SPEC,
158 crate::common::RW,
159 > {
160 crate::common::RegisterField::<
161 28,
162 0x1,
163 1,
164 0,
165 poegg::Inv,
166 poegg::Inv,
167 Poegg_SPEC,
168 crate::common::RW,
169 >::from_register(self, 0)
170 }
171
172 #[doc = "GTETRG Input Status Flag"]
173 #[inline(always)]
174 pub fn st(
175 self,
176 ) -> crate::common::RegisterField<
177 16,
178 0x1,
179 1,
180 0,
181 poegg::St,
182 poegg::St,
183 Poegg_SPEC,
184 crate::common::R,
185 > {
186 crate::common::RegisterField::<
187 16,
188 0x1,
189 1,
190 0,
191 poegg::St,
192 poegg::St,
193 Poegg_SPEC,
194 crate::common::R,
195 >::from_register(self, 0)
196 }
197
198 #[doc = "Comparator Disable Request Enable 5Note: Can be modified only once after a reset."]
199 #[inline(always)]
200 pub fn cdre5(
201 self,
202 ) -> crate::common::RegisterField<
203 13,
204 0x1,
205 1,
206 0,
207 poegg::Cdre5,
208 poegg::Cdre5,
209 Poegg_SPEC,
210 crate::common::RW,
211 > {
212 crate::common::RegisterField::<
213 13,
214 0x1,
215 1,
216 0,
217 poegg::Cdre5,
218 poegg::Cdre5,
219 Poegg_SPEC,
220 crate::common::RW,
221 >::from_register(self, 0)
222 }
223
224 #[doc = "Comparator Disable Request Enable 4Note: Can be modified only once after a reset."]
225 #[inline(always)]
226 pub fn cdre4(
227 self,
228 ) -> crate::common::RegisterField<
229 12,
230 0x1,
231 1,
232 0,
233 poegg::Cdre4,
234 poegg::Cdre4,
235 Poegg_SPEC,
236 crate::common::RW,
237 > {
238 crate::common::RegisterField::<
239 12,
240 0x1,
241 1,
242 0,
243 poegg::Cdre4,
244 poegg::Cdre4,
245 Poegg_SPEC,
246 crate::common::RW,
247 >::from_register(self, 0)
248 }
249
250 #[doc = "Comparator Disable Request Enable 3Note: Can be modified only once after a reset."]
251 #[inline(always)]
252 pub fn cdre3(
253 self,
254 ) -> crate::common::RegisterField<
255 11,
256 0x1,
257 1,
258 0,
259 poegg::Cdre3,
260 poegg::Cdre3,
261 Poegg_SPEC,
262 crate::common::RW,
263 > {
264 crate::common::RegisterField::<
265 11,
266 0x1,
267 1,
268 0,
269 poegg::Cdre3,
270 poegg::Cdre3,
271 Poegg_SPEC,
272 crate::common::RW,
273 >::from_register(self, 0)
274 }
275
276 #[doc = "Comparator Disable Request Enable 2Note: Can be modified only once after a reset."]
277 #[inline(always)]
278 pub fn cdre2(
279 self,
280 ) -> crate::common::RegisterField<
281 10,
282 0x1,
283 1,
284 0,
285 poegg::Cdre2,
286 poegg::Cdre2,
287 Poegg_SPEC,
288 crate::common::RW,
289 > {
290 crate::common::RegisterField::<
291 10,
292 0x1,
293 1,
294 0,
295 poegg::Cdre2,
296 poegg::Cdre2,
297 Poegg_SPEC,
298 crate::common::RW,
299 >::from_register(self, 0)
300 }
301
302 #[doc = "Comparator Disable Request Enable 1Note: Can be modified only once after a reset."]
303 #[inline(always)]
304 pub fn cdre1(
305 self,
306 ) -> crate::common::RegisterField<
307 9,
308 0x1,
309 1,
310 0,
311 poegg::Cdre1,
312 poegg::Cdre1,
313 Poegg_SPEC,
314 crate::common::RW,
315 > {
316 crate::common::RegisterField::<
317 9,
318 0x1,
319 1,
320 0,
321 poegg::Cdre1,
322 poegg::Cdre1,
323 Poegg_SPEC,
324 crate::common::RW,
325 >::from_register(self, 0)
326 }
327
328 #[doc = "Comparator Disable Request Enable 0Note: Can be modified only once after a reset."]
329 #[inline(always)]
330 pub fn cdre0(
331 self,
332 ) -> crate::common::RegisterField<
333 8,
334 0x1,
335 1,
336 0,
337 poegg::Cdre0,
338 poegg::Cdre0,
339 Poegg_SPEC,
340 crate::common::RW,
341 > {
342 crate::common::RegisterField::<
343 8,
344 0x1,
345 1,
346 0,
347 poegg::Cdre0,
348 poegg::Cdre0,
349 Poegg_SPEC,
350 crate::common::RW,
351 >::from_register(self, 0)
352 }
353
354 #[doc = "Oscillation Stop Detection EnableNote: Can be modified only once after a reset."]
355 #[inline(always)]
356 pub fn ostpe(
357 self,
358 ) -> crate::common::RegisterField<
359 6,
360 0x1,
361 1,
362 0,
363 poegg::Ostpe,
364 poegg::Ostpe,
365 Poegg_SPEC,
366 crate::common::RW,
367 > {
368 crate::common::RegisterField::<
369 6,
370 0x1,
371 1,
372 0,
373 poegg::Ostpe,
374 poegg::Ostpe,
375 Poegg_SPEC,
376 crate::common::RW,
377 >::from_register(self, 0)
378 }
379
380 #[doc = "Enable for GPT Output-Disable RequestNote: Can be modified only once after a reset."]
381 #[inline(always)]
382 pub fn ioce(
383 self,
384 ) -> crate::common::RegisterField<
385 5,
386 0x1,
387 1,
388 0,
389 poegg::Ioce,
390 poegg::Ioce,
391 Poegg_SPEC,
392 crate::common::RW,
393 > {
394 crate::common::RegisterField::<
395 5,
396 0x1,
397 1,
398 0,
399 poegg::Ioce,
400 poegg::Ioce,
401 Poegg_SPEC,
402 crate::common::RW,
403 >::from_register(self, 0)
404 }
405
406 #[doc = "Port Input Detection EnableNote: Can be modified only once after a reset."]
407 #[inline(always)]
408 pub fn pide(
409 self,
410 ) -> crate::common::RegisterField<
411 4,
412 0x1,
413 1,
414 0,
415 poegg::Pide,
416 poegg::Pide,
417 Poegg_SPEC,
418 crate::common::RW,
419 > {
420 crate::common::RegisterField::<
421 4,
422 0x1,
423 1,
424 0,
425 poegg::Pide,
426 poegg::Pide,
427 Poegg_SPEC,
428 crate::common::RW,
429 >::from_register(self, 0)
430 }
431
432 #[doc = "Software Stop Flag"]
433 #[inline(always)]
434 pub fn ssf(
435 self,
436 ) -> crate::common::RegisterField<
437 3,
438 0x1,
439 1,
440 0,
441 poegg::Ssf,
442 poegg::Ssf,
443 Poegg_SPEC,
444 crate::common::RW,
445 > {
446 crate::common::RegisterField::<
447 3,
448 0x1,
449 1,
450 0,
451 poegg::Ssf,
452 poegg::Ssf,
453 Poegg_SPEC,
454 crate::common::RW,
455 >::from_register(self, 0)
456 }
457
458 #[doc = "Oscillation Stop Detection Flag"]
459 #[inline(always)]
460 pub fn ostpf(
461 self,
462 ) -> crate::common::RegisterField<
463 2,
464 0x1,
465 1,
466 0,
467 poegg::Ostpf,
468 poegg::Ostpf,
469 Poegg_SPEC,
470 crate::common::RW,
471 > {
472 crate::common::RegisterField::<
473 2,
474 0x1,
475 1,
476 0,
477 poegg::Ostpf,
478 poegg::Ostpf,
479 Poegg_SPEC,
480 crate::common::RW,
481 >::from_register(self, 0)
482 }
483
484 #[doc = "Real Time Overcurrent Detection Flag"]
485 #[inline(always)]
486 pub fn iocf(
487 self,
488 ) -> crate::common::RegisterField<
489 1,
490 0x1,
491 1,
492 0,
493 poegg::Iocf,
494 poegg::Iocf,
495 Poegg_SPEC,
496 crate::common::RW,
497 > {
498 crate::common::RegisterField::<
499 1,
500 0x1,
501 1,
502 0,
503 poegg::Iocf,
504 poegg::Iocf,
505 Poegg_SPEC,
506 crate::common::RW,
507 >::from_register(self, 0)
508 }
509
510 #[doc = "Port Input Detection Flag"]
511 #[inline(always)]
512 pub fn pidf(
513 self,
514 ) -> crate::common::RegisterField<
515 0,
516 0x1,
517 1,
518 0,
519 poegg::Pidf,
520 poegg::Pidf,
521 Poegg_SPEC,
522 crate::common::RW,
523 > {
524 crate::common::RegisterField::<
525 0,
526 0x1,
527 1,
528 0,
529 poegg::Pidf,
530 poegg::Pidf,
531 Poegg_SPEC,
532 crate::common::RW,
533 >::from_register(self, 0)
534 }
535}
536impl ::core::default::Default for Poegg {
537 #[inline(always)]
538 fn default() -> Poegg {
539 <crate::RegValueT<Poegg_SPEC> as RegisterValue<_>>::new(0)
540 }
541}
542pub mod poegg {
543
544 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
545 pub struct Nfcs_SPEC;
546 pub type Nfcs = crate::EnumBitfieldStruct<u8, Nfcs_SPEC>;
547 impl Nfcs {
548 #[doc = "Sampling GTETRG pin input level for three times in every PCLKB."]
549 pub const _00: Self = Self::new(0);
550
551 #[doc = "Sampling GTETRG pin input level for three times in every PCLKB /8."]
552 pub const _01: Self = Self::new(1);
553
554 #[doc = "Sampling GTETRG pin input level for three times in every PCLKB /32."]
555 pub const _10: Self = Self::new(2);
556
557 #[doc = "Sampling GTETRG pin input level for three times in every PCLKB /128."]
558 pub const _11: Self = Self::new(3);
559 }
560 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
561 pub struct Nfen_SPEC;
562 pub type Nfen = crate::EnumBitfieldStruct<u8, Nfen_SPEC>;
563 impl Nfen {
564 #[doc = "Filtering noise disabled"]
565 pub const _0: Self = Self::new(0);
566
567 #[doc = "Filtering noise enabled"]
568 pub const _1: Self = Self::new(1);
569 }
570 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
571 pub struct Inv_SPEC;
572 pub type Inv = crate::EnumBitfieldStruct<u8, Inv_SPEC>;
573 impl Inv {
574 #[doc = "GTETRG Input"]
575 pub const _0: Self = Self::new(0);
576
577 #[doc = "GTETRG Input Reversed."]
578 pub const _1: Self = Self::new(1);
579 }
580 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
581 pub struct St_SPEC;
582 pub type St = crate::EnumBitfieldStruct<u8, St_SPEC>;
583 impl St {
584 #[doc = "GTETRG input after filtering is 0."]
585 pub const _0: Self = Self::new(0);
586
587 #[doc = "GTETRG input after filtering is 1."]
588 pub const _1: Self = Self::new(1);
589 }
590 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
591 pub struct Cdre5_SPEC;
592 pub type Cdre5 = crate::EnumBitfieldStruct<u8, Cdre5_SPEC>;
593 impl Cdre5 {
594 #[doc = "A disable request of comparator 5 disabled."]
595 pub const _0: Self = Self::new(0);
596
597 #[doc = "A disable request of comparator 5 enabled."]
598 pub const _1: Self = Self::new(1);
599 }
600 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
601 pub struct Cdre4_SPEC;
602 pub type Cdre4 = crate::EnumBitfieldStruct<u8, Cdre4_SPEC>;
603 impl Cdre4 {
604 #[doc = "A disable request of comparator 4 disabled."]
605 pub const _0: Self = Self::new(0);
606
607 #[doc = "A disable request of comparator 4 enabled."]
608 pub const _1: Self = Self::new(1);
609 }
610 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
611 pub struct Cdre3_SPEC;
612 pub type Cdre3 = crate::EnumBitfieldStruct<u8, Cdre3_SPEC>;
613 impl Cdre3 {
614 #[doc = "A disable request of comparator 3 disabled."]
615 pub const _0: Self = Self::new(0);
616
617 #[doc = "A disable request of comparator 3 enabled."]
618 pub const _1: Self = Self::new(1);
619 }
620 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
621 pub struct Cdre2_SPEC;
622 pub type Cdre2 = crate::EnumBitfieldStruct<u8, Cdre2_SPEC>;
623 impl Cdre2 {
624 #[doc = "A disable request of comparator 2 disabled."]
625 pub const _0: Self = Self::new(0);
626
627 #[doc = "A disable request of comparator 2 enabled."]
628 pub const _1: Self = Self::new(1);
629 }
630 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
631 pub struct Cdre1_SPEC;
632 pub type Cdre1 = crate::EnumBitfieldStruct<u8, Cdre1_SPEC>;
633 impl Cdre1 {
634 #[doc = "A disable request of comparator 1 disabled."]
635 pub const _0: Self = Self::new(0);
636
637 #[doc = "A disable request of comparator 1 enabled."]
638 pub const _1: Self = Self::new(1);
639 }
640 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
641 pub struct Cdre0_SPEC;
642 pub type Cdre0 = crate::EnumBitfieldStruct<u8, Cdre0_SPEC>;
643 impl Cdre0 {
644 #[doc = "A disable request of comparator 0 disabled."]
645 pub const _0: Self = Self::new(0);
646
647 #[doc = "A disable request of comparator 0 enabled."]
648 pub const _1: Self = Self::new(1);
649 }
650 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
651 pub struct Ostpe_SPEC;
652 pub type Ostpe = crate::EnumBitfieldStruct<u8, Ostpe_SPEC>;
653 impl Ostpe {
654 #[doc = "A output-disable request from the oscillation stop detection disabled."]
655 pub const _0: Self = Self::new(0);
656
657 #[doc = "A output-disable request from the oscillation stop detection enabled."]
658 pub const _1: Self = Self::new(1);
659 }
660 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
661 pub struct Ioce_SPEC;
662 pub type Ioce = crate::EnumBitfieldStruct<u8, Ioce_SPEC>;
663 impl Ioce {
664 #[doc = "Disable output-disable requests from GPT disable request"]
665 pub const _0: Self = Self::new(0);
666
667 #[doc = "Enable output-disable requests from GPT disable request"]
668 pub const _1: Self = Self::new(1);
669 }
670 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
671 pub struct Pide_SPEC;
672 pub type Pide = crate::EnumBitfieldStruct<u8, Pide_SPEC>;
673 impl Pide {
674 #[doc = "A output-disable request from the GTETRG pins disabled."]
675 pub const _0: Self = Self::new(0);
676
677 #[doc = "A output-disable request from the GTETRG pins enabled."]
678 pub const _1: Self = Self::new(1);
679 }
680 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
681 pub struct Ssf_SPEC;
682 pub type Ssf = crate::EnumBitfieldStruct<u8, Ssf_SPEC>;
683 impl Ssf {
684 #[doc = "A output-disable request from software has not been generated."]
685 pub const _0: Self = Self::new(0);
686
687 #[doc = "A output-disable request from software has been generated."]
688 pub const _1: Self = Self::new(1);
689 }
690 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
691 pub struct Ostpf_SPEC;
692 pub type Ostpf = crate::EnumBitfieldStruct<u8, Ostpf_SPEC>;
693 impl Ostpf {
694 #[doc = "A output-disable request from the oscillation stop detection has not been generated."]
695 pub const _0: Self = Self::new(0);
696
697 #[doc = "A output-disable request from the oscillation stop detection has been generated."]
698 pub const _1: Self = Self::new(1);
699 }
700 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
701 pub struct Iocf_SPEC;
702 pub type Iocf = crate::EnumBitfieldStruct<u8, Iocf_SPEC>;
703 impl Iocf {
704 #[doc = "A output-disable request from GPT disable request or comparator interrupt has not been generated."]
705 pub const _0: Self = Self::new(0);
706
707 #[doc = "A output-disable request from GPT disable request or comparator interrupt has been generated."]
708 pub const _1: Self = Self::new(1);
709 }
710 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
711 pub struct Pidf_SPEC;
712 pub type Pidf = crate::EnumBitfieldStruct<u8, Pidf_SPEC>;
713 impl Pidf {
714 #[doc = "A output-disable request from the GTETRG pin has not been generated."]
715 pub const _0: Self = Self::new(0);
716
717 #[doc = "A output-disable request from the GTETRG pin has been generated."]
718 pub const _1: Self = Self::new(1);
719 }
720}