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"Miscellaneous Port Control Register"]
28unsafe impl ::core::marker::Send for super::Pmisc {}
29unsafe impl ::core::marker::Sync for super::Pmisc {}
30impl super::Pmisc {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "Write-Protect Register"]
38 #[inline(always)]
39 pub const fn pwpr(&self) -> &'static crate::common::Reg<self::Pwpr_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Pwpr_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(3usize),
43 )
44 }
45 }
46}
47#[doc(hidden)]
48#[derive(Copy, Clone, Eq, PartialEq)]
49pub struct Pwpr_SPEC;
50impl crate::sealed::RegSpec for Pwpr_SPEC {
51 type DataType = u8;
52}
53
54#[doc = "Write-Protect Register"]
55pub type Pwpr = crate::RegValueT<Pwpr_SPEC>;
56
57impl Pwpr {
58 #[doc = "PFSWE Bit Write Disable"]
59 #[inline(always)]
60 pub fn b0wi(
61 self,
62 ) -> crate::common::RegisterField<
63 7,
64 0x1,
65 1,
66 0,
67 pwpr::B0Wi,
68 pwpr::B0Wi,
69 Pwpr_SPEC,
70 crate::common::RW,
71 > {
72 crate::common::RegisterField::<
73 7,
74 0x1,
75 1,
76 0,
77 pwpr::B0Wi,
78 pwpr::B0Wi,
79 Pwpr_SPEC,
80 crate::common::RW,
81 >::from_register(self, 0)
82 }
83
84 #[doc = "PFS Register Write Enable"]
85 #[inline(always)]
86 pub fn pfswe(
87 self,
88 ) -> crate::common::RegisterField<
89 6,
90 0x1,
91 1,
92 0,
93 pwpr::Pfswe,
94 pwpr::Pfswe,
95 Pwpr_SPEC,
96 crate::common::RW,
97 > {
98 crate::common::RegisterField::<
99 6,
100 0x1,
101 1,
102 0,
103 pwpr::Pfswe,
104 pwpr::Pfswe,
105 Pwpr_SPEC,
106 crate::common::RW,
107 >::from_register(self, 0)
108 }
109
110 #[doc = "These bits are read as 000000. The write value should be 000000."]
111 #[inline(always)]
112 pub fn reserved(
113 self,
114 ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Pwpr_SPEC, crate::common::RW> {
115 crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Pwpr_SPEC,crate::common::RW>::from_register(self,0)
116 }
117}
118impl ::core::default::Default for Pwpr {
119 #[inline(always)]
120 fn default() -> Pwpr {
121 <crate::RegValueT<Pwpr_SPEC> as RegisterValue<_>>::new(128)
122 }
123}
124pub mod pwpr {
125
126 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
127 pub struct B0Wi_SPEC;
128 pub type B0Wi = crate::EnumBitfieldStruct<u8, B0Wi_SPEC>;
129 impl B0Wi {
130 #[doc = "Writing to the PFSWE bit is enabled"]
131 pub const _0: Self = Self::new(0);
132
133 #[doc = "Writing to the PFSWE bit is disabled"]
134 pub const _1: Self = Self::new(1);
135 }
136 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
137 pub struct Pfswe_SPEC;
138 pub type Pfswe = crate::EnumBitfieldStruct<u8, Pfswe_SPEC>;
139 impl Pfswe {
140 #[doc = "Writing to the PFS register is disabled"]
141 pub const _0: Self = Self::new(0);
142
143 #[doc = "Writing to the PFS register is enabled"]
144 pub const _1: Self = Self::new(1);
145 }
146}