esp32c6_lp/pmu/
hp_sleep_hp_sys_cntl.rs

1#[doc = "Register `HP_SLEEP_HP_SYS_CNTL` reader"]
2pub type R = crate::R<HP_SLEEP_HP_SYS_CNTL_SPEC>;
3#[doc = "Register `HP_SLEEP_HP_SYS_CNTL` writer"]
4pub type W = crate::W<HP_SLEEP_HP_SYS_CNTL_SPEC>;
5#[doc = "Field `HP_SLEEP_UART_WAKEUP_EN` reader - need_des"]
6pub type HP_SLEEP_UART_WAKEUP_EN_R = crate::BitReader;
7#[doc = "Field `HP_SLEEP_UART_WAKEUP_EN` writer - need_des"]
8pub type HP_SLEEP_UART_WAKEUP_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `HP_SLEEP_LP_PAD_HOLD_ALL` reader - need_des"]
10pub type HP_SLEEP_LP_PAD_HOLD_ALL_R = crate::BitReader;
11#[doc = "Field `HP_SLEEP_LP_PAD_HOLD_ALL` writer - need_des"]
12pub type HP_SLEEP_LP_PAD_HOLD_ALL_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `HP_SLEEP_HP_PAD_HOLD_ALL` reader - need_des"]
14pub type HP_SLEEP_HP_PAD_HOLD_ALL_R = crate::BitReader;
15#[doc = "Field `HP_SLEEP_HP_PAD_HOLD_ALL` writer - need_des"]
16pub type HP_SLEEP_HP_PAD_HOLD_ALL_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `HP_SLEEP_DIG_PAD_SLP_SEL` reader - need_des"]
18pub type HP_SLEEP_DIG_PAD_SLP_SEL_R = crate::BitReader;
19#[doc = "Field `HP_SLEEP_DIG_PAD_SLP_SEL` writer - need_des"]
20pub type HP_SLEEP_DIG_PAD_SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `HP_SLEEP_DIG_PAUSE_WDT` reader - need_des"]
22pub type HP_SLEEP_DIG_PAUSE_WDT_R = crate::BitReader;
23#[doc = "Field `HP_SLEEP_DIG_PAUSE_WDT` writer - need_des"]
24pub type HP_SLEEP_DIG_PAUSE_WDT_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `HP_SLEEP_DIG_CPU_STALL` reader - need_des"]
26pub type HP_SLEEP_DIG_CPU_STALL_R = crate::BitReader;
27#[doc = "Field `HP_SLEEP_DIG_CPU_STALL` writer - need_des"]
28pub type HP_SLEEP_DIG_CPU_STALL_W<'a, REG> = crate::BitWriter<'a, REG>;
29impl R {
30    #[doc = "Bit 24 - need_des"]
31    #[inline(always)]
32    pub fn hp_sleep_uart_wakeup_en(&self) -> HP_SLEEP_UART_WAKEUP_EN_R {
33        HP_SLEEP_UART_WAKEUP_EN_R::new(((self.bits >> 24) & 1) != 0)
34    }
35    #[doc = "Bit 25 - need_des"]
36    #[inline(always)]
37    pub fn hp_sleep_lp_pad_hold_all(&self) -> HP_SLEEP_LP_PAD_HOLD_ALL_R {
38        HP_SLEEP_LP_PAD_HOLD_ALL_R::new(((self.bits >> 25) & 1) != 0)
39    }
40    #[doc = "Bit 26 - need_des"]
41    #[inline(always)]
42    pub fn hp_sleep_hp_pad_hold_all(&self) -> HP_SLEEP_HP_PAD_HOLD_ALL_R {
43        HP_SLEEP_HP_PAD_HOLD_ALL_R::new(((self.bits >> 26) & 1) != 0)
44    }
45    #[doc = "Bit 27 - need_des"]
46    #[inline(always)]
47    pub fn hp_sleep_dig_pad_slp_sel(&self) -> HP_SLEEP_DIG_PAD_SLP_SEL_R {
48        HP_SLEEP_DIG_PAD_SLP_SEL_R::new(((self.bits >> 27) & 1) != 0)
49    }
50    #[doc = "Bit 28 - need_des"]
51    #[inline(always)]
52    pub fn hp_sleep_dig_pause_wdt(&self) -> HP_SLEEP_DIG_PAUSE_WDT_R {
53        HP_SLEEP_DIG_PAUSE_WDT_R::new(((self.bits >> 28) & 1) != 0)
54    }
55    #[doc = "Bit 29 - need_des"]
56    #[inline(always)]
57    pub fn hp_sleep_dig_cpu_stall(&self) -> HP_SLEEP_DIG_CPU_STALL_R {
58        HP_SLEEP_DIG_CPU_STALL_R::new(((self.bits >> 29) & 1) != 0)
59    }
60}
61#[cfg(feature = "impl-register-debug")]
62impl core::fmt::Debug for R {
63    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
64        f.debug_struct("HP_SLEEP_HP_SYS_CNTL")
65            .field("hp_sleep_uart_wakeup_en", &self.hp_sleep_uart_wakeup_en())
66            .field("hp_sleep_lp_pad_hold_all", &self.hp_sleep_lp_pad_hold_all())
67            .field("hp_sleep_hp_pad_hold_all", &self.hp_sleep_hp_pad_hold_all())
68            .field("hp_sleep_dig_pad_slp_sel", &self.hp_sleep_dig_pad_slp_sel())
69            .field("hp_sleep_dig_pause_wdt", &self.hp_sleep_dig_pause_wdt())
70            .field("hp_sleep_dig_cpu_stall", &self.hp_sleep_dig_cpu_stall())
71            .finish()
72    }
73}
74impl W {
75    #[doc = "Bit 24 - need_des"]
76    #[inline(always)]
77    #[must_use]
78    pub fn hp_sleep_uart_wakeup_en(
79        &mut self,
80    ) -> HP_SLEEP_UART_WAKEUP_EN_W<HP_SLEEP_HP_SYS_CNTL_SPEC> {
81        HP_SLEEP_UART_WAKEUP_EN_W::new(self, 24)
82    }
83    #[doc = "Bit 25 - need_des"]
84    #[inline(always)]
85    #[must_use]
86    pub fn hp_sleep_lp_pad_hold_all(
87        &mut self,
88    ) -> HP_SLEEP_LP_PAD_HOLD_ALL_W<HP_SLEEP_HP_SYS_CNTL_SPEC> {
89        HP_SLEEP_LP_PAD_HOLD_ALL_W::new(self, 25)
90    }
91    #[doc = "Bit 26 - need_des"]
92    #[inline(always)]
93    #[must_use]
94    pub fn hp_sleep_hp_pad_hold_all(
95        &mut self,
96    ) -> HP_SLEEP_HP_PAD_HOLD_ALL_W<HP_SLEEP_HP_SYS_CNTL_SPEC> {
97        HP_SLEEP_HP_PAD_HOLD_ALL_W::new(self, 26)
98    }
99    #[doc = "Bit 27 - need_des"]
100    #[inline(always)]
101    #[must_use]
102    pub fn hp_sleep_dig_pad_slp_sel(
103        &mut self,
104    ) -> HP_SLEEP_DIG_PAD_SLP_SEL_W<HP_SLEEP_HP_SYS_CNTL_SPEC> {
105        HP_SLEEP_DIG_PAD_SLP_SEL_W::new(self, 27)
106    }
107    #[doc = "Bit 28 - need_des"]
108    #[inline(always)]
109    #[must_use]
110    pub fn hp_sleep_dig_pause_wdt(
111        &mut self,
112    ) -> HP_SLEEP_DIG_PAUSE_WDT_W<HP_SLEEP_HP_SYS_CNTL_SPEC> {
113        HP_SLEEP_DIG_PAUSE_WDT_W::new(self, 28)
114    }
115    #[doc = "Bit 29 - need_des"]
116    #[inline(always)]
117    #[must_use]
118    pub fn hp_sleep_dig_cpu_stall(
119        &mut self,
120    ) -> HP_SLEEP_DIG_CPU_STALL_W<HP_SLEEP_HP_SYS_CNTL_SPEC> {
121        HP_SLEEP_DIG_CPU_STALL_W::new(self, 29)
122    }
123}
124#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`hp_sleep_hp_sys_cntl::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_sys_cntl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
125pub struct HP_SLEEP_HP_SYS_CNTL_SPEC;
126impl crate::RegisterSpec for HP_SLEEP_HP_SYS_CNTL_SPEC {
127    type Ux = u32;
128}
129#[doc = "`read()` method returns [`hp_sleep_hp_sys_cntl::R`](R) reader structure"]
130impl crate::Readable for HP_SLEEP_HP_SYS_CNTL_SPEC {}
131#[doc = "`write(|w| ..)` method takes [`hp_sleep_hp_sys_cntl::W`](W) writer structure"]
132impl crate::Writable for HP_SLEEP_HP_SYS_CNTL_SPEC {
133    type Safety = crate::Unsafe;
134    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
135    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
136}
137#[doc = "`reset()` method sets HP_SLEEP_HP_SYS_CNTL to value 0"]
138impl crate::Resettable for HP_SLEEP_HP_SYS_CNTL_SPEC {
139    const RESET_VALUE: u32 = 0;
140}