esp32c3/rtc_cntl/
dbg_sel.rs1#[doc = "Register `DBG_SEL` reader"]
2pub type R = crate::R<DBG_SEL_SPEC>;
3#[doc = "Register `DBG_SEL` writer"]
4pub type W = crate::W<DBG_SEL_SPEC>;
5#[doc = "Field `DEBUG_12M_NO_GATING` reader - use for debug"]
6pub type DEBUG_12M_NO_GATING_R = crate::BitReader;
7#[doc = "Field `DEBUG_12M_NO_GATING` writer - use for debug"]
8pub type DEBUG_12M_NO_GATING_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `DEBUG_BIT_SEL` reader - use for debug"]
10pub type DEBUG_BIT_SEL_R = crate::FieldReader;
11#[doc = "Field `DEBUG_BIT_SEL` writer - use for debug"]
12pub type DEBUG_BIT_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
13#[doc = "Field `DEBUG_SEL0` reader - use for debug"]
14pub type DEBUG_SEL0_R = crate::FieldReader;
15#[doc = "Field `DEBUG_SEL0` writer - use for debug"]
16pub type DEBUG_SEL0_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
17#[doc = "Field `DEBUG_SEL1` reader - use for debug"]
18pub type DEBUG_SEL1_R = crate::FieldReader;
19#[doc = "Field `DEBUG_SEL1` writer - use for debug"]
20pub type DEBUG_SEL1_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
21#[doc = "Field `DEBUG_SEL2` reader - use for debug"]
22pub type DEBUG_SEL2_R = crate::FieldReader;
23#[doc = "Field `DEBUG_SEL2` writer - use for debug"]
24pub type DEBUG_SEL2_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
25#[doc = "Field `DEBUG_SEL3` reader - use for debug"]
26pub type DEBUG_SEL3_R = crate::FieldReader;
27#[doc = "Field `DEBUG_SEL3` writer - use for debug"]
28pub type DEBUG_SEL3_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
29#[doc = "Field `DEBUG_SEL4` reader - use for debug"]
30pub type DEBUG_SEL4_R = crate::FieldReader;
31#[doc = "Field `DEBUG_SEL4` writer - use for debug"]
32pub type DEBUG_SEL4_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
33impl R {
34    #[doc = "Bit 1 - use for debug"]
35    #[inline(always)]
36    pub fn debug_12m_no_gating(&self) -> DEBUG_12M_NO_GATING_R {
37        DEBUG_12M_NO_GATING_R::new(((self.bits >> 1) & 1) != 0)
38    }
39    #[doc = "Bits 2:6 - use for debug"]
40    #[inline(always)]
41    pub fn debug_bit_sel(&self) -> DEBUG_BIT_SEL_R {
42        DEBUG_BIT_SEL_R::new(((self.bits >> 2) & 0x1f) as u8)
43    }
44    #[doc = "Bits 7:11 - use for debug"]
45    #[inline(always)]
46    pub fn debug_sel0(&self) -> DEBUG_SEL0_R {
47        DEBUG_SEL0_R::new(((self.bits >> 7) & 0x1f) as u8)
48    }
49    #[doc = "Bits 12:16 - use for debug"]
50    #[inline(always)]
51    pub fn debug_sel1(&self) -> DEBUG_SEL1_R {
52        DEBUG_SEL1_R::new(((self.bits >> 12) & 0x1f) as u8)
53    }
54    #[doc = "Bits 17:21 - use for debug"]
55    #[inline(always)]
56    pub fn debug_sel2(&self) -> DEBUG_SEL2_R {
57        DEBUG_SEL2_R::new(((self.bits >> 17) & 0x1f) as u8)
58    }
59    #[doc = "Bits 22:26 - use for debug"]
60    #[inline(always)]
61    pub fn debug_sel3(&self) -> DEBUG_SEL3_R {
62        DEBUG_SEL3_R::new(((self.bits >> 22) & 0x1f) as u8)
63    }
64    #[doc = "Bits 27:31 - use for debug"]
65    #[inline(always)]
66    pub fn debug_sel4(&self) -> DEBUG_SEL4_R {
67        DEBUG_SEL4_R::new(((self.bits >> 27) & 0x1f) as u8)
68    }
69}
70#[cfg(feature = "impl-register-debug")]
71impl core::fmt::Debug for R {
72    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
73        f.debug_struct("DBG_SEL")
74            .field("debug_12m_no_gating", &self.debug_12m_no_gating())
75            .field("debug_bit_sel", &self.debug_bit_sel())
76            .field("debug_sel0", &self.debug_sel0())
77            .field("debug_sel1", &self.debug_sel1())
78            .field("debug_sel2", &self.debug_sel2())
79            .field("debug_sel3", &self.debug_sel3())
80            .field("debug_sel4", &self.debug_sel4())
81            .finish()
82    }
83}
84impl W {
85    #[doc = "Bit 1 - use for debug"]
86    #[inline(always)]
87    pub fn debug_12m_no_gating(&mut self) -> DEBUG_12M_NO_GATING_W<DBG_SEL_SPEC> {
88        DEBUG_12M_NO_GATING_W::new(self, 1)
89    }
90    #[doc = "Bits 2:6 - use for debug"]
91    #[inline(always)]
92    pub fn debug_bit_sel(&mut self) -> DEBUG_BIT_SEL_W<DBG_SEL_SPEC> {
93        DEBUG_BIT_SEL_W::new(self, 2)
94    }
95    #[doc = "Bits 7:11 - use for debug"]
96    #[inline(always)]
97    pub fn debug_sel0(&mut self) -> DEBUG_SEL0_W<DBG_SEL_SPEC> {
98        DEBUG_SEL0_W::new(self, 7)
99    }
100    #[doc = "Bits 12:16 - use for debug"]
101    #[inline(always)]
102    pub fn debug_sel1(&mut self) -> DEBUG_SEL1_W<DBG_SEL_SPEC> {
103        DEBUG_SEL1_W::new(self, 12)
104    }
105    #[doc = "Bits 17:21 - use for debug"]
106    #[inline(always)]
107    pub fn debug_sel2(&mut self) -> DEBUG_SEL2_W<DBG_SEL_SPEC> {
108        DEBUG_SEL2_W::new(self, 17)
109    }
110    #[doc = "Bits 22:26 - use for debug"]
111    #[inline(always)]
112    pub fn debug_sel3(&mut self) -> DEBUG_SEL3_W<DBG_SEL_SPEC> {
113        DEBUG_SEL3_W::new(self, 22)
114    }
115    #[doc = "Bits 27:31 - use for debug"]
116    #[inline(always)]
117    pub fn debug_sel4(&mut self) -> DEBUG_SEL4_W<DBG_SEL_SPEC> {
118        DEBUG_SEL4_W::new(self, 27)
119    }
120}
121#[doc = "rtc configure register\n\nYou can [`read`](crate::Reg::read) this register and get [`dbg_sel::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dbg_sel::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
122pub struct DBG_SEL_SPEC;
123impl crate::RegisterSpec for DBG_SEL_SPEC {
124    type Ux = u32;
125}
126#[doc = "`read()` method returns [`dbg_sel::R`](R) reader structure"]
127impl crate::Readable for DBG_SEL_SPEC {}
128#[doc = "`write(|w| ..)` method takes [`dbg_sel::W`](W) writer structure"]
129impl crate::Writable for DBG_SEL_SPEC {
130    type Safety = crate::Unsafe;
131}
132#[doc = "`reset()` method sets DBG_SEL to value 0"]
133impl crate::Resettable for DBG_SEL_SPEC {}