1#[doc = "Register `PWR` reader"]
2pub type R = crate::R<PWR_SPEC>;
3#[doc = "Register `PWR` writer"]
4pub type W = crate::W<PWR_SPEC>;
5#[doc = "Field `PD` reader - PLL powerdown
6 To save power set high when PLL output not required."]
7pub type PD_R = crate::BitReader;
8#[doc = "Field `PD` writer - PLL powerdown
9 To save power set high when PLL output not required."]
10pub type PD_W<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `DSMPD` reader - PLL DSM powerdown
12 Nothing is achieved by setting this low."]
13pub type DSMPD_R = crate::BitReader;
14#[doc = "Field `DSMPD` writer - PLL DSM powerdown
15 Nothing is achieved by setting this low."]
16pub type DSMPD_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `POSTDIVPD` reader - PLL post divider powerdown
18 To save power set high when PLL output not required or bypass=1."]
19pub type POSTDIVPD_R = crate::BitReader;
20#[doc = "Field `POSTDIVPD` writer - PLL post divider powerdown
21 To save power set high when PLL output not required or bypass=1."]
22pub type POSTDIVPD_W<'a, REG> = crate::BitWriter<'a, REG>;
23#[doc = "Field `VCOPD` reader - PLL VCO powerdown
24 To save power set high when PLL output not required or bypass=1."]
25pub type VCOPD_R = crate::BitReader;
26#[doc = "Field `VCOPD` writer - PLL VCO powerdown
27 To save power set high when PLL output not required or bypass=1."]
28pub type VCOPD_W<'a, REG> = crate::BitWriter<'a, REG>;
29impl R {
30#[doc = "Bit 0 - PLL powerdown
31 To save power set high when PLL output not required."]
32 #[inline(always)]
33pub fn pd(&self) -> PD_R {
34 PD_R::new((self.bits & 1) != 0)
35 }
36#[doc = "Bit 2 - PLL DSM powerdown
37 Nothing is achieved by setting this low."]
38 #[inline(always)]
39pub fn dsmpd(&self) -> DSMPD_R {
40 DSMPD_R::new(((self.bits >> 2) & 1) != 0)
41 }
42#[doc = "Bit 3 - PLL post divider powerdown
43 To save power set high when PLL output not required or bypass=1."]
44 #[inline(always)]
45pub fn postdivpd(&self) -> POSTDIVPD_R {
46 POSTDIVPD_R::new(((self.bits >> 3) & 1) != 0)
47 }
48#[doc = "Bit 5 - PLL VCO powerdown
49 To save power set high when PLL output not required or bypass=1."]
50 #[inline(always)]
51pub fn vcopd(&self) -> VCOPD_R {
52 VCOPD_R::new(((self.bits >> 5) & 1) != 0)
53 }
54}
55impl W {
56#[doc = "Bit 0 - PLL powerdown
57 To save power set high when PLL output not required."]
58 #[inline(always)]
59 #[must_use]
60pub fn pd(&mut self) -> PD_W<PWR_SPEC> {
61 PD_W::new(self, 0)
62 }
63#[doc = "Bit 2 - PLL DSM powerdown
64 Nothing is achieved by setting this low."]
65 #[inline(always)]
66 #[must_use]
67pub fn dsmpd(&mut self) -> DSMPD_W<PWR_SPEC> {
68 DSMPD_W::new(self, 2)
69 }
70#[doc = "Bit 3 - PLL post divider powerdown
71 To save power set high when PLL output not required or bypass=1."]
72 #[inline(always)]
73 #[must_use]
74pub fn postdivpd(&mut self) -> POSTDIVPD_W<PWR_SPEC> {
75 POSTDIVPD_W::new(self, 3)
76 }
77#[doc = "Bit 5 - PLL VCO powerdown
78 To save power set high when PLL output not required or bypass=1."]
79 #[inline(always)]
80 #[must_use]
81pub fn vcopd(&mut self) -> VCOPD_W<PWR_SPEC> {
82 VCOPD_W::new(self, 5)
83 }
84#[doc = r" Writes raw bits to the register."]
85 #[doc = r""]
86 #[doc = r" # Safety"]
87 #[doc = r""]
88 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
89 #[inline(always)]
90pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
91self.bits = bits;
92self
93}
94}
95#[doc = "Controls the PLL power modes.
9697You can [`read`](crate::generic::Reg::read) this register and get [`pwr::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`pwr::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
98pub struct PWR_SPEC;
99impl crate::RegisterSpec for PWR_SPEC {
100type Ux = u32;
101}
102#[doc = "`read()` method returns [`pwr::R`](R) reader structure"]
103impl crate::Readable for PWR_SPEC {}
104#[doc = "`write(|w| ..)` method takes [`pwr::W`](W) writer structure"]
105impl crate::Writable for PWR_SPEC {
106const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
107const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
108}
109#[doc = "`reset()` method sets PWR to value 0x2d"]
110impl crate::Resettable for PWR_SPEC {
111const RESET_VALUE: u32 = 0x2d;
112}