esp32p4/pmu/
hp_active_hp_ck_power.rs1#[doc = "Register `HP_ACTIVE_HP_CK_POWER` reader"]
2pub type R = crate::R<HP_ACTIVE_HP_CK_POWER_SPEC>;
3#[doc = "Register `HP_ACTIVE_HP_CK_POWER` writer"]
4pub type W = crate::W<HP_ACTIVE_HP_CK_POWER_SPEC>;
5#[doc = "Field `HP_ACTIVE_I2C_ISO_EN` reader - need_des"]
6pub type HP_ACTIVE_I2C_ISO_EN_R = crate::BitReader;
7#[doc = "Field `HP_ACTIVE_I2C_ISO_EN` writer - need_des"]
8pub type HP_ACTIVE_I2C_ISO_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `HP_ACTIVE_I2C_RETENTION` reader - need_des"]
10pub type HP_ACTIVE_I2C_RETENTION_R = crate::BitReader;
11#[doc = "Field `HP_ACTIVE_I2C_RETENTION` writer - need_des"]
12pub type HP_ACTIVE_I2C_RETENTION_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `HP_ACTIVE_XPD_PLL_I2C` reader - need_des"]
14pub type HP_ACTIVE_XPD_PLL_I2C_R = crate::FieldReader;
15#[doc = "Field `HP_ACTIVE_XPD_PLL_I2C` writer - need_des"]
16pub type HP_ACTIVE_XPD_PLL_I2C_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17#[doc = "Field `HP_ACTIVE_XPD_PLL` reader - need_des"]
18pub type HP_ACTIVE_XPD_PLL_R = crate::FieldReader;
19#[doc = "Field `HP_ACTIVE_XPD_PLL` writer - need_des"]
20pub type HP_ACTIVE_XPD_PLL_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21impl R {
22 #[doc = "Bit 21 - need_des"]
23 #[inline(always)]
24 pub fn hp_active_i2c_iso_en(&self) -> HP_ACTIVE_I2C_ISO_EN_R {
25 HP_ACTIVE_I2C_ISO_EN_R::new(((self.bits >> 21) & 1) != 0)
26 }
27 #[doc = "Bit 22 - need_des"]
28 #[inline(always)]
29 pub fn hp_active_i2c_retention(&self) -> HP_ACTIVE_I2C_RETENTION_R {
30 HP_ACTIVE_I2C_RETENTION_R::new(((self.bits >> 22) & 1) != 0)
31 }
32 #[doc = "Bits 23:26 - need_des"]
33 #[inline(always)]
34 pub fn hp_active_xpd_pll_i2c(&self) -> HP_ACTIVE_XPD_PLL_I2C_R {
35 HP_ACTIVE_XPD_PLL_I2C_R::new(((self.bits >> 23) & 0x0f) as u8)
36 }
37 #[doc = "Bits 27:30 - need_des"]
38 #[inline(always)]
39 pub fn hp_active_xpd_pll(&self) -> HP_ACTIVE_XPD_PLL_R {
40 HP_ACTIVE_XPD_PLL_R::new(((self.bits >> 27) & 0x0f) 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_ACTIVE_HP_CK_POWER")
47 .field(
48 "hp_active_i2c_iso_en",
49 &format_args!("{}", self.hp_active_i2c_iso_en().bit()),
50 )
51 .field(
52 "hp_active_i2c_retention",
53 &format_args!("{}", self.hp_active_i2c_retention().bit()),
54 )
55 .field(
56 "hp_active_xpd_pll_i2c",
57 &format_args!("{}", self.hp_active_xpd_pll_i2c().bits()),
58 )
59 .field(
60 "hp_active_xpd_pll",
61 &format_args!("{}", self.hp_active_xpd_pll().bits()),
62 )
63 .finish()
64 }
65}
66#[cfg(feature = "impl-register-debug")]
67impl core::fmt::Debug for crate::generic::Reg<HP_ACTIVE_HP_CK_POWER_SPEC> {
68 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
69 core::fmt::Debug::fmt(&self.read(), f)
70 }
71}
72impl W {
73 #[doc = "Bit 21 - need_des"]
74 #[inline(always)]
75 #[must_use]
76 pub fn hp_active_i2c_iso_en(&mut self) -> HP_ACTIVE_I2C_ISO_EN_W<HP_ACTIVE_HP_CK_POWER_SPEC> {
77 HP_ACTIVE_I2C_ISO_EN_W::new(self, 21)
78 }
79 #[doc = "Bit 22 - need_des"]
80 #[inline(always)]
81 #[must_use]
82 pub fn hp_active_i2c_retention(
83 &mut self,
84 ) -> HP_ACTIVE_I2C_RETENTION_W<HP_ACTIVE_HP_CK_POWER_SPEC> {
85 HP_ACTIVE_I2C_RETENTION_W::new(self, 22)
86 }
87 #[doc = "Bits 23:26 - need_des"]
88 #[inline(always)]
89 #[must_use]
90 pub fn hp_active_xpd_pll_i2c(&mut self) -> HP_ACTIVE_XPD_PLL_I2C_W<HP_ACTIVE_HP_CK_POWER_SPEC> {
91 HP_ACTIVE_XPD_PLL_I2C_W::new(self, 23)
92 }
93 #[doc = "Bits 27:30 - need_des"]
94 #[inline(always)]
95 #[must_use]
96 pub fn hp_active_xpd_pll(&mut self) -> HP_ACTIVE_XPD_PLL_W<HP_ACTIVE_HP_CK_POWER_SPEC> {
97 HP_ACTIVE_XPD_PLL_W::new(self, 27)
98 }
99}
100#[doc = "need_des\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`hp_active_hp_ck_power::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`hp_active_hp_ck_power::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
101pub struct HP_ACTIVE_HP_CK_POWER_SPEC;
102impl crate::RegisterSpec for HP_ACTIVE_HP_CK_POWER_SPEC {
103 type Ux = u32;
104}
105#[doc = "`read()` method returns [`hp_active_hp_ck_power::R`](R) reader structure"]
106impl crate::Readable for HP_ACTIVE_HP_CK_POWER_SPEC {}
107#[doc = "`write(|w| ..)` method takes [`hp_active_hp_ck_power::W`](W) writer structure"]
108impl crate::Writable for HP_ACTIVE_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_ACTIVE_HP_CK_POWER to value 0"]
114impl crate::Resettable for HP_ACTIVE_HP_CK_POWER_SPEC {
115 const RESET_VALUE: u32 = 0;
116}