eos_s3/misc/
a0_pmu_dbg_mon_sel.rs1#[doc = "Register `A0_PMU_DBG_MON_SEL` reader"]
2pub struct R(crate::R<A0_PMU_DBG_MON_SEL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<A0_PMU_DBG_MON_SEL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<A0_PMU_DBG_MON_SEL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<A0_PMU_DBG_MON_SEL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `A0_PMU_DBG_MON_SEL` writer"]
17pub struct W(crate::W<A0_PMU_DBG_MON_SEL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<A0_PMU_DBG_MON_SEL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<A0_PMU_DBG_MON_SEL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<A0_PMU_DBG_MON_SEL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Select data to be shown in the PMU debug monitor\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum A0_PMU_DEBUG_MON_SEL_A {
41 #[doc = "0: {M4STM_KickOff, M4STM_BUSY, 6'h0}"]
42 SHOW_M4STM_KICKOFF_AND_BUSY_PLUS_0X000000 = 0,
43 #[doc = "1: `1`"]
44 SHOW_A1 = 1,
45 #[doc = "2: `10`"]
46 SHOW_M4 = 2,
47 #[doc = "3: `11`"]
48 SHOW_M4S0 = 3,
49 #[doc = "4: `100`"]
50 SHOW_AD5 = 4,
51 #[doc = "5: `101`"]
52 SHOW_AD4 = 5,
53 #[doc = "6: `110`"]
54 SHOW_AD3 = 6,
55 #[doc = "7: `111`"]
56 SHOW_AD2 = 7,
57 #[doc = "8: `1000`"]
58 SHOW_AD1 = 8,
59 #[doc = "9: `1001`"]
60 SHOW_AD0 = 9,
61 #[doc = "10: {FBSTM_KickOff, FBSTM_BUSY,6'h0}"]
62 SHOW_FBST_KICKOFF_AND_BUSY_PLUS_0X000000 = 10,
63 #[doc = "11: `1011`"]
64 SHOW_I2S = 11,
65 #[doc = "13: `1101`"]
66 SHOW_M4S15 = 13,
67 #[doc = "14: `1110`"]
68 SHOW_M4S11 = 14,
69 #[doc = "15: `1111`"]
70 SHOW_M4S7 = 15,
71 #[doc = "16: `10000`"]
72 SHOW_M4S3 = 16,
73 #[doc = "17: `10001`"]
74 SHOW_PF = 17,
75 #[doc = "18: `10010`"]
76 SHOW_SDMA = 18,
77 #[doc = "19: `10011`"]
78 SHOW_FFE = 19,
79 #[doc = "20: `10100`"]
80 SHOW_FB = 20,
81}
82impl From<A0_PMU_DEBUG_MON_SEL_A> for u8 {
83 #[inline(always)]
84 fn from(variant: A0_PMU_DEBUG_MON_SEL_A) -> Self {
85 variant as _
86 }
87}
88#[doc = "Field `A0_PMU_DEBUG_MON_SEL` reader - Select data to be shown in the PMU debug monitor"]
89pub struct A0_PMU_DEBUG_MON_SEL_R(
90 crate::FieldReader<u8, A0_PMU_DEBUG_MON_SEL_A>,
91);
92impl A0_PMU_DEBUG_MON_SEL_R {
93 #[inline(always)]
94 pub(crate) fn new(bits: u8) -> Self {
95 A0_PMU_DEBUG_MON_SEL_R(crate::FieldReader::new(bits))
96 }
97 #[doc = r"Get enumerated values variant"]
98 #[inline(always)]
99 pub fn variant(&self) -> Option<A0_PMU_DEBUG_MON_SEL_A> {
100 match self . bits { 0 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_M4STM_KICKOFF_AND_BUSY_PLUS_0X000000 ) , 1 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_A1 ) , 2 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_M4 ) , 3 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_M4S0 ) , 4 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_AD5 ) , 5 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_AD4 ) , 6 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_AD3 ) , 7 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_AD2 ) , 8 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_AD1 ) , 9 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_AD0 ) , 10 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_FBST_KICKOFF_AND_BUSY_PLUS_0X000000 ) , 11 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_I2S ) , 13 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_M4S15 ) , 14 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_M4S11 ) , 15 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_M4S7 ) , 16 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_M4S3 ) , 17 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_PF ) , 18 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_SDMA ) , 19 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_FFE ) , 20 => Some ( A0_PMU_DEBUG_MON_SEL_A :: SHOW_FB ) , _ => None , }
101 }
102 #[doc = "Checks if the value of the field is `SHOW_M4STM_KICKOFF_AND_BUSY_PLUS_0X000000`"]
103 #[inline(always)]
104 pub fn is_show_m4stm_kickoff_and_busy_plus_0x000000(&self) -> bool {
105 **self
106 == A0_PMU_DEBUG_MON_SEL_A::SHOW_M4STM_KICKOFF_AND_BUSY_PLUS_0X000000
107 }
108 #[doc = "Checks if the value of the field is `SHOW_A1`"]
109 #[inline(always)]
110 pub fn is_show_a1(&self) -> bool {
111 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_A1
112 }
113 #[doc = "Checks if the value of the field is `SHOW_M4`"]
114 #[inline(always)]
115 pub fn is_show_m4(&self) -> bool {
116 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_M4
117 }
118 #[doc = "Checks if the value of the field is `SHOW_M4S0`"]
119 #[inline(always)]
120 pub fn is_show_m4s0(&self) -> bool {
121 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S0
122 }
123 #[doc = "Checks if the value of the field is `SHOW_AD5`"]
124 #[inline(always)]
125 pub fn is_show_ad5(&self) -> bool {
126 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_AD5
127 }
128 #[doc = "Checks if the value of the field is `SHOW_AD4`"]
129 #[inline(always)]
130 pub fn is_show_ad4(&self) -> bool {
131 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_AD4
132 }
133 #[doc = "Checks if the value of the field is `SHOW_AD3`"]
134 #[inline(always)]
135 pub fn is_show_ad3(&self) -> bool {
136 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_AD3
137 }
138 #[doc = "Checks if the value of the field is `SHOW_AD2`"]
139 #[inline(always)]
140 pub fn is_show_ad2(&self) -> bool {
141 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_AD2
142 }
143 #[doc = "Checks if the value of the field is `SHOW_AD1`"]
144 #[inline(always)]
145 pub fn is_show_ad1(&self) -> bool {
146 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_AD1
147 }
148 #[doc = "Checks if the value of the field is `SHOW_AD0`"]
149 #[inline(always)]
150 pub fn is_show_ad0(&self) -> bool {
151 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_AD0
152 }
153 #[doc = "Checks if the value of the field is `SHOW_FBST_KICKOFF_AND_BUSY_PLUS_0X000000`"]
154 #[inline(always)]
155 pub fn is_show_fbst_kickoff_and_busy_plus_0x000000(&self) -> bool {
156 **self
157 == A0_PMU_DEBUG_MON_SEL_A::SHOW_FBST_KICKOFF_AND_BUSY_PLUS_0X000000
158 }
159 #[doc = "Checks if the value of the field is `SHOW_I2S`"]
160 #[inline(always)]
161 pub fn is_show_i2s(&self) -> bool {
162 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_I2S
163 }
164 #[doc = "Checks if the value of the field is `SHOW_M4S15`"]
165 #[inline(always)]
166 pub fn is_show_m4s15(&self) -> bool {
167 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S15
168 }
169 #[doc = "Checks if the value of the field is `SHOW_M4S11`"]
170 #[inline(always)]
171 pub fn is_show_m4s11(&self) -> bool {
172 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S11
173 }
174 #[doc = "Checks if the value of the field is `SHOW_M4S7`"]
175 #[inline(always)]
176 pub fn is_show_m4s7(&self) -> bool {
177 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S7
178 }
179 #[doc = "Checks if the value of the field is `SHOW_M4S3`"]
180 #[inline(always)]
181 pub fn is_show_m4s3(&self) -> bool {
182 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S3
183 }
184 #[doc = "Checks if the value of the field is `SHOW_PF`"]
185 #[inline(always)]
186 pub fn is_show_pf(&self) -> bool {
187 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_PF
188 }
189 #[doc = "Checks if the value of the field is `SHOW_SDMA`"]
190 #[inline(always)]
191 pub fn is_show_sdma(&self) -> bool {
192 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_SDMA
193 }
194 #[doc = "Checks if the value of the field is `SHOW_FFE`"]
195 #[inline(always)]
196 pub fn is_show_ffe(&self) -> bool {
197 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_FFE
198 }
199 #[doc = "Checks if the value of the field is `SHOW_FB`"]
200 #[inline(always)]
201 pub fn is_show_fb(&self) -> bool {
202 **self == A0_PMU_DEBUG_MON_SEL_A::SHOW_FB
203 }
204}
205impl core::ops::Deref for A0_PMU_DEBUG_MON_SEL_R {
206 type Target = crate::FieldReader<u8, A0_PMU_DEBUG_MON_SEL_A>;
207 #[inline(always)]
208 fn deref(&self) -> &Self::Target {
209 &self.0
210 }
211}
212#[doc = "Field `A0_PMU_DEBUG_MON_SEL` writer - Select data to be shown in the PMU debug monitor"]
213pub struct A0_PMU_DEBUG_MON_SEL_W<'a> {
214 w: &'a mut W,
215}
216impl<'a> A0_PMU_DEBUG_MON_SEL_W<'a> {
217 #[doc = r"Writes `variant` to the field"]
218 #[inline(always)]
219 pub fn variant(self, variant: A0_PMU_DEBUG_MON_SEL_A) -> &'a mut W {
220 unsafe { self.bits(variant.into()) }
221 }
222 #[doc = "{M4STM_KickOff, M4STM_BUSY, 6'h0}"]
223 #[inline(always)]
224 pub fn show_m4stm_kickoff_and_busy_plus_0x000000(self) -> &'a mut W {
225 self.variant(
226 A0_PMU_DEBUG_MON_SEL_A::SHOW_M4STM_KICKOFF_AND_BUSY_PLUS_0X000000,
227 )
228 }
229 #[doc = "`1`"]
230 #[inline(always)]
231 pub fn show_a1(self) -> &'a mut W {
232 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_A1)
233 }
234 #[doc = "`10`"]
235 #[inline(always)]
236 pub fn show_m4(self) -> &'a mut W {
237 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_M4)
238 }
239 #[doc = "`11`"]
240 #[inline(always)]
241 pub fn show_m4s0(self) -> &'a mut W {
242 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S0)
243 }
244 #[doc = "`100`"]
245 #[inline(always)]
246 pub fn show_ad5(self) -> &'a mut W {
247 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_AD5)
248 }
249 #[doc = "`101`"]
250 #[inline(always)]
251 pub fn show_ad4(self) -> &'a mut W {
252 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_AD4)
253 }
254 #[doc = "`110`"]
255 #[inline(always)]
256 pub fn show_ad3(self) -> &'a mut W {
257 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_AD3)
258 }
259 #[doc = "`111`"]
260 #[inline(always)]
261 pub fn show_ad2(self) -> &'a mut W {
262 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_AD2)
263 }
264 #[doc = "`1000`"]
265 #[inline(always)]
266 pub fn show_ad1(self) -> &'a mut W {
267 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_AD1)
268 }
269 #[doc = "`1001`"]
270 #[inline(always)]
271 pub fn show_ad0(self) -> &'a mut W {
272 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_AD0)
273 }
274 #[doc = "{FBSTM_KickOff, FBSTM_BUSY,6'h0}"]
275 #[inline(always)]
276 pub fn show_fbst_kickoff_and_busy_plus_0x000000(self) -> &'a mut W {
277 self.variant(
278 A0_PMU_DEBUG_MON_SEL_A::SHOW_FBST_KICKOFF_AND_BUSY_PLUS_0X000000,
279 )
280 }
281 #[doc = "`1011`"]
282 #[inline(always)]
283 pub fn show_i2s(self) -> &'a mut W {
284 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_I2S)
285 }
286 #[doc = "`1101`"]
287 #[inline(always)]
288 pub fn show_m4s15(self) -> &'a mut W {
289 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S15)
290 }
291 #[doc = "`1110`"]
292 #[inline(always)]
293 pub fn show_m4s11(self) -> &'a mut W {
294 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S11)
295 }
296 #[doc = "`1111`"]
297 #[inline(always)]
298 pub fn show_m4s7(self) -> &'a mut W {
299 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S7)
300 }
301 #[doc = "`10000`"]
302 #[inline(always)]
303 pub fn show_m4s3(self) -> &'a mut W {
304 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_M4S3)
305 }
306 #[doc = "`10001`"]
307 #[inline(always)]
308 pub fn show_pf(self) -> &'a mut W {
309 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_PF)
310 }
311 #[doc = "`10010`"]
312 #[inline(always)]
313 pub fn show_sdma(self) -> &'a mut W {
314 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_SDMA)
315 }
316 #[doc = "`10011`"]
317 #[inline(always)]
318 pub fn show_ffe(self) -> &'a mut W {
319 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_FFE)
320 }
321 #[doc = "`10100`"]
322 #[inline(always)]
323 pub fn show_fb(self) -> &'a mut W {
324 self.variant(A0_PMU_DEBUG_MON_SEL_A::SHOW_FB)
325 }
326 #[doc = r"Writes raw bits to the field"]
327 #[inline(always)]
328 pub unsafe fn bits(self, value: u8) -> &'a mut W {
329 self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f);
330 self.w
331 }
332}
333impl R {
334 #[doc = "Bits 0:5 - Select data to be shown in the PMU debug monitor"]
335 #[inline(always)]
336 pub fn a0_pmu_debug_mon_sel(&self) -> A0_PMU_DEBUG_MON_SEL_R {
337 A0_PMU_DEBUG_MON_SEL_R::new((self.bits & 0x3f) as u8)
338 }
339}
340impl W {
341 #[doc = "Bits 0:5 - Select data to be shown in the PMU debug monitor"]
342 #[inline(always)]
343 pub fn a0_pmu_debug_mon_sel(&mut self) -> A0_PMU_DEBUG_MON_SEL_W {
344 A0_PMU_DEBUG_MON_SEL_W { w: self }
345 }
346 #[doc = "Writes raw bits to the register."]
347 #[inline(always)]
348 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
349 self.0.bits(bits);
350 self
351 }
352}
353#[doc = "Selects the data present in the PMU debug monitor. The output will be (Except 0 and 10), {Status0, Status1, ISO, RET, GateCLK_N, Mem_DS, MP_Gate, RP_Gate)\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [a0_pmu_dbg_mon_sel](index.html) module"]
354pub struct A0_PMU_DBG_MON_SEL_SPEC;
355impl crate::RegisterSpec for A0_PMU_DBG_MON_SEL_SPEC {
356 type Ux = u32;
357}
358#[doc = "`read()` method returns [a0_pmu_dbg_mon_sel::R](R) reader structure"]
359impl crate::Readable for A0_PMU_DBG_MON_SEL_SPEC {
360 type Reader = R;
361}
362#[doc = "`write(|w| ..)` method takes [a0_pmu_dbg_mon_sel::W](W) writer structure"]
363impl crate::Writable for A0_PMU_DBG_MON_SEL_SPEC {
364 type Writer = W;
365}
366#[doc = "`reset()` method sets A0_PMU_DBG_MON_SEL to value 0"]
367impl crate::Resettable for A0_PMU_DBG_MON_SEL_SPEC {
368 #[inline(always)]
369 fn reset_value() -> Self::Ux {
370 0
371 }
372}