esp32p4/dma/
lowpower_cfg0.rs1#[doc = "Register `LOWPOWER_CFG0` reader"]
2pub type R = crate::R<LOWPOWER_CFG0_SPEC>;
3#[doc = "Register `LOWPOWER_CFG0` writer"]
4pub type W = crate::W<LOWPOWER_CFG0_SPEC>;
5#[doc = "Field `GBL_CSLP_EN` reader - NA"]
6pub type GBL_CSLP_EN_R = crate::BitReader;
7#[doc = "Field `GBL_CSLP_EN` writer - NA"]
8pub type GBL_CSLP_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `CHNL_CSLP_EN` reader - NA"]
10pub type CHNL_CSLP_EN_R = crate::BitReader;
11#[doc = "Field `CHNL_CSLP_EN` writer - NA"]
12pub type CHNL_CSLP_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SBIU_CSLP_EN` reader - NA"]
14pub type SBIU_CSLP_EN_R = crate::BitReader;
15#[doc = "Field `SBIU_CSLP_EN` writer - NA"]
16pub type SBIU_CSLP_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `MXIF_CSLP_EN` reader - NA"]
18pub type MXIF_CSLP_EN_R = crate::BitReader;
19#[doc = "Field `MXIF_CSLP_EN` writer - NA"]
20pub type MXIF_CSLP_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[doc = "Bit 0 - NA"]
23 #[inline(always)]
24 pub fn gbl_cslp_en(&self) -> GBL_CSLP_EN_R {
25 GBL_CSLP_EN_R::new((self.bits & 1) != 0)
26 }
27 #[doc = "Bit 1 - NA"]
28 #[inline(always)]
29 pub fn chnl_cslp_en(&self) -> CHNL_CSLP_EN_R {
30 CHNL_CSLP_EN_R::new(((self.bits >> 1) & 1) != 0)
31 }
32 #[doc = "Bit 2 - NA"]
33 #[inline(always)]
34 pub fn sbiu_cslp_en(&self) -> SBIU_CSLP_EN_R {
35 SBIU_CSLP_EN_R::new(((self.bits >> 2) & 1) != 0)
36 }
37 #[doc = "Bit 3 - NA"]
38 #[inline(always)]
39 pub fn mxif_cslp_en(&self) -> MXIF_CSLP_EN_R {
40 MXIF_CSLP_EN_R::new(((self.bits >> 3) & 1) != 0)
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("LOWPOWER_CFG0")
47 .field("gbl_cslp_en", &format_args!("{}", self.gbl_cslp_en().bit()))
48 .field(
49 "chnl_cslp_en",
50 &format_args!("{}", self.chnl_cslp_en().bit()),
51 )
52 .field(
53 "sbiu_cslp_en",
54 &format_args!("{}", self.sbiu_cslp_en().bit()),
55 )
56 .field(
57 "mxif_cslp_en",
58 &format_args!("{}", self.mxif_cslp_en().bit()),
59 )
60 .finish()
61 }
62}
63#[cfg(feature = "impl-register-debug")]
64impl core::fmt::Debug for crate::generic::Reg<LOWPOWER_CFG0_SPEC> {
65 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
66 core::fmt::Debug::fmt(&self.read(), f)
67 }
68}
69impl W {
70 #[doc = "Bit 0 - NA"]
71 #[inline(always)]
72 #[must_use]
73 pub fn gbl_cslp_en(&mut self) -> GBL_CSLP_EN_W<LOWPOWER_CFG0_SPEC> {
74 GBL_CSLP_EN_W::new(self, 0)
75 }
76 #[doc = "Bit 1 - NA"]
77 #[inline(always)]
78 #[must_use]
79 pub fn chnl_cslp_en(&mut self) -> CHNL_CSLP_EN_W<LOWPOWER_CFG0_SPEC> {
80 CHNL_CSLP_EN_W::new(self, 1)
81 }
82 #[doc = "Bit 2 - NA"]
83 #[inline(always)]
84 #[must_use]
85 pub fn sbiu_cslp_en(&mut self) -> SBIU_CSLP_EN_W<LOWPOWER_CFG0_SPEC> {
86 SBIU_CSLP_EN_W::new(self, 2)
87 }
88 #[doc = "Bit 3 - NA"]
89 #[inline(always)]
90 #[must_use]
91 pub fn mxif_cslp_en(&mut self) -> MXIF_CSLP_EN_W<LOWPOWER_CFG0_SPEC> {
92 MXIF_CSLP_EN_W::new(self, 3)
93 }
94}
95#[doc = "NA\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`lowpower_cfg0::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 [`lowpower_cfg0::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
96pub struct LOWPOWER_CFG0_SPEC;
97impl crate::RegisterSpec for LOWPOWER_CFG0_SPEC {
98 type Ux = u32;
99}
100#[doc = "`read()` method returns [`lowpower_cfg0::R`](R) reader structure"]
101impl crate::Readable for LOWPOWER_CFG0_SPEC {}
102#[doc = "`write(|w| ..)` method takes [`lowpower_cfg0::W`](W) writer structure"]
103impl crate::Writable for LOWPOWER_CFG0_SPEC {
104 type Safety = crate::Unsafe;
105 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
106 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
107}
108#[doc = "`reset()` method sets LOWPOWER_CFG0 to value 0x0f"]
109impl crate::Resettable for LOWPOWER_CFG0_SPEC {
110 const RESET_VALUE: u32 = 0x0f;
111}