1#[doc = "Register `CONF` reader"]
2pub type R = crate::R<CONF_SPEC>;
3#[doc = "Register `CONF` writer"]
4pub type W = crate::W<CONF_SPEC>;
5#[doc = "Field `SYSTIMER_CLK_FO` reader - systimer clock force on"]
6pub type SYSTIMER_CLK_FO_R = crate::BitReader;
7#[doc = "Field `SYSTIMER_CLK_FO` writer - systimer clock force on"]
8pub type SYSTIMER_CLK_FO_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `TARGET2_WORK_EN` reader - target2 work enable"]
10pub type TARGET2_WORK_EN_R = crate::BitReader;
11#[doc = "Field `TARGET2_WORK_EN` writer - target2 work enable"]
12pub type TARGET2_WORK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `TARGET1_WORK_EN` reader - target1 work enable"]
14pub type TARGET1_WORK_EN_R = crate::BitReader;
15#[doc = "Field `TARGET1_WORK_EN` writer - target1 work enable"]
16pub type TARGET1_WORK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `TARGET0_WORK_EN` reader - target0 work enable"]
18pub type TARGET0_WORK_EN_R = crate::BitReader;
19#[doc = "Field `TARGET0_WORK_EN` writer - target0 work enable"]
20pub type TARGET0_WORK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `TIMER_UNIT1_CORE1_STALL_EN` reader - If timer unit1 is stalled when core1 stalled"]
22pub type TIMER_UNIT1_CORE1_STALL_EN_R = crate::BitReader;
23#[doc = "Field `TIMER_UNIT1_CORE1_STALL_EN` writer - If timer unit1 is stalled when core1 stalled"]
24pub type TIMER_UNIT1_CORE1_STALL_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `TIMER_UNIT1_CORE0_STALL_EN` reader - If timer unit1 is stalled when core0 stalled"]
26pub type TIMER_UNIT1_CORE0_STALL_EN_R = crate::BitReader;
27#[doc = "Field `TIMER_UNIT1_CORE0_STALL_EN` writer - If timer unit1 is stalled when core0 stalled"]
28pub type TIMER_UNIT1_CORE0_STALL_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `TIMER_UNIT0_CORE1_STALL_EN` reader - If timer unit0 is stalled when core1 stalled"]
30pub type TIMER_UNIT0_CORE1_STALL_EN_R = crate::BitReader;
31#[doc = "Field `TIMER_UNIT0_CORE1_STALL_EN` writer - If timer unit0 is stalled when core1 stalled"]
32pub type TIMER_UNIT0_CORE1_STALL_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `TIMER_UNIT0_CORE0_STALL_EN` reader - If timer unit0 is stalled when core0 stalled"]
34pub type TIMER_UNIT0_CORE0_STALL_EN_R = crate::BitReader;
35#[doc = "Field `TIMER_UNIT0_CORE0_STALL_EN` writer - If timer unit0 is stalled when core0 stalled"]
36pub type TIMER_UNIT0_CORE0_STALL_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `TIMER_UNIT1_WORK_EN` reader - timer unit1 work enable"]
38pub type TIMER_UNIT1_WORK_EN_R = crate::BitReader;
39#[doc = "Field `TIMER_UNIT1_WORK_EN` writer - timer unit1 work enable"]
40pub type TIMER_UNIT1_WORK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `TIMER_UNIT0_WORK_EN` reader - timer unit0 work enable"]
42pub type TIMER_UNIT0_WORK_EN_R = crate::BitReader;
43#[doc = "Field `TIMER_UNIT0_WORK_EN` writer - timer unit0 work enable"]
44pub type TIMER_UNIT0_WORK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `CLK_EN` reader - register file clk gating"]
46pub type CLK_EN_R = crate::BitReader;
47#[doc = "Field `CLK_EN` writer - register file clk gating"]
48pub type CLK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
49impl R {
50 #[doc = "Bit 0 - systimer clock force on"]
51 #[inline(always)]
52 pub fn systimer_clk_fo(&self) -> SYSTIMER_CLK_FO_R {
53 SYSTIMER_CLK_FO_R::new((self.bits & 1) != 0)
54 }
55 #[doc = "Bit 22 - target2 work enable"]
56 #[inline(always)]
57 pub fn target2_work_en(&self) -> TARGET2_WORK_EN_R {
58 TARGET2_WORK_EN_R::new(((self.bits >> 22) & 1) != 0)
59 }
60 #[doc = "Bit 23 - target1 work enable"]
61 #[inline(always)]
62 pub fn target1_work_en(&self) -> TARGET1_WORK_EN_R {
63 TARGET1_WORK_EN_R::new(((self.bits >> 23) & 1) != 0)
64 }
65 #[doc = "Bit 24 - target0 work enable"]
66 #[inline(always)]
67 pub fn target0_work_en(&self) -> TARGET0_WORK_EN_R {
68 TARGET0_WORK_EN_R::new(((self.bits >> 24) & 1) != 0)
69 }
70 #[doc = "Bit 25 - If timer unit1 is stalled when core1 stalled"]
71 #[inline(always)]
72 pub fn timer_unit1_core1_stall_en(&self) -> TIMER_UNIT1_CORE1_STALL_EN_R {
73 TIMER_UNIT1_CORE1_STALL_EN_R::new(((self.bits >> 25) & 1) != 0)
74 }
75 #[doc = "Bit 26 - If timer unit1 is stalled when core0 stalled"]
76 #[inline(always)]
77 pub fn timer_unit1_core0_stall_en(&self) -> TIMER_UNIT1_CORE0_STALL_EN_R {
78 TIMER_UNIT1_CORE0_STALL_EN_R::new(((self.bits >> 26) & 1) != 0)
79 }
80 #[doc = "Bit 27 - If timer unit0 is stalled when core1 stalled"]
81 #[inline(always)]
82 pub fn timer_unit0_core1_stall_en(&self) -> TIMER_UNIT0_CORE1_STALL_EN_R {
83 TIMER_UNIT0_CORE1_STALL_EN_R::new(((self.bits >> 27) & 1) != 0)
84 }
85 #[doc = "Bit 28 - If timer unit0 is stalled when core0 stalled"]
86 #[inline(always)]
87 pub fn timer_unit0_core0_stall_en(&self) -> TIMER_UNIT0_CORE0_STALL_EN_R {
88 TIMER_UNIT0_CORE0_STALL_EN_R::new(((self.bits >> 28) & 1) != 0)
89 }
90 #[doc = "Bit 29 - timer unit1 work enable"]
91 #[inline(always)]
92 pub fn timer_unit1_work_en(&self) -> TIMER_UNIT1_WORK_EN_R {
93 TIMER_UNIT1_WORK_EN_R::new(((self.bits >> 29) & 1) != 0)
94 }
95 #[doc = "Bit 30 - timer unit0 work enable"]
96 #[inline(always)]
97 pub fn timer_unit0_work_en(&self) -> TIMER_UNIT0_WORK_EN_R {
98 TIMER_UNIT0_WORK_EN_R::new(((self.bits >> 30) & 1) != 0)
99 }
100 #[doc = "Bit 31 - register file clk gating"]
101 #[inline(always)]
102 pub fn clk_en(&self) -> CLK_EN_R {
103 CLK_EN_R::new(((self.bits >> 31) & 1) != 0)
104 }
105}
106#[cfg(feature = "impl-register-debug")]
107impl core::fmt::Debug for R {
108 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
109 f.debug_struct("CONF")
110 .field("systimer_clk_fo", &self.systimer_clk_fo())
111 .field("target2_work_en", &self.target2_work_en())
112 .field("target1_work_en", &self.target1_work_en())
113 .field("target0_work_en", &self.target0_work_en())
114 .field(
115 "timer_unit1_core1_stall_en",
116 &self.timer_unit1_core1_stall_en(),
117 )
118 .field(
119 "timer_unit1_core0_stall_en",
120 &self.timer_unit1_core0_stall_en(),
121 )
122 .field(
123 "timer_unit0_core1_stall_en",
124 &self.timer_unit0_core1_stall_en(),
125 )
126 .field(
127 "timer_unit0_core0_stall_en",
128 &self.timer_unit0_core0_stall_en(),
129 )
130 .field("timer_unit1_work_en", &self.timer_unit1_work_en())
131 .field("timer_unit0_work_en", &self.timer_unit0_work_en())
132 .field("clk_en", &self.clk_en())
133 .finish()
134 }
135}
136impl W {
137 #[doc = "Bit 0 - systimer clock force on"]
138 #[inline(always)]
139 pub fn systimer_clk_fo(&mut self) -> SYSTIMER_CLK_FO_W<CONF_SPEC> {
140 SYSTIMER_CLK_FO_W::new(self, 0)
141 }
142 #[doc = "Bit 22 - target2 work enable"]
143 #[inline(always)]
144 pub fn target2_work_en(&mut self) -> TARGET2_WORK_EN_W<CONF_SPEC> {
145 TARGET2_WORK_EN_W::new(self, 22)
146 }
147 #[doc = "Bit 23 - target1 work enable"]
148 #[inline(always)]
149 pub fn target1_work_en(&mut self) -> TARGET1_WORK_EN_W<CONF_SPEC> {
150 TARGET1_WORK_EN_W::new(self, 23)
151 }
152 #[doc = "Bit 24 - target0 work enable"]
153 #[inline(always)]
154 pub fn target0_work_en(&mut self) -> TARGET0_WORK_EN_W<CONF_SPEC> {
155 TARGET0_WORK_EN_W::new(self, 24)
156 }
157 #[doc = "Bit 25 - If timer unit1 is stalled when core1 stalled"]
158 #[inline(always)]
159 pub fn timer_unit1_core1_stall_en(&mut self) -> TIMER_UNIT1_CORE1_STALL_EN_W<CONF_SPEC> {
160 TIMER_UNIT1_CORE1_STALL_EN_W::new(self, 25)
161 }
162 #[doc = "Bit 26 - If timer unit1 is stalled when core0 stalled"]
163 #[inline(always)]
164 pub fn timer_unit1_core0_stall_en(&mut self) -> TIMER_UNIT1_CORE0_STALL_EN_W<CONF_SPEC> {
165 TIMER_UNIT1_CORE0_STALL_EN_W::new(self, 26)
166 }
167 #[doc = "Bit 27 - If timer unit0 is stalled when core1 stalled"]
168 #[inline(always)]
169 pub fn timer_unit0_core1_stall_en(&mut self) -> TIMER_UNIT0_CORE1_STALL_EN_W<CONF_SPEC> {
170 TIMER_UNIT0_CORE1_STALL_EN_W::new(self, 27)
171 }
172 #[doc = "Bit 28 - If timer unit0 is stalled when core0 stalled"]
173 #[inline(always)]
174 pub fn timer_unit0_core0_stall_en(&mut self) -> TIMER_UNIT0_CORE0_STALL_EN_W<CONF_SPEC> {
175 TIMER_UNIT0_CORE0_STALL_EN_W::new(self, 28)
176 }
177 #[doc = "Bit 29 - timer unit1 work enable"]
178 #[inline(always)]
179 pub fn timer_unit1_work_en(&mut self) -> TIMER_UNIT1_WORK_EN_W<CONF_SPEC> {
180 TIMER_UNIT1_WORK_EN_W::new(self, 29)
181 }
182 #[doc = "Bit 30 - timer unit0 work enable"]
183 #[inline(always)]
184 pub fn timer_unit0_work_en(&mut self) -> TIMER_UNIT0_WORK_EN_W<CONF_SPEC> {
185 TIMER_UNIT0_WORK_EN_W::new(self, 30)
186 }
187 #[doc = "Bit 31 - register file clk gating"]
188 #[inline(always)]
189 pub fn clk_en(&mut self) -> CLK_EN_W<CONF_SPEC> {
190 CLK_EN_W::new(self, 31)
191 }
192}
193#[doc = "Configure system timer clock\n\nYou can [`read`](crate::Reg::read) this register and get [`conf::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`conf::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
194pub struct CONF_SPEC;
195impl crate::RegisterSpec for CONF_SPEC {
196 type Ux = u32;
197}
198#[doc = "`read()` method returns [`conf::R`](R) reader structure"]
199impl crate::Readable for CONF_SPEC {}
200#[doc = "`write(|w| ..)` method takes [`conf::W`](W) writer structure"]
201impl crate::Writable for CONF_SPEC {
202 type Safety = crate::Unsafe;
203 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
204 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
205}
206#[doc = "`reset()` method sets CONF to value 0x4600_0000"]
207impl crate::Resettable for CONF_SPEC {
208 const RESET_VALUE: u32 = 0x4600_0000;
209}