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