bl61x_pac/pds/
pds_ctl2.rs

1#[doc = "Register `PDS_CTL2` reader"]
2pub type R = crate::R<PDS_CTL2_SPEC>;
3#[doc = "Register `PDS_CTL2` writer"]
4pub type W = crate::W<PDS_CTL2_SPEC>;
5#[doc = "Field `cr_pds_force_np_pwr_off` reader - "]
6pub type CR_PDS_FORCE_NP_PWR_OFF_R = crate::BitReader;
7#[doc = "Field `cr_pds_force_np_pwr_off` writer - "]
8pub type CR_PDS_FORCE_NP_PWR_OFF_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `cr_pds_force_wb_pwr_off` reader - "]
10pub type CR_PDS_FORCE_WB_PWR_OFF_R = crate::BitReader;
11#[doc = "Field `cr_pds_force_wb_pwr_off` writer - "]
12pub type CR_PDS_FORCE_WB_PWR_OFF_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `cr_pds_force_usb_pwr_off` reader - "]
14pub type CR_PDS_FORCE_USB_PWR_OFF_R = crate::BitReader;
15#[doc = "Field `cr_pds_force_usb_pwr_off` writer - "]
16pub type CR_PDS_FORCE_USB_PWR_OFF_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `cr_pds_force_np_iso_en` reader - "]
18pub type CR_PDS_FORCE_NP_ISO_EN_R = crate::BitReader;
19#[doc = "Field `cr_pds_force_np_iso_en` writer - "]
20pub type CR_PDS_FORCE_NP_ISO_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `cr_pds_force_wb_iso_en` reader - "]
22pub type CR_PDS_FORCE_WB_ISO_EN_R = crate::BitReader;
23#[doc = "Field `cr_pds_force_wb_iso_en` writer - "]
24pub type CR_PDS_FORCE_WB_ISO_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `cr_pds_force_usb_iso_en` reader - "]
26pub type CR_PDS_FORCE_USB_ISO_EN_R = crate::BitReader;
27#[doc = "Field `cr_pds_force_usb_iso_en` writer - "]
28pub type CR_PDS_FORCE_USB_ISO_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `cr_pds_force_np_pds_rst` reader - "]
30pub type CR_PDS_FORCE_NP_PDS_RST_R = crate::BitReader;
31#[doc = "Field `cr_pds_force_np_pds_rst` writer - "]
32pub type CR_PDS_FORCE_NP_PDS_RST_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `cr_pds_force_wb_pds_rst` reader - "]
34pub type CR_PDS_FORCE_WB_PDS_RST_R = crate::BitReader;
35#[doc = "Field `cr_pds_force_wb_pds_rst` writer - "]
36pub type CR_PDS_FORCE_WB_PDS_RST_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `cr_pds_force_usb_pds_rst` reader - "]
38pub type CR_PDS_FORCE_USB_PDS_RST_R = crate::BitReader;
39#[doc = "Field `cr_pds_force_usb_pds_rst` writer - "]
40pub type CR_PDS_FORCE_USB_PDS_RST_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `cr_pds_force_np_mem_stby` reader - "]
42pub type CR_PDS_FORCE_NP_MEM_STBY_R = crate::BitReader;
43#[doc = "Field `cr_pds_force_np_mem_stby` writer - "]
44pub type CR_PDS_FORCE_NP_MEM_STBY_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `cr_pds_force_wb_mem_stby` reader - "]
46pub type CR_PDS_FORCE_WB_MEM_STBY_R = crate::BitReader;
47#[doc = "Field `cr_pds_force_wb_mem_stby` writer - "]
48pub type CR_PDS_FORCE_WB_MEM_STBY_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `cr_pds_force_usb_mem_stby` reader - "]
50pub type CR_PDS_FORCE_USB_MEM_STBY_R = crate::BitReader;
51#[doc = "Field `cr_pds_force_usb_mem_stby` writer - "]
52pub type CR_PDS_FORCE_USB_MEM_STBY_W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `cr_pds_force_np_gate_clk` reader - "]
54pub type CR_PDS_FORCE_NP_GATE_CLK_R = crate::BitReader;
55#[doc = "Field `cr_pds_force_np_gate_clk` writer - "]
56pub type CR_PDS_FORCE_NP_GATE_CLK_W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `cr_pds_force_wb_gate_clk` reader - "]
58pub type CR_PDS_FORCE_WB_GATE_CLK_R = crate::BitReader;
59#[doc = "Field `cr_pds_force_wb_gate_clk` writer - "]
60pub type CR_PDS_FORCE_WB_GATE_CLK_W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `cr_pds_force_usb_gate_clk` reader - "]
62pub type CR_PDS_FORCE_USB_GATE_CLK_R = crate::BitReader;
63#[doc = "Field `cr_pds_force_usb_gate_clk` writer - "]
64pub type CR_PDS_FORCE_USB_GATE_CLK_W<'a, REG> = crate::BitWriter<'a, REG>;
65impl R {
66    #[doc = "Bit 0"]
67    #[inline(always)]
68    pub fn cr_pds_force_np_pwr_off(&self) -> CR_PDS_FORCE_NP_PWR_OFF_R {
69        CR_PDS_FORCE_NP_PWR_OFF_R::new((self.bits & 1) != 0)
70    }
71    #[doc = "Bit 2"]
72    #[inline(always)]
73    pub fn cr_pds_force_wb_pwr_off(&self) -> CR_PDS_FORCE_WB_PWR_OFF_R {
74        CR_PDS_FORCE_WB_PWR_OFF_R::new(((self.bits >> 2) & 1) != 0)
75    }
76    #[doc = "Bit 3"]
77    #[inline(always)]
78    pub fn cr_pds_force_usb_pwr_off(&self) -> CR_PDS_FORCE_USB_PWR_OFF_R {
79        CR_PDS_FORCE_USB_PWR_OFF_R::new(((self.bits >> 3) & 1) != 0)
80    }
81    #[doc = "Bit 4"]
82    #[inline(always)]
83    pub fn cr_pds_force_np_iso_en(&self) -> CR_PDS_FORCE_NP_ISO_EN_R {
84        CR_PDS_FORCE_NP_ISO_EN_R::new(((self.bits >> 4) & 1) != 0)
85    }
86    #[doc = "Bit 6"]
87    #[inline(always)]
88    pub fn cr_pds_force_wb_iso_en(&self) -> CR_PDS_FORCE_WB_ISO_EN_R {
89        CR_PDS_FORCE_WB_ISO_EN_R::new(((self.bits >> 6) & 1) != 0)
90    }
91    #[doc = "Bit 7"]
92    #[inline(always)]
93    pub fn cr_pds_force_usb_iso_en(&self) -> CR_PDS_FORCE_USB_ISO_EN_R {
94        CR_PDS_FORCE_USB_ISO_EN_R::new(((self.bits >> 7) & 1) != 0)
95    }
96    #[doc = "Bit 8"]
97    #[inline(always)]
98    pub fn cr_pds_force_np_pds_rst(&self) -> CR_PDS_FORCE_NP_PDS_RST_R {
99        CR_PDS_FORCE_NP_PDS_RST_R::new(((self.bits >> 8) & 1) != 0)
100    }
101    #[doc = "Bit 10"]
102    #[inline(always)]
103    pub fn cr_pds_force_wb_pds_rst(&self) -> CR_PDS_FORCE_WB_PDS_RST_R {
104        CR_PDS_FORCE_WB_PDS_RST_R::new(((self.bits >> 10) & 1) != 0)
105    }
106    #[doc = "Bit 11"]
107    #[inline(always)]
108    pub fn cr_pds_force_usb_pds_rst(&self) -> CR_PDS_FORCE_USB_PDS_RST_R {
109        CR_PDS_FORCE_USB_PDS_RST_R::new(((self.bits >> 11) & 1) != 0)
110    }
111    #[doc = "Bit 12"]
112    #[inline(always)]
113    pub fn cr_pds_force_np_mem_stby(&self) -> CR_PDS_FORCE_NP_MEM_STBY_R {
114        CR_PDS_FORCE_NP_MEM_STBY_R::new(((self.bits >> 12) & 1) != 0)
115    }
116    #[doc = "Bit 14"]
117    #[inline(always)]
118    pub fn cr_pds_force_wb_mem_stby(&self) -> CR_PDS_FORCE_WB_MEM_STBY_R {
119        CR_PDS_FORCE_WB_MEM_STBY_R::new(((self.bits >> 14) & 1) != 0)
120    }
121    #[doc = "Bit 15"]
122    #[inline(always)]
123    pub fn cr_pds_force_usb_mem_stby(&self) -> CR_PDS_FORCE_USB_MEM_STBY_R {
124        CR_PDS_FORCE_USB_MEM_STBY_R::new(((self.bits >> 15) & 1) != 0)
125    }
126    #[doc = "Bit 16"]
127    #[inline(always)]
128    pub fn cr_pds_force_np_gate_clk(&self) -> CR_PDS_FORCE_NP_GATE_CLK_R {
129        CR_PDS_FORCE_NP_GATE_CLK_R::new(((self.bits >> 16) & 1) != 0)
130    }
131    #[doc = "Bit 18"]
132    #[inline(always)]
133    pub fn cr_pds_force_wb_gate_clk(&self) -> CR_PDS_FORCE_WB_GATE_CLK_R {
134        CR_PDS_FORCE_WB_GATE_CLK_R::new(((self.bits >> 18) & 1) != 0)
135    }
136    #[doc = "Bit 19"]
137    #[inline(always)]
138    pub fn cr_pds_force_usb_gate_clk(&self) -> CR_PDS_FORCE_USB_GATE_CLK_R {
139        CR_PDS_FORCE_USB_GATE_CLK_R::new(((self.bits >> 19) & 1) != 0)
140    }
141}
142impl W {
143    #[doc = "Bit 0"]
144    #[inline(always)]
145    #[must_use]
146    pub fn cr_pds_force_np_pwr_off(&mut self) -> CR_PDS_FORCE_NP_PWR_OFF_W<PDS_CTL2_SPEC> {
147        CR_PDS_FORCE_NP_PWR_OFF_W::new(self, 0)
148    }
149    #[doc = "Bit 2"]
150    #[inline(always)]
151    #[must_use]
152    pub fn cr_pds_force_wb_pwr_off(&mut self) -> CR_PDS_FORCE_WB_PWR_OFF_W<PDS_CTL2_SPEC> {
153        CR_PDS_FORCE_WB_PWR_OFF_W::new(self, 2)
154    }
155    #[doc = "Bit 3"]
156    #[inline(always)]
157    #[must_use]
158    pub fn cr_pds_force_usb_pwr_off(&mut self) -> CR_PDS_FORCE_USB_PWR_OFF_W<PDS_CTL2_SPEC> {
159        CR_PDS_FORCE_USB_PWR_OFF_W::new(self, 3)
160    }
161    #[doc = "Bit 4"]
162    #[inline(always)]
163    #[must_use]
164    pub fn cr_pds_force_np_iso_en(&mut self) -> CR_PDS_FORCE_NP_ISO_EN_W<PDS_CTL2_SPEC> {
165        CR_PDS_FORCE_NP_ISO_EN_W::new(self, 4)
166    }
167    #[doc = "Bit 6"]
168    #[inline(always)]
169    #[must_use]
170    pub fn cr_pds_force_wb_iso_en(&mut self) -> CR_PDS_FORCE_WB_ISO_EN_W<PDS_CTL2_SPEC> {
171        CR_PDS_FORCE_WB_ISO_EN_W::new(self, 6)
172    }
173    #[doc = "Bit 7"]
174    #[inline(always)]
175    #[must_use]
176    pub fn cr_pds_force_usb_iso_en(&mut self) -> CR_PDS_FORCE_USB_ISO_EN_W<PDS_CTL2_SPEC> {
177        CR_PDS_FORCE_USB_ISO_EN_W::new(self, 7)
178    }
179    #[doc = "Bit 8"]
180    #[inline(always)]
181    #[must_use]
182    pub fn cr_pds_force_np_pds_rst(&mut self) -> CR_PDS_FORCE_NP_PDS_RST_W<PDS_CTL2_SPEC> {
183        CR_PDS_FORCE_NP_PDS_RST_W::new(self, 8)
184    }
185    #[doc = "Bit 10"]
186    #[inline(always)]
187    #[must_use]
188    pub fn cr_pds_force_wb_pds_rst(&mut self) -> CR_PDS_FORCE_WB_PDS_RST_W<PDS_CTL2_SPEC> {
189        CR_PDS_FORCE_WB_PDS_RST_W::new(self, 10)
190    }
191    #[doc = "Bit 11"]
192    #[inline(always)]
193    #[must_use]
194    pub fn cr_pds_force_usb_pds_rst(&mut self) -> CR_PDS_FORCE_USB_PDS_RST_W<PDS_CTL2_SPEC> {
195        CR_PDS_FORCE_USB_PDS_RST_W::new(self, 11)
196    }
197    #[doc = "Bit 12"]
198    #[inline(always)]
199    #[must_use]
200    pub fn cr_pds_force_np_mem_stby(&mut self) -> CR_PDS_FORCE_NP_MEM_STBY_W<PDS_CTL2_SPEC> {
201        CR_PDS_FORCE_NP_MEM_STBY_W::new(self, 12)
202    }
203    #[doc = "Bit 14"]
204    #[inline(always)]
205    #[must_use]
206    pub fn cr_pds_force_wb_mem_stby(&mut self) -> CR_PDS_FORCE_WB_MEM_STBY_W<PDS_CTL2_SPEC> {
207        CR_PDS_FORCE_WB_MEM_STBY_W::new(self, 14)
208    }
209    #[doc = "Bit 15"]
210    #[inline(always)]
211    #[must_use]
212    pub fn cr_pds_force_usb_mem_stby(&mut self) -> CR_PDS_FORCE_USB_MEM_STBY_W<PDS_CTL2_SPEC> {
213        CR_PDS_FORCE_USB_MEM_STBY_W::new(self, 15)
214    }
215    #[doc = "Bit 16"]
216    #[inline(always)]
217    #[must_use]
218    pub fn cr_pds_force_np_gate_clk(&mut self) -> CR_PDS_FORCE_NP_GATE_CLK_W<PDS_CTL2_SPEC> {
219        CR_PDS_FORCE_NP_GATE_CLK_W::new(self, 16)
220    }
221    #[doc = "Bit 18"]
222    #[inline(always)]
223    #[must_use]
224    pub fn cr_pds_force_wb_gate_clk(&mut self) -> CR_PDS_FORCE_WB_GATE_CLK_W<PDS_CTL2_SPEC> {
225        CR_PDS_FORCE_WB_GATE_CLK_W::new(self, 18)
226    }
227    #[doc = "Bit 19"]
228    #[inline(always)]
229    #[must_use]
230    pub fn cr_pds_force_usb_gate_clk(&mut self) -> CR_PDS_FORCE_USB_GATE_CLK_W<PDS_CTL2_SPEC> {
231        CR_PDS_FORCE_USB_GATE_CLK_W::new(self, 19)
232    }
233    #[doc = r" Writes raw bits to the register."]
234    #[doc = r""]
235    #[doc = r" # Safety"]
236    #[doc = r""]
237    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
238    #[inline(always)]
239    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
240        self.bits = bits;
241        self
242    }
243}
244#[doc = "PDS_CTL2.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pds_ctl2::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 [`pds_ctl2::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
245pub struct PDS_CTL2_SPEC;
246impl crate::RegisterSpec for PDS_CTL2_SPEC {
247    type Ux = u32;
248}
249#[doc = "`read()` method returns [`pds_ctl2::R`](R) reader structure"]
250impl crate::Readable for PDS_CTL2_SPEC {}
251#[doc = "`write(|w| ..)` method takes [`pds_ctl2::W`](W) writer structure"]
252impl crate::Writable for PDS_CTL2_SPEC {
253    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
254    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
255}
256#[doc = "`reset()` method sets PDS_CTL2 to value 0"]
257impl crate::Resettable for PDS_CTL2_SPEC {
258    const RESET_VALUE: Self::Ux = 0;
259}