bl702_pac/pds/
pds_ctl2.rs1#[doc = "Register `PDS_CTL2` reader"]
2pub struct R(crate::R<PDS_CTL2_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PDS_CTL2_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PDS_CTL2_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PDS_CTL2_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `PDS_CTL2` writer"]
17pub struct W(crate::W<PDS_CTL2_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<PDS_CTL2_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<PDS_CTL2_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<PDS_CTL2_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `cr_pds_force_np_pwr_off` reader - "]
38pub type CR_PDS_FORCE_NP_PWR_OFF_R = crate::BitReader<bool>;
39#[doc = "Field `cr_pds_force_np_pwr_off` writer - "]
40pub type CR_PDS_FORCE_NP_PWR_OFF_W<'a, const O: u8> =
41 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
42#[doc = "Field `cr_pds_force_bz_pwr_off` reader - "]
43pub type CR_PDS_FORCE_BZ_PWR_OFF_R = crate::BitReader<bool>;
44#[doc = "Field `cr_pds_force_bz_pwr_off` writer - "]
45pub type CR_PDS_FORCE_BZ_PWR_OFF_W<'a, const O: u8> =
46 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
47#[doc = "Field `cr_pds_force_usb_pwr_off` reader - "]
48pub type CR_PDS_FORCE_USB_PWR_OFF_R = crate::BitReader<bool>;
49#[doc = "Field `cr_pds_force_usb_pwr_off` writer - "]
50pub type CR_PDS_FORCE_USB_PWR_OFF_W<'a, const O: u8> =
51 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
52#[doc = "Field `cr_pds_force_np_iso_en` reader - "]
53pub type CR_PDS_FORCE_NP_ISO_EN_R = crate::BitReader<bool>;
54#[doc = "Field `cr_pds_force_np_iso_en` writer - "]
55pub type CR_PDS_FORCE_NP_ISO_EN_W<'a, const O: u8> =
56 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
57#[doc = "Field `cr_pds_force_bz_iso_en` reader - "]
58pub type CR_PDS_FORCE_BZ_ISO_EN_R = crate::BitReader<bool>;
59#[doc = "Field `cr_pds_force_bz_iso_en` writer - "]
60pub type CR_PDS_FORCE_BZ_ISO_EN_W<'a, const O: u8> =
61 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
62#[doc = "Field `cr_pds_force_usb_iso_en` reader - "]
63pub type CR_PDS_FORCE_USB_ISO_EN_R = crate::BitReader<bool>;
64#[doc = "Field `cr_pds_force_usb_iso_en` writer - "]
65pub type CR_PDS_FORCE_USB_ISO_EN_W<'a, const O: u8> =
66 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
67#[doc = "Field `cr_pds_force_np_pds_rst` reader - "]
68pub type CR_PDS_FORCE_NP_PDS_RST_R = crate::BitReader<bool>;
69#[doc = "Field `cr_pds_force_np_pds_rst` writer - "]
70pub type CR_PDS_FORCE_NP_PDS_RST_W<'a, const O: u8> =
71 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
72#[doc = "Field `cr_pds_force_bz_pds_rst` reader - "]
73pub type CR_PDS_FORCE_BZ_PDS_RST_R = crate::BitReader<bool>;
74#[doc = "Field `cr_pds_force_bz_pds_rst` writer - "]
75pub type CR_PDS_FORCE_BZ_PDS_RST_W<'a, const O: u8> =
76 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
77#[doc = "Field `cr_pds_force_usb_pds_rst` reader - "]
78pub type CR_PDS_FORCE_USB_PDS_RST_R = crate::BitReader<bool>;
79#[doc = "Field `cr_pds_force_usb_pds_rst` writer - "]
80pub type CR_PDS_FORCE_USB_PDS_RST_W<'a, const O: u8> =
81 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
82#[doc = "Field `cr_pds_force_np_mem_stby` reader - "]
83pub type CR_PDS_FORCE_NP_MEM_STBY_R = crate::BitReader<bool>;
84#[doc = "Field `cr_pds_force_np_mem_stby` writer - "]
85pub type CR_PDS_FORCE_NP_MEM_STBY_W<'a, const O: u8> =
86 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
87#[doc = "Field `cr_pds_force_bz_mem_stby` reader - "]
88pub type CR_PDS_FORCE_BZ_MEM_STBY_R = crate::BitReader<bool>;
89#[doc = "Field `cr_pds_force_bz_mem_stby` writer - "]
90pub type CR_PDS_FORCE_BZ_MEM_STBY_W<'a, const O: u8> =
91 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
92#[doc = "Field `cr_pds_force_usb_mem_stby` reader - "]
93pub type CR_PDS_FORCE_USB_MEM_STBY_R = crate::BitReader<bool>;
94#[doc = "Field `cr_pds_force_usb_mem_stby` writer - "]
95pub type CR_PDS_FORCE_USB_MEM_STBY_W<'a, const O: u8> =
96 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
97#[doc = "Field `cr_pds_force_np_gate_clk` reader - "]
98pub type CR_PDS_FORCE_NP_GATE_CLK_R = crate::BitReader<bool>;
99#[doc = "Field `cr_pds_force_np_gate_clk` writer - "]
100pub type CR_PDS_FORCE_NP_GATE_CLK_W<'a, const O: u8> =
101 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
102#[doc = "Field `cr_pds_force_bz_gate_clk` reader - "]
103pub type CR_PDS_FORCE_BZ_GATE_CLK_R = crate::BitReader<bool>;
104#[doc = "Field `cr_pds_force_bz_gate_clk` writer - "]
105pub type CR_PDS_FORCE_BZ_GATE_CLK_W<'a, const O: u8> =
106 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
107#[doc = "Field `cr_pds_force_usb_gate_clk` reader - "]
108pub type CR_PDS_FORCE_USB_GATE_CLK_R = crate::BitReader<bool>;
109#[doc = "Field `cr_pds_force_usb_gate_clk` writer - "]
110pub type CR_PDS_FORCE_USB_GATE_CLK_W<'a, const O: u8> =
111 crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
112impl R {
113 #[doc = "Bit 0"]
114 #[inline(always)]
115 pub fn cr_pds_force_np_pwr_off(&self) -> CR_PDS_FORCE_NP_PWR_OFF_R {
116 CR_PDS_FORCE_NP_PWR_OFF_R::new((self.bits & 1) != 0)
117 }
118 #[doc = "Bit 2"]
119 #[inline(always)]
120 pub fn cr_pds_force_bz_pwr_off(&self) -> CR_PDS_FORCE_BZ_PWR_OFF_R {
121 CR_PDS_FORCE_BZ_PWR_OFF_R::new(((self.bits >> 2) & 1) != 0)
122 }
123 #[doc = "Bit 3"]
124 #[inline(always)]
125 pub fn cr_pds_force_usb_pwr_off(&self) -> CR_PDS_FORCE_USB_PWR_OFF_R {
126 CR_PDS_FORCE_USB_PWR_OFF_R::new(((self.bits >> 3) & 1) != 0)
127 }
128 #[doc = "Bit 4"]
129 #[inline(always)]
130 pub fn cr_pds_force_np_iso_en(&self) -> CR_PDS_FORCE_NP_ISO_EN_R {
131 CR_PDS_FORCE_NP_ISO_EN_R::new(((self.bits >> 4) & 1) != 0)
132 }
133 #[doc = "Bit 6"]
134 #[inline(always)]
135 pub fn cr_pds_force_bz_iso_en(&self) -> CR_PDS_FORCE_BZ_ISO_EN_R {
136 CR_PDS_FORCE_BZ_ISO_EN_R::new(((self.bits >> 6) & 1) != 0)
137 }
138 #[doc = "Bit 7"]
139 #[inline(always)]
140 pub fn cr_pds_force_usb_iso_en(&self) -> CR_PDS_FORCE_USB_ISO_EN_R {
141 CR_PDS_FORCE_USB_ISO_EN_R::new(((self.bits >> 7) & 1) != 0)
142 }
143 #[doc = "Bit 8"]
144 #[inline(always)]
145 pub fn cr_pds_force_np_pds_rst(&self) -> CR_PDS_FORCE_NP_PDS_RST_R {
146 CR_PDS_FORCE_NP_PDS_RST_R::new(((self.bits >> 8) & 1) != 0)
147 }
148 #[doc = "Bit 10"]
149 #[inline(always)]
150 pub fn cr_pds_force_bz_pds_rst(&self) -> CR_PDS_FORCE_BZ_PDS_RST_R {
151 CR_PDS_FORCE_BZ_PDS_RST_R::new(((self.bits >> 10) & 1) != 0)
152 }
153 #[doc = "Bit 11"]
154 #[inline(always)]
155 pub fn cr_pds_force_usb_pds_rst(&self) -> CR_PDS_FORCE_USB_PDS_RST_R {
156 CR_PDS_FORCE_USB_PDS_RST_R::new(((self.bits >> 11) & 1) != 0)
157 }
158 #[doc = "Bit 12"]
159 #[inline(always)]
160 pub fn cr_pds_force_np_mem_stby(&self) -> CR_PDS_FORCE_NP_MEM_STBY_R {
161 CR_PDS_FORCE_NP_MEM_STBY_R::new(((self.bits >> 12) & 1) != 0)
162 }
163 #[doc = "Bit 14"]
164 #[inline(always)]
165 pub fn cr_pds_force_bz_mem_stby(&self) -> CR_PDS_FORCE_BZ_MEM_STBY_R {
166 CR_PDS_FORCE_BZ_MEM_STBY_R::new(((self.bits >> 14) & 1) != 0)
167 }
168 #[doc = "Bit 15"]
169 #[inline(always)]
170 pub fn cr_pds_force_usb_mem_stby(&self) -> CR_PDS_FORCE_USB_MEM_STBY_R {
171 CR_PDS_FORCE_USB_MEM_STBY_R::new(((self.bits >> 15) & 1) != 0)
172 }
173 #[doc = "Bit 16"]
174 #[inline(always)]
175 pub fn cr_pds_force_np_gate_clk(&self) -> CR_PDS_FORCE_NP_GATE_CLK_R {
176 CR_PDS_FORCE_NP_GATE_CLK_R::new(((self.bits >> 16) & 1) != 0)
177 }
178 #[doc = "Bit 18"]
179 #[inline(always)]
180 pub fn cr_pds_force_bz_gate_clk(&self) -> CR_PDS_FORCE_BZ_GATE_CLK_R {
181 CR_PDS_FORCE_BZ_GATE_CLK_R::new(((self.bits >> 18) & 1) != 0)
182 }
183 #[doc = "Bit 19"]
184 #[inline(always)]
185 pub fn cr_pds_force_usb_gate_clk(&self) -> CR_PDS_FORCE_USB_GATE_CLK_R {
186 CR_PDS_FORCE_USB_GATE_CLK_R::new(((self.bits >> 19) & 1) != 0)
187 }
188}
189impl W {
190 #[doc = "Bit 0"]
191 #[inline(always)]
192 #[must_use]
193 pub fn cr_pds_force_np_pwr_off(&mut self) -> CR_PDS_FORCE_NP_PWR_OFF_W<0> {
194 CR_PDS_FORCE_NP_PWR_OFF_W::new(self)
195 }
196 #[doc = "Bit 2"]
197 #[inline(always)]
198 #[must_use]
199 pub fn cr_pds_force_bz_pwr_off(&mut self) -> CR_PDS_FORCE_BZ_PWR_OFF_W<2> {
200 CR_PDS_FORCE_BZ_PWR_OFF_W::new(self)
201 }
202 #[doc = "Bit 3"]
203 #[inline(always)]
204 #[must_use]
205 pub fn cr_pds_force_usb_pwr_off(&mut self) -> CR_PDS_FORCE_USB_PWR_OFF_W<3> {
206 CR_PDS_FORCE_USB_PWR_OFF_W::new(self)
207 }
208 #[doc = "Bit 4"]
209 #[inline(always)]
210 #[must_use]
211 pub fn cr_pds_force_np_iso_en(&mut self) -> CR_PDS_FORCE_NP_ISO_EN_W<4> {
212 CR_PDS_FORCE_NP_ISO_EN_W::new(self)
213 }
214 #[doc = "Bit 6"]
215 #[inline(always)]
216 #[must_use]
217 pub fn cr_pds_force_bz_iso_en(&mut self) -> CR_PDS_FORCE_BZ_ISO_EN_W<6> {
218 CR_PDS_FORCE_BZ_ISO_EN_W::new(self)
219 }
220 #[doc = "Bit 7"]
221 #[inline(always)]
222 #[must_use]
223 pub fn cr_pds_force_usb_iso_en(&mut self) -> CR_PDS_FORCE_USB_ISO_EN_W<7> {
224 CR_PDS_FORCE_USB_ISO_EN_W::new(self)
225 }
226 #[doc = "Bit 8"]
227 #[inline(always)]
228 #[must_use]
229 pub fn cr_pds_force_np_pds_rst(&mut self) -> CR_PDS_FORCE_NP_PDS_RST_W<8> {
230 CR_PDS_FORCE_NP_PDS_RST_W::new(self)
231 }
232 #[doc = "Bit 10"]
233 #[inline(always)]
234 #[must_use]
235 pub fn cr_pds_force_bz_pds_rst(&mut self) -> CR_PDS_FORCE_BZ_PDS_RST_W<10> {
236 CR_PDS_FORCE_BZ_PDS_RST_W::new(self)
237 }
238 #[doc = "Bit 11"]
239 #[inline(always)]
240 #[must_use]
241 pub fn cr_pds_force_usb_pds_rst(&mut self) -> CR_PDS_FORCE_USB_PDS_RST_W<11> {
242 CR_PDS_FORCE_USB_PDS_RST_W::new(self)
243 }
244 #[doc = "Bit 12"]
245 #[inline(always)]
246 #[must_use]
247 pub fn cr_pds_force_np_mem_stby(&mut self) -> CR_PDS_FORCE_NP_MEM_STBY_W<12> {
248 CR_PDS_FORCE_NP_MEM_STBY_W::new(self)
249 }
250 #[doc = "Bit 14"]
251 #[inline(always)]
252 #[must_use]
253 pub fn cr_pds_force_bz_mem_stby(&mut self) -> CR_PDS_FORCE_BZ_MEM_STBY_W<14> {
254 CR_PDS_FORCE_BZ_MEM_STBY_W::new(self)
255 }
256 #[doc = "Bit 15"]
257 #[inline(always)]
258 #[must_use]
259 pub fn cr_pds_force_usb_mem_stby(&mut self) -> CR_PDS_FORCE_USB_MEM_STBY_W<15> {
260 CR_PDS_FORCE_USB_MEM_STBY_W::new(self)
261 }
262 #[doc = "Bit 16"]
263 #[inline(always)]
264 #[must_use]
265 pub fn cr_pds_force_np_gate_clk(&mut self) -> CR_PDS_FORCE_NP_GATE_CLK_W<16> {
266 CR_PDS_FORCE_NP_GATE_CLK_W::new(self)
267 }
268 #[doc = "Bit 18"]
269 #[inline(always)]
270 #[must_use]
271 pub fn cr_pds_force_bz_gate_clk(&mut self) -> CR_PDS_FORCE_BZ_GATE_CLK_W<18> {
272 CR_PDS_FORCE_BZ_GATE_CLK_W::new(self)
273 }
274 #[doc = "Bit 19"]
275 #[inline(always)]
276 #[must_use]
277 pub fn cr_pds_force_usb_gate_clk(&mut self) -> CR_PDS_FORCE_USB_GATE_CLK_W<19> {
278 CR_PDS_FORCE_USB_GATE_CLK_W::new(self)
279 }
280 #[doc = "Writes raw bits to the register."]
281 #[inline(always)]
282 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
283 self.0.bits(bits);
284 self
285 }
286}
287#[doc = "PDS_CTL2.\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 [pds_ctl2](index.html) module"]
288pub struct PDS_CTL2_SPEC;
289impl crate::RegisterSpec for PDS_CTL2_SPEC {
290 type Ux = u32;
291}
292#[doc = "`read()` method returns [pds_ctl2::R](R) reader structure"]
293impl crate::Readable for PDS_CTL2_SPEC {
294 type Reader = R;
295}
296#[doc = "`write(|w| ..)` method takes [pds_ctl2::W](W) writer structure"]
297impl crate::Writable for PDS_CTL2_SPEC {
298 type Writer = W;
299 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
300 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
301}
302#[doc = "`reset()` method sets PDS_CTL2 to value 0"]
303impl crate::Resettable for PDS_CTL2_SPEC {
304 const RESET_VALUE: Self::Ux = 0;
305}