esp32p4/pmu/
imm_pad_hold_all.rs

1#[doc = "Register `IMM_PAD_HOLD_ALL` reader"]
2pub type R = crate::R<IMM_PAD_HOLD_ALL_SPEC>;
3#[doc = "Register `IMM_PAD_HOLD_ALL` writer"]
4pub type W = crate::W<IMM_PAD_HOLD_ALL_SPEC>;
5#[doc = "Field `PAD_SLP_SEL` reader - need_des"]
6pub type PAD_SLP_SEL_R = crate::BitReader;
7#[doc = "Field `LP_PAD_HOLD_ALL` reader - need_des"]
8pub type LP_PAD_HOLD_ALL_R = crate::BitReader;
9#[doc = "Field `HP_PAD_HOLD_ALL` reader - need_des"]
10pub type HP_PAD_HOLD_ALL_R = crate::BitReader;
11#[doc = "Field `TIE_HIGH_PAD_SLP_SEL` writer - need_des"]
12pub type TIE_HIGH_PAD_SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `TIE_LOW_PAD_SLP_SEL` writer - need_des"]
14pub type TIE_LOW_PAD_SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
15#[doc = "Field `TIE_HIGH_LP_PAD_HOLD_ALL` writer - need_des"]
16pub type TIE_HIGH_LP_PAD_HOLD_ALL_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `TIE_LOW_LP_PAD_HOLD_ALL` writer - need_des"]
18pub type TIE_LOW_LP_PAD_HOLD_ALL_W<'a, REG> = crate::BitWriter<'a, REG>;
19#[doc = "Field `TIE_HIGH_HP_PAD_HOLD_ALL` writer - need_des"]
20pub type TIE_HIGH_HP_PAD_HOLD_ALL_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `TIE_LOW_HP_PAD_HOLD_ALL` writer - need_des"]
22pub type TIE_LOW_HP_PAD_HOLD_ALL_W<'a, REG> = crate::BitWriter<'a, REG>;
23impl R {
24    #[doc = "Bit 0 - need_des"]
25    #[inline(always)]
26    pub fn pad_slp_sel(&self) -> PAD_SLP_SEL_R {
27        PAD_SLP_SEL_R::new((self.bits & 1) != 0)
28    }
29    #[doc = "Bit 1 - need_des"]
30    #[inline(always)]
31    pub fn lp_pad_hold_all(&self) -> LP_PAD_HOLD_ALL_R {
32        LP_PAD_HOLD_ALL_R::new(((self.bits >> 1) & 1) != 0)
33    }
34    #[doc = "Bit 2 - need_des"]
35    #[inline(always)]
36    pub fn hp_pad_hold_all(&self) -> HP_PAD_HOLD_ALL_R {
37        HP_PAD_HOLD_ALL_R::new(((self.bits >> 2) & 1) != 0)
38    }
39}
40#[cfg(feature = "impl-register-debug")]
41impl core::fmt::Debug for R {
42    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
43        f.debug_struct("IMM_PAD_HOLD_ALL")
44            .field("pad_slp_sel", &format_args!("{}", self.pad_slp_sel().bit()))
45            .field(
46                "lp_pad_hold_all",
47                &format_args!("{}", self.lp_pad_hold_all().bit()),
48            )
49            .field(
50                "hp_pad_hold_all",
51                &format_args!("{}", self.hp_pad_hold_all().bit()),
52            )
53            .finish()
54    }
55}
56#[cfg(feature = "impl-register-debug")]
57impl core::fmt::Debug for crate::generic::Reg<IMM_PAD_HOLD_ALL_SPEC> {
58    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
59        core::fmt::Debug::fmt(&self.read(), f)
60    }
61}
62impl W {
63    #[doc = "Bit 26 - need_des"]
64    #[inline(always)]
65    #[must_use]
66    pub fn tie_high_pad_slp_sel(&mut self) -> TIE_HIGH_PAD_SLP_SEL_W<IMM_PAD_HOLD_ALL_SPEC> {
67        TIE_HIGH_PAD_SLP_SEL_W::new(self, 26)
68    }
69    #[doc = "Bit 27 - need_des"]
70    #[inline(always)]
71    #[must_use]
72    pub fn tie_low_pad_slp_sel(&mut self) -> TIE_LOW_PAD_SLP_SEL_W<IMM_PAD_HOLD_ALL_SPEC> {
73        TIE_LOW_PAD_SLP_SEL_W::new(self, 27)
74    }
75    #[doc = "Bit 28 - need_des"]
76    #[inline(always)]
77    #[must_use]
78    pub fn tie_high_lp_pad_hold_all(
79        &mut self,
80    ) -> TIE_HIGH_LP_PAD_HOLD_ALL_W<IMM_PAD_HOLD_ALL_SPEC> {
81        TIE_HIGH_LP_PAD_HOLD_ALL_W::new(self, 28)
82    }
83    #[doc = "Bit 29 - need_des"]
84    #[inline(always)]
85    #[must_use]
86    pub fn tie_low_lp_pad_hold_all(&mut self) -> TIE_LOW_LP_PAD_HOLD_ALL_W<IMM_PAD_HOLD_ALL_SPEC> {
87        TIE_LOW_LP_PAD_HOLD_ALL_W::new(self, 29)
88    }
89    #[doc = "Bit 30 - need_des"]
90    #[inline(always)]
91    #[must_use]
92    pub fn tie_high_hp_pad_hold_all(
93        &mut self,
94    ) -> TIE_HIGH_HP_PAD_HOLD_ALL_W<IMM_PAD_HOLD_ALL_SPEC> {
95        TIE_HIGH_HP_PAD_HOLD_ALL_W::new(self, 30)
96    }
97    #[doc = "Bit 31 - need_des"]
98    #[inline(always)]
99    #[must_use]
100    pub fn tie_low_hp_pad_hold_all(&mut self) -> TIE_LOW_HP_PAD_HOLD_ALL_W<IMM_PAD_HOLD_ALL_SPEC> {
101        TIE_LOW_HP_PAD_HOLD_ALL_W::new(self, 31)
102    }
103}
104#[doc = "need_des\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`imm_pad_hold_all::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 [`imm_pad_hold_all::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
105pub struct IMM_PAD_HOLD_ALL_SPEC;
106impl crate::RegisterSpec for IMM_PAD_HOLD_ALL_SPEC {
107    type Ux = u32;
108}
109#[doc = "`read()` method returns [`imm_pad_hold_all::R`](R) reader structure"]
110impl crate::Readable for IMM_PAD_HOLD_ALL_SPEC {}
111#[doc = "`write(|w| ..)` method takes [`imm_pad_hold_all::W`](W) writer structure"]
112impl crate::Writable for IMM_PAD_HOLD_ALL_SPEC {
113    type Safety = crate::Unsafe;
114    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
115    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
116}
117#[doc = "`reset()` method sets IMM_PAD_HOLD_ALL to value 0"]
118impl crate::Resettable for IMM_PAD_HOLD_ALL_SPEC {
119    const RESET_VALUE: u32 = 0;
120}