esp32c6_lp/pmu/
hp_sleep_hp_ck_power.rs

1#[doc = "Register `HP_SLEEP_HP_CK_POWER` reader"]
2pub type R = crate::R<HP_SLEEP_HP_CK_POWER_SPEC>;
3#[doc = "Register `HP_SLEEP_HP_CK_POWER` writer"]
4pub type W = crate::W<HP_SLEEP_HP_CK_POWER_SPEC>;
5#[doc = "Field `HP_SLEEP_I2C_ISO_EN` reader - need_des"]
6pub type HP_SLEEP_I2C_ISO_EN_R = crate::BitReader;
7#[doc = "Field `HP_SLEEP_I2C_ISO_EN` writer - need_des"]
8pub type HP_SLEEP_I2C_ISO_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `HP_SLEEP_I2C_RETENTION` reader - need_des"]
10pub type HP_SLEEP_I2C_RETENTION_R = crate::BitReader;
11#[doc = "Field `HP_SLEEP_I2C_RETENTION` writer - need_des"]
12pub type HP_SLEEP_I2C_RETENTION_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `HP_SLEEP_XPD_BB_I2C` reader - need_des"]
14pub type HP_SLEEP_XPD_BB_I2C_R = crate::BitReader;
15#[doc = "Field `HP_SLEEP_XPD_BB_I2C` writer - need_des"]
16pub type HP_SLEEP_XPD_BB_I2C_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `HP_SLEEP_XPD_BBPLL_I2C` reader - need_des"]
18pub type HP_SLEEP_XPD_BBPLL_I2C_R = crate::BitReader;
19#[doc = "Field `HP_SLEEP_XPD_BBPLL_I2C` writer - need_des"]
20pub type HP_SLEEP_XPD_BBPLL_I2C_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `HP_SLEEP_XPD_BBPLL` reader - need_des"]
22pub type HP_SLEEP_XPD_BBPLL_R = crate::BitReader;
23#[doc = "Field `HP_SLEEP_XPD_BBPLL` writer - need_des"]
24pub type HP_SLEEP_XPD_BBPLL_W<'a, REG> = crate::BitWriter<'a, REG>;
25impl R {
26    #[doc = "Bit 26 - need_des"]
27    #[inline(always)]
28    pub fn hp_sleep_i2c_iso_en(&self) -> HP_SLEEP_I2C_ISO_EN_R {
29        HP_SLEEP_I2C_ISO_EN_R::new(((self.bits >> 26) & 1) != 0)
30    }
31    #[doc = "Bit 27 - need_des"]
32    #[inline(always)]
33    pub fn hp_sleep_i2c_retention(&self) -> HP_SLEEP_I2C_RETENTION_R {
34        HP_SLEEP_I2C_RETENTION_R::new(((self.bits >> 27) & 1) != 0)
35    }
36    #[doc = "Bit 28 - need_des"]
37    #[inline(always)]
38    pub fn hp_sleep_xpd_bb_i2c(&self) -> HP_SLEEP_XPD_BB_I2C_R {
39        HP_SLEEP_XPD_BB_I2C_R::new(((self.bits >> 28) & 1) != 0)
40    }
41    #[doc = "Bit 29 - need_des"]
42    #[inline(always)]
43    pub fn hp_sleep_xpd_bbpll_i2c(&self) -> HP_SLEEP_XPD_BBPLL_I2C_R {
44        HP_SLEEP_XPD_BBPLL_I2C_R::new(((self.bits >> 29) & 1) != 0)
45    }
46    #[doc = "Bit 30 - need_des"]
47    #[inline(always)]
48    pub fn hp_sleep_xpd_bbpll(&self) -> HP_SLEEP_XPD_BBPLL_R {
49        HP_SLEEP_XPD_BBPLL_R::new(((self.bits >> 30) & 1) != 0)
50    }
51}
52#[cfg(feature = "impl-register-debug")]
53impl core::fmt::Debug for R {
54    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
55        f.debug_struct("HP_SLEEP_HP_CK_POWER")
56            .field("hp_sleep_i2c_iso_en", &self.hp_sleep_i2c_iso_en())
57            .field("hp_sleep_i2c_retention", &self.hp_sleep_i2c_retention())
58            .field("hp_sleep_xpd_bb_i2c", &self.hp_sleep_xpd_bb_i2c())
59            .field("hp_sleep_xpd_bbpll_i2c", &self.hp_sleep_xpd_bbpll_i2c())
60            .field("hp_sleep_xpd_bbpll", &self.hp_sleep_xpd_bbpll())
61            .finish()
62    }
63}
64impl W {
65    #[doc = "Bit 26 - need_des"]
66    #[inline(always)]
67    #[must_use]
68    pub fn hp_sleep_i2c_iso_en(&mut self) -> HP_SLEEP_I2C_ISO_EN_W<HP_SLEEP_HP_CK_POWER_SPEC> {
69        HP_SLEEP_I2C_ISO_EN_W::new(self, 26)
70    }
71    #[doc = "Bit 27 - need_des"]
72    #[inline(always)]
73    #[must_use]
74    pub fn hp_sleep_i2c_retention(
75        &mut self,
76    ) -> HP_SLEEP_I2C_RETENTION_W<HP_SLEEP_HP_CK_POWER_SPEC> {
77        HP_SLEEP_I2C_RETENTION_W::new(self, 27)
78    }
79    #[doc = "Bit 28 - need_des"]
80    #[inline(always)]
81    #[must_use]
82    pub fn hp_sleep_xpd_bb_i2c(&mut self) -> HP_SLEEP_XPD_BB_I2C_W<HP_SLEEP_HP_CK_POWER_SPEC> {
83        HP_SLEEP_XPD_BB_I2C_W::new(self, 28)
84    }
85    #[doc = "Bit 29 - need_des"]
86    #[inline(always)]
87    #[must_use]
88    pub fn hp_sleep_xpd_bbpll_i2c(
89        &mut self,
90    ) -> HP_SLEEP_XPD_BBPLL_I2C_W<HP_SLEEP_HP_CK_POWER_SPEC> {
91        HP_SLEEP_XPD_BBPLL_I2C_W::new(self, 29)
92    }
93    #[doc = "Bit 30 - need_des"]
94    #[inline(always)]
95    #[must_use]
96    pub fn hp_sleep_xpd_bbpll(&mut self) -> HP_SLEEP_XPD_BBPLL_W<HP_SLEEP_HP_CK_POWER_SPEC> {
97        HP_SLEEP_XPD_BBPLL_W::new(self, 30)
98    }
99}
100#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`hp_sleep_hp_ck_power::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_hp_ck_power::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_HP_CK_POWER_SPEC;
102impl crate::RegisterSpec for HP_SLEEP_HP_CK_POWER_SPEC {
103    type Ux = u32;
104}
105#[doc = "`read()` method returns [`hp_sleep_hp_ck_power::R`](R) reader structure"]
106impl crate::Readable for HP_SLEEP_HP_CK_POWER_SPEC {}
107#[doc = "`write(|w| ..)` method takes [`hp_sleep_hp_ck_power::W`](W) writer structure"]
108impl crate::Writable for HP_SLEEP_HP_CK_POWER_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_HP_CK_POWER to value 0"]
114impl crate::Resettable for HP_SLEEP_HP_CK_POWER_SPEC {
115    const RESET_VALUE: u32 = 0;
116}