esp32p4/hp_sys_clkrst/
peri_clk_ctrl118.rs1#[doc = "Register `PERI_CLK_CTRL118` reader"]
2pub type R = crate::R<PERI_CLK_CTRL118_SPEC>;
3#[doc = "Register `PERI_CLK_CTRL118` writer"]
4pub type W = crate::W<PERI_CLK_CTRL118_SPEC>;
5#[doc = "Field `PARLIO_RX_CLK_DIV_NUMERATOR` reader - Reserved"]
6pub type PARLIO_RX_CLK_DIV_NUMERATOR_R = crate::FieldReader;
7#[doc = "Field `PARLIO_RX_CLK_DIV_NUMERATOR` writer - Reserved"]
8pub type PARLIO_RX_CLK_DIV_NUMERATOR_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `PARLIO_RX_CLK_DIV_DENOMINATOR` reader - Reserved"]
10pub type PARLIO_RX_CLK_DIV_DENOMINATOR_R = crate::FieldReader;
11#[doc = "Field `PARLIO_RX_CLK_DIV_DENOMINATOR` writer - Reserved"]
12pub type PARLIO_RX_CLK_DIV_DENOMINATOR_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `PARLIO_TX_CLK_SRC_SEL` reader - Reserved"]
14pub type PARLIO_TX_CLK_SRC_SEL_R = crate::FieldReader;
15#[doc = "Field `PARLIO_TX_CLK_SRC_SEL` writer - Reserved"]
16pub type PARLIO_TX_CLK_SRC_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17#[doc = "Field `PARLIO_TX_CLK_EN` reader - Reserved"]
18pub type PARLIO_TX_CLK_EN_R = crate::BitReader;
19#[doc = "Field `PARLIO_TX_CLK_EN` writer - Reserved"]
20pub type PARLIO_TX_CLK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `PARLIO_TX_CLK_DIV_NUM` reader - Reserved"]
22pub type PARLIO_TX_CLK_DIV_NUM_R = crate::FieldReader;
23#[doc = "Field `PARLIO_TX_CLK_DIV_NUM` writer - Reserved"]
24pub type PARLIO_TX_CLK_DIV_NUM_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
25impl R {
26 #[doc = "Bits 0:7 - Reserved"]
27 #[inline(always)]
28 pub fn parlio_rx_clk_div_numerator(&self) -> PARLIO_RX_CLK_DIV_NUMERATOR_R {
29 PARLIO_RX_CLK_DIV_NUMERATOR_R::new((self.bits & 0xff) as u8)
30 }
31 #[doc = "Bits 8:15 - Reserved"]
32 #[inline(always)]
33 pub fn parlio_rx_clk_div_denominator(&self) -> PARLIO_RX_CLK_DIV_DENOMINATOR_R {
34 PARLIO_RX_CLK_DIV_DENOMINATOR_R::new(((self.bits >> 8) & 0xff) as u8)
35 }
36 #[doc = "Bits 16:17 - Reserved"]
37 #[inline(always)]
38 pub fn parlio_tx_clk_src_sel(&self) -> PARLIO_TX_CLK_SRC_SEL_R {
39 PARLIO_TX_CLK_SRC_SEL_R::new(((self.bits >> 16) & 3) as u8)
40 }
41 #[doc = "Bit 18 - Reserved"]
42 #[inline(always)]
43 pub fn parlio_tx_clk_en(&self) -> PARLIO_TX_CLK_EN_R {
44 PARLIO_TX_CLK_EN_R::new(((self.bits >> 18) & 1) != 0)
45 }
46 #[doc = "Bits 19:26 - Reserved"]
47 #[inline(always)]
48 pub fn parlio_tx_clk_div_num(&self) -> PARLIO_TX_CLK_DIV_NUM_R {
49 PARLIO_TX_CLK_DIV_NUM_R::new(((self.bits >> 19) & 0xff) as u8)
50 }
51}
52#[cfg(feature = "impl-register-debug")]
53impl core::fmt::Debug for R {
54 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
55 f.debug_struct("PERI_CLK_CTRL118")
56 .field(
57 "parlio_rx_clk_div_numerator",
58 &format_args!("{}", self.parlio_rx_clk_div_numerator().bits()),
59 )
60 .field(
61 "parlio_rx_clk_div_denominator",
62 &format_args!("{}", self.parlio_rx_clk_div_denominator().bits()),
63 )
64 .field(
65 "parlio_tx_clk_src_sel",
66 &format_args!("{}", self.parlio_tx_clk_src_sel().bits()),
67 )
68 .field(
69 "parlio_tx_clk_en",
70 &format_args!("{}", self.parlio_tx_clk_en().bit()),
71 )
72 .field(
73 "parlio_tx_clk_div_num",
74 &format_args!("{}", self.parlio_tx_clk_div_num().bits()),
75 )
76 .finish()
77 }
78}
79#[cfg(feature = "impl-register-debug")]
80impl core::fmt::Debug for crate::generic::Reg<PERI_CLK_CTRL118_SPEC> {
81 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
82 core::fmt::Debug::fmt(&self.read(), f)
83 }
84}
85impl W {
86 #[doc = "Bits 0:7 - Reserved"]
87 #[inline(always)]
88 #[must_use]
89 pub fn parlio_rx_clk_div_numerator(
90 &mut self,
91 ) -> PARLIO_RX_CLK_DIV_NUMERATOR_W<PERI_CLK_CTRL118_SPEC> {
92 PARLIO_RX_CLK_DIV_NUMERATOR_W::new(self, 0)
93 }
94 #[doc = "Bits 8:15 - Reserved"]
95 #[inline(always)]
96 #[must_use]
97 pub fn parlio_rx_clk_div_denominator(
98 &mut self,
99 ) -> PARLIO_RX_CLK_DIV_DENOMINATOR_W<PERI_CLK_CTRL118_SPEC> {
100 PARLIO_RX_CLK_DIV_DENOMINATOR_W::new(self, 8)
101 }
102 #[doc = "Bits 16:17 - Reserved"]
103 #[inline(always)]
104 #[must_use]
105 pub fn parlio_tx_clk_src_sel(&mut self) -> PARLIO_TX_CLK_SRC_SEL_W<PERI_CLK_CTRL118_SPEC> {
106 PARLIO_TX_CLK_SRC_SEL_W::new(self, 16)
107 }
108 #[doc = "Bit 18 - Reserved"]
109 #[inline(always)]
110 #[must_use]
111 pub fn parlio_tx_clk_en(&mut self) -> PARLIO_TX_CLK_EN_W<PERI_CLK_CTRL118_SPEC> {
112 PARLIO_TX_CLK_EN_W::new(self, 18)
113 }
114 #[doc = "Bits 19:26 - Reserved"]
115 #[inline(always)]
116 #[must_use]
117 pub fn parlio_tx_clk_div_num(&mut self) -> PARLIO_TX_CLK_DIV_NUM_W<PERI_CLK_CTRL118_SPEC> {
118 PARLIO_TX_CLK_DIV_NUM_W::new(self, 19)
119 }
120}
121#[doc = "Reserved\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`peri_clk_ctrl118::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_clk_ctrl118::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
122pub struct PERI_CLK_CTRL118_SPEC;
123impl crate::RegisterSpec for PERI_CLK_CTRL118_SPEC {
124 type Ux = u32;
125}
126#[doc = "`read()` method returns [`peri_clk_ctrl118::R`](R) reader structure"]
127impl crate::Readable for PERI_CLK_CTRL118_SPEC {}
128#[doc = "`write(|w| ..)` method takes [`peri_clk_ctrl118::W`](W) writer structure"]
129impl crate::Writable for PERI_CLK_CTRL118_SPEC {
130 type Safety = crate::Unsafe;
131 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
132 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
133}
134#[doc = "`reset()` method sets PERI_CLK_CTRL118 to value 0"]
135impl crate::Resettable for PERI_CLK_CTRL118_SPEC {
136 const RESET_VALUE: u32 = 0;
137}