esp32c6_lp/pmu/
hp_sleep_lp_regulator0.rs

1#[doc = "Register `HP_SLEEP_LP_REGULATOR0` reader"]
2pub type R = crate::R<HP_SLEEP_LP_REGULATOR0_SPEC>;
3#[doc = "Register `HP_SLEEP_LP_REGULATOR0` writer"]
4pub type W = crate::W<HP_SLEEP_LP_REGULATOR0_SPEC>;
5#[doc = "Field `HP_SLEEP_LP_REGULATOR_SLP_XPD` reader - need_des"]
6pub type HP_SLEEP_LP_REGULATOR_SLP_XPD_R = crate::BitReader;
7#[doc = "Field `HP_SLEEP_LP_REGULATOR_SLP_XPD` writer - need_des"]
8pub type HP_SLEEP_LP_REGULATOR_SLP_XPD_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `HP_SLEEP_LP_REGULATOR_XPD` reader - need_des"]
10pub type HP_SLEEP_LP_REGULATOR_XPD_R = crate::BitReader;
11#[doc = "Field `HP_SLEEP_LP_REGULATOR_XPD` writer - need_des"]
12pub type HP_SLEEP_LP_REGULATOR_XPD_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `HP_SLEEP_LP_REGULATOR_SLP_DBIAS` reader - need_des"]
14pub type HP_SLEEP_LP_REGULATOR_SLP_DBIAS_R = crate::FieldReader;
15#[doc = "Field `HP_SLEEP_LP_REGULATOR_SLP_DBIAS` writer - need_des"]
16pub type HP_SLEEP_LP_REGULATOR_SLP_DBIAS_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17#[doc = "Field `HP_SLEEP_LP_REGULATOR_DBIAS` reader - need_des"]
18pub type HP_SLEEP_LP_REGULATOR_DBIAS_R = crate::FieldReader;
19#[doc = "Field `HP_SLEEP_LP_REGULATOR_DBIAS` writer - need_des"]
20pub type HP_SLEEP_LP_REGULATOR_DBIAS_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
21impl R {
22    #[doc = "Bit 21 - need_des"]
23    #[inline(always)]
24    pub fn hp_sleep_lp_regulator_slp_xpd(&self) -> HP_SLEEP_LP_REGULATOR_SLP_XPD_R {
25        HP_SLEEP_LP_REGULATOR_SLP_XPD_R::new(((self.bits >> 21) & 1) != 0)
26    }
27    #[doc = "Bit 22 - need_des"]
28    #[inline(always)]
29    pub fn hp_sleep_lp_regulator_xpd(&self) -> HP_SLEEP_LP_REGULATOR_XPD_R {
30        HP_SLEEP_LP_REGULATOR_XPD_R::new(((self.bits >> 22) & 1) != 0)
31    }
32    #[doc = "Bits 23:26 - need_des"]
33    #[inline(always)]
34    pub fn hp_sleep_lp_regulator_slp_dbias(&self) -> HP_SLEEP_LP_REGULATOR_SLP_DBIAS_R {
35        HP_SLEEP_LP_REGULATOR_SLP_DBIAS_R::new(((self.bits >> 23) & 0x0f) as u8)
36    }
37    #[doc = "Bits 27:31 - need_des"]
38    #[inline(always)]
39    pub fn hp_sleep_lp_regulator_dbias(&self) -> HP_SLEEP_LP_REGULATOR_DBIAS_R {
40        HP_SLEEP_LP_REGULATOR_DBIAS_R::new(((self.bits >> 27) & 0x1f) as u8)
41    }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46        f.debug_struct("HP_SLEEP_LP_REGULATOR0")
47            .field(
48                "hp_sleep_lp_regulator_slp_xpd",
49                &self.hp_sleep_lp_regulator_slp_xpd(),
50            )
51            .field(
52                "hp_sleep_lp_regulator_xpd",
53                &self.hp_sleep_lp_regulator_xpd(),
54            )
55            .field(
56                "hp_sleep_lp_regulator_slp_dbias",
57                &self.hp_sleep_lp_regulator_slp_dbias(),
58            )
59            .field(
60                "hp_sleep_lp_regulator_dbias",
61                &self.hp_sleep_lp_regulator_dbias(),
62            )
63            .finish()
64    }
65}
66impl W {
67    #[doc = "Bit 21 - need_des"]
68    #[inline(always)]
69    #[must_use]
70    pub fn hp_sleep_lp_regulator_slp_xpd(
71        &mut self,
72    ) -> HP_SLEEP_LP_REGULATOR_SLP_XPD_W<HP_SLEEP_LP_REGULATOR0_SPEC> {
73        HP_SLEEP_LP_REGULATOR_SLP_XPD_W::new(self, 21)
74    }
75    #[doc = "Bit 22 - need_des"]
76    #[inline(always)]
77    #[must_use]
78    pub fn hp_sleep_lp_regulator_xpd(
79        &mut self,
80    ) -> HP_SLEEP_LP_REGULATOR_XPD_W<HP_SLEEP_LP_REGULATOR0_SPEC> {
81        HP_SLEEP_LP_REGULATOR_XPD_W::new(self, 22)
82    }
83    #[doc = "Bits 23:26 - need_des"]
84    #[inline(always)]
85    #[must_use]
86    pub fn hp_sleep_lp_regulator_slp_dbias(
87        &mut self,
88    ) -> HP_SLEEP_LP_REGULATOR_SLP_DBIAS_W<HP_SLEEP_LP_REGULATOR0_SPEC> {
89        HP_SLEEP_LP_REGULATOR_SLP_DBIAS_W::new(self, 23)
90    }
91    #[doc = "Bits 27:31 - need_des"]
92    #[inline(always)]
93    #[must_use]
94    pub fn hp_sleep_lp_regulator_dbias(
95        &mut self,
96    ) -> HP_SLEEP_LP_REGULATOR_DBIAS_W<HP_SLEEP_LP_REGULATOR0_SPEC> {
97        HP_SLEEP_LP_REGULATOR_DBIAS_W::new(self, 27)
98    }
99}
100#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`hp_sleep_lp_regulator0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`hp_sleep_lp_regulator0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
101pub struct HP_SLEEP_LP_REGULATOR0_SPEC;
102impl crate::RegisterSpec for HP_SLEEP_LP_REGULATOR0_SPEC {
103    type Ux = u32;
104}
105#[doc = "`read()` method returns [`hp_sleep_lp_regulator0::R`](R) reader structure"]
106impl crate::Readable for HP_SLEEP_LP_REGULATOR0_SPEC {}
107#[doc = "`write(|w| ..)` method takes [`hp_sleep_lp_regulator0::W`](W) writer structure"]
108impl crate::Writable for HP_SLEEP_LP_REGULATOR0_SPEC {
109    type Safety = crate::Unsafe;
110    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
111    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
112}
113#[doc = "`reset()` method sets HP_SLEEP_LP_REGULATOR0 to value 0xc660_0000"]
114impl crate::Resettable for HP_SLEEP_LP_REGULATOR0_SPEC {
115    const RESET_VALUE: u32 = 0xc660_0000;
116}