esp32p4/hp_sys/
peri_mem_clk_force_on.rs1#[doc = "Register `PERI_MEM_CLK_FORCE_ON` reader"]
2pub type R = crate::R<PERI_MEM_CLK_FORCE_ON_SPEC>;
3#[doc = "Register `PERI_MEM_CLK_FORCE_ON` writer"]
4pub type W = crate::W<PERI_MEM_CLK_FORCE_ON_SPEC>;
5#[doc = "Field `RMT_MEM_CLK_FORCE_ON` reader - Set this bit to force on mem clk in rmt"]
6pub type RMT_MEM_CLK_FORCE_ON_R = crate::BitReader;
7#[doc = "Field `RMT_MEM_CLK_FORCE_ON` writer - Set this bit to force on mem clk in rmt"]
8pub type RMT_MEM_CLK_FORCE_ON_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `BITSCRAMBLER_TX_MEM_CLK_FORCE_ON` reader - Set this bit to force on tx mem clk in bitscrambler"]
10pub type BITSCRAMBLER_TX_MEM_CLK_FORCE_ON_R = crate::BitReader;
11#[doc = "Field `BITSCRAMBLER_TX_MEM_CLK_FORCE_ON` writer - Set this bit to force on tx mem clk in bitscrambler"]
12pub type BITSCRAMBLER_TX_MEM_CLK_FORCE_ON_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `BITSCRAMBLER_RX_MEM_CLK_FORCE_ON` reader - Set this bit to force on rx mem clk in bitscrambler"]
14pub type BITSCRAMBLER_RX_MEM_CLK_FORCE_ON_R = crate::BitReader;
15#[doc = "Field `BITSCRAMBLER_RX_MEM_CLK_FORCE_ON` writer - Set this bit to force on rx mem clk in bitscrambler"]
16pub type BITSCRAMBLER_RX_MEM_CLK_FORCE_ON_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `GDMA_MEM_CLK_FORCE_ON` reader - Set this bit to force on mem clk in gdma"]
18pub type GDMA_MEM_CLK_FORCE_ON_R = crate::BitReader;
19#[doc = "Field `GDMA_MEM_CLK_FORCE_ON` writer - Set this bit to force on mem clk in gdma"]
20pub type GDMA_MEM_CLK_FORCE_ON_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[doc = "Bit 0 - Set this bit to force on mem clk in rmt"]
23 #[inline(always)]
24 pub fn rmt_mem_clk_force_on(&self) -> RMT_MEM_CLK_FORCE_ON_R {
25 RMT_MEM_CLK_FORCE_ON_R::new((self.bits & 1) != 0)
26 }
27 #[doc = "Bit 1 - Set this bit to force on tx mem clk in bitscrambler"]
28 #[inline(always)]
29 pub fn bitscrambler_tx_mem_clk_force_on(&self) -> BITSCRAMBLER_TX_MEM_CLK_FORCE_ON_R {
30 BITSCRAMBLER_TX_MEM_CLK_FORCE_ON_R::new(((self.bits >> 1) & 1) != 0)
31 }
32 #[doc = "Bit 2 - Set this bit to force on rx mem clk in bitscrambler"]
33 #[inline(always)]
34 pub fn bitscrambler_rx_mem_clk_force_on(&self) -> BITSCRAMBLER_RX_MEM_CLK_FORCE_ON_R {
35 BITSCRAMBLER_RX_MEM_CLK_FORCE_ON_R::new(((self.bits >> 2) & 1) != 0)
36 }
37 #[doc = "Bit 3 - Set this bit to force on mem clk in gdma"]
38 #[inline(always)]
39 pub fn gdma_mem_clk_force_on(&self) -> GDMA_MEM_CLK_FORCE_ON_R {
40 GDMA_MEM_CLK_FORCE_ON_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("PERI_MEM_CLK_FORCE_ON")
47 .field(
48 "rmt_mem_clk_force_on",
49 &format_args!("{}", self.rmt_mem_clk_force_on().bit()),
50 )
51 .field(
52 "bitscrambler_tx_mem_clk_force_on",
53 &format_args!("{}", self.bitscrambler_tx_mem_clk_force_on().bit()),
54 )
55 .field(
56 "bitscrambler_rx_mem_clk_force_on",
57 &format_args!("{}", self.bitscrambler_rx_mem_clk_force_on().bit()),
58 )
59 .field(
60 "gdma_mem_clk_force_on",
61 &format_args!("{}", self.gdma_mem_clk_force_on().bit()),
62 )
63 .finish()
64 }
65}
66#[cfg(feature = "impl-register-debug")]
67impl core::fmt::Debug for crate::generic::Reg<PERI_MEM_CLK_FORCE_ON_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 0 - Set this bit to force on mem clk in rmt"]
74 #[inline(always)]
75 #[must_use]
76 pub fn rmt_mem_clk_force_on(&mut self) -> RMT_MEM_CLK_FORCE_ON_W<PERI_MEM_CLK_FORCE_ON_SPEC> {
77 RMT_MEM_CLK_FORCE_ON_W::new(self, 0)
78 }
79 #[doc = "Bit 1 - Set this bit to force on tx mem clk in bitscrambler"]
80 #[inline(always)]
81 #[must_use]
82 pub fn bitscrambler_tx_mem_clk_force_on(
83 &mut self,
84 ) -> BITSCRAMBLER_TX_MEM_CLK_FORCE_ON_W<PERI_MEM_CLK_FORCE_ON_SPEC> {
85 BITSCRAMBLER_TX_MEM_CLK_FORCE_ON_W::new(self, 1)
86 }
87 #[doc = "Bit 2 - Set this bit to force on rx mem clk in bitscrambler"]
88 #[inline(always)]
89 #[must_use]
90 pub fn bitscrambler_rx_mem_clk_force_on(
91 &mut self,
92 ) -> BITSCRAMBLER_RX_MEM_CLK_FORCE_ON_W<PERI_MEM_CLK_FORCE_ON_SPEC> {
93 BITSCRAMBLER_RX_MEM_CLK_FORCE_ON_W::new(self, 2)
94 }
95 #[doc = "Bit 3 - Set this bit to force on mem clk in gdma"]
96 #[inline(always)]
97 #[must_use]
98 pub fn gdma_mem_clk_force_on(&mut self) -> GDMA_MEM_CLK_FORCE_ON_W<PERI_MEM_CLK_FORCE_ON_SPEC> {
99 GDMA_MEM_CLK_FORCE_ON_W::new(self, 3)
100 }
101}
102#[doc = "hp peri mem clk force on regpster\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`peri_mem_clk_force_on::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 [`peri_mem_clk_force_on::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
103pub struct PERI_MEM_CLK_FORCE_ON_SPEC;
104impl crate::RegisterSpec for PERI_MEM_CLK_FORCE_ON_SPEC {
105 type Ux = u32;
106}
107#[doc = "`read()` method returns [`peri_mem_clk_force_on::R`](R) reader structure"]
108impl crate::Readable for PERI_MEM_CLK_FORCE_ON_SPEC {}
109#[doc = "`write(|w| ..)` method takes [`peri_mem_clk_force_on::W`](W) writer structure"]
110impl crate::Writable for PERI_MEM_CLK_FORCE_ON_SPEC {
111 type Safety = crate::Unsafe;
112 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
113 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
114}
115#[doc = "`reset()` method sets PERI_MEM_CLK_FORCE_ON to value 0"]
116impl crate::Resettable for PERI_MEM_CLK_FORCE_ON_SPEC {
117 const RESET_VALUE: u32 = 0;
118}