esp32h2/lp_clkrst/
clk_to_hp.rs1#[doc = "Register `CLK_TO_HP` reader"]
2pub type R = crate::R<CLK_TO_HP_SPEC>;
3#[doc = "Register `CLK_TO_HP` writer"]
4pub type W = crate::W<CLK_TO_HP_SPEC>;
5#[doc = "Field `ICG_HP_XTAL32K` reader - need_des"]
6pub type ICG_HP_XTAL32K_R = crate::BitReader;
7#[doc = "Field `ICG_HP_XTAL32K` writer - need_des"]
8pub type ICG_HP_XTAL32K_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `ICG_HP_SOSC` reader - need_des"]
10pub type ICG_HP_SOSC_R = crate::BitReader;
11#[doc = "Field `ICG_HP_SOSC` writer - need_des"]
12pub type ICG_HP_SOSC_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `ICG_HP_OSC32K` reader - need_des"]
14pub type ICG_HP_OSC32K_R = crate::BitReader;
15#[doc = "Field `ICG_HP_OSC32K` writer - need_des"]
16pub type ICG_HP_OSC32K_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `ICG_HP_FOSC` reader - need_des"]
18pub type ICG_HP_FOSC_R = crate::BitReader;
19#[doc = "Field `ICG_HP_FOSC` writer - need_des"]
20pub type ICG_HP_FOSC_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[doc = "Bit 28 - need_des"]
23 #[inline(always)]
24 pub fn icg_hp_xtal32k(&self) -> ICG_HP_XTAL32K_R {
25 ICG_HP_XTAL32K_R::new(((self.bits >> 28) & 1) != 0)
26 }
27 #[doc = "Bit 29 - need_des"]
28 #[inline(always)]
29 pub fn icg_hp_sosc(&self) -> ICG_HP_SOSC_R {
30 ICG_HP_SOSC_R::new(((self.bits >> 29) & 1) != 0)
31 }
32 #[doc = "Bit 30 - need_des"]
33 #[inline(always)]
34 pub fn icg_hp_osc32k(&self) -> ICG_HP_OSC32K_R {
35 ICG_HP_OSC32K_R::new(((self.bits >> 30) & 1) != 0)
36 }
37 #[doc = "Bit 31 - need_des"]
38 #[inline(always)]
39 pub fn icg_hp_fosc(&self) -> ICG_HP_FOSC_R {
40 ICG_HP_FOSC_R::new(((self.bits >> 31) & 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("CLK_TO_HP")
47 .field("icg_hp_xtal32k", &self.icg_hp_xtal32k())
48 .field("icg_hp_sosc", &self.icg_hp_sosc())
49 .field("icg_hp_osc32k", &self.icg_hp_osc32k())
50 .field("icg_hp_fosc", &self.icg_hp_fosc())
51 .finish()
52 }
53}
54impl W {
55 #[doc = "Bit 28 - need_des"]
56 #[inline(always)]
57 pub fn icg_hp_xtal32k(&mut self) -> ICG_HP_XTAL32K_W<CLK_TO_HP_SPEC> {
58 ICG_HP_XTAL32K_W::new(self, 28)
59 }
60 #[doc = "Bit 29 - need_des"]
61 #[inline(always)]
62 pub fn icg_hp_sosc(&mut self) -> ICG_HP_SOSC_W<CLK_TO_HP_SPEC> {
63 ICG_HP_SOSC_W::new(self, 29)
64 }
65 #[doc = "Bit 30 - need_des"]
66 #[inline(always)]
67 pub fn icg_hp_osc32k(&mut self) -> ICG_HP_OSC32K_W<CLK_TO_HP_SPEC> {
68 ICG_HP_OSC32K_W::new(self, 30)
69 }
70 #[doc = "Bit 31 - need_des"]
71 #[inline(always)]
72 pub fn icg_hp_fosc(&mut self) -> ICG_HP_FOSC_W<CLK_TO_HP_SPEC> {
73 ICG_HP_FOSC_W::new(self, 31)
74 }
75}
76#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`clk_to_hp::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`clk_to_hp::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct CLK_TO_HP_SPEC;
78impl crate::RegisterSpec for CLK_TO_HP_SPEC {
79 type Ux = u32;
80}
81#[doc = "`read()` method returns [`clk_to_hp::R`](R) reader structure"]
82impl crate::Readable for CLK_TO_HP_SPEC {}
83#[doc = "`write(|w| ..)` method takes [`clk_to_hp::W`](W) writer structure"]
84impl crate::Writable for CLK_TO_HP_SPEC {
85 type Safety = crate::Unsafe;
86 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
87 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
88}
89#[doc = "`reset()` method sets CLK_TO_HP to value 0xf000_0000"]
90impl crate::Resettable for CLK_TO_HP_SPEC {
91 const RESET_VALUE: u32 = 0xf000_0000;
92}