esp32c6_lp/pmu/
hp_active_dig_power.rs1#[doc = "Register `HP_ACTIVE_DIG_POWER` reader"]
2pub type R = crate::R<HP_ACTIVE_DIG_POWER_SPEC>;
3#[doc = "Register `HP_ACTIVE_DIG_POWER` writer"]
4pub type W = crate::W<HP_ACTIVE_DIG_POWER_SPEC>;
5#[doc = "Field `HP_ACTIVE_VDD_SPI_PD_EN` reader - need_des"]
6pub type HP_ACTIVE_VDD_SPI_PD_EN_R = crate::BitReader;
7#[doc = "Field `HP_ACTIVE_VDD_SPI_PD_EN` writer - need_des"]
8pub type HP_ACTIVE_VDD_SPI_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `HP_ACTIVE_HP_MEM_DSLP` reader - need_des"]
10pub type HP_ACTIVE_HP_MEM_DSLP_R = crate::BitReader;
11#[doc = "Field `HP_ACTIVE_HP_MEM_DSLP` writer - need_des"]
12pub type HP_ACTIVE_HP_MEM_DSLP_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `HP_ACTIVE_PD_HP_MEM_PD_EN` reader - need_des"]
14pub type HP_ACTIVE_PD_HP_MEM_PD_EN_R = crate::FieldReader;
15#[doc = "Field `HP_ACTIVE_PD_HP_MEM_PD_EN` writer - need_des"]
16pub type HP_ACTIVE_PD_HP_MEM_PD_EN_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17#[doc = "Field `HP_ACTIVE_PD_HP_WIFI_PD_EN` reader - need_des"]
18pub type HP_ACTIVE_PD_HP_WIFI_PD_EN_R = crate::BitReader;
19#[doc = "Field `HP_ACTIVE_PD_HP_WIFI_PD_EN` writer - need_des"]
20pub type HP_ACTIVE_PD_HP_WIFI_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `HP_ACTIVE_PD_HP_CPU_PD_EN` reader - need_des"]
22pub type HP_ACTIVE_PD_HP_CPU_PD_EN_R = crate::BitReader;
23#[doc = "Field `HP_ACTIVE_PD_HP_CPU_PD_EN` writer - need_des"]
24pub type HP_ACTIVE_PD_HP_CPU_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `HP_ACTIVE_PD_HP_AON_PD_EN` reader - need_des"]
26pub type HP_ACTIVE_PD_HP_AON_PD_EN_R = crate::BitReader;
27#[doc = "Field `HP_ACTIVE_PD_HP_AON_PD_EN` writer - need_des"]
28pub type HP_ACTIVE_PD_HP_AON_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `HP_ACTIVE_PD_TOP_PD_EN` reader - need_des"]
30pub type HP_ACTIVE_PD_TOP_PD_EN_R = crate::BitReader;
31#[doc = "Field `HP_ACTIVE_PD_TOP_PD_EN` writer - need_des"]
32pub type HP_ACTIVE_PD_TOP_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
33impl R {
34 #[doc = "Bit 21 - need_des"]
35 #[inline(always)]
36 pub fn hp_active_vdd_spi_pd_en(&self) -> HP_ACTIVE_VDD_SPI_PD_EN_R {
37 HP_ACTIVE_VDD_SPI_PD_EN_R::new(((self.bits >> 21) & 1) != 0)
38 }
39 #[doc = "Bit 22 - need_des"]
40 #[inline(always)]
41 pub fn hp_active_hp_mem_dslp(&self) -> HP_ACTIVE_HP_MEM_DSLP_R {
42 HP_ACTIVE_HP_MEM_DSLP_R::new(((self.bits >> 22) & 1) != 0)
43 }
44 #[doc = "Bits 23:26 - need_des"]
45 #[inline(always)]
46 pub fn hp_active_pd_hp_mem_pd_en(&self) -> HP_ACTIVE_PD_HP_MEM_PD_EN_R {
47 HP_ACTIVE_PD_HP_MEM_PD_EN_R::new(((self.bits >> 23) & 0x0f) as u8)
48 }
49 #[doc = "Bit 27 - need_des"]
50 #[inline(always)]
51 pub fn hp_active_pd_hp_wifi_pd_en(&self) -> HP_ACTIVE_PD_HP_WIFI_PD_EN_R {
52 HP_ACTIVE_PD_HP_WIFI_PD_EN_R::new(((self.bits >> 27) & 1) != 0)
53 }
54 #[doc = "Bit 29 - need_des"]
55 #[inline(always)]
56 pub fn hp_active_pd_hp_cpu_pd_en(&self) -> HP_ACTIVE_PD_HP_CPU_PD_EN_R {
57 HP_ACTIVE_PD_HP_CPU_PD_EN_R::new(((self.bits >> 29) & 1) != 0)
58 }
59 #[doc = "Bit 30 - need_des"]
60 #[inline(always)]
61 pub fn hp_active_pd_hp_aon_pd_en(&self) -> HP_ACTIVE_PD_HP_AON_PD_EN_R {
62 HP_ACTIVE_PD_HP_AON_PD_EN_R::new(((self.bits >> 30) & 1) != 0)
63 }
64 #[doc = "Bit 31 - need_des"]
65 #[inline(always)]
66 pub fn hp_active_pd_top_pd_en(&self) -> HP_ACTIVE_PD_TOP_PD_EN_R {
67 HP_ACTIVE_PD_TOP_PD_EN_R::new(((self.bits >> 31) & 1) != 0)
68 }
69}
70#[cfg(feature = "impl-register-debug")]
71impl core::fmt::Debug for R {
72 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
73 f.debug_struct("HP_ACTIVE_DIG_POWER")
74 .field("hp_active_vdd_spi_pd_en", &self.hp_active_vdd_spi_pd_en())
75 .field("hp_active_hp_mem_dslp", &self.hp_active_hp_mem_dslp())
76 .field(
77 "hp_active_pd_hp_mem_pd_en",
78 &self.hp_active_pd_hp_mem_pd_en(),
79 )
80 .field(
81 "hp_active_pd_hp_wifi_pd_en",
82 &self.hp_active_pd_hp_wifi_pd_en(),
83 )
84 .field(
85 "hp_active_pd_hp_cpu_pd_en",
86 &self.hp_active_pd_hp_cpu_pd_en(),
87 )
88 .field(
89 "hp_active_pd_hp_aon_pd_en",
90 &self.hp_active_pd_hp_aon_pd_en(),
91 )
92 .field("hp_active_pd_top_pd_en", &self.hp_active_pd_top_pd_en())
93 .finish()
94 }
95}
96impl W {
97 #[doc = "Bit 21 - need_des"]
98 #[inline(always)]
99 #[must_use]
100 pub fn hp_active_vdd_spi_pd_en(
101 &mut self,
102 ) -> HP_ACTIVE_VDD_SPI_PD_EN_W<HP_ACTIVE_DIG_POWER_SPEC> {
103 HP_ACTIVE_VDD_SPI_PD_EN_W::new(self, 21)
104 }
105 #[doc = "Bit 22 - need_des"]
106 #[inline(always)]
107 #[must_use]
108 pub fn hp_active_hp_mem_dslp(&mut self) -> HP_ACTIVE_HP_MEM_DSLP_W<HP_ACTIVE_DIG_POWER_SPEC> {
109 HP_ACTIVE_HP_MEM_DSLP_W::new(self, 22)
110 }
111 #[doc = "Bits 23:26 - need_des"]
112 #[inline(always)]
113 #[must_use]
114 pub fn hp_active_pd_hp_mem_pd_en(
115 &mut self,
116 ) -> HP_ACTIVE_PD_HP_MEM_PD_EN_W<HP_ACTIVE_DIG_POWER_SPEC> {
117 HP_ACTIVE_PD_HP_MEM_PD_EN_W::new(self, 23)
118 }
119 #[doc = "Bit 27 - need_des"]
120 #[inline(always)]
121 #[must_use]
122 pub fn hp_active_pd_hp_wifi_pd_en(
123 &mut self,
124 ) -> HP_ACTIVE_PD_HP_WIFI_PD_EN_W<HP_ACTIVE_DIG_POWER_SPEC> {
125 HP_ACTIVE_PD_HP_WIFI_PD_EN_W::new(self, 27)
126 }
127 #[doc = "Bit 29 - need_des"]
128 #[inline(always)]
129 #[must_use]
130 pub fn hp_active_pd_hp_cpu_pd_en(
131 &mut self,
132 ) -> HP_ACTIVE_PD_HP_CPU_PD_EN_W<HP_ACTIVE_DIG_POWER_SPEC> {
133 HP_ACTIVE_PD_HP_CPU_PD_EN_W::new(self, 29)
134 }
135 #[doc = "Bit 30 - need_des"]
136 #[inline(always)]
137 #[must_use]
138 pub fn hp_active_pd_hp_aon_pd_en(
139 &mut self,
140 ) -> HP_ACTIVE_PD_HP_AON_PD_EN_W<HP_ACTIVE_DIG_POWER_SPEC> {
141 HP_ACTIVE_PD_HP_AON_PD_EN_W::new(self, 30)
142 }
143 #[doc = "Bit 31 - need_des"]
144 #[inline(always)]
145 #[must_use]
146 pub fn hp_active_pd_top_pd_en(&mut self) -> HP_ACTIVE_PD_TOP_PD_EN_W<HP_ACTIVE_DIG_POWER_SPEC> {
147 HP_ACTIVE_PD_TOP_PD_EN_W::new(self, 31)
148 }
149}
150#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`hp_active_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 [`hp_active_dig_power::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
151pub struct HP_ACTIVE_DIG_POWER_SPEC;
152impl crate::RegisterSpec for HP_ACTIVE_DIG_POWER_SPEC {
153 type Ux = u32;
154}
155#[doc = "`read()` method returns [`hp_active_dig_power::R`](R) reader structure"]
156impl crate::Readable for HP_ACTIVE_DIG_POWER_SPEC {}
157#[doc = "`write(|w| ..)` method takes [`hp_active_dig_power::W`](W) writer structure"]
158impl crate::Writable for HP_ACTIVE_DIG_POWER_SPEC {
159 type Safety = crate::Unsafe;
160 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
161 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
162}
163#[doc = "`reset()` method sets HP_ACTIVE_DIG_POWER to value 0"]
164impl crate::Resettable for HP_ACTIVE_DIG_POWER_SPEC {
165 const RESET_VALUE: u32 = 0;
166}