efm32tg11b520_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 `I2C0DIS` reader - Allow Power Down of I2C0 During EM23"]
50pub type I2C0DIS_R = crate::BitReader<bool>;
51#[doc = "Field `I2C0DIS` writer - Allow Power Down of I2C0 During EM23"]
52pub type I2C0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 5>;
53#[doc = "Field `I2C1DIS` reader - Allow Power Down of I2C1 During EM23"]
54pub type I2C1DIS_R = crate::BitReader<bool>;
55#[doc = "Field `I2C1DIS` writer - Allow Power Down of I2C1 During EM23"]
56pub type I2C1DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 6>;
57#[doc = "Field `VDAC0DIS` reader - Allow Power Down of DAC0 During EM23"]
58pub type VDAC0DIS_R = crate::BitReader<bool>;
59#[doc = "Field `VDAC0DIS` writer - Allow Power Down of DAC0 During EM23"]
60pub type VDAC0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 7>;
61#[doc = "Field `ADC0DIS` reader - Allow Power Down of ADC0 During EM23"]
62pub type ADC0DIS_R = crate::BitReader<bool>;
63#[doc = "Field `ADC0DIS` writer - Allow Power Down of ADC0 During EM23"]
64pub type ADC0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 9>;
65#[doc = "Field `LETIMER0DIS` reader - Allow Power Down of LETIMER0 During EM23"]
66pub type LETIMER0DIS_R = crate::BitReader<bool>;
67#[doc = "Field `LETIMER0DIS` writer - Allow Power Down of LETIMER0 During EM23"]
68pub type LETIMER0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 10>;
69#[doc = "Field `WDOG0DIS` reader - Allow Power Down of WDOG0 During EM23"]
70pub type WDOG0DIS_R = crate::BitReader<bool>;
71#[doc = "Field `WDOG0DIS` writer - Allow Power Down of WDOG0 During EM23"]
72pub type WDOG0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 11>;
73#[doc = "Field `LESENSE0DIS` reader - Allow Power Down of LESENSE0 During EM23"]
74pub type LESENSE0DIS_R = crate::BitReader<bool>;
75#[doc = "Field `LESENSE0DIS` writer - Allow Power Down of LESENSE0 During EM23"]
76pub type LESENSE0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 13>;
77#[doc = "Field `CSENDIS` reader - Allow Power Down of CSEN During EM23"]
78pub type CSENDIS_R = crate::BitReader<bool>;
79#[doc = "Field `CSENDIS` writer - Allow Power Down of CSEN During EM23"]
80pub type CSENDIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 14>;
81#[doc = "Field `LEUART0DIS` reader - Allow Power Down of LEUART0 During EM23"]
82pub type LEUART0DIS_R = crate::BitReader<bool>;
83#[doc = "Field `LEUART0DIS` writer - Allow Power Down of LEUART0 During EM23"]
84pub type LEUART0DIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 15>;
85#[doc = "Field `LCDDIS` reader - Allow Power Down of LCD During EM23"]
86pub type LCDDIS_R = crate::BitReader<bool>;
87#[doc = "Field `LCDDIS` writer - Allow Power Down of LCD During EM23"]
88pub type LCDDIS_W<'a> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, 17>;
89impl R {
90    #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"]
91    #[inline(always)]
92    pub fn acmp0dis(&self) -> ACMP0DIS_R {
93        ACMP0DIS_R::new((self.bits & 1) != 0)
94    }
95    #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"]
96    #[inline(always)]
97    pub fn acmp1dis(&self) -> ACMP1DIS_R {
98        ACMP1DIS_R::new(((self.bits >> 1) & 1) != 0)
99    }
100    #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"]
101    #[inline(always)]
102    pub fn pcnt0dis(&self) -> PCNT0DIS_R {
103        PCNT0DIS_R::new(((self.bits >> 2) & 1) != 0)
104    }
105    #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"]
106    #[inline(always)]
107    pub fn i2c0dis(&self) -> I2C0DIS_R {
108        I2C0DIS_R::new(((self.bits >> 5) & 1) != 0)
109    }
110    #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"]
111    #[inline(always)]
112    pub fn i2c1dis(&self) -> I2C1DIS_R {
113        I2C1DIS_R::new(((self.bits >> 6) & 1) != 0)
114    }
115    #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"]
116    #[inline(always)]
117    pub fn vdac0dis(&self) -> VDAC0DIS_R {
118        VDAC0DIS_R::new(((self.bits >> 7) & 1) != 0)
119    }
120    #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"]
121    #[inline(always)]
122    pub fn adc0dis(&self) -> ADC0DIS_R {
123        ADC0DIS_R::new(((self.bits >> 9) & 1) != 0)
124    }
125    #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"]
126    #[inline(always)]
127    pub fn letimer0dis(&self) -> LETIMER0DIS_R {
128        LETIMER0DIS_R::new(((self.bits >> 10) & 1) != 0)
129    }
130    #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"]
131    #[inline(always)]
132    pub fn wdog0dis(&self) -> WDOG0DIS_R {
133        WDOG0DIS_R::new(((self.bits >> 11) & 1) != 0)
134    }
135    #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"]
136    #[inline(always)]
137    pub fn lesense0dis(&self) -> LESENSE0DIS_R {
138        LESENSE0DIS_R::new(((self.bits >> 13) & 1) != 0)
139    }
140    #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"]
141    #[inline(always)]
142    pub fn csendis(&self) -> CSENDIS_R {
143        CSENDIS_R::new(((self.bits >> 14) & 1) != 0)
144    }
145    #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"]
146    #[inline(always)]
147    pub fn leuart0dis(&self) -> LEUART0DIS_R {
148        LEUART0DIS_R::new(((self.bits >> 15) & 1) != 0)
149    }
150    #[doc = "Bit 17 - Allow Power Down of LCD During EM23"]
151    #[inline(always)]
152    pub fn lcddis(&self) -> LCDDIS_R {
153        LCDDIS_R::new(((self.bits >> 17) & 1) != 0)
154    }
155}
156impl W {
157    #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"]
158    #[inline(always)]
159    pub fn acmp0dis(&mut self) -> ACMP0DIS_W {
160        ACMP0DIS_W::new(self)
161    }
162    #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"]
163    #[inline(always)]
164    pub fn acmp1dis(&mut self) -> ACMP1DIS_W {
165        ACMP1DIS_W::new(self)
166    }
167    #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"]
168    #[inline(always)]
169    pub fn pcnt0dis(&mut self) -> PCNT0DIS_W {
170        PCNT0DIS_W::new(self)
171    }
172    #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"]
173    #[inline(always)]
174    pub fn i2c0dis(&mut self) -> I2C0DIS_W {
175        I2C0DIS_W::new(self)
176    }
177    #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"]
178    #[inline(always)]
179    pub fn i2c1dis(&mut self) -> I2C1DIS_W {
180        I2C1DIS_W::new(self)
181    }
182    #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"]
183    #[inline(always)]
184    pub fn vdac0dis(&mut self) -> VDAC0DIS_W {
185        VDAC0DIS_W::new(self)
186    }
187    #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"]
188    #[inline(always)]
189    pub fn adc0dis(&mut self) -> ADC0DIS_W {
190        ADC0DIS_W::new(self)
191    }
192    #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"]
193    #[inline(always)]
194    pub fn letimer0dis(&mut self) -> LETIMER0DIS_W {
195        LETIMER0DIS_W::new(self)
196    }
197    #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"]
198    #[inline(always)]
199    pub fn wdog0dis(&mut self) -> WDOG0DIS_W {
200        WDOG0DIS_W::new(self)
201    }
202    #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"]
203    #[inline(always)]
204    pub fn lesense0dis(&mut self) -> LESENSE0DIS_W {
205        LESENSE0DIS_W::new(self)
206    }
207    #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"]
208    #[inline(always)]
209    pub fn csendis(&mut self) -> CSENDIS_W {
210        CSENDIS_W::new(self)
211    }
212    #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"]
213    #[inline(always)]
214    pub fn leuart0dis(&mut self) -> LEUART0DIS_W {
215        LEUART0DIS_W::new(self)
216    }
217    #[doc = "Bit 17 - Allow Power Down of LCD During EM23"]
218    #[inline(always)]
219    pub fn lcddis(&mut self) -> LCDDIS_W {
220        LCDDIS_W::new(self)
221    }
222    #[doc = "Writes raw bits to the register."]
223    #[inline(always)]
224    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
225        self.0.bits(bits);
226        self
227    }
228}
229#[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"]
230pub struct EM23PERNORETAINCTRL_SPEC;
231impl crate::RegisterSpec for EM23PERNORETAINCTRL_SPEC {
232    type Ux = u32;
233}
234#[doc = "`read()` method returns [em23pernoretainctrl::R](R) reader structure"]
235impl crate::Readable for EM23PERNORETAINCTRL_SPEC {
236    type Reader = R;
237}
238#[doc = "`write(|w| ..)` method takes [em23pernoretainctrl::W](W) writer structure"]
239impl crate::Writable for EM23PERNORETAINCTRL_SPEC {
240    type Writer = W;
241}
242#[doc = "`reset()` method sets EM23PERNORETAINCTRL to value 0"]
243impl crate::Resettable for EM23PERNORETAINCTRL_SPEC {
244    #[inline(always)]
245    fn reset_value() -> Self::Ux {
246        0
247    }
248}