1#[doc = "Register `CTSUMCH` reader"]
2pub struct R(crate::R<CTSUMCH_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CTSUMCH_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CTSUMCH_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CTSUMCH_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CTSUMCH` writer"]
17pub struct W(crate::W<CTSUMCH_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CTSUMCH_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<CTSUMCH_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CTSUMCH_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `MCH0` reader - CTSU Measurement Channel 0"]
38pub type MCH0_R = crate::FieldReader<u8, MCH0_A>;
39#[doc = "CTSU Measurement Channel 0\n\nValue on reset: 63"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum MCH0_A {
43 #[doc = "0: TS00"]
44 _0X00 = 0,
45 #[doc = "2: TS02"]
46 _0X02 = 2,
47 #[doc = "4: TS04"]
48 _0X04 = 4,
49 #[doc = "5: TS05"]
50 _0X05 = 5,
51 #[doc = "6: TS06"]
52 _0X06 = 6,
53 #[doc = "7: TS07"]
54 _0X07 = 7,
55 #[doc = "8: TS08"]
56 _0X08 = 8,
57 #[doc = "9: TS09"]
58 _0X09 = 9,
59 #[doc = "10: TS10"]
60 _0X0A = 10,
61 #[doc = "11: TS11"]
62 _0X0B = 11,
63 #[doc = "12: TS12"]
64 _0X0C = 12,
65 #[doc = "13: TS13"]
66 _0X0D = 13,
67 #[doc = "14: TS14"]
68 _0X0E = 14,
69 #[doc = "15: TS15"]
70 _0X0F = 15,
71 #[doc = "16: TS16"]
72 _0X10 = 16,
73 #[doc = "17: TS17"]
74 _0X11 = 17,
75 #[doc = "18: TS18"]
76 _0X12 = 18,
77 #[doc = "21: TS21"]
78 _0X15 = 21,
79 #[doc = "22: TS22"]
80 _0X16 = 22,
81 #[doc = "23: TS23"]
82 _0X17 = 23,
83 #[doc = "24: TS24"]
84 _0X18 = 24,
85 #[doc = "25: TS25"]
86 _0X19 = 25,
87 #[doc = "26: TS26"]
88 _0X1A = 26,
89 #[doc = "27: TS27"]
90 _0X1B = 27,
91 #[doc = "28: TS28"]
92 _0X1C = 28,
93 #[doc = "30: TS30"]
94 _0X1E = 30,
95 #[doc = "31: TS31"]
96 _0X1F = 31,
97 #[doc = "32: TS32"]
98 _0X20 = 32,
99 #[doc = "33: TS33"]
100 _0X21 = 33,
101 #[doc = "34: TS34"]
102 _0X22 = 34,
103 #[doc = "63: Measurement is being stopped."]
104 _0X3F = 63,
105}
106impl From<MCH0_A> for u8 {
107 #[inline(always)]
108 fn from(variant: MCH0_A) -> Self {
109 variant as _
110 }
111}
112impl MCH0_R {
113 #[doc = "Get enumerated values variant"]
114 #[inline(always)]
115 pub fn variant(&self) -> Option<MCH0_A> {
116 match self.bits {
117 0 => Some(MCH0_A::_0X00),
118 2 => Some(MCH0_A::_0X02),
119 4 => Some(MCH0_A::_0X04),
120 5 => Some(MCH0_A::_0X05),
121 6 => Some(MCH0_A::_0X06),
122 7 => Some(MCH0_A::_0X07),
123 8 => Some(MCH0_A::_0X08),
124 9 => Some(MCH0_A::_0X09),
125 10 => Some(MCH0_A::_0X0A),
126 11 => Some(MCH0_A::_0X0B),
127 12 => Some(MCH0_A::_0X0C),
128 13 => Some(MCH0_A::_0X0D),
129 14 => Some(MCH0_A::_0X0E),
130 15 => Some(MCH0_A::_0X0F),
131 16 => Some(MCH0_A::_0X10),
132 17 => Some(MCH0_A::_0X11),
133 18 => Some(MCH0_A::_0X12),
134 21 => Some(MCH0_A::_0X15),
135 22 => Some(MCH0_A::_0X16),
136 23 => Some(MCH0_A::_0X17),
137 24 => Some(MCH0_A::_0X18),
138 25 => Some(MCH0_A::_0X19),
139 26 => Some(MCH0_A::_0X1A),
140 27 => Some(MCH0_A::_0X1B),
141 28 => Some(MCH0_A::_0X1C),
142 30 => Some(MCH0_A::_0X1E),
143 31 => Some(MCH0_A::_0X1F),
144 32 => Some(MCH0_A::_0X20),
145 33 => Some(MCH0_A::_0X21),
146 34 => Some(MCH0_A::_0X22),
147 63 => Some(MCH0_A::_0X3F),
148 _ => None,
149 }
150 }
151 #[doc = "Checks if the value of the field is `_0X00`"]
152 #[inline(always)]
153 pub fn is_0x00(&self) -> bool {
154 *self == MCH0_A::_0X00
155 }
156 #[doc = "Checks if the value of the field is `_0X02`"]
157 #[inline(always)]
158 pub fn is_0x02(&self) -> bool {
159 *self == MCH0_A::_0X02
160 }
161 #[doc = "Checks if the value of the field is `_0X04`"]
162 #[inline(always)]
163 pub fn is_0x04(&self) -> bool {
164 *self == MCH0_A::_0X04
165 }
166 #[doc = "Checks if the value of the field is `_0X05`"]
167 #[inline(always)]
168 pub fn is_0x05(&self) -> bool {
169 *self == MCH0_A::_0X05
170 }
171 #[doc = "Checks if the value of the field is `_0X06`"]
172 #[inline(always)]
173 pub fn is_0x06(&self) -> bool {
174 *self == MCH0_A::_0X06
175 }
176 #[doc = "Checks if the value of the field is `_0X07`"]
177 #[inline(always)]
178 pub fn is_0x07(&self) -> bool {
179 *self == MCH0_A::_0X07
180 }
181 #[doc = "Checks if the value of the field is `_0X08`"]
182 #[inline(always)]
183 pub fn is_0x08(&self) -> bool {
184 *self == MCH0_A::_0X08
185 }
186 #[doc = "Checks if the value of the field is `_0X09`"]
187 #[inline(always)]
188 pub fn is_0x09(&self) -> bool {
189 *self == MCH0_A::_0X09
190 }
191 #[doc = "Checks if the value of the field is `_0X0A`"]
192 #[inline(always)]
193 pub fn is_0x0a(&self) -> bool {
194 *self == MCH0_A::_0X0A
195 }
196 #[doc = "Checks if the value of the field is `_0X0B`"]
197 #[inline(always)]
198 pub fn is_0x0b(&self) -> bool {
199 *self == MCH0_A::_0X0B
200 }
201 #[doc = "Checks if the value of the field is `_0X0C`"]
202 #[inline(always)]
203 pub fn is_0x0c(&self) -> bool {
204 *self == MCH0_A::_0X0C
205 }
206 #[doc = "Checks if the value of the field is `_0X0D`"]
207 #[inline(always)]
208 pub fn is_0x0d(&self) -> bool {
209 *self == MCH0_A::_0X0D
210 }
211 #[doc = "Checks if the value of the field is `_0X0E`"]
212 #[inline(always)]
213 pub fn is_0x0e(&self) -> bool {
214 *self == MCH0_A::_0X0E
215 }
216 #[doc = "Checks if the value of the field is `_0X0F`"]
217 #[inline(always)]
218 pub fn is_0x0f(&self) -> bool {
219 *self == MCH0_A::_0X0F
220 }
221 #[doc = "Checks if the value of the field is `_0X10`"]
222 #[inline(always)]
223 pub fn is_0x10(&self) -> bool {
224 *self == MCH0_A::_0X10
225 }
226 #[doc = "Checks if the value of the field is `_0X11`"]
227 #[inline(always)]
228 pub fn is_0x11(&self) -> bool {
229 *self == MCH0_A::_0X11
230 }
231 #[doc = "Checks if the value of the field is `_0X12`"]
232 #[inline(always)]
233 pub fn is_0x12(&self) -> bool {
234 *self == MCH0_A::_0X12
235 }
236 #[doc = "Checks if the value of the field is `_0X15`"]
237 #[inline(always)]
238 pub fn is_0x15(&self) -> bool {
239 *self == MCH0_A::_0X15
240 }
241 #[doc = "Checks if the value of the field is `_0X16`"]
242 #[inline(always)]
243 pub fn is_0x16(&self) -> bool {
244 *self == MCH0_A::_0X16
245 }
246 #[doc = "Checks if the value of the field is `_0X17`"]
247 #[inline(always)]
248 pub fn is_0x17(&self) -> bool {
249 *self == MCH0_A::_0X17
250 }
251 #[doc = "Checks if the value of the field is `_0X18`"]
252 #[inline(always)]
253 pub fn is_0x18(&self) -> bool {
254 *self == MCH0_A::_0X18
255 }
256 #[doc = "Checks if the value of the field is `_0X19`"]
257 #[inline(always)]
258 pub fn is_0x19(&self) -> bool {
259 *self == MCH0_A::_0X19
260 }
261 #[doc = "Checks if the value of the field is `_0X1A`"]
262 #[inline(always)]
263 pub fn is_0x1a(&self) -> bool {
264 *self == MCH0_A::_0X1A
265 }
266 #[doc = "Checks if the value of the field is `_0X1B`"]
267 #[inline(always)]
268 pub fn is_0x1b(&self) -> bool {
269 *self == MCH0_A::_0X1B
270 }
271 #[doc = "Checks if the value of the field is `_0X1C`"]
272 #[inline(always)]
273 pub fn is_0x1c(&self) -> bool {
274 *self == MCH0_A::_0X1C
275 }
276 #[doc = "Checks if the value of the field is `_0X1E`"]
277 #[inline(always)]
278 pub fn is_0x1e(&self) -> bool {
279 *self == MCH0_A::_0X1E
280 }
281 #[doc = "Checks if the value of the field is `_0X1F`"]
282 #[inline(always)]
283 pub fn is_0x1f(&self) -> bool {
284 *self == MCH0_A::_0X1F
285 }
286 #[doc = "Checks if the value of the field is `_0X20`"]
287 #[inline(always)]
288 pub fn is_0x20(&self) -> bool {
289 *self == MCH0_A::_0X20
290 }
291 #[doc = "Checks if the value of the field is `_0X21`"]
292 #[inline(always)]
293 pub fn is_0x21(&self) -> bool {
294 *self == MCH0_A::_0X21
295 }
296 #[doc = "Checks if the value of the field is `_0X22`"]
297 #[inline(always)]
298 pub fn is_0x22(&self) -> bool {
299 *self == MCH0_A::_0X22
300 }
301 #[doc = "Checks if the value of the field is `_0X3F`"]
302 #[inline(always)]
303 pub fn is_0x3f(&self) -> bool {
304 *self == MCH0_A::_0X3F
305 }
306}
307#[doc = "Field `MCH0` writer - CTSU Measurement Channel 0"]
308pub type MCH0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTSUMCH_SPEC, u8, MCH0_A, 6, O>;
309impl<'a, const O: u8> MCH0_W<'a, O> {
310 #[doc = "TS00"]
311 #[inline(always)]
312 pub fn _0x00(self) -> &'a mut W {
313 self.variant(MCH0_A::_0X00)
314 }
315 #[doc = "TS02"]
316 #[inline(always)]
317 pub fn _0x02(self) -> &'a mut W {
318 self.variant(MCH0_A::_0X02)
319 }
320 #[doc = "TS04"]
321 #[inline(always)]
322 pub fn _0x04(self) -> &'a mut W {
323 self.variant(MCH0_A::_0X04)
324 }
325 #[doc = "TS05"]
326 #[inline(always)]
327 pub fn _0x05(self) -> &'a mut W {
328 self.variant(MCH0_A::_0X05)
329 }
330 #[doc = "TS06"]
331 #[inline(always)]
332 pub fn _0x06(self) -> &'a mut W {
333 self.variant(MCH0_A::_0X06)
334 }
335 #[doc = "TS07"]
336 #[inline(always)]
337 pub fn _0x07(self) -> &'a mut W {
338 self.variant(MCH0_A::_0X07)
339 }
340 #[doc = "TS08"]
341 #[inline(always)]
342 pub fn _0x08(self) -> &'a mut W {
343 self.variant(MCH0_A::_0X08)
344 }
345 #[doc = "TS09"]
346 #[inline(always)]
347 pub fn _0x09(self) -> &'a mut W {
348 self.variant(MCH0_A::_0X09)
349 }
350 #[doc = "TS10"]
351 #[inline(always)]
352 pub fn _0x0a(self) -> &'a mut W {
353 self.variant(MCH0_A::_0X0A)
354 }
355 #[doc = "TS11"]
356 #[inline(always)]
357 pub fn _0x0b(self) -> &'a mut W {
358 self.variant(MCH0_A::_0X0B)
359 }
360 #[doc = "TS12"]
361 #[inline(always)]
362 pub fn _0x0c(self) -> &'a mut W {
363 self.variant(MCH0_A::_0X0C)
364 }
365 #[doc = "TS13"]
366 #[inline(always)]
367 pub fn _0x0d(self) -> &'a mut W {
368 self.variant(MCH0_A::_0X0D)
369 }
370 #[doc = "TS14"]
371 #[inline(always)]
372 pub fn _0x0e(self) -> &'a mut W {
373 self.variant(MCH0_A::_0X0E)
374 }
375 #[doc = "TS15"]
376 #[inline(always)]
377 pub fn _0x0f(self) -> &'a mut W {
378 self.variant(MCH0_A::_0X0F)
379 }
380 #[doc = "TS16"]
381 #[inline(always)]
382 pub fn _0x10(self) -> &'a mut W {
383 self.variant(MCH0_A::_0X10)
384 }
385 #[doc = "TS17"]
386 #[inline(always)]
387 pub fn _0x11(self) -> &'a mut W {
388 self.variant(MCH0_A::_0X11)
389 }
390 #[doc = "TS18"]
391 #[inline(always)]
392 pub fn _0x12(self) -> &'a mut W {
393 self.variant(MCH0_A::_0X12)
394 }
395 #[doc = "TS21"]
396 #[inline(always)]
397 pub fn _0x15(self) -> &'a mut W {
398 self.variant(MCH0_A::_0X15)
399 }
400 #[doc = "TS22"]
401 #[inline(always)]
402 pub fn _0x16(self) -> &'a mut W {
403 self.variant(MCH0_A::_0X16)
404 }
405 #[doc = "TS23"]
406 #[inline(always)]
407 pub fn _0x17(self) -> &'a mut W {
408 self.variant(MCH0_A::_0X17)
409 }
410 #[doc = "TS24"]
411 #[inline(always)]
412 pub fn _0x18(self) -> &'a mut W {
413 self.variant(MCH0_A::_0X18)
414 }
415 #[doc = "TS25"]
416 #[inline(always)]
417 pub fn _0x19(self) -> &'a mut W {
418 self.variant(MCH0_A::_0X19)
419 }
420 #[doc = "TS26"]
421 #[inline(always)]
422 pub fn _0x1a(self) -> &'a mut W {
423 self.variant(MCH0_A::_0X1A)
424 }
425 #[doc = "TS27"]
426 #[inline(always)]
427 pub fn _0x1b(self) -> &'a mut W {
428 self.variant(MCH0_A::_0X1B)
429 }
430 #[doc = "TS28"]
431 #[inline(always)]
432 pub fn _0x1c(self) -> &'a mut W {
433 self.variant(MCH0_A::_0X1C)
434 }
435 #[doc = "TS30"]
436 #[inline(always)]
437 pub fn _0x1e(self) -> &'a mut W {
438 self.variant(MCH0_A::_0X1E)
439 }
440 #[doc = "TS31"]
441 #[inline(always)]
442 pub fn _0x1f(self) -> &'a mut W {
443 self.variant(MCH0_A::_0X1F)
444 }
445 #[doc = "TS32"]
446 #[inline(always)]
447 pub fn _0x20(self) -> &'a mut W {
448 self.variant(MCH0_A::_0X20)
449 }
450 #[doc = "TS33"]
451 #[inline(always)]
452 pub fn _0x21(self) -> &'a mut W {
453 self.variant(MCH0_A::_0X21)
454 }
455 #[doc = "TS34"]
456 #[inline(always)]
457 pub fn _0x22(self) -> &'a mut W {
458 self.variant(MCH0_A::_0X22)
459 }
460 #[doc = "Measurement is being stopped."]
461 #[inline(always)]
462 pub fn _0x3f(self) -> &'a mut W {
463 self.variant(MCH0_A::_0X3F)
464 }
465}
466#[doc = "Field `MCH1` reader - CTSU Measurement Channel 1"]
467pub type MCH1_R = crate::FieldReader<u8, MCH1_A>;
468#[doc = "CTSU Measurement Channel 1\n\nValue on reset: 63"]
469#[derive(Clone, Copy, Debug, PartialEq, Eq)]
470#[repr(u8)]
471pub enum MCH1_A {
472 #[doc = "0: TS00"]
473 _0X00 = 0,
474 #[doc = "2: TS02"]
475 _0X02 = 2,
476 #[doc = "4: TS04"]
477 _0X04 = 4,
478 #[doc = "5: TS05"]
479 _0X05 = 5,
480 #[doc = "6: TS06"]
481 _0X06 = 6,
482 #[doc = "7: TS07"]
483 _0X07 = 7,
484 #[doc = "8: TS08"]
485 _0X08 = 8,
486 #[doc = "9: TS09"]
487 _0X09 = 9,
488 #[doc = "10: TS10"]
489 _0X0A = 10,
490 #[doc = "11: TS11"]
491 _0X0B = 11,
492 #[doc = "12: TS12"]
493 _0X0C = 12,
494 #[doc = "13: TS13"]
495 _0X0D = 13,
496 #[doc = "14: TS14"]
497 _0X0E = 14,
498 #[doc = "15: TS15"]
499 _0X0F = 15,
500 #[doc = "16: TS16"]
501 _0X10 = 16,
502 #[doc = "17: TS17"]
503 _0X11 = 17,
504 #[doc = "18: TS18"]
505 _0X12 = 18,
506 #[doc = "21: TS21"]
507 _0X15 = 21,
508 #[doc = "22: TS22"]
509 _0X16 = 22,
510 #[doc = "23: TS23"]
511 _0X17 = 23,
512 #[doc = "24: TS24"]
513 _0X18 = 24,
514 #[doc = "25: TS25"]
515 _0X19 = 25,
516 #[doc = "26: TS26"]
517 _0X1A = 26,
518 #[doc = "27: TS27"]
519 _0X1B = 27,
520 #[doc = "28: TS28"]
521 _0X1C = 28,
522 #[doc = "30: TS30"]
523 _0X1E = 30,
524 #[doc = "31: TS31"]
525 _0X1F = 31,
526 #[doc = "32: TS32"]
527 _0X20 = 32,
528 #[doc = "33: TS33"]
529 _0X21 = 33,
530 #[doc = "34: TS34"]
531 _0X22 = 34,
532 #[doc = "63: Measurement is being stopped."]
533 _0X3F = 63,
534}
535impl From<MCH1_A> for u8 {
536 #[inline(always)]
537 fn from(variant: MCH1_A) -> Self {
538 variant as _
539 }
540}
541impl MCH1_R {
542 #[doc = "Get enumerated values variant"]
543 #[inline(always)]
544 pub fn variant(&self) -> Option<MCH1_A> {
545 match self.bits {
546 0 => Some(MCH1_A::_0X00),
547 2 => Some(MCH1_A::_0X02),
548 4 => Some(MCH1_A::_0X04),
549 5 => Some(MCH1_A::_0X05),
550 6 => Some(MCH1_A::_0X06),
551 7 => Some(MCH1_A::_0X07),
552 8 => Some(MCH1_A::_0X08),
553 9 => Some(MCH1_A::_0X09),
554 10 => Some(MCH1_A::_0X0A),
555 11 => Some(MCH1_A::_0X0B),
556 12 => Some(MCH1_A::_0X0C),
557 13 => Some(MCH1_A::_0X0D),
558 14 => Some(MCH1_A::_0X0E),
559 15 => Some(MCH1_A::_0X0F),
560 16 => Some(MCH1_A::_0X10),
561 17 => Some(MCH1_A::_0X11),
562 18 => Some(MCH1_A::_0X12),
563 21 => Some(MCH1_A::_0X15),
564 22 => Some(MCH1_A::_0X16),
565 23 => Some(MCH1_A::_0X17),
566 24 => Some(MCH1_A::_0X18),
567 25 => Some(MCH1_A::_0X19),
568 26 => Some(MCH1_A::_0X1A),
569 27 => Some(MCH1_A::_0X1B),
570 28 => Some(MCH1_A::_0X1C),
571 30 => Some(MCH1_A::_0X1E),
572 31 => Some(MCH1_A::_0X1F),
573 32 => Some(MCH1_A::_0X20),
574 33 => Some(MCH1_A::_0X21),
575 34 => Some(MCH1_A::_0X22),
576 63 => Some(MCH1_A::_0X3F),
577 _ => None,
578 }
579 }
580 #[doc = "Checks if the value of the field is `_0X00`"]
581 #[inline(always)]
582 pub fn is_0x00(&self) -> bool {
583 *self == MCH1_A::_0X00
584 }
585 #[doc = "Checks if the value of the field is `_0X02`"]
586 #[inline(always)]
587 pub fn is_0x02(&self) -> bool {
588 *self == MCH1_A::_0X02
589 }
590 #[doc = "Checks if the value of the field is `_0X04`"]
591 #[inline(always)]
592 pub fn is_0x04(&self) -> bool {
593 *self == MCH1_A::_0X04
594 }
595 #[doc = "Checks if the value of the field is `_0X05`"]
596 #[inline(always)]
597 pub fn is_0x05(&self) -> bool {
598 *self == MCH1_A::_0X05
599 }
600 #[doc = "Checks if the value of the field is `_0X06`"]
601 #[inline(always)]
602 pub fn is_0x06(&self) -> bool {
603 *self == MCH1_A::_0X06
604 }
605 #[doc = "Checks if the value of the field is `_0X07`"]
606 #[inline(always)]
607 pub fn is_0x07(&self) -> bool {
608 *self == MCH1_A::_0X07
609 }
610 #[doc = "Checks if the value of the field is `_0X08`"]
611 #[inline(always)]
612 pub fn is_0x08(&self) -> bool {
613 *self == MCH1_A::_0X08
614 }
615 #[doc = "Checks if the value of the field is `_0X09`"]
616 #[inline(always)]
617 pub fn is_0x09(&self) -> bool {
618 *self == MCH1_A::_0X09
619 }
620 #[doc = "Checks if the value of the field is `_0X0A`"]
621 #[inline(always)]
622 pub fn is_0x0a(&self) -> bool {
623 *self == MCH1_A::_0X0A
624 }
625 #[doc = "Checks if the value of the field is `_0X0B`"]
626 #[inline(always)]
627 pub fn is_0x0b(&self) -> bool {
628 *self == MCH1_A::_0X0B
629 }
630 #[doc = "Checks if the value of the field is `_0X0C`"]
631 #[inline(always)]
632 pub fn is_0x0c(&self) -> bool {
633 *self == MCH1_A::_0X0C
634 }
635 #[doc = "Checks if the value of the field is `_0X0D`"]
636 #[inline(always)]
637 pub fn is_0x0d(&self) -> bool {
638 *self == MCH1_A::_0X0D
639 }
640 #[doc = "Checks if the value of the field is `_0X0E`"]
641 #[inline(always)]
642 pub fn is_0x0e(&self) -> bool {
643 *self == MCH1_A::_0X0E
644 }
645 #[doc = "Checks if the value of the field is `_0X0F`"]
646 #[inline(always)]
647 pub fn is_0x0f(&self) -> bool {
648 *self == MCH1_A::_0X0F
649 }
650 #[doc = "Checks if the value of the field is `_0X10`"]
651 #[inline(always)]
652 pub fn is_0x10(&self) -> bool {
653 *self == MCH1_A::_0X10
654 }
655 #[doc = "Checks if the value of the field is `_0X11`"]
656 #[inline(always)]
657 pub fn is_0x11(&self) -> bool {
658 *self == MCH1_A::_0X11
659 }
660 #[doc = "Checks if the value of the field is `_0X12`"]
661 #[inline(always)]
662 pub fn is_0x12(&self) -> bool {
663 *self == MCH1_A::_0X12
664 }
665 #[doc = "Checks if the value of the field is `_0X15`"]
666 #[inline(always)]
667 pub fn is_0x15(&self) -> bool {
668 *self == MCH1_A::_0X15
669 }
670 #[doc = "Checks if the value of the field is `_0X16`"]
671 #[inline(always)]
672 pub fn is_0x16(&self) -> bool {
673 *self == MCH1_A::_0X16
674 }
675 #[doc = "Checks if the value of the field is `_0X17`"]
676 #[inline(always)]
677 pub fn is_0x17(&self) -> bool {
678 *self == MCH1_A::_0X17
679 }
680 #[doc = "Checks if the value of the field is `_0X18`"]
681 #[inline(always)]
682 pub fn is_0x18(&self) -> bool {
683 *self == MCH1_A::_0X18
684 }
685 #[doc = "Checks if the value of the field is `_0X19`"]
686 #[inline(always)]
687 pub fn is_0x19(&self) -> bool {
688 *self == MCH1_A::_0X19
689 }
690 #[doc = "Checks if the value of the field is `_0X1A`"]
691 #[inline(always)]
692 pub fn is_0x1a(&self) -> bool {
693 *self == MCH1_A::_0X1A
694 }
695 #[doc = "Checks if the value of the field is `_0X1B`"]
696 #[inline(always)]
697 pub fn is_0x1b(&self) -> bool {
698 *self == MCH1_A::_0X1B
699 }
700 #[doc = "Checks if the value of the field is `_0X1C`"]
701 #[inline(always)]
702 pub fn is_0x1c(&self) -> bool {
703 *self == MCH1_A::_0X1C
704 }
705 #[doc = "Checks if the value of the field is `_0X1E`"]
706 #[inline(always)]
707 pub fn is_0x1e(&self) -> bool {
708 *self == MCH1_A::_0X1E
709 }
710 #[doc = "Checks if the value of the field is `_0X1F`"]
711 #[inline(always)]
712 pub fn is_0x1f(&self) -> bool {
713 *self == MCH1_A::_0X1F
714 }
715 #[doc = "Checks if the value of the field is `_0X20`"]
716 #[inline(always)]
717 pub fn is_0x20(&self) -> bool {
718 *self == MCH1_A::_0X20
719 }
720 #[doc = "Checks if the value of the field is `_0X21`"]
721 #[inline(always)]
722 pub fn is_0x21(&self) -> bool {
723 *self == MCH1_A::_0X21
724 }
725 #[doc = "Checks if the value of the field is `_0X22`"]
726 #[inline(always)]
727 pub fn is_0x22(&self) -> bool {
728 *self == MCH1_A::_0X22
729 }
730 #[doc = "Checks if the value of the field is `_0X3F`"]
731 #[inline(always)]
732 pub fn is_0x3f(&self) -> bool {
733 *self == MCH1_A::_0X3F
734 }
735}
736#[doc = "Field `MCH1` writer - CTSU Measurement Channel 1"]
737pub type MCH1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTSUMCH_SPEC, u8, MCH1_A, 6, O>;
738impl<'a, const O: u8> MCH1_W<'a, O> {
739 #[doc = "TS00"]
740 #[inline(always)]
741 pub fn _0x00(self) -> &'a mut W {
742 self.variant(MCH1_A::_0X00)
743 }
744 #[doc = "TS02"]
745 #[inline(always)]
746 pub fn _0x02(self) -> &'a mut W {
747 self.variant(MCH1_A::_0X02)
748 }
749 #[doc = "TS04"]
750 #[inline(always)]
751 pub fn _0x04(self) -> &'a mut W {
752 self.variant(MCH1_A::_0X04)
753 }
754 #[doc = "TS05"]
755 #[inline(always)]
756 pub fn _0x05(self) -> &'a mut W {
757 self.variant(MCH1_A::_0X05)
758 }
759 #[doc = "TS06"]
760 #[inline(always)]
761 pub fn _0x06(self) -> &'a mut W {
762 self.variant(MCH1_A::_0X06)
763 }
764 #[doc = "TS07"]
765 #[inline(always)]
766 pub fn _0x07(self) -> &'a mut W {
767 self.variant(MCH1_A::_0X07)
768 }
769 #[doc = "TS08"]
770 #[inline(always)]
771 pub fn _0x08(self) -> &'a mut W {
772 self.variant(MCH1_A::_0X08)
773 }
774 #[doc = "TS09"]
775 #[inline(always)]
776 pub fn _0x09(self) -> &'a mut W {
777 self.variant(MCH1_A::_0X09)
778 }
779 #[doc = "TS10"]
780 #[inline(always)]
781 pub fn _0x0a(self) -> &'a mut W {
782 self.variant(MCH1_A::_0X0A)
783 }
784 #[doc = "TS11"]
785 #[inline(always)]
786 pub fn _0x0b(self) -> &'a mut W {
787 self.variant(MCH1_A::_0X0B)
788 }
789 #[doc = "TS12"]
790 #[inline(always)]
791 pub fn _0x0c(self) -> &'a mut W {
792 self.variant(MCH1_A::_0X0C)
793 }
794 #[doc = "TS13"]
795 #[inline(always)]
796 pub fn _0x0d(self) -> &'a mut W {
797 self.variant(MCH1_A::_0X0D)
798 }
799 #[doc = "TS14"]
800 #[inline(always)]
801 pub fn _0x0e(self) -> &'a mut W {
802 self.variant(MCH1_A::_0X0E)
803 }
804 #[doc = "TS15"]
805 #[inline(always)]
806 pub fn _0x0f(self) -> &'a mut W {
807 self.variant(MCH1_A::_0X0F)
808 }
809 #[doc = "TS16"]
810 #[inline(always)]
811 pub fn _0x10(self) -> &'a mut W {
812 self.variant(MCH1_A::_0X10)
813 }
814 #[doc = "TS17"]
815 #[inline(always)]
816 pub fn _0x11(self) -> &'a mut W {
817 self.variant(MCH1_A::_0X11)
818 }
819 #[doc = "TS18"]
820 #[inline(always)]
821 pub fn _0x12(self) -> &'a mut W {
822 self.variant(MCH1_A::_0X12)
823 }
824 #[doc = "TS21"]
825 #[inline(always)]
826 pub fn _0x15(self) -> &'a mut W {
827 self.variant(MCH1_A::_0X15)
828 }
829 #[doc = "TS22"]
830 #[inline(always)]
831 pub fn _0x16(self) -> &'a mut W {
832 self.variant(MCH1_A::_0X16)
833 }
834 #[doc = "TS23"]
835 #[inline(always)]
836 pub fn _0x17(self) -> &'a mut W {
837 self.variant(MCH1_A::_0X17)
838 }
839 #[doc = "TS24"]
840 #[inline(always)]
841 pub fn _0x18(self) -> &'a mut W {
842 self.variant(MCH1_A::_0X18)
843 }
844 #[doc = "TS25"]
845 #[inline(always)]
846 pub fn _0x19(self) -> &'a mut W {
847 self.variant(MCH1_A::_0X19)
848 }
849 #[doc = "TS26"]
850 #[inline(always)]
851 pub fn _0x1a(self) -> &'a mut W {
852 self.variant(MCH1_A::_0X1A)
853 }
854 #[doc = "TS27"]
855 #[inline(always)]
856 pub fn _0x1b(self) -> &'a mut W {
857 self.variant(MCH1_A::_0X1B)
858 }
859 #[doc = "TS28"]
860 #[inline(always)]
861 pub fn _0x1c(self) -> &'a mut W {
862 self.variant(MCH1_A::_0X1C)
863 }
864 #[doc = "TS30"]
865 #[inline(always)]
866 pub fn _0x1e(self) -> &'a mut W {
867 self.variant(MCH1_A::_0X1E)
868 }
869 #[doc = "TS31"]
870 #[inline(always)]
871 pub fn _0x1f(self) -> &'a mut W {
872 self.variant(MCH1_A::_0X1F)
873 }
874 #[doc = "TS32"]
875 #[inline(always)]
876 pub fn _0x20(self) -> &'a mut W {
877 self.variant(MCH1_A::_0X20)
878 }
879 #[doc = "TS33"]
880 #[inline(always)]
881 pub fn _0x21(self) -> &'a mut W {
882 self.variant(MCH1_A::_0X21)
883 }
884 #[doc = "TS34"]
885 #[inline(always)]
886 pub fn _0x22(self) -> &'a mut W {
887 self.variant(MCH1_A::_0X22)
888 }
889 #[doc = "Measurement is being stopped."]
890 #[inline(always)]
891 pub fn _0x3f(self) -> &'a mut W {
892 self.variant(MCH1_A::_0X3F)
893 }
894}
895#[doc = "Field `MCA0` reader - Multiple Clocks Control"]
896pub type MCA0_R = crate::BitReader<MCA0_A>;
897#[doc = "Multiple Clocks Control\n\nValue on reset: 0"]
898#[derive(Clone, Copy, Debug, PartialEq, Eq)]
899pub enum MCA0_A {
900 #[doc = "0: Disable"]
901 _0 = 0,
902 #[doc = "1: Enable"]
903 _1 = 1,
904}
905impl From<MCA0_A> for bool {
906 #[inline(always)]
907 fn from(variant: MCA0_A) -> Self {
908 variant as u8 != 0
909 }
910}
911impl MCA0_R {
912 #[doc = "Get enumerated values variant"]
913 #[inline(always)]
914 pub fn variant(&self) -> MCA0_A {
915 match self.bits {
916 false => MCA0_A::_0,
917 true => MCA0_A::_1,
918 }
919 }
920 #[doc = "Checks if the value of the field is `_0`"]
921 #[inline(always)]
922 pub fn is_0(&self) -> bool {
923 *self == MCA0_A::_0
924 }
925 #[doc = "Checks if the value of the field is `_1`"]
926 #[inline(always)]
927 pub fn is_1(&self) -> bool {
928 *self == MCA0_A::_1
929 }
930}
931#[doc = "Field `MCA0` writer - Multiple Clocks Control"]
932pub type MCA0_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTSUMCH_SPEC, MCA0_A, O>;
933impl<'a, const O: u8> MCA0_W<'a, O> {
934 #[doc = "Disable"]
935 #[inline(always)]
936 pub fn _0(self) -> &'a mut W {
937 self.variant(MCA0_A::_0)
938 }
939 #[doc = "Enable"]
940 #[inline(always)]
941 pub fn _1(self) -> &'a mut W {
942 self.variant(MCA0_A::_1)
943 }
944}
945#[doc = "Field `MCA1` reader - Multiple Clocks Control"]
946pub type MCA1_R = crate::BitReader<MCA1_A>;
947#[doc = "Multiple Clocks Control\n\nValue on reset: 0"]
948#[derive(Clone, Copy, Debug, PartialEq, Eq)]
949pub enum MCA1_A {
950 #[doc = "0: Disable"]
951 _0 = 0,
952 #[doc = "1: Enable"]
953 _1 = 1,
954}
955impl From<MCA1_A> for bool {
956 #[inline(always)]
957 fn from(variant: MCA1_A) -> Self {
958 variant as u8 != 0
959 }
960}
961impl MCA1_R {
962 #[doc = "Get enumerated values variant"]
963 #[inline(always)]
964 pub fn variant(&self) -> MCA1_A {
965 match self.bits {
966 false => MCA1_A::_0,
967 true => MCA1_A::_1,
968 }
969 }
970 #[doc = "Checks if the value of the field is `_0`"]
971 #[inline(always)]
972 pub fn is_0(&self) -> bool {
973 *self == MCA1_A::_0
974 }
975 #[doc = "Checks if the value of the field is `_1`"]
976 #[inline(always)]
977 pub fn is_1(&self) -> bool {
978 *self == MCA1_A::_1
979 }
980}
981#[doc = "Field `MCA1` writer - Multiple Clocks Control"]
982pub type MCA1_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTSUMCH_SPEC, MCA1_A, O>;
983impl<'a, const O: u8> MCA1_W<'a, O> {
984 #[doc = "Disable"]
985 #[inline(always)]
986 pub fn _0(self) -> &'a mut W {
987 self.variant(MCA1_A::_0)
988 }
989 #[doc = "Enable"]
990 #[inline(always)]
991 pub fn _1(self) -> &'a mut W {
992 self.variant(MCA1_A::_1)
993 }
994}
995#[doc = "Field `MCA2` reader - Multiple Clocks Control"]
996pub type MCA2_R = crate::BitReader<MCA2_A>;
997#[doc = "Multiple Clocks Control\n\nValue on reset: 0"]
998#[derive(Clone, Copy, Debug, PartialEq, Eq)]
999pub enum MCA2_A {
1000 #[doc = "0: Disable"]
1001 _0 = 0,
1002 #[doc = "1: Enable"]
1003 _1 = 1,
1004}
1005impl From<MCA2_A> for bool {
1006 #[inline(always)]
1007 fn from(variant: MCA2_A) -> Self {
1008 variant as u8 != 0
1009 }
1010}
1011impl MCA2_R {
1012 #[doc = "Get enumerated values variant"]
1013 #[inline(always)]
1014 pub fn variant(&self) -> MCA2_A {
1015 match self.bits {
1016 false => MCA2_A::_0,
1017 true => MCA2_A::_1,
1018 }
1019 }
1020 #[doc = "Checks if the value of the field is `_0`"]
1021 #[inline(always)]
1022 pub fn is_0(&self) -> bool {
1023 *self == MCA2_A::_0
1024 }
1025 #[doc = "Checks if the value of the field is `_1`"]
1026 #[inline(always)]
1027 pub fn is_1(&self) -> bool {
1028 *self == MCA2_A::_1
1029 }
1030}
1031#[doc = "Field `MCA2` writer - Multiple Clocks Control"]
1032pub type MCA2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTSUMCH_SPEC, MCA2_A, O>;
1033impl<'a, const O: u8> MCA2_W<'a, O> {
1034 #[doc = "Disable"]
1035 #[inline(always)]
1036 pub fn _0(self) -> &'a mut W {
1037 self.variant(MCA2_A::_0)
1038 }
1039 #[doc = "Enable"]
1040 #[inline(always)]
1041 pub fn _1(self) -> &'a mut W {
1042 self.variant(MCA2_A::_1)
1043 }
1044}
1045#[doc = "Field `MCA3` reader - Multiple Clocks Control"]
1046pub type MCA3_R = crate::BitReader<MCA3_A>;
1047#[doc = "Multiple Clocks Control\n\nValue on reset: 0"]
1048#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1049pub enum MCA3_A {
1050 #[doc = "0: Disable"]
1051 _0 = 0,
1052 #[doc = "1: Enable"]
1053 _1 = 1,
1054}
1055impl From<MCA3_A> for bool {
1056 #[inline(always)]
1057 fn from(variant: MCA3_A) -> Self {
1058 variant as u8 != 0
1059 }
1060}
1061impl MCA3_R {
1062 #[doc = "Get enumerated values variant"]
1063 #[inline(always)]
1064 pub fn variant(&self) -> MCA3_A {
1065 match self.bits {
1066 false => MCA3_A::_0,
1067 true => MCA3_A::_1,
1068 }
1069 }
1070 #[doc = "Checks if the value of the field is `_0`"]
1071 #[inline(always)]
1072 pub fn is_0(&self) -> bool {
1073 *self == MCA3_A::_0
1074 }
1075 #[doc = "Checks if the value of the field is `_1`"]
1076 #[inline(always)]
1077 pub fn is_1(&self) -> bool {
1078 *self == MCA3_A::_1
1079 }
1080}
1081#[doc = "Field `MCA3` writer - Multiple Clocks Control"]
1082pub type MCA3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTSUMCH_SPEC, MCA3_A, O>;
1083impl<'a, const O: u8> MCA3_W<'a, O> {
1084 #[doc = "Disable"]
1085 #[inline(always)]
1086 pub fn _0(self) -> &'a mut W {
1087 self.variant(MCA3_A::_0)
1088 }
1089 #[doc = "Enable"]
1090 #[inline(always)]
1091 pub fn _1(self) -> &'a mut W {
1092 self.variant(MCA3_A::_1)
1093 }
1094}
1095impl R {
1096 #[doc = "Bits 0:5 - CTSU Measurement Channel 0"]
1097 #[inline(always)]
1098 pub fn mch0(&self) -> MCH0_R {
1099 MCH0_R::new((self.bits & 0x3f) as u8)
1100 }
1101 #[doc = "Bits 8:13 - CTSU Measurement Channel 1"]
1102 #[inline(always)]
1103 pub fn mch1(&self) -> MCH1_R {
1104 MCH1_R::new(((self.bits >> 8) & 0x3f) as u8)
1105 }
1106 #[doc = "Bit 16 - Multiple Clocks Control"]
1107 #[inline(always)]
1108 pub fn mca0(&self) -> MCA0_R {
1109 MCA0_R::new(((self.bits >> 16) & 1) != 0)
1110 }
1111 #[doc = "Bit 17 - Multiple Clocks Control"]
1112 #[inline(always)]
1113 pub fn mca1(&self) -> MCA1_R {
1114 MCA1_R::new(((self.bits >> 17) & 1) != 0)
1115 }
1116 #[doc = "Bit 18 - Multiple Clocks Control"]
1117 #[inline(always)]
1118 pub fn mca2(&self) -> MCA2_R {
1119 MCA2_R::new(((self.bits >> 18) & 1) != 0)
1120 }
1121 #[doc = "Bit 19 - Multiple Clocks Control"]
1122 #[inline(always)]
1123 pub fn mca3(&self) -> MCA3_R {
1124 MCA3_R::new(((self.bits >> 19) & 1) != 0)
1125 }
1126}
1127impl W {
1128 #[doc = "Bits 0:5 - CTSU Measurement Channel 0"]
1129 #[inline(always)]
1130 #[must_use]
1131 pub fn mch0(&mut self) -> MCH0_W<0> {
1132 MCH0_W::new(self)
1133 }
1134 #[doc = "Bits 8:13 - CTSU Measurement Channel 1"]
1135 #[inline(always)]
1136 #[must_use]
1137 pub fn mch1(&mut self) -> MCH1_W<8> {
1138 MCH1_W::new(self)
1139 }
1140 #[doc = "Bit 16 - Multiple Clocks Control"]
1141 #[inline(always)]
1142 #[must_use]
1143 pub fn mca0(&mut self) -> MCA0_W<16> {
1144 MCA0_W::new(self)
1145 }
1146 #[doc = "Bit 17 - Multiple Clocks Control"]
1147 #[inline(always)]
1148 #[must_use]
1149 pub fn mca1(&mut self) -> MCA1_W<17> {
1150 MCA1_W::new(self)
1151 }
1152 #[doc = "Bit 18 - Multiple Clocks Control"]
1153 #[inline(always)]
1154 #[must_use]
1155 pub fn mca2(&mut self) -> MCA2_W<18> {
1156 MCA2_W::new(self)
1157 }
1158 #[doc = "Bit 19 - Multiple Clocks Control"]
1159 #[inline(always)]
1160 #[must_use]
1161 pub fn mca3(&mut self) -> MCA3_W<19> {
1162 MCA3_W::new(self)
1163 }
1164 #[doc = "Writes raw bits to the register."]
1165 #[inline(always)]
1166 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1167 self.0.bits(bits);
1168 self
1169 }
1170}
1171#[doc = "CTSU Measurement Channel Register\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 [ctsumch](index.html) module"]
1172pub struct CTSUMCH_SPEC;
1173impl crate::RegisterSpec for CTSUMCH_SPEC {
1174 type Ux = u32;
1175}
1176#[doc = "`read()` method returns [ctsumch::R](R) reader structure"]
1177impl crate::Readable for CTSUMCH_SPEC {
1178 type Reader = R;
1179}
1180#[doc = "`write(|w| ..)` method takes [ctsumch::W](W) writer structure"]
1181impl crate::Writable for CTSUMCH_SPEC {
1182 type Writer = W;
1183 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1184 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1185}
1186#[doc = "`reset()` method sets CTSUMCH to value 0x3f3f"]
1187impl crate::Resettable for CTSUMCH_SPEC {
1188 const RESET_VALUE: Self::Ux = 0x3f3f;
1189}