esp32c6_lp/pmu/
lp_sleep_lp_dig_power.rs

1#[doc = "Register `LP_SLEEP_LP_DIG_POWER` reader"]
2pub type R = crate::R<LP_SLEEP_LP_DIG_POWER_SPEC>;
3#[doc = "Register `LP_SLEEP_LP_DIG_POWER` writer"]
4pub type W = crate::W<LP_SLEEP_LP_DIG_POWER_SPEC>;
5#[doc = "Field `LP_SLEEP_LP_MEM_DSLP` reader - need_des"]
6pub type LP_SLEEP_LP_MEM_DSLP_R = crate::BitReader;
7#[doc = "Field `LP_SLEEP_LP_MEM_DSLP` writer - need_des"]
8pub type LP_SLEEP_LP_MEM_DSLP_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `LP_SLEEP_PD_LP_PERI_PD_EN` reader - need_des"]
10pub type LP_SLEEP_PD_LP_PERI_PD_EN_R = crate::BitReader;
11#[doc = "Field `LP_SLEEP_PD_LP_PERI_PD_EN` writer - need_des"]
12pub type LP_SLEEP_PD_LP_PERI_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14    #[doc = "Bit 30 - need_des"]
15    #[inline(always)]
16    pub fn lp_sleep_lp_mem_dslp(&self) -> LP_SLEEP_LP_MEM_DSLP_R {
17        LP_SLEEP_LP_MEM_DSLP_R::new(((self.bits >> 30) & 1) != 0)
18    }
19    #[doc = "Bit 31 - need_des"]
20    #[inline(always)]
21    pub fn lp_sleep_pd_lp_peri_pd_en(&self) -> LP_SLEEP_PD_LP_PERI_PD_EN_R {
22        LP_SLEEP_PD_LP_PERI_PD_EN_R::new(((self.bits >> 31) & 1) != 0)
23    }
24}
25#[cfg(feature = "impl-register-debug")]
26impl core::fmt::Debug for R {
27    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28        f.debug_struct("LP_SLEEP_LP_DIG_POWER")
29            .field("lp_sleep_lp_mem_dslp", &self.lp_sleep_lp_mem_dslp())
30            .field(
31                "lp_sleep_pd_lp_peri_pd_en",
32                &self.lp_sleep_pd_lp_peri_pd_en(),
33            )
34            .finish()
35    }
36}
37impl W {
38    #[doc = "Bit 30 - need_des"]
39    #[inline(always)]
40    #[must_use]
41    pub fn lp_sleep_lp_mem_dslp(&mut self) -> LP_SLEEP_LP_MEM_DSLP_W<LP_SLEEP_LP_DIG_POWER_SPEC> {
42        LP_SLEEP_LP_MEM_DSLP_W::new(self, 30)
43    }
44    #[doc = "Bit 31 - need_des"]
45    #[inline(always)]
46    #[must_use]
47    pub fn lp_sleep_pd_lp_peri_pd_en(
48        &mut self,
49    ) -> LP_SLEEP_PD_LP_PERI_PD_EN_W<LP_SLEEP_LP_DIG_POWER_SPEC> {
50        LP_SLEEP_PD_LP_PERI_PD_EN_W::new(self, 31)
51    }
52}
53#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`lp_sleep_lp_dig_power::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`lp_sleep_lp_dig_power::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
54pub struct LP_SLEEP_LP_DIG_POWER_SPEC;
55impl crate::RegisterSpec for LP_SLEEP_LP_DIG_POWER_SPEC {
56    type Ux = u32;
57}
58#[doc = "`read()` method returns [`lp_sleep_lp_dig_power::R`](R) reader structure"]
59impl crate::Readable for LP_SLEEP_LP_DIG_POWER_SPEC {}
60#[doc = "`write(|w| ..)` method takes [`lp_sleep_lp_dig_power::W`](W) writer structure"]
61impl crate::Writable for LP_SLEEP_LP_DIG_POWER_SPEC {
62    type Safety = crate::Unsafe;
63    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
64    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
65}
66#[doc = "`reset()` method sets LP_SLEEP_LP_DIG_POWER to value 0"]
67impl crate::Resettable for LP_SLEEP_LP_DIG_POWER_SPEC {
68    const RESET_VALUE: u32 = 0;
69}