efm32gg12b830_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>;
101#[doc = "Field `LEUART1DIS` reader - Allow Power Down of LEUART1 During EM23"]
102pub type LEUART1DIS_R = crate::BitReader<bool>;
103#[doc = "Field `LEUART1DIS` writer - Allow Power Down of LEUART1 During EM23"]
104pub type LEUART1DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 16>;
105#[doc = "Field `LCDDIS` reader - Allow Power Down of LCD During EM23"]
106pub type LCDDIS_R = crate::BitReader<bool>;
107#[doc = "Field `LCDDIS` writer - Allow Power Down of LCD During EM23"]
108pub type LCDDIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 17>;
109#[doc = "Field `LETIMER1DIS` reader - Allow Power Down of LETIMER1 During EM23"]
110pub type LETIMER1DIS_R = crate::BitReader<bool>;
111#[doc = "Field `LETIMER1DIS` writer - Allow Power Down of LETIMER1 During EM23"]
112pub type LETIMER1DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 18>;
113#[doc = "Field `ADC1DIS` reader - Allow Power Down of ADC1 During EM23"]
114pub type ADC1DIS_R = crate::BitReader<bool>;
115#[doc = "Field `ADC1DIS` writer - Allow Power Down of ADC1 During EM23"]
116pub type ADC1DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 20>;
117#[doc = "Field `ACMP2DIS` reader - Allow Power Down of ACMP2 During EM23"]
118pub type ACMP2DIS_R = crate::BitReader<bool>;
119#[doc = "Field `ACMP2DIS` writer - Allow Power Down of ACMP2 During EM23"]
120pub type ACMP2DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 21>;
121#[doc = "Field `RTCDIS` reader - Allow Power Down of RTC During EM23"]
122pub type RTCDIS_R = crate::BitReader<bool>;
123#[doc = "Field `RTCDIS` writer - Allow Power Down of RTC During EM23"]
124pub type RTCDIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 23>;
125#[doc = "Field `USBDIS` reader - Allow Power Down of USB During EM23"]
126pub type USBDIS_R = crate::BitReader<bool>;
127#[doc = "Field `USBDIS` writer - Allow Power Down of USB During EM23"]
128pub type USBDIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 24>;
129impl R {
130    #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"]
131    #[inline(always)]
132    pub fn acmp0dis(&self) -> ACMP0DIS_R {
133        ACMP0DIS_R::new((self.bits & 1) != 0)
134    }
135    #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"]
136    #[inline(always)]
137    pub fn acmp1dis(&self) -> ACMP1DIS_R {
138        ACMP1DIS_R::new(((self.bits >> 1) & 1) != 0)
139    }
140    #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"]
141    #[inline(always)]
142    pub fn pcnt0dis(&self) -> PCNT0DIS_R {
143        PCNT0DIS_R::new(((self.bits >> 2) & 1) != 0)
144    }
145    #[doc = "Bit 3 - Allow Power Down of PCNT1 During EM23"]
146    #[inline(always)]
147    pub fn pcnt1dis(&self) -> PCNT1DIS_R {
148        PCNT1DIS_R::new(((self.bits >> 3) & 1) != 0)
149    }
150    #[doc = "Bit 4 - Allow Power Down of PCNT2 During EM23"]
151    #[inline(always)]
152    pub fn pcnt2dis(&self) -> PCNT2DIS_R {
153        PCNT2DIS_R::new(((self.bits >> 4) & 1) != 0)
154    }
155    #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"]
156    #[inline(always)]
157    pub fn i2c0dis(&self) -> I2C0DIS_R {
158        I2C0DIS_R::new(((self.bits >> 5) & 1) != 0)
159    }
160    #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"]
161    #[inline(always)]
162    pub fn i2c1dis(&self) -> I2C1DIS_R {
163        I2C1DIS_R::new(((self.bits >> 6) & 1) != 0)
164    }
165    #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"]
166    #[inline(always)]
167    pub fn vdac0dis(&self) -> VDAC0DIS_R {
168        VDAC0DIS_R::new(((self.bits >> 7) & 1) != 0)
169    }
170    #[doc = "Bit 8 - Allow Power Down of IDAC0 During EM23"]
171    #[inline(always)]
172    pub fn idac0dis(&self) -> IDAC0DIS_R {
173        IDAC0DIS_R::new(((self.bits >> 8) & 1) != 0)
174    }
175    #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"]
176    #[inline(always)]
177    pub fn adc0dis(&self) -> ADC0DIS_R {
178        ADC0DIS_R::new(((self.bits >> 9) & 1) != 0)
179    }
180    #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"]
181    #[inline(always)]
182    pub fn letimer0dis(&self) -> LETIMER0DIS_R {
183        LETIMER0DIS_R::new(((self.bits >> 10) & 1) != 0)
184    }
185    #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"]
186    #[inline(always)]
187    pub fn wdog0dis(&self) -> WDOG0DIS_R {
188        WDOG0DIS_R::new(((self.bits >> 11) & 1) != 0)
189    }
190    #[doc = "Bit 12 - Allow Power Down of WDOG1 During EM23"]
191    #[inline(always)]
192    pub fn wdog1dis(&self) -> WDOG1DIS_R {
193        WDOG1DIS_R::new(((self.bits >> 12) & 1) != 0)
194    }
195    #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"]
196    #[inline(always)]
197    pub fn lesense0dis(&self) -> LESENSE0DIS_R {
198        LESENSE0DIS_R::new(((self.bits >> 13) & 1) != 0)
199    }
200    #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"]
201    #[inline(always)]
202    pub fn csendis(&self) -> CSENDIS_R {
203        CSENDIS_R::new(((self.bits >> 14) & 1) != 0)
204    }
205    #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"]
206    #[inline(always)]
207    pub fn leuart0dis(&self) -> LEUART0DIS_R {
208        LEUART0DIS_R::new(((self.bits >> 15) & 1) != 0)
209    }
210    #[doc = "Bit 16 - Allow Power Down of LEUART1 During EM23"]
211    #[inline(always)]
212    pub fn leuart1dis(&self) -> LEUART1DIS_R {
213        LEUART1DIS_R::new(((self.bits >> 16) & 1) != 0)
214    }
215    #[doc = "Bit 17 - Allow Power Down of LCD During EM23"]
216    #[inline(always)]
217    pub fn lcddis(&self) -> LCDDIS_R {
218        LCDDIS_R::new(((self.bits >> 17) & 1) != 0)
219    }
220    #[doc = "Bit 18 - Allow Power Down of LETIMER1 During EM23"]
221    #[inline(always)]
222    pub fn letimer1dis(&self) -> LETIMER1DIS_R {
223        LETIMER1DIS_R::new(((self.bits >> 18) & 1) != 0)
224    }
225    #[doc = "Bit 20 - Allow Power Down of ADC1 During EM23"]
226    #[inline(always)]
227    pub fn adc1dis(&self) -> ADC1DIS_R {
228        ADC1DIS_R::new(((self.bits >> 20) & 1) != 0)
229    }
230    #[doc = "Bit 21 - Allow Power Down of ACMP2 During EM23"]
231    #[inline(always)]
232    pub fn acmp2dis(&self) -> ACMP2DIS_R {
233        ACMP2DIS_R::new(((self.bits >> 21) & 1) != 0)
234    }
235    #[doc = "Bit 23 - Allow Power Down of RTC During EM23"]
236    #[inline(always)]
237    pub fn rtcdis(&self) -> RTCDIS_R {
238        RTCDIS_R::new(((self.bits >> 23) & 1) != 0)
239    }
240    #[doc = "Bit 24 - Allow Power Down of USB During EM23"]
241    #[inline(always)]
242    pub fn usbdis(&self) -> USBDIS_R {
243        USBDIS_R::new(((self.bits >> 24) & 1) != 0)
244    }
245}
246impl W {
247    #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"]
248    #[inline(always)]
249    pub fn acmp0dis(&mut self) -> ACMP0DIS_W {
250        ACMP0DIS_W::new(self)
251    }
252    #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"]
253    #[inline(always)]
254    pub fn acmp1dis(&mut self) -> ACMP1DIS_W {
255        ACMP1DIS_W::new(self)
256    }
257    #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"]
258    #[inline(always)]
259    pub fn pcnt0dis(&mut self) -> PCNT0DIS_W {
260        PCNT0DIS_W::new(self)
261    }
262    #[doc = "Bit 3 - Allow Power Down of PCNT1 During EM23"]
263    #[inline(always)]
264    pub fn pcnt1dis(&mut self) -> PCNT1DIS_W {
265        PCNT1DIS_W::new(self)
266    }
267    #[doc = "Bit 4 - Allow Power Down of PCNT2 During EM23"]
268    #[inline(always)]
269    pub fn pcnt2dis(&mut self) -> PCNT2DIS_W {
270        PCNT2DIS_W::new(self)
271    }
272    #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"]
273    #[inline(always)]
274    pub fn i2c0dis(&mut self) -> I2C0DIS_W {
275        I2C0DIS_W::new(self)
276    }
277    #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"]
278    #[inline(always)]
279    pub fn i2c1dis(&mut self) -> I2C1DIS_W {
280        I2C1DIS_W::new(self)
281    }
282    #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"]
283    #[inline(always)]
284    pub fn vdac0dis(&mut self) -> VDAC0DIS_W {
285        VDAC0DIS_W::new(self)
286    }
287    #[doc = "Bit 8 - Allow Power Down of IDAC0 During EM23"]
288    #[inline(always)]
289    pub fn idac0dis(&mut self) -> IDAC0DIS_W {
290        IDAC0DIS_W::new(self)
291    }
292    #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"]
293    #[inline(always)]
294    pub fn adc0dis(&mut self) -> ADC0DIS_W {
295        ADC0DIS_W::new(self)
296    }
297    #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"]
298    #[inline(always)]
299    pub fn letimer0dis(&mut self) -> LETIMER0DIS_W {
300        LETIMER0DIS_W::new(self)
301    }
302    #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"]
303    #[inline(always)]
304    pub fn wdog0dis(&mut self) -> WDOG0DIS_W {
305        WDOG0DIS_W::new(self)
306    }
307    #[doc = "Bit 12 - Allow Power Down of WDOG1 During EM23"]
308    #[inline(always)]
309    pub fn wdog1dis(&mut self) -> WDOG1DIS_W {
310        WDOG1DIS_W::new(self)
311    }
312    #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"]
313    #[inline(always)]
314    pub fn lesense0dis(&mut self) -> LESENSE0DIS_W {
315        LESENSE0DIS_W::new(self)
316    }
317    #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"]
318    #[inline(always)]
319    pub fn csendis(&mut self) -> CSENDIS_W {
320        CSENDIS_W::new(self)
321    }
322    #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"]
323    #[inline(always)]
324    pub fn leuart0dis(&mut self) -> LEUART0DIS_W {
325        LEUART0DIS_W::new(self)
326    }
327    #[doc = "Bit 16 - Allow Power Down of LEUART1 During EM23"]
328    #[inline(always)]
329    pub fn leuart1dis(&mut self) -> LEUART1DIS_W {
330        LEUART1DIS_W::new(self)
331    }
332    #[doc = "Bit 17 - Allow Power Down of LCD During EM23"]
333    #[inline(always)]
334    pub fn lcddis(&mut self) -> LCDDIS_W {
335        LCDDIS_W::new(self)
336    }
337    #[doc = "Bit 18 - Allow Power Down of LETIMER1 During EM23"]
338    #[inline(always)]
339    pub fn letimer1dis(&mut self) -> LETIMER1DIS_W {
340        LETIMER1DIS_W::new(self)
341    }
342    #[doc = "Bit 20 - Allow Power Down of ADC1 During EM23"]
343    #[inline(always)]
344    pub fn adc1dis(&mut self) -> ADC1DIS_W {
345        ADC1DIS_W::new(self)
346    }
347    #[doc = "Bit 21 - Allow Power Down of ACMP2 During EM23"]
348    #[inline(always)]
349    pub fn acmp2dis(&mut self) -> ACMP2DIS_W {
350        ACMP2DIS_W::new(self)
351    }
352    #[doc = "Bit 23 - Allow Power Down of RTC During EM23"]
353    #[inline(always)]
354    pub fn rtcdis(&mut self) -> RTCDIS_W {
355        RTCDIS_W::new(self)
356    }
357    #[doc = "Bit 24 - Allow Power Down of USB During EM23"]
358    #[inline(always)]
359    pub fn usbdis(&mut self) -> USBDIS_W {
360        USBDIS_W::new(self)
361    }
362    #[doc = "Writes raw bits to the register."]
363    #[inline(always)]
364    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
365        self.0.bits(bits);
366        self
367    }
368}
369#[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"]
370pub struct EM23PERNORETAINCTRL_SPEC;
371impl crate::RegisterSpec for EM23PERNORETAINCTRL_SPEC {
372    type Ux = u32;
373}
374#[doc = "`read()` method returns [em23pernoretainctrl::R](R) reader structure"]
375impl crate::Readable for EM23PERNORETAINCTRL_SPEC {
376    type Reader = R;
377}
378#[doc = "`write(|w| ..)` method takes [em23pernoretainctrl::W](W) writer structure"]
379impl crate::Writable for EM23PERNORETAINCTRL_SPEC {
380    type Writer = W;
381}
382#[doc = "`reset()` method sets EM23PERNORETAINCTRL to value 0"]
383impl crate::Resettable for EM23PERNORETAINCTRL_SPEC {
384    #[inline(always)]
385    fn reset_value() -> Self::Ux {
386        0
387    }
388}