esp32c6/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    pub fn lp_sleep_lp_mem_dslp(&mut self) -> LP_SLEEP_LP_MEM_DSLP_W<LP_SLEEP_LP_DIG_POWER_SPEC> {
41        LP_SLEEP_LP_MEM_DSLP_W::new(self, 30)
42    }
43    #[doc = "Bit 31 - need_des"]
44    #[inline(always)]
45    pub fn lp_sleep_pd_lp_peri_pd_en(
46        &mut self,
47    ) -> LP_SLEEP_PD_LP_PERI_PD_EN_W<LP_SLEEP_LP_DIG_POWER_SPEC> {
48        LP_SLEEP_PD_LP_PERI_PD_EN_W::new(self, 31)
49    }
50}
51#[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)."]
52pub struct LP_SLEEP_LP_DIG_POWER_SPEC;
53impl crate::RegisterSpec for LP_SLEEP_LP_DIG_POWER_SPEC {
54    type Ux = u32;
55}
56#[doc = "`read()` method returns [`lp_sleep_lp_dig_power::R`](R) reader structure"]
57impl crate::Readable for LP_SLEEP_LP_DIG_POWER_SPEC {}
58#[doc = "`write(|w| ..)` method takes [`lp_sleep_lp_dig_power::W`](W) writer structure"]
59impl crate::Writable for LP_SLEEP_LP_DIG_POWER_SPEC {
60    type Safety = crate::Unsafe;
61    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
62    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
63}
64#[doc = "`reset()` method sets LP_SLEEP_LP_DIG_POWER to value 0"]
65impl crate::Resettable for LP_SLEEP_LP_DIG_POWER_SPEC {
66    const RESET_VALUE: u32 = 0;
67}