bl602_pac/pds/
pds_ctl2.rs

1#[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_wb_pwr_off` reader - "]
43pub type CR_PDS_FORCE_WB_PWR_OFF_R = crate::BitReader<bool>;
44#[doc = "Field `cr_pds_force_wb_pwr_off` writer - "]
45pub type CR_PDS_FORCE_WB_PWR_OFF_W<'a, const O: u8> =
46    crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
47#[doc = "Field `cr_pds_force_np_iso_en` reader - "]
48pub type CR_PDS_FORCE_NP_ISO_EN_R = crate::BitReader<bool>;
49#[doc = "Field `cr_pds_force_np_iso_en` writer - "]
50pub type CR_PDS_FORCE_NP_ISO_EN_W<'a, const O: u8> =
51    crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
52#[doc = "Field `cr_pds_force_wb_iso_en` reader - "]
53pub type CR_PDS_FORCE_WB_ISO_EN_R = crate::BitReader<bool>;
54#[doc = "Field `cr_pds_force_wb_iso_en` writer - "]
55pub type CR_PDS_FORCE_WB_ISO_EN_W<'a, const O: u8> =
56    crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
57#[doc = "Field `cr_pds_force_np_pds_rst` reader - "]
58pub type CR_PDS_FORCE_NP_PDS_RST_R = crate::BitReader<bool>;
59#[doc = "Field `cr_pds_force_np_pds_rst` writer - "]
60pub type CR_PDS_FORCE_NP_PDS_RST_W<'a, const O: u8> =
61    crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
62#[doc = "Field `cr_pds_force_wb_pds_rst` reader - "]
63pub type CR_PDS_FORCE_WB_PDS_RST_R = crate::BitReader<bool>;
64#[doc = "Field `cr_pds_force_wb_pds_rst` writer - "]
65pub type CR_PDS_FORCE_WB_PDS_RST_W<'a, const O: u8> =
66    crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
67#[doc = "Field `cr_pds_force_np_mem_stby` reader - "]
68pub type CR_PDS_FORCE_NP_MEM_STBY_R = crate::BitReader<bool>;
69#[doc = "Field `cr_pds_force_np_mem_stby` writer - "]
70pub type CR_PDS_FORCE_NP_MEM_STBY_W<'a, const O: u8> =
71    crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
72#[doc = "Field `cr_pds_force_wb_mem_stby` reader - "]
73pub type CR_PDS_FORCE_WB_MEM_STBY_R = crate::BitReader<bool>;
74#[doc = "Field `cr_pds_force_wb_mem_stby` writer - "]
75pub type CR_PDS_FORCE_WB_MEM_STBY_W<'a, const O: u8> =
76    crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
77#[doc = "Field `cr_pds_force_np_gate_clk` reader - "]
78pub type CR_PDS_FORCE_NP_GATE_CLK_R = crate::BitReader<bool>;
79#[doc = "Field `cr_pds_force_np_gate_clk` writer - "]
80pub type CR_PDS_FORCE_NP_GATE_CLK_W<'a, const O: u8> =
81    crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
82#[doc = "Field `cr_pds_force_wb_gate_clk` reader - "]
83pub type CR_PDS_FORCE_WB_GATE_CLK_R = crate::BitReader<bool>;
84#[doc = "Field `cr_pds_force_wb_gate_clk` writer - "]
85pub type CR_PDS_FORCE_WB_GATE_CLK_W<'a, const O: u8> =
86    crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>;
87impl R {
88    #[doc = "Bit 0"]
89    #[inline(always)]
90    pub fn cr_pds_force_np_pwr_off(&self) -> CR_PDS_FORCE_NP_PWR_OFF_R {
91        CR_PDS_FORCE_NP_PWR_OFF_R::new((self.bits & 1) != 0)
92    }
93    #[doc = "Bit 2"]
94    #[inline(always)]
95    pub fn cr_pds_force_wb_pwr_off(&self) -> CR_PDS_FORCE_WB_PWR_OFF_R {
96        CR_PDS_FORCE_WB_PWR_OFF_R::new(((self.bits >> 2) & 1) != 0)
97    }
98    #[doc = "Bit 4"]
99    #[inline(always)]
100    pub fn cr_pds_force_np_iso_en(&self) -> CR_PDS_FORCE_NP_ISO_EN_R {
101        CR_PDS_FORCE_NP_ISO_EN_R::new(((self.bits >> 4) & 1) != 0)
102    }
103    #[doc = "Bit 6"]
104    #[inline(always)]
105    pub fn cr_pds_force_wb_iso_en(&self) -> CR_PDS_FORCE_WB_ISO_EN_R {
106        CR_PDS_FORCE_WB_ISO_EN_R::new(((self.bits >> 6) & 1) != 0)
107    }
108    #[doc = "Bit 8"]
109    #[inline(always)]
110    pub fn cr_pds_force_np_pds_rst(&self) -> CR_PDS_FORCE_NP_PDS_RST_R {
111        CR_PDS_FORCE_NP_PDS_RST_R::new(((self.bits >> 8) & 1) != 0)
112    }
113    #[doc = "Bit 10"]
114    #[inline(always)]
115    pub fn cr_pds_force_wb_pds_rst(&self) -> CR_PDS_FORCE_WB_PDS_RST_R {
116        CR_PDS_FORCE_WB_PDS_RST_R::new(((self.bits >> 10) & 1) != 0)
117    }
118    #[doc = "Bit 12"]
119    #[inline(always)]
120    pub fn cr_pds_force_np_mem_stby(&self) -> CR_PDS_FORCE_NP_MEM_STBY_R {
121        CR_PDS_FORCE_NP_MEM_STBY_R::new(((self.bits >> 12) & 1) != 0)
122    }
123    #[doc = "Bit 14"]
124    #[inline(always)]
125    pub fn cr_pds_force_wb_mem_stby(&self) -> CR_PDS_FORCE_WB_MEM_STBY_R {
126        CR_PDS_FORCE_WB_MEM_STBY_R::new(((self.bits >> 14) & 1) != 0)
127    }
128    #[doc = "Bit 16"]
129    #[inline(always)]
130    pub fn cr_pds_force_np_gate_clk(&self) -> CR_PDS_FORCE_NP_GATE_CLK_R {
131        CR_PDS_FORCE_NP_GATE_CLK_R::new(((self.bits >> 16) & 1) != 0)
132    }
133    #[doc = "Bit 18"]
134    #[inline(always)]
135    pub fn cr_pds_force_wb_gate_clk(&self) -> CR_PDS_FORCE_WB_GATE_CLK_R {
136        CR_PDS_FORCE_WB_GATE_CLK_R::new(((self.bits >> 18) & 1) != 0)
137    }
138}
139impl W {
140    #[doc = "Bit 0"]
141    #[inline(always)]
142    #[must_use]
143    pub fn cr_pds_force_np_pwr_off(&mut self) -> CR_PDS_FORCE_NP_PWR_OFF_W<0> {
144        CR_PDS_FORCE_NP_PWR_OFF_W::new(self)
145    }
146    #[doc = "Bit 2"]
147    #[inline(always)]
148    #[must_use]
149    pub fn cr_pds_force_wb_pwr_off(&mut self) -> CR_PDS_FORCE_WB_PWR_OFF_W<2> {
150        CR_PDS_FORCE_WB_PWR_OFF_W::new(self)
151    }
152    #[doc = "Bit 4"]
153    #[inline(always)]
154    #[must_use]
155    pub fn cr_pds_force_np_iso_en(&mut self) -> CR_PDS_FORCE_NP_ISO_EN_W<4> {
156        CR_PDS_FORCE_NP_ISO_EN_W::new(self)
157    }
158    #[doc = "Bit 6"]
159    #[inline(always)]
160    #[must_use]
161    pub fn cr_pds_force_wb_iso_en(&mut self) -> CR_PDS_FORCE_WB_ISO_EN_W<6> {
162        CR_PDS_FORCE_WB_ISO_EN_W::new(self)
163    }
164    #[doc = "Bit 8"]
165    #[inline(always)]
166    #[must_use]
167    pub fn cr_pds_force_np_pds_rst(&mut self) -> CR_PDS_FORCE_NP_PDS_RST_W<8> {
168        CR_PDS_FORCE_NP_PDS_RST_W::new(self)
169    }
170    #[doc = "Bit 10"]
171    #[inline(always)]
172    #[must_use]
173    pub fn cr_pds_force_wb_pds_rst(&mut self) -> CR_PDS_FORCE_WB_PDS_RST_W<10> {
174        CR_PDS_FORCE_WB_PDS_RST_W::new(self)
175    }
176    #[doc = "Bit 12"]
177    #[inline(always)]
178    #[must_use]
179    pub fn cr_pds_force_np_mem_stby(&mut self) -> CR_PDS_FORCE_NP_MEM_STBY_W<12> {
180        CR_PDS_FORCE_NP_MEM_STBY_W::new(self)
181    }
182    #[doc = "Bit 14"]
183    #[inline(always)]
184    #[must_use]
185    pub fn cr_pds_force_wb_mem_stby(&mut self) -> CR_PDS_FORCE_WB_MEM_STBY_W<14> {
186        CR_PDS_FORCE_WB_MEM_STBY_W::new(self)
187    }
188    #[doc = "Bit 16"]
189    #[inline(always)]
190    #[must_use]
191    pub fn cr_pds_force_np_gate_clk(&mut self) -> CR_PDS_FORCE_NP_GATE_CLK_W<16> {
192        CR_PDS_FORCE_NP_GATE_CLK_W::new(self)
193    }
194    #[doc = "Bit 18"]
195    #[inline(always)]
196    #[must_use]
197    pub fn cr_pds_force_wb_gate_clk(&mut self) -> CR_PDS_FORCE_WB_GATE_CLK_W<18> {
198        CR_PDS_FORCE_WB_GATE_CLK_W::new(self)
199    }
200    #[doc = "Writes raw bits to the register."]
201    #[inline(always)]
202    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
203        self.0.bits(bits);
204        self
205    }
206}
207#[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"]
208pub struct PDS_CTL2_SPEC;
209impl crate::RegisterSpec for PDS_CTL2_SPEC {
210    type Ux = u32;
211}
212#[doc = "`read()` method returns [pds_ctl2::R](R) reader structure"]
213impl crate::Readable for PDS_CTL2_SPEC {
214    type Reader = R;
215}
216#[doc = "`write(|w| ..)` method takes [pds_ctl2::W](W) writer structure"]
217impl crate::Writable for PDS_CTL2_SPEC {
218    type Writer = W;
219    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
220    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
221}
222#[doc = "`reset()` method sets PDS_CTL2 to value 0"]
223impl crate::Resettable for PDS_CTL2_SPEC {
224    const RESET_VALUE: Self::Ux = 0;
225}