stm32mp1/stm32mp157/adc/
cr.rs1pub type R = crate::R<CRrs>;
3pub type W = crate::W<CRrs>;
5pub type ADEN_R = crate::BitReader;
7pub type ADEN_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type ADDIS_R = crate::BitReader;
11pub type ADDIS_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type ADSTART_R = crate::BitReader;
15pub type ADSTART_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type JADSTART_R = crate::BitReader;
19pub type JADSTART_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type ADSTP_R = crate::BitReader;
23pub type ADSTP_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type JADSTP_R = crate::BitReader;
27pub type JADSTP_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type BOOST_R = crate::BitReader;
31pub type BOOST_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type ADCALLIN_R = crate::BitReader;
35pub type ADCALLIN_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type LINCALRDYW1_R = crate::BitReader;
39pub type LINCALRDYW1_W<'a, REG> = crate::BitWriter<'a, REG>;
41pub type LINCALRDYW2_R = crate::BitReader;
43pub type LINCALRDYW2_W<'a, REG> = crate::BitWriter<'a, REG>;
45pub type LINCALRDYW3_R = crate::BitReader;
47pub type LINCALRDYW3_W<'a, REG> = crate::BitWriter<'a, REG>;
49pub type LINCALRDYW4_R = crate::BitReader;
51pub type LINCALRDYW4_W<'a, REG> = crate::BitWriter<'a, REG>;
53pub type LINCALRDYW5_R = crate::BitReader;
55pub type LINCALRDYW5_W<'a, REG> = crate::BitWriter<'a, REG>;
57pub type LINCALRDYW6_R = crate::BitReader;
59pub type LINCALRDYW6_W<'a, REG> = crate::BitWriter<'a, REG>;
61pub type ADVREGEN_R = crate::BitReader;
63pub type ADVREGEN_W<'a, REG> = crate::BitWriter<'a, REG>;
65pub type DEEPPWD_R = crate::BitReader;
67pub type DEEPPWD_W<'a, REG> = crate::BitWriter<'a, REG>;
69pub type ADCALDIF_R = crate::BitReader;
71pub type ADCALDIF_W<'a, REG> = crate::BitWriter<'a, REG>;
73pub type ADCAL_R = crate::BitReader;
75pub type ADCAL_W<'a, REG> = crate::BitWriter<'a, REG>;
77impl R {
78 #[inline(always)]
80 pub fn aden(&self) -> ADEN_R {
81 ADEN_R::new((self.bits & 1) != 0)
82 }
83 #[inline(always)]
85 pub fn addis(&self) -> ADDIS_R {
86 ADDIS_R::new(((self.bits >> 1) & 1) != 0)
87 }
88 #[inline(always)]
90 pub fn adstart(&self) -> ADSTART_R {
91 ADSTART_R::new(((self.bits >> 2) & 1) != 0)
92 }
93 #[inline(always)]
95 pub fn jadstart(&self) -> JADSTART_R {
96 JADSTART_R::new(((self.bits >> 3) & 1) != 0)
97 }
98 #[inline(always)]
100 pub fn adstp(&self) -> ADSTP_R {
101 ADSTP_R::new(((self.bits >> 4) & 1) != 0)
102 }
103 #[inline(always)]
105 pub fn jadstp(&self) -> JADSTP_R {
106 JADSTP_R::new(((self.bits >> 5) & 1) != 0)
107 }
108 #[inline(always)]
110 pub fn boost(&self) -> BOOST_R {
111 BOOST_R::new(((self.bits >> 8) & 1) != 0)
112 }
113 #[inline(always)]
115 pub fn adcallin(&self) -> ADCALLIN_R {
116 ADCALLIN_R::new(((self.bits >> 16) & 1) != 0)
117 }
118 #[inline(always)]
120 pub fn lincalrdyw1(&self) -> LINCALRDYW1_R {
121 LINCALRDYW1_R::new(((self.bits >> 22) & 1) != 0)
122 }
123 #[inline(always)]
125 pub fn lincalrdyw2(&self) -> LINCALRDYW2_R {
126 LINCALRDYW2_R::new(((self.bits >> 23) & 1) != 0)
127 }
128 #[inline(always)]
130 pub fn lincalrdyw3(&self) -> LINCALRDYW3_R {
131 LINCALRDYW3_R::new(((self.bits >> 24) & 1) != 0)
132 }
133 #[inline(always)]
135 pub fn lincalrdyw4(&self) -> LINCALRDYW4_R {
136 LINCALRDYW4_R::new(((self.bits >> 25) & 1) != 0)
137 }
138 #[inline(always)]
140 pub fn lincalrdyw5(&self) -> LINCALRDYW5_R {
141 LINCALRDYW5_R::new(((self.bits >> 26) & 1) != 0)
142 }
143 #[inline(always)]
145 pub fn lincalrdyw6(&self) -> LINCALRDYW6_R {
146 LINCALRDYW6_R::new(((self.bits >> 27) & 1) != 0)
147 }
148 #[inline(always)]
150 pub fn advregen(&self) -> ADVREGEN_R {
151 ADVREGEN_R::new(((self.bits >> 28) & 1) != 0)
152 }
153 #[inline(always)]
155 pub fn deeppwd(&self) -> DEEPPWD_R {
156 DEEPPWD_R::new(((self.bits >> 29) & 1) != 0)
157 }
158 #[inline(always)]
160 pub fn adcaldif(&self) -> ADCALDIF_R {
161 ADCALDIF_R::new(((self.bits >> 30) & 1) != 0)
162 }
163 #[inline(always)]
165 pub fn adcal(&self) -> ADCAL_R {
166 ADCAL_R::new(((self.bits >> 31) & 1) != 0)
167 }
168}
169impl core::fmt::Debug for R {
170 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
171 f.debug_struct("CR")
172 .field("aden", &self.aden())
173 .field("addis", &self.addis())
174 .field("adstart", &self.adstart())
175 .field("jadstart", &self.jadstart())
176 .field("adstp", &self.adstp())
177 .field("jadstp", &self.jadstp())
178 .field("boost", &self.boost())
179 .field("adcallin", &self.adcallin())
180 .field("lincalrdyw1", &self.lincalrdyw1())
181 .field("lincalrdyw2", &self.lincalrdyw2())
182 .field("lincalrdyw3", &self.lincalrdyw3())
183 .field("lincalrdyw4", &self.lincalrdyw4())
184 .field("lincalrdyw5", &self.lincalrdyw5())
185 .field("lincalrdyw6", &self.lincalrdyw6())
186 .field("advregen", &self.advregen())
187 .field("deeppwd", &self.deeppwd())
188 .field("adcaldif", &self.adcaldif())
189 .field("adcal", &self.adcal())
190 .finish()
191 }
192}
193impl W {
194 #[inline(always)]
196 pub fn aden(&mut self) -> ADEN_W<CRrs> {
197 ADEN_W::new(self, 0)
198 }
199 #[inline(always)]
201 pub fn addis(&mut self) -> ADDIS_W<CRrs> {
202 ADDIS_W::new(self, 1)
203 }
204 #[inline(always)]
206 pub fn adstart(&mut self) -> ADSTART_W<CRrs> {
207 ADSTART_W::new(self, 2)
208 }
209 #[inline(always)]
211 pub fn jadstart(&mut self) -> JADSTART_W<CRrs> {
212 JADSTART_W::new(self, 3)
213 }
214 #[inline(always)]
216 pub fn adstp(&mut self) -> ADSTP_W<CRrs> {
217 ADSTP_W::new(self, 4)
218 }
219 #[inline(always)]
221 pub fn jadstp(&mut self) -> JADSTP_W<CRrs> {
222 JADSTP_W::new(self, 5)
223 }
224 #[inline(always)]
226 pub fn boost(&mut self) -> BOOST_W<CRrs> {
227 BOOST_W::new(self, 8)
228 }
229 #[inline(always)]
231 pub fn adcallin(&mut self) -> ADCALLIN_W<CRrs> {
232 ADCALLIN_W::new(self, 16)
233 }
234 #[inline(always)]
236 pub fn lincalrdyw1(&mut self) -> LINCALRDYW1_W<CRrs> {
237 LINCALRDYW1_W::new(self, 22)
238 }
239 #[inline(always)]
241 pub fn lincalrdyw2(&mut self) -> LINCALRDYW2_W<CRrs> {
242 LINCALRDYW2_W::new(self, 23)
243 }
244 #[inline(always)]
246 pub fn lincalrdyw3(&mut self) -> LINCALRDYW3_W<CRrs> {
247 LINCALRDYW3_W::new(self, 24)
248 }
249 #[inline(always)]
251 pub fn lincalrdyw4(&mut self) -> LINCALRDYW4_W<CRrs> {
252 LINCALRDYW4_W::new(self, 25)
253 }
254 #[inline(always)]
256 pub fn lincalrdyw5(&mut self) -> LINCALRDYW5_W<CRrs> {
257 LINCALRDYW5_W::new(self, 26)
258 }
259 #[inline(always)]
261 pub fn lincalrdyw6(&mut self) -> LINCALRDYW6_W<CRrs> {
262 LINCALRDYW6_W::new(self, 27)
263 }
264 #[inline(always)]
266 pub fn advregen(&mut self) -> ADVREGEN_W<CRrs> {
267 ADVREGEN_W::new(self, 28)
268 }
269 #[inline(always)]
271 pub fn deeppwd(&mut self) -> DEEPPWD_W<CRrs> {
272 DEEPPWD_W::new(self, 29)
273 }
274 #[inline(always)]
276 pub fn adcaldif(&mut self) -> ADCALDIF_W<CRrs> {
277 ADCALDIF_W::new(self, 30)
278 }
279 #[inline(always)]
281 pub fn adcal(&mut self) -> ADCAL_W<CRrs> {
282 ADCAL_W::new(self, 31)
283 }
284}
285pub struct CRrs;
291impl crate::RegisterSpec for CRrs {
292 type Ux = u32;
293}
294impl crate::Readable for CRrs {}
296impl crate::Writable for CRrs {
298 type Safety = crate::Unsafe;
299}
300impl crate::Resettable for CRrs {
302 const RESET_VALUE: u32 = 0x2000_0000;
303}