bl702_pac/pds/
clkpll_rz.rs1#[doc = "Register `clkpll_rz` reader"]
2pub struct R(crate::R<CLKPLL_RZ_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CLKPLL_RZ_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CLKPLL_RZ_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CLKPLL_RZ_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `clkpll_rz` writer"]
17pub struct W(crate::W<CLKPLL_RZ_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CLKPLL_RZ_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<CLKPLL_RZ_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CLKPLL_RZ_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `clkpll_c4_en` reader - "]
38pub type CLKPLL_C4_EN_R = crate::BitReader<bool>;
39#[doc = "Field `clkpll_c4_en` writer - "]
40pub type CLKPLL_C4_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_RZ_SPEC, bool, O>;
41#[doc = "Field `clkpll_r4` reader - "]
42pub type CLKPLL_R4_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `clkpll_r4` writer - "]
44pub type CLKPLL_R4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKPLL_RZ_SPEC, u8, u8, 2, O>;
45#[doc = "Field `clkpll_r4_short` reader - "]
46pub type CLKPLL_R4_SHORT_R = crate::BitReader<bool>;
47#[doc = "Field `clkpll_r4_short` writer - "]
48pub type CLKPLL_R4_SHORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_RZ_SPEC, bool, O>;
49#[doc = "Field `clkpll_c3` reader - "]
50pub type CLKPLL_C3_R = crate::FieldReader<u8, u8>;
51#[doc = "Field `clkpll_c3` writer - "]
52pub type CLKPLL_C3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKPLL_RZ_SPEC, u8, u8, 2, O>;
53#[doc = "Field `clkpll_cz` reader - "]
54pub type CLKPLL_CZ_R = crate::FieldReader<u8, u8>;
55#[doc = "Field `clkpll_cz` writer - "]
56pub type CLKPLL_CZ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKPLL_RZ_SPEC, u8, u8, 2, O>;
57#[doc = "Field `clkpll_rz` reader - "]
58pub type CLKPLL_RZ_R = crate::FieldReader<u8, u8>;
59#[doc = "Field `clkpll_rz` writer - "]
60pub type CLKPLL_RZ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKPLL_RZ_SPEC, u8, u8, 3, O>;
61impl R {
62 #[doc = "Bit 0"]
63 #[inline(always)]
64 pub fn clkpll_c4_en(&self) -> CLKPLL_C4_EN_R {
65 CLKPLL_C4_EN_R::new((self.bits & 1) != 0)
66 }
67 #[doc = "Bits 4:5"]
68 #[inline(always)]
69 pub fn clkpll_r4(&self) -> CLKPLL_R4_R {
70 CLKPLL_R4_R::new(((self.bits >> 4) & 3) as u8)
71 }
72 #[doc = "Bit 8"]
73 #[inline(always)]
74 pub fn clkpll_r4_short(&self) -> CLKPLL_R4_SHORT_R {
75 CLKPLL_R4_SHORT_R::new(((self.bits >> 8) & 1) != 0)
76 }
77 #[doc = "Bits 12:13"]
78 #[inline(always)]
79 pub fn clkpll_c3(&self) -> CLKPLL_C3_R {
80 CLKPLL_C3_R::new(((self.bits >> 12) & 3) as u8)
81 }
82 #[doc = "Bits 14:15"]
83 #[inline(always)]
84 pub fn clkpll_cz(&self) -> CLKPLL_CZ_R {
85 CLKPLL_CZ_R::new(((self.bits >> 14) & 3) as u8)
86 }
87 #[doc = "Bits 16:18"]
88 #[inline(always)]
89 pub fn clkpll_rz(&self) -> CLKPLL_RZ_R {
90 CLKPLL_RZ_R::new(((self.bits >> 16) & 7) as u8)
91 }
92}
93impl W {
94 #[doc = "Bit 0"]
95 #[inline(always)]
96 #[must_use]
97 pub fn clkpll_c4_en(&mut self) -> CLKPLL_C4_EN_W<0> {
98 CLKPLL_C4_EN_W::new(self)
99 }
100 #[doc = "Bits 4:5"]
101 #[inline(always)]
102 #[must_use]
103 pub fn clkpll_r4(&mut self) -> CLKPLL_R4_W<4> {
104 CLKPLL_R4_W::new(self)
105 }
106 #[doc = "Bit 8"]
107 #[inline(always)]
108 #[must_use]
109 pub fn clkpll_r4_short(&mut self) -> CLKPLL_R4_SHORT_W<8> {
110 CLKPLL_R4_SHORT_W::new(self)
111 }
112 #[doc = "Bits 12:13"]
113 #[inline(always)]
114 #[must_use]
115 pub fn clkpll_c3(&mut self) -> CLKPLL_C3_W<12> {
116 CLKPLL_C3_W::new(self)
117 }
118 #[doc = "Bits 14:15"]
119 #[inline(always)]
120 #[must_use]
121 pub fn clkpll_cz(&mut self) -> CLKPLL_CZ_W<14> {
122 CLKPLL_CZ_W::new(self)
123 }
124 #[doc = "Bits 16:18"]
125 #[inline(always)]
126 #[must_use]
127 pub fn clkpll_rz(&mut self) -> CLKPLL_RZ_W<16> {
128 CLKPLL_RZ_W::new(self)
129 }
130 #[doc = "Writes raw bits to the register."]
131 #[inline(always)]
132 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
133 self.0.bits(bits);
134 self
135 }
136}
137#[doc = "clkpll_rz.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [clkpll_rz](index.html) module"]
138pub struct CLKPLL_RZ_SPEC;
139impl crate::RegisterSpec for CLKPLL_RZ_SPEC {
140 type Ux = u32;
141}
142#[doc = "`read()` method returns [clkpll_rz::R](R) reader structure"]
143impl crate::Readable for CLKPLL_RZ_SPEC {
144 type Reader = R;
145}
146#[doc = "`write(|w| ..)` method takes [clkpll_rz::W](W) writer structure"]
147impl crate::Writable for CLKPLL_RZ_SPEC {
148 type Writer = W;
149 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
150 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
151}
152#[doc = "`reset()` method sets clkpll_rz to value 0"]
153impl crate::Resettable for CLKPLL_RZ_SPEC {
154 const RESET_VALUE: Self::Ux = 0;
155}