1pub type R = crate::R<CtrlSpec>;
3pub type W = crate::W<CtrlSpec>;
5#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9pub enum Hsien {
10 Off = 0,
12 On = 1,
14}
15impl From<Hsien> for bool {
16 #[inline(always)]
17 fn from(variant: Hsien) -> Self {
18 variant as u8 != 0
19 }
20}
21pub type HsienR = crate::BitReader<Hsien>;
23impl HsienR {
24 #[inline(always)]
26 pub const fn variant(&self) -> Hsien {
27 match self.bits {
28 false => Hsien::Off,
29 true => Hsien::On,
30 }
31 }
32 #[inline(always)]
34 pub fn is_off(&self) -> bool {
35 *self == Hsien::Off
36 }
37 #[inline(always)]
39 pub fn is_on(&self) -> bool {
40 *self == Hsien::On
41 }
42}
43pub type HsienW<'a, REG> = crate::BitWriter<'a, REG, Hsien>;
45impl<'a, REG> HsienW<'a, REG>
46where
47 REG: crate::Writable + crate::RegisterSpec,
48{
49 #[inline(always)]
51 pub fn off(self) -> &'a mut crate::W<REG> {
52 self.variant(Hsien::Off)
53 }
54 #[inline(always)]
56 pub fn on(self) -> &'a mut crate::W<REG> {
57 self.variant(Hsien::On)
58 }
59}
60pub type HsirdfR = crate::BitReader;
62pub type HsirdfW<'a, REG> = crate::BitWriter<'a, REG>;
64pub type HsitrimR = crate::FieldReader;
66pub type HsitrimW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
68pub type HsicalR = crate::FieldReader;
70pub type HsicalW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
72#[derive(Clone, Copy, Debug, PartialEq, Eq)]
76pub enum Hseen {
77 Off = 0,
79 On = 1,
81}
82impl From<Hseen> for bool {
83 #[inline(always)]
84 fn from(variant: Hseen) -> Self {
85 variant as u8 != 0
86 }
87}
88pub type HseenR = crate::BitReader<Hseen>;
90impl HseenR {
91 #[inline(always)]
93 pub const fn variant(&self) -> Hseen {
94 match self.bits {
95 false => Hseen::Off,
96 true => Hseen::On,
97 }
98 }
99 #[inline(always)]
101 pub fn is_off(&self) -> bool {
102 *self == Hseen::Off
103 }
104 #[inline(always)]
106 pub fn is_on(&self) -> bool {
107 *self == Hseen::On
108 }
109}
110pub type HseenW<'a, REG> = crate::BitWriter<'a, REG, Hseen>;
112impl<'a, REG> HseenW<'a, REG>
113where
114 REG: crate::Writable + crate::RegisterSpec,
115{
116 #[inline(always)]
118 pub fn off(self) -> &'a mut crate::W<REG> {
119 self.variant(Hseen::Off)
120 }
121 #[inline(always)]
123 pub fn on(self) -> &'a mut crate::W<REG> {
124 self.variant(Hseen::On)
125 }
126}
127pub type HserdfR = crate::BitReader;
129pub type HserdfW<'a, REG> = crate::BitWriter<'a, REG>;
131#[derive(Clone, Copy, Debug, PartialEq, Eq)]
135pub enum Hsebp {
136 NotBypassed = 0,
138 Bypassed = 1,
140}
141impl From<Hsebp> for bool {
142 #[inline(always)]
143 fn from(variant: Hsebp) -> Self {
144 variant as u8 != 0
145 }
146}
147pub type HsebpR = crate::BitReader<Hsebp>;
149impl HsebpR {
150 #[inline(always)]
152 pub const fn variant(&self) -> Hsebp {
153 match self.bits {
154 false => Hsebp::NotBypassed,
155 true => Hsebp::Bypassed,
156 }
157 }
158 #[inline(always)]
160 pub fn is_not_bypassed(&self) -> bool {
161 *self == Hsebp::NotBypassed
162 }
163 #[inline(always)]
165 pub fn is_bypassed(&self) -> bool {
166 *self == Hsebp::Bypassed
167 }
168}
169pub type HsebpW<'a, REG> = crate::BitWriter<'a, REG, Hsebp>;
171impl<'a, REG> HsebpW<'a, REG>
172where
173 REG: crate::Writable + crate::RegisterSpec,
174{
175 #[inline(always)]
177 pub fn not_bypassed(self) -> &'a mut crate::W<REG> {
178 self.variant(Hsebp::NotBypassed)
179 }
180 #[inline(always)]
182 pub fn bypassed(self) -> &'a mut crate::W<REG> {
183 self.variant(Hsebp::Bypassed)
184 }
185}
186#[derive(Clone, Copy, Debug, PartialEq, Eq)]
190pub enum Clkssen {
191 Off = 0,
193 On = 1,
195}
196impl From<Clkssen> for bool {
197 #[inline(always)]
198 fn from(variant: Clkssen) -> Self {
199 variant as u8 != 0
200 }
201}
202pub type ClkssenR = crate::BitReader<Clkssen>;
204impl ClkssenR {
205 #[inline(always)]
207 pub const fn variant(&self) -> Clkssen {
208 match self.bits {
209 false => Clkssen::Off,
210 true => Clkssen::On,
211 }
212 }
213 #[inline(always)]
215 pub fn is_off(&self) -> bool {
216 *self == Clkssen::Off
217 }
218 #[inline(always)]
220 pub fn is_on(&self) -> bool {
221 *self == Clkssen::On
222 }
223}
224pub type ClkssenW<'a, REG> = crate::BitWriter<'a, REG, Clkssen>;
226impl<'a, REG> ClkssenW<'a, REG>
227where
228 REG: crate::Writable + crate::RegisterSpec,
229{
230 #[inline(always)]
232 pub fn off(self) -> &'a mut crate::W<REG> {
233 self.variant(Clkssen::Off)
234 }
235 #[inline(always)]
237 pub fn on(self) -> &'a mut crate::W<REG> {
238 self.variant(Clkssen::On)
239 }
240}
241#[derive(Clone, Copy, Debug, PartialEq, Eq)]
245pub enum Pllen {
246 Off = 0,
248 On = 1,
250}
251impl From<Pllen> for bool {
252 #[inline(always)]
253 fn from(variant: Pllen) -> Self {
254 variant as u8 != 0
255 }
256}
257pub type PllenR = crate::BitReader<Pllen>;
259impl PllenR {
260 #[inline(always)]
262 pub const fn variant(&self) -> Pllen {
263 match self.bits {
264 false => Pllen::Off,
265 true => Pllen::On,
266 }
267 }
268 #[inline(always)]
270 pub fn is_off(&self) -> bool {
271 *self == Pllen::Off
272 }
273 #[inline(always)]
275 pub fn is_on(&self) -> bool {
276 *self == Pllen::On
277 }
278}
279pub type PllenW<'a, REG> = crate::BitWriter<'a, REG, Pllen>;
281impl<'a, REG> PllenW<'a, REG>
282where
283 REG: crate::Writable + crate::RegisterSpec,
284{
285 #[inline(always)]
287 pub fn off(self) -> &'a mut crate::W<REG> {
288 self.variant(Pllen::Off)
289 }
290 #[inline(always)]
292 pub fn on(self) -> &'a mut crate::W<REG> {
293 self.variant(Pllen::On)
294 }
295}
296#[derive(Clone, Copy, Debug, PartialEq, Eq)]
300pub enum Pllrdfr {
301 NotReady = 0,
303 Ready = 1,
305}
306impl From<Pllrdfr> for bool {
307 #[inline(always)]
308 fn from(variant: Pllrdfr) -> Self {
309 variant as u8 != 0
310 }
311}
312pub type PllrdfR = crate::BitReader<Pllrdfr>;
314impl PllrdfR {
315 #[inline(always)]
317 pub const fn variant(&self) -> Pllrdfr {
318 match self.bits {
319 false => Pllrdfr::NotReady,
320 true => Pllrdfr::Ready,
321 }
322 }
323 #[inline(always)]
325 pub fn is_not_ready(&self) -> bool {
326 *self == Pllrdfr::NotReady
327 }
328 #[inline(always)]
330 pub fn is_ready(&self) -> bool {
331 *self == Pllrdfr::Ready
332 }
333}
334pub type PllrdfW<'a, REG> = crate::BitWriter<'a, REG, Pllrdfr>;
336impl<'a, REG> PllrdfW<'a, REG>
337where
338 REG: crate::Writable + crate::RegisterSpec,
339{
340 #[inline(always)]
342 pub fn not_ready(self) -> &'a mut crate::W<REG> {
343 self.variant(Pllrdfr::NotReady)
344 }
345 #[inline(always)]
347 pub fn ready(self) -> &'a mut crate::W<REG> {
348 self.variant(Pllrdfr::Ready)
349 }
350}
351impl R {
352 #[inline(always)]
354 pub fn hsien(&self) -> HsienR {
355 HsienR::new((self.bits & 1) != 0)
356 }
357 #[inline(always)]
359 pub fn hsirdf(&self) -> HsirdfR {
360 HsirdfR::new(((self.bits >> 1) & 1) != 0)
361 }
362 #[inline(always)]
364 pub fn hsitrim(&self) -> HsitrimR {
365 HsitrimR::new(((self.bits >> 3) & 0x1f) as u8)
366 }
367 #[inline(always)]
369 pub fn hsical(&self) -> HsicalR {
370 HsicalR::new(((self.bits >> 8) & 0xff) as u8)
371 }
372 #[inline(always)]
374 pub fn hseen(&self) -> HseenR {
375 HseenR::new(((self.bits >> 16) & 1) != 0)
376 }
377 #[inline(always)]
379 pub fn hserdf(&self) -> HserdfR {
380 HserdfR::new(((self.bits >> 17) & 1) != 0)
381 }
382 #[inline(always)]
384 pub fn hsebp(&self) -> HsebpR {
385 HsebpR::new(((self.bits >> 18) & 1) != 0)
386 }
387 #[inline(always)]
389 pub fn clkssen(&self) -> ClkssenR {
390 ClkssenR::new(((self.bits >> 19) & 1) != 0)
391 }
392 #[inline(always)]
394 pub fn pllen(&self) -> PllenR {
395 PllenR::new(((self.bits >> 24) & 1) != 0)
396 }
397 #[inline(always)]
399 pub fn pllrdf(&self) -> PllrdfR {
400 PllrdfR::new(((self.bits >> 25) & 1) != 0)
401 }
402}
403impl W {
404 #[inline(always)]
406 #[must_use]
407 pub fn hsien(&mut self) -> HsienW<CtrlSpec> {
408 HsienW::new(self, 0)
409 }
410 #[inline(always)]
412 #[must_use]
413 pub fn hsirdf(&mut self) -> HsirdfW<CtrlSpec> {
414 HsirdfW::new(self, 1)
415 }
416 #[inline(always)]
418 #[must_use]
419 pub fn hsitrim(&mut self) -> HsitrimW<CtrlSpec> {
420 HsitrimW::new(self, 3)
421 }
422 #[inline(always)]
424 #[must_use]
425 pub fn hsical(&mut self) -> HsicalW<CtrlSpec> {
426 HsicalW::new(self, 8)
427 }
428 #[inline(always)]
430 #[must_use]
431 pub fn hseen(&mut self) -> HseenW<CtrlSpec> {
432 HseenW::new(self, 16)
433 }
434 #[inline(always)]
436 #[must_use]
437 pub fn hserdf(&mut self) -> HserdfW<CtrlSpec> {
438 HserdfW::new(self, 17)
439 }
440 #[inline(always)]
442 #[must_use]
443 pub fn hsebp(&mut self) -> HsebpW<CtrlSpec> {
444 HsebpW::new(self, 18)
445 }
446 #[inline(always)]
448 #[must_use]
449 pub fn clkssen(&mut self) -> ClkssenW<CtrlSpec> {
450 ClkssenW::new(self, 19)
451 }
452 #[inline(always)]
454 #[must_use]
455 pub fn pllen(&mut self) -> PllenW<CtrlSpec> {
456 PllenW::new(self, 24)
457 }
458 #[inline(always)]
460 #[must_use]
461 pub fn pllrdf(&mut self) -> PllrdfW<CtrlSpec> {
462 PllrdfW::new(self, 25)
463 }
464}
465pub struct CtrlSpec;
469impl crate::RegisterSpec for CtrlSpec {
470 type Ux = u32;
471}
472impl crate::Readable for CtrlSpec {}
474impl crate::Writable for CtrlSpec {
476 type Safety = crate::Unsafe;
477 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
478 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
479}
480impl crate::Resettable for CtrlSpec {
482 const RESET_VALUE: u32 = 0x83;
483}