stm32g4_staging/stm32g441/syscfg/
cfgr1.rs1pub type R = crate::R<CFGR1rs>;
3pub type W = crate::W<CFGR1rs>;
5pub type BOOSTEN_R = crate::BitReader;
7pub type BOOSTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type ANASWVDD_R = crate::BitReader;
11pub type ANASWVDD_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type I2C_PB6_FMP_R = crate::BitReader;
15pub type I2C_PB6_FMP_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type I2C_PB7_FMP_R = crate::BitReader;
19pub type I2C_PB7_FMP_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type I2C_PB8_FMP_R = crate::BitReader;
23pub type I2C_PB8_FMP_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type I2C_PB9_FMP_R = crate::BitReader;
27pub type I2C_PB9_FMP_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type I2C1_FMP_R = crate::BitReader;
31pub type I2C1_FMP_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type I2C2_FMP_R = crate::BitReader;
35pub type I2C2_FMP_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type I2C3_FMP_R = crate::BitReader;
39pub type I2C3_FMP_W<'a, REG> = crate::BitWriter<'a, REG>;
41pub type I2C4_FMP_R = crate::BitReader;
43pub type I2C4_FMP_W<'a, REG> = crate::BitWriter<'a, REG>;
45pub type FPU_IE_R = crate::FieldReader;
47pub type FPU_IE_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
49impl R {
50 #[inline(always)]
52 pub fn boosten(&self) -> BOOSTEN_R {
53 BOOSTEN_R::new(((self.bits >> 8) & 1) != 0)
54 }
55 #[inline(always)]
57 pub fn anaswvdd(&self) -> ANASWVDD_R {
58 ANASWVDD_R::new(((self.bits >> 9) & 1) != 0)
59 }
60 #[inline(always)]
62 pub fn i2c_pb6_fmp(&self) -> I2C_PB6_FMP_R {
63 I2C_PB6_FMP_R::new(((self.bits >> 16) & 1) != 0)
64 }
65 #[inline(always)]
67 pub fn i2c_pb7_fmp(&self) -> I2C_PB7_FMP_R {
68 I2C_PB7_FMP_R::new(((self.bits >> 17) & 1) != 0)
69 }
70 #[inline(always)]
72 pub fn i2c_pb8_fmp(&self) -> I2C_PB8_FMP_R {
73 I2C_PB8_FMP_R::new(((self.bits >> 18) & 1) != 0)
74 }
75 #[inline(always)]
77 pub fn i2c_pb9_fmp(&self) -> I2C_PB9_FMP_R {
78 I2C_PB9_FMP_R::new(((self.bits >> 19) & 1) != 0)
79 }
80 #[inline(always)]
82 pub fn i2c1_fmp(&self) -> I2C1_FMP_R {
83 I2C1_FMP_R::new(((self.bits >> 20) & 1) != 0)
84 }
85 #[inline(always)]
87 pub fn i2c2_fmp(&self) -> I2C2_FMP_R {
88 I2C2_FMP_R::new(((self.bits >> 21) & 1) != 0)
89 }
90 #[inline(always)]
92 pub fn i2c3_fmp(&self) -> I2C3_FMP_R {
93 I2C3_FMP_R::new(((self.bits >> 22) & 1) != 0)
94 }
95 #[inline(always)]
97 pub fn i2c4_fmp(&self) -> I2C4_FMP_R {
98 I2C4_FMP_R::new(((self.bits >> 23) & 1) != 0)
99 }
100 #[inline(always)]
102 pub fn fpu_ie(&self) -> FPU_IE_R {
103 FPU_IE_R::new(((self.bits >> 26) & 0x3f) as u8)
104 }
105}
106impl core::fmt::Debug for R {
107 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
108 f.debug_struct("CFGR1")
109 .field("boosten", &self.boosten())
110 .field("anaswvdd", &self.anaswvdd())
111 .field("i2c_pb6_fmp", &self.i2c_pb6_fmp())
112 .field("i2c_pb7_fmp", &self.i2c_pb7_fmp())
113 .field("i2c_pb8_fmp", &self.i2c_pb8_fmp())
114 .field("i2c_pb9_fmp", &self.i2c_pb9_fmp())
115 .field("i2c1_fmp", &self.i2c1_fmp())
116 .field("i2c2_fmp", &self.i2c2_fmp())
117 .field("i2c3_fmp", &self.i2c3_fmp())
118 .field("i2c4_fmp", &self.i2c4_fmp())
119 .field("fpu_ie", &self.fpu_ie())
120 .finish()
121 }
122}
123impl W {
124 #[inline(always)]
126 pub fn boosten(&mut self) -> BOOSTEN_W<CFGR1rs> {
127 BOOSTEN_W::new(self, 8)
128 }
129 #[inline(always)]
131 pub fn anaswvdd(&mut self) -> ANASWVDD_W<CFGR1rs> {
132 ANASWVDD_W::new(self, 9)
133 }
134 #[inline(always)]
136 pub fn i2c_pb6_fmp(&mut self) -> I2C_PB6_FMP_W<CFGR1rs> {
137 I2C_PB6_FMP_W::new(self, 16)
138 }
139 #[inline(always)]
141 pub fn i2c_pb7_fmp(&mut self) -> I2C_PB7_FMP_W<CFGR1rs> {
142 I2C_PB7_FMP_W::new(self, 17)
143 }
144 #[inline(always)]
146 pub fn i2c_pb8_fmp(&mut self) -> I2C_PB8_FMP_W<CFGR1rs> {
147 I2C_PB8_FMP_W::new(self, 18)
148 }
149 #[inline(always)]
151 pub fn i2c_pb9_fmp(&mut self) -> I2C_PB9_FMP_W<CFGR1rs> {
152 I2C_PB9_FMP_W::new(self, 19)
153 }
154 #[inline(always)]
156 pub fn i2c1_fmp(&mut self) -> I2C1_FMP_W<CFGR1rs> {
157 I2C1_FMP_W::new(self, 20)
158 }
159 #[inline(always)]
161 pub fn i2c2_fmp(&mut self) -> I2C2_FMP_W<CFGR1rs> {
162 I2C2_FMP_W::new(self, 21)
163 }
164 #[inline(always)]
166 pub fn i2c3_fmp(&mut self) -> I2C3_FMP_W<CFGR1rs> {
167 I2C3_FMP_W::new(self, 22)
168 }
169 #[inline(always)]
171 pub fn i2c4_fmp(&mut self) -> I2C4_FMP_W<CFGR1rs> {
172 I2C4_FMP_W::new(self, 23)
173 }
174 #[inline(always)]
176 pub fn fpu_ie(&mut self) -> FPU_IE_W<CFGR1rs> {
177 FPU_IE_W::new(self, 26)
178 }
179}
180pub struct CFGR1rs;
186impl crate::RegisterSpec for CFGR1rs {
187 type Ux = u32;
188}
189impl crate::Readable for CFGR1rs {}
191impl crate::Writable for CFGR1rs {
193 type Safety = crate::Unsafe;
194}
195impl crate::Resettable for CFGR1rs {
197 const RESET_VALUE: u32 = 0x7c00_0001;
198}