esp32c6_lp/lp_clkrst/
xtal32k.rs1#[doc = "Register `XTAL32K` reader"]
2pub type R = crate::R<XTAL32K_SPEC>;
3#[doc = "Register `XTAL32K` writer"]
4pub type W = crate::W<XTAL32K_SPEC>;
5#[doc = "Field `DRES_XTAL32K` reader - need_des"]
6pub type DRES_XTAL32K_R = crate::FieldReader;
7#[doc = "Field `DRES_XTAL32K` writer - need_des"]
8pub type DRES_XTAL32K_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9#[doc = "Field `DGM_XTAL32K` reader - need_des"]
10pub type DGM_XTAL32K_R = crate::FieldReader;
11#[doc = "Field `DGM_XTAL32K` writer - need_des"]
12pub type DGM_XTAL32K_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13#[doc = "Field `DBUF_XTAL32K` reader - need_des"]
14pub type DBUF_XTAL32K_R = crate::BitReader;
15#[doc = "Field `DBUF_XTAL32K` writer - need_des"]
16pub type DBUF_XTAL32K_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `DAC_XTAL32K` reader - need_des"]
18pub type DAC_XTAL32K_R = crate::FieldReader;
19#[doc = "Field `DAC_XTAL32K` writer - need_des"]
20pub type DAC_XTAL32K_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
21impl R {
22 #[doc = "Bits 22:24 - need_des"]
23 #[inline(always)]
24 pub fn dres_xtal32k(&self) -> DRES_XTAL32K_R {
25 DRES_XTAL32K_R::new(((self.bits >> 22) & 7) as u8)
26 }
27 #[doc = "Bits 25:27 - need_des"]
28 #[inline(always)]
29 pub fn dgm_xtal32k(&self) -> DGM_XTAL32K_R {
30 DGM_XTAL32K_R::new(((self.bits >> 25) & 7) as u8)
31 }
32 #[doc = "Bit 28 - need_des"]
33 #[inline(always)]
34 pub fn dbuf_xtal32k(&self) -> DBUF_XTAL32K_R {
35 DBUF_XTAL32K_R::new(((self.bits >> 28) & 1) != 0)
36 }
37 #[doc = "Bits 29:31 - need_des"]
38 #[inline(always)]
39 pub fn dac_xtal32k(&self) -> DAC_XTAL32K_R {
40 DAC_XTAL32K_R::new(((self.bits >> 29) & 7) as u8)
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("XTAL32K")
47 .field("dres_xtal32k", &self.dres_xtal32k())
48 .field("dgm_xtal32k", &self.dgm_xtal32k())
49 .field("dbuf_xtal32k", &self.dbuf_xtal32k())
50 .field("dac_xtal32k", &self.dac_xtal32k())
51 .finish()
52 }
53}
54impl W {
55 #[doc = "Bits 22:24 - need_des"]
56 #[inline(always)]
57 #[must_use]
58 pub fn dres_xtal32k(&mut self) -> DRES_XTAL32K_W<XTAL32K_SPEC> {
59 DRES_XTAL32K_W::new(self, 22)
60 }
61 #[doc = "Bits 25:27 - need_des"]
62 #[inline(always)]
63 #[must_use]
64 pub fn dgm_xtal32k(&mut self) -> DGM_XTAL32K_W<XTAL32K_SPEC> {
65 DGM_XTAL32K_W::new(self, 25)
66 }
67 #[doc = "Bit 28 - need_des"]
68 #[inline(always)]
69 #[must_use]
70 pub fn dbuf_xtal32k(&mut self) -> DBUF_XTAL32K_W<XTAL32K_SPEC> {
71 DBUF_XTAL32K_W::new(self, 28)
72 }
73 #[doc = "Bits 29:31 - need_des"]
74 #[inline(always)]
75 #[must_use]
76 pub fn dac_xtal32k(&mut self) -> DAC_XTAL32K_W<XTAL32K_SPEC> {
77 DAC_XTAL32K_W::new(self, 29)
78 }
79}
80#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`xtal32k::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`xtal32k::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
81pub struct XTAL32K_SPEC;
82impl crate::RegisterSpec for XTAL32K_SPEC {
83 type Ux = u32;
84}
85#[doc = "`read()` method returns [`xtal32k::R`](R) reader structure"]
86impl crate::Readable for XTAL32K_SPEC {}
87#[doc = "`write(|w| ..)` method takes [`xtal32k::W`](W) writer structure"]
88impl crate::Writable for XTAL32K_SPEC {
89 type Safety = crate::Unsafe;
90 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
92}
93#[doc = "`reset()` method sets XTAL32K to value 0x66c0_0000"]
94impl crate::Resettable for XTAL32K_SPEC {
95 const RESET_VALUE: u32 = 0x66c0_0000;
96}