efm32pg12b500_pac/emu/
em23pernoretainctrl.rs

1#[doc = "Register `EM23PERNORETAINCTRL` reader"]
2pub struct R(crate::R<EM23PERNORETAINCTRL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<EM23PERNORETAINCTRL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<EM23PERNORETAINCTRL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<EM23PERNORETAINCTRL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `EM23PERNORETAINCTRL` writer"]
17pub struct W(crate::W<EM23PERNORETAINCTRL_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<EM23PERNORETAINCTRL_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<EM23PERNORETAINCTRL_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<EM23PERNORETAINCTRL_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `ACMP0DIS` reader - Allow Power Down of ACMP0 During EM23"]
38pub type ACMP0DIS_R = crate::BitReader<bool>;
39#[doc = "Field `ACMP0DIS` writer - Allow Power Down of ACMP0 During EM23"]
40pub type ACMP0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 0>;
41#[doc = "Field `ACMP1DIS` reader - Allow Power Down of ACMP1 During EM23"]
42pub type ACMP1DIS_R = crate::BitReader<bool>;
43#[doc = "Field `ACMP1DIS` writer - Allow Power Down of ACMP1 During EM23"]
44pub type ACMP1DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 1>;
45#[doc = "Field `PCNT0DIS` reader - Allow Power Down of PCNT0 During EM23"]
46pub type PCNT0DIS_R = crate::BitReader<bool>;
47#[doc = "Field `PCNT0DIS` writer - Allow Power Down of PCNT0 During EM23"]
48pub type PCNT0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 2>;
49#[doc = "Field `PCNT1DIS` reader - Allow Power Down of PCNT1 During EM23"]
50pub type PCNT1DIS_R = crate::BitReader<bool>;
51#[doc = "Field `PCNT1DIS` writer - Allow Power Down of PCNT1 During EM23"]
52pub type PCNT1DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 3>;
53#[doc = "Field `PCNT2DIS` reader - Allow Power Down of PCNT2 During EM23"]
54pub type PCNT2DIS_R = crate::BitReader<bool>;
55#[doc = "Field `PCNT2DIS` writer - Allow Power Down of PCNT2 During EM23"]
56pub type PCNT2DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 4>;
57#[doc = "Field `I2C0DIS` reader - Allow Power Down of I2C0 During EM23"]
58pub type I2C0DIS_R = crate::BitReader<bool>;
59#[doc = "Field `I2C0DIS` writer - Allow Power Down of I2C0 During EM23"]
60pub type I2C0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 5>;
61#[doc = "Field `I2C1DIS` reader - Allow Power Down of I2C1 During EM23"]
62pub type I2C1DIS_R = crate::BitReader<bool>;
63#[doc = "Field `I2C1DIS` writer - Allow Power Down of I2C1 During EM23"]
64pub type I2C1DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 6>;
65#[doc = "Field `VDAC0DIS` reader - Allow Power Down of DAC0 During EM23"]
66pub type VDAC0DIS_R = crate::BitReader<bool>;
67#[doc = "Field `VDAC0DIS` writer - Allow Power Down of DAC0 During EM23"]
68pub type VDAC0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 7>;
69#[doc = "Field `IDAC0DIS` reader - Allow Power Down of IDAC0 During EM23"]
70pub type IDAC0DIS_R = crate::BitReader<bool>;
71#[doc = "Field `IDAC0DIS` writer - Allow Power Down of IDAC0 During EM23"]
72pub type IDAC0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 8>;
73#[doc = "Field `ADC0DIS` reader - Allow Power Down of ADC0 During EM23"]
74pub type ADC0DIS_R = crate::BitReader<bool>;
75#[doc = "Field `ADC0DIS` writer - Allow Power Down of ADC0 During EM23"]
76pub type ADC0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 9>;
77#[doc = "Field `LETIMER0DIS` reader - Allow Power Down of LETIMER0 During EM23"]
78pub type LETIMER0DIS_R = crate::BitReader<bool>;
79#[doc = "Field `LETIMER0DIS` writer - Allow Power Down of LETIMER0 During EM23"]
80pub type LETIMER0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 10>;
81#[doc = "Field `WDOG0DIS` reader - Allow Power Down of WDOG0 During EM23"]
82pub type WDOG0DIS_R = crate::BitReader<bool>;
83#[doc = "Field `WDOG0DIS` writer - Allow Power Down of WDOG0 During EM23"]
84pub type WDOG0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 11>;
85#[doc = "Field `WDOG1DIS` reader - Allow Power Down of WDOG1 During EM23"]
86pub type WDOG1DIS_R = crate::BitReader<bool>;
87#[doc = "Field `WDOG1DIS` writer - Allow Power Down of WDOG1 During EM23"]
88pub type WDOG1DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 12>;
89#[doc = "Field `LESENSE0DIS` reader - Allow Power Down of LESENSE0 During EM23"]
90pub type LESENSE0DIS_R = crate::BitReader<bool>;
91#[doc = "Field `LESENSE0DIS` writer - Allow Power Down of LESENSE0 During EM23"]
92pub type LESENSE0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 13>;
93#[doc = "Field `CSENDIS` reader - Allow Power Down of CSEN During EM23"]
94pub type CSENDIS_R = crate::BitReader<bool>;
95#[doc = "Field `CSENDIS` writer - Allow Power Down of CSEN During EM23"]
96pub type CSENDIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 14>;
97#[doc = "Field `LEUART0DIS` reader - Allow Power Down of LEUART0 During EM23"]
98pub type LEUART0DIS_R = crate::BitReader<bool>;
99#[doc = "Field `LEUART0DIS` writer - Allow Power Down of LEUART0 During EM23"]
100pub type LEUART0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 15>;
101impl R {
102    #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"]
103    #[inline(always)]
104    pub fn acmp0dis(&self) -> ACMP0DIS_R {
105        ACMP0DIS_R::new((self.bits & 1) != 0)
106    }
107    #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"]
108    #[inline(always)]
109    pub fn acmp1dis(&self) -> ACMP1DIS_R {
110        ACMP1DIS_R::new(((self.bits >> 1) & 1) != 0)
111    }
112    #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"]
113    #[inline(always)]
114    pub fn pcnt0dis(&self) -> PCNT0DIS_R {
115        PCNT0DIS_R::new(((self.bits >> 2) & 1) != 0)
116    }
117    #[doc = "Bit 3 - Allow Power Down of PCNT1 During EM23"]
118    #[inline(always)]
119    pub fn pcnt1dis(&self) -> PCNT1DIS_R {
120        PCNT1DIS_R::new(((self.bits >> 3) & 1) != 0)
121    }
122    #[doc = "Bit 4 - Allow Power Down of PCNT2 During EM23"]
123    #[inline(always)]
124    pub fn pcnt2dis(&self) -> PCNT2DIS_R {
125        PCNT2DIS_R::new(((self.bits >> 4) & 1) != 0)
126    }
127    #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"]
128    #[inline(always)]
129    pub fn i2c0dis(&self) -> I2C0DIS_R {
130        I2C0DIS_R::new(((self.bits >> 5) & 1) != 0)
131    }
132    #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"]
133    #[inline(always)]
134    pub fn i2c1dis(&self) -> I2C1DIS_R {
135        I2C1DIS_R::new(((self.bits >> 6) & 1) != 0)
136    }
137    #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"]
138    #[inline(always)]
139    pub fn vdac0dis(&self) -> VDAC0DIS_R {
140        VDAC0DIS_R::new(((self.bits >> 7) & 1) != 0)
141    }
142    #[doc = "Bit 8 - Allow Power Down of IDAC0 During EM23"]
143    #[inline(always)]
144    pub fn idac0dis(&self) -> IDAC0DIS_R {
145        IDAC0DIS_R::new(((self.bits >> 8) & 1) != 0)
146    }
147    #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"]
148    #[inline(always)]
149    pub fn adc0dis(&self) -> ADC0DIS_R {
150        ADC0DIS_R::new(((self.bits >> 9) & 1) != 0)
151    }
152    #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"]
153    #[inline(always)]
154    pub fn letimer0dis(&self) -> LETIMER0DIS_R {
155        LETIMER0DIS_R::new(((self.bits >> 10) & 1) != 0)
156    }
157    #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"]
158    #[inline(always)]
159    pub fn wdog0dis(&self) -> WDOG0DIS_R {
160        WDOG0DIS_R::new(((self.bits >> 11) & 1) != 0)
161    }
162    #[doc = "Bit 12 - Allow Power Down of WDOG1 During EM23"]
163    #[inline(always)]
164    pub fn wdog1dis(&self) -> WDOG1DIS_R {
165        WDOG1DIS_R::new(((self.bits >> 12) & 1) != 0)
166    }
167    #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"]
168    #[inline(always)]
169    pub fn lesense0dis(&self) -> LESENSE0DIS_R {
170        LESENSE0DIS_R::new(((self.bits >> 13) & 1) != 0)
171    }
172    #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"]
173    #[inline(always)]
174    pub fn csendis(&self) -> CSENDIS_R {
175        CSENDIS_R::new(((self.bits >> 14) & 1) != 0)
176    }
177    #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"]
178    #[inline(always)]
179    pub fn leuart0dis(&self) -> LEUART0DIS_R {
180        LEUART0DIS_R::new(((self.bits >> 15) & 1) != 0)
181    }
182}
183impl W {
184    #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"]
185    #[inline(always)]
186    pub fn acmp0dis(&mut self) -> ACMP0DIS_W {
187        ACMP0DIS_W::new(self)
188    }
189    #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"]
190    #[inline(always)]
191    pub fn acmp1dis(&mut self) -> ACMP1DIS_W {
192        ACMP1DIS_W::new(self)
193    }
194    #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"]
195    #[inline(always)]
196    pub fn pcnt0dis(&mut self) -> PCNT0DIS_W {
197        PCNT0DIS_W::new(self)
198    }
199    #[doc = "Bit 3 - Allow Power Down of PCNT1 During EM23"]
200    #[inline(always)]
201    pub fn pcnt1dis(&mut self) -> PCNT1DIS_W {
202        PCNT1DIS_W::new(self)
203    }
204    #[doc = "Bit 4 - Allow Power Down of PCNT2 During EM23"]
205    #[inline(always)]
206    pub fn pcnt2dis(&mut self) -> PCNT2DIS_W {
207        PCNT2DIS_W::new(self)
208    }
209    #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"]
210    #[inline(always)]
211    pub fn i2c0dis(&mut self) -> I2C0DIS_W {
212        I2C0DIS_W::new(self)
213    }
214    #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"]
215    #[inline(always)]
216    pub fn i2c1dis(&mut self) -> I2C1DIS_W {
217        I2C1DIS_W::new(self)
218    }
219    #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"]
220    #[inline(always)]
221    pub fn vdac0dis(&mut self) -> VDAC0DIS_W {
222        VDAC0DIS_W::new(self)
223    }
224    #[doc = "Bit 8 - Allow Power Down of IDAC0 During EM23"]
225    #[inline(always)]
226    pub fn idac0dis(&mut self) -> IDAC0DIS_W {
227        IDAC0DIS_W::new(self)
228    }
229    #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"]
230    #[inline(always)]
231    pub fn adc0dis(&mut self) -> ADC0DIS_W {
232        ADC0DIS_W::new(self)
233    }
234    #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"]
235    #[inline(always)]
236    pub fn letimer0dis(&mut self) -> LETIMER0DIS_W {
237        LETIMER0DIS_W::new(self)
238    }
239    #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"]
240    #[inline(always)]
241    pub fn wdog0dis(&mut self) -> WDOG0DIS_W {
242        WDOG0DIS_W::new(self)
243    }
244    #[doc = "Bit 12 - Allow Power Down of WDOG1 During EM23"]
245    #[inline(always)]
246    pub fn wdog1dis(&mut self) -> WDOG1DIS_W {
247        WDOG1DIS_W::new(self)
248    }
249    #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"]
250    #[inline(always)]
251    pub fn lesense0dis(&mut self) -> LESENSE0DIS_W {
252        LESENSE0DIS_W::new(self)
253    }
254    #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"]
255    #[inline(always)]
256    pub fn csendis(&mut self) -> CSENDIS_W {
257        CSENDIS_W::new(self)
258    }
259    #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"]
260    #[inline(always)]
261    pub fn leuart0dis(&mut self) -> LEUART0DIS_W {
262        LEUART0DIS_W::new(self)
263    }
264    #[doc = "Writes raw bits to the register."]
265    #[inline(always)]
266    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
267        self.0.bits(bits);
268        self
269    }
270}
271#[doc = "When Set Corresponding Peripherals May Get Powered Down in EM23\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 [em23pernoretainctrl](index.html) module"]
272pub struct EM23PERNORETAINCTRL_SPEC;
273impl crate::RegisterSpec for EM23PERNORETAINCTRL_SPEC {
274    type Ux = u32;
275}
276#[doc = "`read()` method returns [em23pernoretainctrl::R](R) reader structure"]
277impl crate::Readable for EM23PERNORETAINCTRL_SPEC {
278    type Reader = R;
279}
280#[doc = "`write(|w| ..)` method takes [em23pernoretainctrl::W](W) writer structure"]
281impl crate::Writable for EM23PERNORETAINCTRL_SPEC {
282    type Writer = W;
283}
284#[doc = "`reset()` method sets EM23PERNORETAINCTRL to value 0"]
285impl crate::Resettable for EM23PERNORETAINCTRL_SPEC {
286    #[inline(always)]
287    fn reset_value() -> Self::Ux {
288        0
289    }
290}