efm32jg12b_pac/efm32jg12b500/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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
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, const O: u8> =
81    crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
82#[doc = "Field `WDOG0DIS` reader - Allow Power Down of WDOG0 During EM23"]
83pub type WDOG0DIS_R = crate::BitReader<bool>;
84#[doc = "Field `WDOG0DIS` writer - Allow Power Down of WDOG0 During EM23"]
85pub type WDOG0DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
86#[doc = "Field `WDOG1DIS` reader - Allow Power Down of WDOG1 During EM23"]
87pub type WDOG1DIS_R = crate::BitReader<bool>;
88#[doc = "Field `WDOG1DIS` writer - Allow Power Down of WDOG1 During EM23"]
89pub type WDOG1DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
90#[doc = "Field `LESENSE0DIS` reader - Allow Power Down of LESENSE0 During EM23"]
91pub type LESENSE0DIS_R = crate::BitReader<bool>;
92#[doc = "Field `LESENSE0DIS` writer - Allow Power Down of LESENSE0 During EM23"]
93pub type LESENSE0DIS_W<'a, const O: u8> =
94    crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
95#[doc = "Field `CSENDIS` reader - Allow Power Down of CSEN During EM23"]
96pub type CSENDIS_R = crate::BitReader<bool>;
97#[doc = "Field `CSENDIS` writer - Allow Power Down of CSEN During EM23"]
98pub type CSENDIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
99#[doc = "Field `LEUART0DIS` reader - Allow Power Down of LEUART0 During EM23"]
100pub type LEUART0DIS_R = crate::BitReader<bool>;
101#[doc = "Field `LEUART0DIS` writer - Allow Power Down of LEUART0 During EM23"]
102pub type LEUART0DIS_W<'a, const O: u8> =
103    crate::BitWriter<'a, u32, EM23PERNORETAINCTRL_SPEC, bool, O>;
104impl R {
105    #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"]
106    #[inline(always)]
107    pub fn acmp0dis(&self) -> ACMP0DIS_R {
108        ACMP0DIS_R::new((self.bits & 1) != 0)
109    }
110    #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"]
111    #[inline(always)]
112    pub fn acmp1dis(&self) -> ACMP1DIS_R {
113        ACMP1DIS_R::new(((self.bits >> 1) & 1) != 0)
114    }
115    #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"]
116    #[inline(always)]
117    pub fn pcnt0dis(&self) -> PCNT0DIS_R {
118        PCNT0DIS_R::new(((self.bits >> 2) & 1) != 0)
119    }
120    #[doc = "Bit 3 - Allow Power Down of PCNT1 During EM23"]
121    #[inline(always)]
122    pub fn pcnt1dis(&self) -> PCNT1DIS_R {
123        PCNT1DIS_R::new(((self.bits >> 3) & 1) != 0)
124    }
125    #[doc = "Bit 4 - Allow Power Down of PCNT2 During EM23"]
126    #[inline(always)]
127    pub fn pcnt2dis(&self) -> PCNT2DIS_R {
128        PCNT2DIS_R::new(((self.bits >> 4) & 1) != 0)
129    }
130    #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"]
131    #[inline(always)]
132    pub fn i2c0dis(&self) -> I2C0DIS_R {
133        I2C0DIS_R::new(((self.bits >> 5) & 1) != 0)
134    }
135    #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"]
136    #[inline(always)]
137    pub fn i2c1dis(&self) -> I2C1DIS_R {
138        I2C1DIS_R::new(((self.bits >> 6) & 1) != 0)
139    }
140    #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"]
141    #[inline(always)]
142    pub fn vdac0dis(&self) -> VDAC0DIS_R {
143        VDAC0DIS_R::new(((self.bits >> 7) & 1) != 0)
144    }
145    #[doc = "Bit 8 - Allow Power Down of IDAC0 During EM23"]
146    #[inline(always)]
147    pub fn idac0dis(&self) -> IDAC0DIS_R {
148        IDAC0DIS_R::new(((self.bits >> 8) & 1) != 0)
149    }
150    #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"]
151    #[inline(always)]
152    pub fn adc0dis(&self) -> ADC0DIS_R {
153        ADC0DIS_R::new(((self.bits >> 9) & 1) != 0)
154    }
155    #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"]
156    #[inline(always)]
157    pub fn letimer0dis(&self) -> LETIMER0DIS_R {
158        LETIMER0DIS_R::new(((self.bits >> 10) & 1) != 0)
159    }
160    #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"]
161    #[inline(always)]
162    pub fn wdog0dis(&self) -> WDOG0DIS_R {
163        WDOG0DIS_R::new(((self.bits >> 11) & 1) != 0)
164    }
165    #[doc = "Bit 12 - Allow Power Down of WDOG1 During EM23"]
166    #[inline(always)]
167    pub fn wdog1dis(&self) -> WDOG1DIS_R {
168        WDOG1DIS_R::new(((self.bits >> 12) & 1) != 0)
169    }
170    #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"]
171    #[inline(always)]
172    pub fn lesense0dis(&self) -> LESENSE0DIS_R {
173        LESENSE0DIS_R::new(((self.bits >> 13) & 1) != 0)
174    }
175    #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"]
176    #[inline(always)]
177    pub fn csendis(&self) -> CSENDIS_R {
178        CSENDIS_R::new(((self.bits >> 14) & 1) != 0)
179    }
180    #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"]
181    #[inline(always)]
182    pub fn leuart0dis(&self) -> LEUART0DIS_R {
183        LEUART0DIS_R::new(((self.bits >> 15) & 1) != 0)
184    }
185}
186impl W {
187    #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"]
188    #[inline(always)]
189    #[must_use]
190    pub fn acmp0dis(&mut self) -> ACMP0DIS_W<0> {
191        ACMP0DIS_W::new(self)
192    }
193    #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"]
194    #[inline(always)]
195    #[must_use]
196    pub fn acmp1dis(&mut self) -> ACMP1DIS_W<1> {
197        ACMP1DIS_W::new(self)
198    }
199    #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"]
200    #[inline(always)]
201    #[must_use]
202    pub fn pcnt0dis(&mut self) -> PCNT0DIS_W<2> {
203        PCNT0DIS_W::new(self)
204    }
205    #[doc = "Bit 3 - Allow Power Down of PCNT1 During EM23"]
206    #[inline(always)]
207    #[must_use]
208    pub fn pcnt1dis(&mut self) -> PCNT1DIS_W<3> {
209        PCNT1DIS_W::new(self)
210    }
211    #[doc = "Bit 4 - Allow Power Down of PCNT2 During EM23"]
212    #[inline(always)]
213    #[must_use]
214    pub fn pcnt2dis(&mut self) -> PCNT2DIS_W<4> {
215        PCNT2DIS_W::new(self)
216    }
217    #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"]
218    #[inline(always)]
219    #[must_use]
220    pub fn i2c0dis(&mut self) -> I2C0DIS_W<5> {
221        I2C0DIS_W::new(self)
222    }
223    #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"]
224    #[inline(always)]
225    #[must_use]
226    pub fn i2c1dis(&mut self) -> I2C1DIS_W<6> {
227        I2C1DIS_W::new(self)
228    }
229    #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"]
230    #[inline(always)]
231    #[must_use]
232    pub fn vdac0dis(&mut self) -> VDAC0DIS_W<7> {
233        VDAC0DIS_W::new(self)
234    }
235    #[doc = "Bit 8 - Allow Power Down of IDAC0 During EM23"]
236    #[inline(always)]
237    #[must_use]
238    pub fn idac0dis(&mut self) -> IDAC0DIS_W<8> {
239        IDAC0DIS_W::new(self)
240    }
241    #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"]
242    #[inline(always)]
243    #[must_use]
244    pub fn adc0dis(&mut self) -> ADC0DIS_W<9> {
245        ADC0DIS_W::new(self)
246    }
247    #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"]
248    #[inline(always)]
249    #[must_use]
250    pub fn letimer0dis(&mut self) -> LETIMER0DIS_W<10> {
251        LETIMER0DIS_W::new(self)
252    }
253    #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"]
254    #[inline(always)]
255    #[must_use]
256    pub fn wdog0dis(&mut self) -> WDOG0DIS_W<11> {
257        WDOG0DIS_W::new(self)
258    }
259    #[doc = "Bit 12 - Allow Power Down of WDOG1 During EM23"]
260    #[inline(always)]
261    #[must_use]
262    pub fn wdog1dis(&mut self) -> WDOG1DIS_W<12> {
263        WDOG1DIS_W::new(self)
264    }
265    #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"]
266    #[inline(always)]
267    #[must_use]
268    pub fn lesense0dis(&mut self) -> LESENSE0DIS_W<13> {
269        LESENSE0DIS_W::new(self)
270    }
271    #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"]
272    #[inline(always)]
273    #[must_use]
274    pub fn csendis(&mut self) -> CSENDIS_W<14> {
275        CSENDIS_W::new(self)
276    }
277    #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"]
278    #[inline(always)]
279    #[must_use]
280    pub fn leuart0dis(&mut self) -> LEUART0DIS_W<15> {
281        LEUART0DIS_W::new(self)
282    }
283    #[doc = "Writes raw bits to the register."]
284    #[inline(always)]
285    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
286        self.0.bits(bits);
287        self
288    }
289}
290#[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"]
291pub struct EM23PERNORETAINCTRL_SPEC;
292impl crate::RegisterSpec for EM23PERNORETAINCTRL_SPEC {
293    type Ux = u32;
294}
295#[doc = "`read()` method returns [em23pernoretainctrl::R](R) reader structure"]
296impl crate::Readable for EM23PERNORETAINCTRL_SPEC {
297    type Reader = R;
298}
299#[doc = "`write(|w| ..)` method takes [em23pernoretainctrl::W](W) writer structure"]
300impl crate::Writable for EM23PERNORETAINCTRL_SPEC {
301    type Writer = W;
302    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
303    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
304}
305#[doc = "`reset()` method sets EM23PERNORETAINCTRL to value 0"]
306impl crate::Resettable for EM23PERNORETAINCTRL_SPEC {
307    const RESET_VALUE: Self::Ux = 0;
308}