1#[doc = "Register `INCFG` reader"]
2pub struct R(crate::R<INCFG_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<INCFG_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<INCFG_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<INCFG_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `INCFG` writer"]
17pub struct W(crate::W<INCFG_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<INCFG_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<INCFG_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<INCFG_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "CTIMER B7 input configuration\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum CFGB7_A {
40 #[doc = "1: Input is CT31 value."]
41 CT31 = 1,
42 #[doc = "0: Input is CT30 value."]
43 CT30 = 0,
44}
45impl From<CFGB7_A> for bool {
46 #[inline(always)]
47 fn from(variant: CFGB7_A) -> Self {
48 variant as u8 != 0
49 }
50}
51#[doc = "Field `CFGB7` reader - CTIMER B7 input configuration"]
52pub struct CFGB7_R(crate::FieldReader<bool, CFGB7_A>);
53impl CFGB7_R {
54 pub(crate) fn new(bits: bool) -> Self {
55 CFGB7_R(crate::FieldReader::new(bits))
56 }
57 #[doc = r"Get enumerated values variant"]
58 #[inline(always)]
59 pub fn variant(&self) -> CFGB7_A {
60 match self.bits {
61 true => CFGB7_A::CT31,
62 false => CFGB7_A::CT30,
63 }
64 }
65 #[doc = "Checks if the value of the field is `CT31`"]
66 #[inline(always)]
67 pub fn is_ct31(&self) -> bool {
68 **self == CFGB7_A::CT31
69 }
70 #[doc = "Checks if the value of the field is `CT30`"]
71 #[inline(always)]
72 pub fn is_ct30(&self) -> bool {
73 **self == CFGB7_A::CT30
74 }
75}
76impl core::ops::Deref for CFGB7_R {
77 type Target = crate::FieldReader<bool, CFGB7_A>;
78 #[inline(always)]
79 fn deref(&self) -> &Self::Target {
80 &self.0
81 }
82}
83#[doc = "Field `CFGB7` writer - CTIMER B7 input configuration"]
84pub struct CFGB7_W<'a> {
85 w: &'a mut W,
86}
87impl<'a> CFGB7_W<'a> {
88 #[doc = r"Writes `variant` to the field"]
89 #[inline(always)]
90 pub fn variant(self, variant: CFGB7_A) -> &'a mut W {
91 self.bit(variant.into())
92 }
93 #[doc = "Input is CT31 value."]
94 #[inline(always)]
95 pub fn ct31(self) -> &'a mut W {
96 self.variant(CFGB7_A::CT31)
97 }
98 #[doc = "Input is CT30 value."]
99 #[inline(always)]
100 pub fn ct30(self) -> &'a mut W {
101 self.variant(CFGB7_A::CT30)
102 }
103 #[doc = r"Sets the field bit"]
104 #[inline(always)]
105 pub fn set_bit(self) -> &'a mut W {
106 self.bit(true)
107 }
108 #[doc = r"Clears the field bit"]
109 #[inline(always)]
110 pub fn clear_bit(self) -> &'a mut W {
111 self.bit(false)
112 }
113 #[doc = r"Writes raw bits to the field"]
114 #[inline(always)]
115 pub fn bit(self, value: bool) -> &'a mut W {
116 self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
117 self.w
118 }
119}
120#[doc = "CTIMER A7 input configuration\n\nValue on reset: 0"]
121#[derive(Clone, Copy, Debug, PartialEq)]
122pub enum CFGA7_A {
123 #[doc = "1: Input is CT29 value."]
124 CT29 = 1,
125 #[doc = "0: Input is CT28 value."]
126 CT28 = 0,
127}
128impl From<CFGA7_A> for bool {
129 #[inline(always)]
130 fn from(variant: CFGA7_A) -> Self {
131 variant as u8 != 0
132 }
133}
134#[doc = "Field `CFGA7` reader - CTIMER A7 input configuration"]
135pub struct CFGA7_R(crate::FieldReader<bool, CFGA7_A>);
136impl CFGA7_R {
137 pub(crate) fn new(bits: bool) -> Self {
138 CFGA7_R(crate::FieldReader::new(bits))
139 }
140 #[doc = r"Get enumerated values variant"]
141 #[inline(always)]
142 pub fn variant(&self) -> CFGA7_A {
143 match self.bits {
144 true => CFGA7_A::CT29,
145 false => CFGA7_A::CT28,
146 }
147 }
148 #[doc = "Checks if the value of the field is `CT29`"]
149 #[inline(always)]
150 pub fn is_ct29(&self) -> bool {
151 **self == CFGA7_A::CT29
152 }
153 #[doc = "Checks if the value of the field is `CT28`"]
154 #[inline(always)]
155 pub fn is_ct28(&self) -> bool {
156 **self == CFGA7_A::CT28
157 }
158}
159impl core::ops::Deref for CFGA7_R {
160 type Target = crate::FieldReader<bool, CFGA7_A>;
161 #[inline(always)]
162 fn deref(&self) -> &Self::Target {
163 &self.0
164 }
165}
166#[doc = "Field `CFGA7` writer - CTIMER A7 input configuration"]
167pub struct CFGA7_W<'a> {
168 w: &'a mut W,
169}
170impl<'a> CFGA7_W<'a> {
171 #[doc = r"Writes `variant` to the field"]
172 #[inline(always)]
173 pub fn variant(self, variant: CFGA7_A) -> &'a mut W {
174 self.bit(variant.into())
175 }
176 #[doc = "Input is CT29 value."]
177 #[inline(always)]
178 pub fn ct29(self) -> &'a mut W {
179 self.variant(CFGA7_A::CT29)
180 }
181 #[doc = "Input is CT28 value."]
182 #[inline(always)]
183 pub fn ct28(self) -> &'a mut W {
184 self.variant(CFGA7_A::CT28)
185 }
186 #[doc = r"Sets the field bit"]
187 #[inline(always)]
188 pub fn set_bit(self) -> &'a mut W {
189 self.bit(true)
190 }
191 #[doc = r"Clears the field bit"]
192 #[inline(always)]
193 pub fn clear_bit(self) -> &'a mut W {
194 self.bit(false)
195 }
196 #[doc = r"Writes raw bits to the field"]
197 #[inline(always)]
198 pub fn bit(self, value: bool) -> &'a mut W {
199 self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14);
200 self.w
201 }
202}
203#[doc = "CTIMER B6 input configuration\n\nValue on reset: 0"]
204#[derive(Clone, Copy, Debug, PartialEq)]
205pub enum CFGB6_A {
206 #[doc = "1: Input is CT27 value."]
207 CT27 = 1,
208 #[doc = "0: Input is CT26 value."]
209 CT26 = 0,
210}
211impl From<CFGB6_A> for bool {
212 #[inline(always)]
213 fn from(variant: CFGB6_A) -> Self {
214 variant as u8 != 0
215 }
216}
217#[doc = "Field `CFGB6` reader - CTIMER B6 input configuration"]
218pub struct CFGB6_R(crate::FieldReader<bool, CFGB6_A>);
219impl CFGB6_R {
220 pub(crate) fn new(bits: bool) -> Self {
221 CFGB6_R(crate::FieldReader::new(bits))
222 }
223 #[doc = r"Get enumerated values variant"]
224 #[inline(always)]
225 pub fn variant(&self) -> CFGB6_A {
226 match self.bits {
227 true => CFGB6_A::CT27,
228 false => CFGB6_A::CT26,
229 }
230 }
231 #[doc = "Checks if the value of the field is `CT27`"]
232 #[inline(always)]
233 pub fn is_ct27(&self) -> bool {
234 **self == CFGB6_A::CT27
235 }
236 #[doc = "Checks if the value of the field is `CT26`"]
237 #[inline(always)]
238 pub fn is_ct26(&self) -> bool {
239 **self == CFGB6_A::CT26
240 }
241}
242impl core::ops::Deref for CFGB6_R {
243 type Target = crate::FieldReader<bool, CFGB6_A>;
244 #[inline(always)]
245 fn deref(&self) -> &Self::Target {
246 &self.0
247 }
248}
249#[doc = "Field `CFGB6` writer - CTIMER B6 input configuration"]
250pub struct CFGB6_W<'a> {
251 w: &'a mut W,
252}
253impl<'a> CFGB6_W<'a> {
254 #[doc = r"Writes `variant` to the field"]
255 #[inline(always)]
256 pub fn variant(self, variant: CFGB6_A) -> &'a mut W {
257 self.bit(variant.into())
258 }
259 #[doc = "Input is CT27 value."]
260 #[inline(always)]
261 pub fn ct27(self) -> &'a mut W {
262 self.variant(CFGB6_A::CT27)
263 }
264 #[doc = "Input is CT26 value."]
265 #[inline(always)]
266 pub fn ct26(self) -> &'a mut W {
267 self.variant(CFGB6_A::CT26)
268 }
269 #[doc = r"Sets the field bit"]
270 #[inline(always)]
271 pub fn set_bit(self) -> &'a mut W {
272 self.bit(true)
273 }
274 #[doc = r"Clears the field bit"]
275 #[inline(always)]
276 pub fn clear_bit(self) -> &'a mut W {
277 self.bit(false)
278 }
279 #[doc = r"Writes raw bits to the field"]
280 #[inline(always)]
281 pub fn bit(self, value: bool) -> &'a mut W {
282 self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13);
283 self.w
284 }
285}
286#[doc = "CTIMER A6 input configuration\n\nValue on reset: 0"]
287#[derive(Clone, Copy, Debug, PartialEq)]
288pub enum CFGA6_A {
289 #[doc = "1: Input is CT25 value."]
290 CT25 = 1,
291 #[doc = "0: Input is CT24 value."]
292 CT24 = 0,
293}
294impl From<CFGA6_A> for bool {
295 #[inline(always)]
296 fn from(variant: CFGA6_A) -> Self {
297 variant as u8 != 0
298 }
299}
300#[doc = "Field `CFGA6` reader - CTIMER A6 input configuration"]
301pub struct CFGA6_R(crate::FieldReader<bool, CFGA6_A>);
302impl CFGA6_R {
303 pub(crate) fn new(bits: bool) -> Self {
304 CFGA6_R(crate::FieldReader::new(bits))
305 }
306 #[doc = r"Get enumerated values variant"]
307 #[inline(always)]
308 pub fn variant(&self) -> CFGA6_A {
309 match self.bits {
310 true => CFGA6_A::CT25,
311 false => CFGA6_A::CT24,
312 }
313 }
314 #[doc = "Checks if the value of the field is `CT25`"]
315 #[inline(always)]
316 pub fn is_ct25(&self) -> bool {
317 **self == CFGA6_A::CT25
318 }
319 #[doc = "Checks if the value of the field is `CT24`"]
320 #[inline(always)]
321 pub fn is_ct24(&self) -> bool {
322 **self == CFGA6_A::CT24
323 }
324}
325impl core::ops::Deref for CFGA6_R {
326 type Target = crate::FieldReader<bool, CFGA6_A>;
327 #[inline(always)]
328 fn deref(&self) -> &Self::Target {
329 &self.0
330 }
331}
332#[doc = "Field `CFGA6` writer - CTIMER A6 input configuration"]
333pub struct CFGA6_W<'a> {
334 w: &'a mut W,
335}
336impl<'a> CFGA6_W<'a> {
337 #[doc = r"Writes `variant` to the field"]
338 #[inline(always)]
339 pub fn variant(self, variant: CFGA6_A) -> &'a mut W {
340 self.bit(variant.into())
341 }
342 #[doc = "Input is CT25 value."]
343 #[inline(always)]
344 pub fn ct25(self) -> &'a mut W {
345 self.variant(CFGA6_A::CT25)
346 }
347 #[doc = "Input is CT24 value."]
348 #[inline(always)]
349 pub fn ct24(self) -> &'a mut W {
350 self.variant(CFGA6_A::CT24)
351 }
352 #[doc = r"Sets the field bit"]
353 #[inline(always)]
354 pub fn set_bit(self) -> &'a mut W {
355 self.bit(true)
356 }
357 #[doc = r"Clears the field bit"]
358 #[inline(always)]
359 pub fn clear_bit(self) -> &'a mut W {
360 self.bit(false)
361 }
362 #[doc = r"Writes raw bits to the field"]
363 #[inline(always)]
364 pub fn bit(self, value: bool) -> &'a mut W {
365 self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
366 self.w
367 }
368}
369#[doc = "CTIMER B5 input configuration\n\nValue on reset: 0"]
370#[derive(Clone, Copy, Debug, PartialEq)]
371pub enum CFGB5_A {
372 #[doc = "1: Input is CT23 value."]
373 CT23 = 1,
374 #[doc = "0: Input is CT22 value."]
375 CT22 = 0,
376}
377impl From<CFGB5_A> for bool {
378 #[inline(always)]
379 fn from(variant: CFGB5_A) -> Self {
380 variant as u8 != 0
381 }
382}
383#[doc = "Field `CFGB5` reader - CTIMER B5 input configuration"]
384pub struct CFGB5_R(crate::FieldReader<bool, CFGB5_A>);
385impl CFGB5_R {
386 pub(crate) fn new(bits: bool) -> Self {
387 CFGB5_R(crate::FieldReader::new(bits))
388 }
389 #[doc = r"Get enumerated values variant"]
390 #[inline(always)]
391 pub fn variant(&self) -> CFGB5_A {
392 match self.bits {
393 true => CFGB5_A::CT23,
394 false => CFGB5_A::CT22,
395 }
396 }
397 #[doc = "Checks if the value of the field is `CT23`"]
398 #[inline(always)]
399 pub fn is_ct23(&self) -> bool {
400 **self == CFGB5_A::CT23
401 }
402 #[doc = "Checks if the value of the field is `CT22`"]
403 #[inline(always)]
404 pub fn is_ct22(&self) -> bool {
405 **self == CFGB5_A::CT22
406 }
407}
408impl core::ops::Deref for CFGB5_R {
409 type Target = crate::FieldReader<bool, CFGB5_A>;
410 #[inline(always)]
411 fn deref(&self) -> &Self::Target {
412 &self.0
413 }
414}
415#[doc = "Field `CFGB5` writer - CTIMER B5 input configuration"]
416pub struct CFGB5_W<'a> {
417 w: &'a mut W,
418}
419impl<'a> CFGB5_W<'a> {
420 #[doc = r"Writes `variant` to the field"]
421 #[inline(always)]
422 pub fn variant(self, variant: CFGB5_A) -> &'a mut W {
423 self.bit(variant.into())
424 }
425 #[doc = "Input is CT23 value."]
426 #[inline(always)]
427 pub fn ct23(self) -> &'a mut W {
428 self.variant(CFGB5_A::CT23)
429 }
430 #[doc = "Input is CT22 value."]
431 #[inline(always)]
432 pub fn ct22(self) -> &'a mut W {
433 self.variant(CFGB5_A::CT22)
434 }
435 #[doc = r"Sets the field bit"]
436 #[inline(always)]
437 pub fn set_bit(self) -> &'a mut W {
438 self.bit(true)
439 }
440 #[doc = r"Clears the field bit"]
441 #[inline(always)]
442 pub fn clear_bit(self) -> &'a mut W {
443 self.bit(false)
444 }
445 #[doc = r"Writes raw bits to the field"]
446 #[inline(always)]
447 pub fn bit(self, value: bool) -> &'a mut W {
448 self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
449 self.w
450 }
451}
452#[doc = "CTIMER A5 input configuration\n\nValue on reset: 0"]
453#[derive(Clone, Copy, Debug, PartialEq)]
454pub enum CFGA5_A {
455 #[doc = "1: Input is CT21 value."]
456 CT21 = 1,
457 #[doc = "0: Input is CT20 value."]
458 CT20 = 0,
459}
460impl From<CFGA5_A> for bool {
461 #[inline(always)]
462 fn from(variant: CFGA5_A) -> Self {
463 variant as u8 != 0
464 }
465}
466#[doc = "Field `CFGA5` reader - CTIMER A5 input configuration"]
467pub struct CFGA5_R(crate::FieldReader<bool, CFGA5_A>);
468impl CFGA5_R {
469 pub(crate) fn new(bits: bool) -> Self {
470 CFGA5_R(crate::FieldReader::new(bits))
471 }
472 #[doc = r"Get enumerated values variant"]
473 #[inline(always)]
474 pub fn variant(&self) -> CFGA5_A {
475 match self.bits {
476 true => CFGA5_A::CT21,
477 false => CFGA5_A::CT20,
478 }
479 }
480 #[doc = "Checks if the value of the field is `CT21`"]
481 #[inline(always)]
482 pub fn is_ct21(&self) -> bool {
483 **self == CFGA5_A::CT21
484 }
485 #[doc = "Checks if the value of the field is `CT20`"]
486 #[inline(always)]
487 pub fn is_ct20(&self) -> bool {
488 **self == CFGA5_A::CT20
489 }
490}
491impl core::ops::Deref for CFGA5_R {
492 type Target = crate::FieldReader<bool, CFGA5_A>;
493 #[inline(always)]
494 fn deref(&self) -> &Self::Target {
495 &self.0
496 }
497}
498#[doc = "Field `CFGA5` writer - CTIMER A5 input configuration"]
499pub struct CFGA5_W<'a> {
500 w: &'a mut W,
501}
502impl<'a> CFGA5_W<'a> {
503 #[doc = r"Writes `variant` to the field"]
504 #[inline(always)]
505 pub fn variant(self, variant: CFGA5_A) -> &'a mut W {
506 self.bit(variant.into())
507 }
508 #[doc = "Input is CT21 value."]
509 #[inline(always)]
510 pub fn ct21(self) -> &'a mut W {
511 self.variant(CFGA5_A::CT21)
512 }
513 #[doc = "Input is CT20 value."]
514 #[inline(always)]
515 pub fn ct20(self) -> &'a mut W {
516 self.variant(CFGA5_A::CT20)
517 }
518 #[doc = r"Sets the field bit"]
519 #[inline(always)]
520 pub fn set_bit(self) -> &'a mut W {
521 self.bit(true)
522 }
523 #[doc = r"Clears the field bit"]
524 #[inline(always)]
525 pub fn clear_bit(self) -> &'a mut W {
526 self.bit(false)
527 }
528 #[doc = r"Writes raw bits to the field"]
529 #[inline(always)]
530 pub fn bit(self, value: bool) -> &'a mut W {
531 self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
532 self.w
533 }
534}
535#[doc = "CTIMER B4 input configuration\n\nValue on reset: 0"]
536#[derive(Clone, Copy, Debug, PartialEq)]
537pub enum CFGB4_A {
538 #[doc = "1: Input is CT19 value."]
539 CT19 = 1,
540 #[doc = "0: Input is CT18 value."]
541 CT18 = 0,
542}
543impl From<CFGB4_A> for bool {
544 #[inline(always)]
545 fn from(variant: CFGB4_A) -> Self {
546 variant as u8 != 0
547 }
548}
549#[doc = "Field `CFGB4` reader - CTIMER B4 input configuration"]
550pub struct CFGB4_R(crate::FieldReader<bool, CFGB4_A>);
551impl CFGB4_R {
552 pub(crate) fn new(bits: bool) -> Self {
553 CFGB4_R(crate::FieldReader::new(bits))
554 }
555 #[doc = r"Get enumerated values variant"]
556 #[inline(always)]
557 pub fn variant(&self) -> CFGB4_A {
558 match self.bits {
559 true => CFGB4_A::CT19,
560 false => CFGB4_A::CT18,
561 }
562 }
563 #[doc = "Checks if the value of the field is `CT19`"]
564 #[inline(always)]
565 pub fn is_ct19(&self) -> bool {
566 **self == CFGB4_A::CT19
567 }
568 #[doc = "Checks if the value of the field is `CT18`"]
569 #[inline(always)]
570 pub fn is_ct18(&self) -> bool {
571 **self == CFGB4_A::CT18
572 }
573}
574impl core::ops::Deref for CFGB4_R {
575 type Target = crate::FieldReader<bool, CFGB4_A>;
576 #[inline(always)]
577 fn deref(&self) -> &Self::Target {
578 &self.0
579 }
580}
581#[doc = "Field `CFGB4` writer - CTIMER B4 input configuration"]
582pub struct CFGB4_W<'a> {
583 w: &'a mut W,
584}
585impl<'a> CFGB4_W<'a> {
586 #[doc = r"Writes `variant` to the field"]
587 #[inline(always)]
588 pub fn variant(self, variant: CFGB4_A) -> &'a mut W {
589 self.bit(variant.into())
590 }
591 #[doc = "Input is CT19 value."]
592 #[inline(always)]
593 pub fn ct19(self) -> &'a mut W {
594 self.variant(CFGB4_A::CT19)
595 }
596 #[doc = "Input is CT18 value."]
597 #[inline(always)]
598 pub fn ct18(self) -> &'a mut W {
599 self.variant(CFGB4_A::CT18)
600 }
601 #[doc = r"Sets the field bit"]
602 #[inline(always)]
603 pub fn set_bit(self) -> &'a mut W {
604 self.bit(true)
605 }
606 #[doc = r"Clears the field bit"]
607 #[inline(always)]
608 pub fn clear_bit(self) -> &'a mut W {
609 self.bit(false)
610 }
611 #[doc = r"Writes raw bits to the field"]
612 #[inline(always)]
613 pub fn bit(self, value: bool) -> &'a mut W {
614 self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
615 self.w
616 }
617}
618#[doc = "CTIMER A4 input configuration\n\nValue on reset: 0"]
619#[derive(Clone, Copy, Debug, PartialEq)]
620pub enum CFGA4_A {
621 #[doc = "1: Input is CT17 value."]
622 CT17 = 1,
623 #[doc = "0: Input is CT16 value."]
624 CT16 = 0,
625}
626impl From<CFGA4_A> for bool {
627 #[inline(always)]
628 fn from(variant: CFGA4_A) -> Self {
629 variant as u8 != 0
630 }
631}
632#[doc = "Field `CFGA4` reader - CTIMER A4 input configuration"]
633pub struct CFGA4_R(crate::FieldReader<bool, CFGA4_A>);
634impl CFGA4_R {
635 pub(crate) fn new(bits: bool) -> Self {
636 CFGA4_R(crate::FieldReader::new(bits))
637 }
638 #[doc = r"Get enumerated values variant"]
639 #[inline(always)]
640 pub fn variant(&self) -> CFGA4_A {
641 match self.bits {
642 true => CFGA4_A::CT17,
643 false => CFGA4_A::CT16,
644 }
645 }
646 #[doc = "Checks if the value of the field is `CT17`"]
647 #[inline(always)]
648 pub fn is_ct17(&self) -> bool {
649 **self == CFGA4_A::CT17
650 }
651 #[doc = "Checks if the value of the field is `CT16`"]
652 #[inline(always)]
653 pub fn is_ct16(&self) -> bool {
654 **self == CFGA4_A::CT16
655 }
656}
657impl core::ops::Deref for CFGA4_R {
658 type Target = crate::FieldReader<bool, CFGA4_A>;
659 #[inline(always)]
660 fn deref(&self) -> &Self::Target {
661 &self.0
662 }
663}
664#[doc = "Field `CFGA4` writer - CTIMER A4 input configuration"]
665pub struct CFGA4_W<'a> {
666 w: &'a mut W,
667}
668impl<'a> CFGA4_W<'a> {
669 #[doc = r"Writes `variant` to the field"]
670 #[inline(always)]
671 pub fn variant(self, variant: CFGA4_A) -> &'a mut W {
672 self.bit(variant.into())
673 }
674 #[doc = "Input is CT17 value."]
675 #[inline(always)]
676 pub fn ct17(self) -> &'a mut W {
677 self.variant(CFGA4_A::CT17)
678 }
679 #[doc = "Input is CT16 value."]
680 #[inline(always)]
681 pub fn ct16(self) -> &'a mut W {
682 self.variant(CFGA4_A::CT16)
683 }
684 #[doc = r"Sets the field bit"]
685 #[inline(always)]
686 pub fn set_bit(self) -> &'a mut W {
687 self.bit(true)
688 }
689 #[doc = r"Clears the field bit"]
690 #[inline(always)]
691 pub fn clear_bit(self) -> &'a mut W {
692 self.bit(false)
693 }
694 #[doc = r"Writes raw bits to the field"]
695 #[inline(always)]
696 pub fn bit(self, value: bool) -> &'a mut W {
697 self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
698 self.w
699 }
700}
701#[doc = "CTIMER B3 input configuration\n\nValue on reset: 0"]
702#[derive(Clone, Copy, Debug, PartialEq)]
703pub enum CFGB3_A {
704 #[doc = "1: Input is CT15 value."]
705 CT15 = 1,
706 #[doc = "0: Input is CT14 value."]
707 CT14 = 0,
708}
709impl From<CFGB3_A> for bool {
710 #[inline(always)]
711 fn from(variant: CFGB3_A) -> Self {
712 variant as u8 != 0
713 }
714}
715#[doc = "Field `CFGB3` reader - CTIMER B3 input configuration"]
716pub struct CFGB3_R(crate::FieldReader<bool, CFGB3_A>);
717impl CFGB3_R {
718 pub(crate) fn new(bits: bool) -> Self {
719 CFGB3_R(crate::FieldReader::new(bits))
720 }
721 #[doc = r"Get enumerated values variant"]
722 #[inline(always)]
723 pub fn variant(&self) -> CFGB3_A {
724 match self.bits {
725 true => CFGB3_A::CT15,
726 false => CFGB3_A::CT14,
727 }
728 }
729 #[doc = "Checks if the value of the field is `CT15`"]
730 #[inline(always)]
731 pub fn is_ct15(&self) -> bool {
732 **self == CFGB3_A::CT15
733 }
734 #[doc = "Checks if the value of the field is `CT14`"]
735 #[inline(always)]
736 pub fn is_ct14(&self) -> bool {
737 **self == CFGB3_A::CT14
738 }
739}
740impl core::ops::Deref for CFGB3_R {
741 type Target = crate::FieldReader<bool, CFGB3_A>;
742 #[inline(always)]
743 fn deref(&self) -> &Self::Target {
744 &self.0
745 }
746}
747#[doc = "Field `CFGB3` writer - CTIMER B3 input configuration"]
748pub struct CFGB3_W<'a> {
749 w: &'a mut W,
750}
751impl<'a> CFGB3_W<'a> {
752 #[doc = r"Writes `variant` to the field"]
753 #[inline(always)]
754 pub fn variant(self, variant: CFGB3_A) -> &'a mut W {
755 self.bit(variant.into())
756 }
757 #[doc = "Input is CT15 value."]
758 #[inline(always)]
759 pub fn ct15(self) -> &'a mut W {
760 self.variant(CFGB3_A::CT15)
761 }
762 #[doc = "Input is CT14 value."]
763 #[inline(always)]
764 pub fn ct14(self) -> &'a mut W {
765 self.variant(CFGB3_A::CT14)
766 }
767 #[doc = r"Sets the field bit"]
768 #[inline(always)]
769 pub fn set_bit(self) -> &'a mut W {
770 self.bit(true)
771 }
772 #[doc = r"Clears the field bit"]
773 #[inline(always)]
774 pub fn clear_bit(self) -> &'a mut W {
775 self.bit(false)
776 }
777 #[doc = r"Writes raw bits to the field"]
778 #[inline(always)]
779 pub fn bit(self, value: bool) -> &'a mut W {
780 self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
781 self.w
782 }
783}
784#[doc = "CTIMER A3 input configuration\n\nValue on reset: 0"]
785#[derive(Clone, Copy, Debug, PartialEq)]
786pub enum CFGA3_A {
787 #[doc = "1: Input is CT13 value."]
788 CT13 = 1,
789 #[doc = "0: Input is CT12 value."]
790 CT12 = 0,
791}
792impl From<CFGA3_A> for bool {
793 #[inline(always)]
794 fn from(variant: CFGA3_A) -> Self {
795 variant as u8 != 0
796 }
797}
798#[doc = "Field `CFGA3` reader - CTIMER A3 input configuration"]
799pub struct CFGA3_R(crate::FieldReader<bool, CFGA3_A>);
800impl CFGA3_R {
801 pub(crate) fn new(bits: bool) -> Self {
802 CFGA3_R(crate::FieldReader::new(bits))
803 }
804 #[doc = r"Get enumerated values variant"]
805 #[inline(always)]
806 pub fn variant(&self) -> CFGA3_A {
807 match self.bits {
808 true => CFGA3_A::CT13,
809 false => CFGA3_A::CT12,
810 }
811 }
812 #[doc = "Checks if the value of the field is `CT13`"]
813 #[inline(always)]
814 pub fn is_ct13(&self) -> bool {
815 **self == CFGA3_A::CT13
816 }
817 #[doc = "Checks if the value of the field is `CT12`"]
818 #[inline(always)]
819 pub fn is_ct12(&self) -> bool {
820 **self == CFGA3_A::CT12
821 }
822}
823impl core::ops::Deref for CFGA3_R {
824 type Target = crate::FieldReader<bool, CFGA3_A>;
825 #[inline(always)]
826 fn deref(&self) -> &Self::Target {
827 &self.0
828 }
829}
830#[doc = "Field `CFGA3` writer - CTIMER A3 input configuration"]
831pub struct CFGA3_W<'a> {
832 w: &'a mut W,
833}
834impl<'a> CFGA3_W<'a> {
835 #[doc = r"Writes `variant` to the field"]
836 #[inline(always)]
837 pub fn variant(self, variant: CFGA3_A) -> &'a mut W {
838 self.bit(variant.into())
839 }
840 #[doc = "Input is CT13 value."]
841 #[inline(always)]
842 pub fn ct13(self) -> &'a mut W {
843 self.variant(CFGA3_A::CT13)
844 }
845 #[doc = "Input is CT12 value."]
846 #[inline(always)]
847 pub fn ct12(self) -> &'a mut W {
848 self.variant(CFGA3_A::CT12)
849 }
850 #[doc = r"Sets the field bit"]
851 #[inline(always)]
852 pub fn set_bit(self) -> &'a mut W {
853 self.bit(true)
854 }
855 #[doc = r"Clears the field bit"]
856 #[inline(always)]
857 pub fn clear_bit(self) -> &'a mut W {
858 self.bit(false)
859 }
860 #[doc = r"Writes raw bits to the field"]
861 #[inline(always)]
862 pub fn bit(self, value: bool) -> &'a mut W {
863 self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
864 self.w
865 }
866}
867#[doc = "CTIMER B2 input configuration\n\nValue on reset: 0"]
868#[derive(Clone, Copy, Debug, PartialEq)]
869pub enum CFGB2_A {
870 #[doc = "1: Input is CT11 value."]
871 CT11 = 1,
872 #[doc = "0: Input is CT10 value."]
873 CT10 = 0,
874}
875impl From<CFGB2_A> for bool {
876 #[inline(always)]
877 fn from(variant: CFGB2_A) -> Self {
878 variant as u8 != 0
879 }
880}
881#[doc = "Field `CFGB2` reader - CTIMER B2 input configuration"]
882pub struct CFGB2_R(crate::FieldReader<bool, CFGB2_A>);
883impl CFGB2_R {
884 pub(crate) fn new(bits: bool) -> Self {
885 CFGB2_R(crate::FieldReader::new(bits))
886 }
887 #[doc = r"Get enumerated values variant"]
888 #[inline(always)]
889 pub fn variant(&self) -> CFGB2_A {
890 match self.bits {
891 true => CFGB2_A::CT11,
892 false => CFGB2_A::CT10,
893 }
894 }
895 #[doc = "Checks if the value of the field is `CT11`"]
896 #[inline(always)]
897 pub fn is_ct11(&self) -> bool {
898 **self == CFGB2_A::CT11
899 }
900 #[doc = "Checks if the value of the field is `CT10`"]
901 #[inline(always)]
902 pub fn is_ct10(&self) -> bool {
903 **self == CFGB2_A::CT10
904 }
905}
906impl core::ops::Deref for CFGB2_R {
907 type Target = crate::FieldReader<bool, CFGB2_A>;
908 #[inline(always)]
909 fn deref(&self) -> &Self::Target {
910 &self.0
911 }
912}
913#[doc = "Field `CFGB2` writer - CTIMER B2 input configuration"]
914pub struct CFGB2_W<'a> {
915 w: &'a mut W,
916}
917impl<'a> CFGB2_W<'a> {
918 #[doc = r"Writes `variant` to the field"]
919 #[inline(always)]
920 pub fn variant(self, variant: CFGB2_A) -> &'a mut W {
921 self.bit(variant.into())
922 }
923 #[doc = "Input is CT11 value."]
924 #[inline(always)]
925 pub fn ct11(self) -> &'a mut W {
926 self.variant(CFGB2_A::CT11)
927 }
928 #[doc = "Input is CT10 value."]
929 #[inline(always)]
930 pub fn ct10(self) -> &'a mut W {
931 self.variant(CFGB2_A::CT10)
932 }
933 #[doc = r"Sets the field bit"]
934 #[inline(always)]
935 pub fn set_bit(self) -> &'a mut W {
936 self.bit(true)
937 }
938 #[doc = r"Clears the field bit"]
939 #[inline(always)]
940 pub fn clear_bit(self) -> &'a mut W {
941 self.bit(false)
942 }
943 #[doc = r"Writes raw bits to the field"]
944 #[inline(always)]
945 pub fn bit(self, value: bool) -> &'a mut W {
946 self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
947 self.w
948 }
949}
950#[doc = "CTIMER A2 input configuration\n\nValue on reset: 0"]
951#[derive(Clone, Copy, Debug, PartialEq)]
952pub enum CFGA2_A {
953 #[doc = "1: Input is CT9 value."]
954 CT9 = 1,
955 #[doc = "0: Input is CT8 value."]
956 CT8 = 0,
957}
958impl From<CFGA2_A> for bool {
959 #[inline(always)]
960 fn from(variant: CFGA2_A) -> Self {
961 variant as u8 != 0
962 }
963}
964#[doc = "Field `CFGA2` reader - CTIMER A2 input configuration"]
965pub struct CFGA2_R(crate::FieldReader<bool, CFGA2_A>);
966impl CFGA2_R {
967 pub(crate) fn new(bits: bool) -> Self {
968 CFGA2_R(crate::FieldReader::new(bits))
969 }
970 #[doc = r"Get enumerated values variant"]
971 #[inline(always)]
972 pub fn variant(&self) -> CFGA2_A {
973 match self.bits {
974 true => CFGA2_A::CT9,
975 false => CFGA2_A::CT8,
976 }
977 }
978 #[doc = "Checks if the value of the field is `CT9`"]
979 #[inline(always)]
980 pub fn is_ct9(&self) -> bool {
981 **self == CFGA2_A::CT9
982 }
983 #[doc = "Checks if the value of the field is `CT8`"]
984 #[inline(always)]
985 pub fn is_ct8(&self) -> bool {
986 **self == CFGA2_A::CT8
987 }
988}
989impl core::ops::Deref for CFGA2_R {
990 type Target = crate::FieldReader<bool, CFGA2_A>;
991 #[inline(always)]
992 fn deref(&self) -> &Self::Target {
993 &self.0
994 }
995}
996#[doc = "Field `CFGA2` writer - CTIMER A2 input configuration"]
997pub struct CFGA2_W<'a> {
998 w: &'a mut W,
999}
1000impl<'a> CFGA2_W<'a> {
1001 #[doc = r"Writes `variant` to the field"]
1002 #[inline(always)]
1003 pub fn variant(self, variant: CFGA2_A) -> &'a mut W {
1004 self.bit(variant.into())
1005 }
1006 #[doc = "Input is CT9 value."]
1007 #[inline(always)]
1008 pub fn ct9(self) -> &'a mut W {
1009 self.variant(CFGA2_A::CT9)
1010 }
1011 #[doc = "Input is CT8 value."]
1012 #[inline(always)]
1013 pub fn ct8(self) -> &'a mut W {
1014 self.variant(CFGA2_A::CT8)
1015 }
1016 #[doc = r"Sets the field bit"]
1017 #[inline(always)]
1018 pub fn set_bit(self) -> &'a mut W {
1019 self.bit(true)
1020 }
1021 #[doc = r"Clears the field bit"]
1022 #[inline(always)]
1023 pub fn clear_bit(self) -> &'a mut W {
1024 self.bit(false)
1025 }
1026 #[doc = r"Writes raw bits to the field"]
1027 #[inline(always)]
1028 pub fn bit(self, value: bool) -> &'a mut W {
1029 self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
1030 self.w
1031 }
1032}
1033#[doc = "CTIMER B1 input configuration\n\nValue on reset: 0"]
1034#[derive(Clone, Copy, Debug, PartialEq)]
1035pub enum CFGB1_A {
1036 #[doc = "1: Input is CT7 value."]
1037 CT7 = 1,
1038 #[doc = "0: Input is CT6 value."]
1039 CT6 = 0,
1040}
1041impl From<CFGB1_A> for bool {
1042 #[inline(always)]
1043 fn from(variant: CFGB1_A) -> Self {
1044 variant as u8 != 0
1045 }
1046}
1047#[doc = "Field `CFGB1` reader - CTIMER B1 input configuration"]
1048pub struct CFGB1_R(crate::FieldReader<bool, CFGB1_A>);
1049impl CFGB1_R {
1050 pub(crate) fn new(bits: bool) -> Self {
1051 CFGB1_R(crate::FieldReader::new(bits))
1052 }
1053 #[doc = r"Get enumerated values variant"]
1054 #[inline(always)]
1055 pub fn variant(&self) -> CFGB1_A {
1056 match self.bits {
1057 true => CFGB1_A::CT7,
1058 false => CFGB1_A::CT6,
1059 }
1060 }
1061 #[doc = "Checks if the value of the field is `CT7`"]
1062 #[inline(always)]
1063 pub fn is_ct7(&self) -> bool {
1064 **self == CFGB1_A::CT7
1065 }
1066 #[doc = "Checks if the value of the field is `CT6`"]
1067 #[inline(always)]
1068 pub fn is_ct6(&self) -> bool {
1069 **self == CFGB1_A::CT6
1070 }
1071}
1072impl core::ops::Deref for CFGB1_R {
1073 type Target = crate::FieldReader<bool, CFGB1_A>;
1074 #[inline(always)]
1075 fn deref(&self) -> &Self::Target {
1076 &self.0
1077 }
1078}
1079#[doc = "Field `CFGB1` writer - CTIMER B1 input configuration"]
1080pub struct CFGB1_W<'a> {
1081 w: &'a mut W,
1082}
1083impl<'a> CFGB1_W<'a> {
1084 #[doc = r"Writes `variant` to the field"]
1085 #[inline(always)]
1086 pub fn variant(self, variant: CFGB1_A) -> &'a mut W {
1087 self.bit(variant.into())
1088 }
1089 #[doc = "Input is CT7 value."]
1090 #[inline(always)]
1091 pub fn ct7(self) -> &'a mut W {
1092 self.variant(CFGB1_A::CT7)
1093 }
1094 #[doc = "Input is CT6 value."]
1095 #[inline(always)]
1096 pub fn ct6(self) -> &'a mut W {
1097 self.variant(CFGB1_A::CT6)
1098 }
1099 #[doc = r"Sets the field bit"]
1100 #[inline(always)]
1101 pub fn set_bit(self) -> &'a mut W {
1102 self.bit(true)
1103 }
1104 #[doc = r"Clears the field bit"]
1105 #[inline(always)]
1106 pub fn clear_bit(self) -> &'a mut W {
1107 self.bit(false)
1108 }
1109 #[doc = r"Writes raw bits to the field"]
1110 #[inline(always)]
1111 pub fn bit(self, value: bool) -> &'a mut W {
1112 self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
1113 self.w
1114 }
1115}
1116#[doc = "CTIMER A1 input configuration\n\nValue on reset: 0"]
1117#[derive(Clone, Copy, Debug, PartialEq)]
1118pub enum CFGA1_A {
1119 #[doc = "1: Input is CT5 value."]
1120 CT5 = 1,
1121 #[doc = "0: Input is CT4 value."]
1122 CT4 = 0,
1123}
1124impl From<CFGA1_A> for bool {
1125 #[inline(always)]
1126 fn from(variant: CFGA1_A) -> Self {
1127 variant as u8 != 0
1128 }
1129}
1130#[doc = "Field `CFGA1` reader - CTIMER A1 input configuration"]
1131pub struct CFGA1_R(crate::FieldReader<bool, CFGA1_A>);
1132impl CFGA1_R {
1133 pub(crate) fn new(bits: bool) -> Self {
1134 CFGA1_R(crate::FieldReader::new(bits))
1135 }
1136 #[doc = r"Get enumerated values variant"]
1137 #[inline(always)]
1138 pub fn variant(&self) -> CFGA1_A {
1139 match self.bits {
1140 true => CFGA1_A::CT5,
1141 false => CFGA1_A::CT4,
1142 }
1143 }
1144 #[doc = "Checks if the value of the field is `CT5`"]
1145 #[inline(always)]
1146 pub fn is_ct5(&self) -> bool {
1147 **self == CFGA1_A::CT5
1148 }
1149 #[doc = "Checks if the value of the field is `CT4`"]
1150 #[inline(always)]
1151 pub fn is_ct4(&self) -> bool {
1152 **self == CFGA1_A::CT4
1153 }
1154}
1155impl core::ops::Deref for CFGA1_R {
1156 type Target = crate::FieldReader<bool, CFGA1_A>;
1157 #[inline(always)]
1158 fn deref(&self) -> &Self::Target {
1159 &self.0
1160 }
1161}
1162#[doc = "Field `CFGA1` writer - CTIMER A1 input configuration"]
1163pub struct CFGA1_W<'a> {
1164 w: &'a mut W,
1165}
1166impl<'a> CFGA1_W<'a> {
1167 #[doc = r"Writes `variant` to the field"]
1168 #[inline(always)]
1169 pub fn variant(self, variant: CFGA1_A) -> &'a mut W {
1170 self.bit(variant.into())
1171 }
1172 #[doc = "Input is CT5 value."]
1173 #[inline(always)]
1174 pub fn ct5(self) -> &'a mut W {
1175 self.variant(CFGA1_A::CT5)
1176 }
1177 #[doc = "Input is CT4 value."]
1178 #[inline(always)]
1179 pub fn ct4(self) -> &'a mut W {
1180 self.variant(CFGA1_A::CT4)
1181 }
1182 #[doc = r"Sets the field bit"]
1183 #[inline(always)]
1184 pub fn set_bit(self) -> &'a mut W {
1185 self.bit(true)
1186 }
1187 #[doc = r"Clears the field bit"]
1188 #[inline(always)]
1189 pub fn clear_bit(self) -> &'a mut W {
1190 self.bit(false)
1191 }
1192 #[doc = r"Writes raw bits to the field"]
1193 #[inline(always)]
1194 pub fn bit(self, value: bool) -> &'a mut W {
1195 self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
1196 self.w
1197 }
1198}
1199#[doc = "CTIMER B0 input configuration\n\nValue on reset: 0"]
1200#[derive(Clone, Copy, Debug, PartialEq)]
1201pub enum CFGB0_A {
1202 #[doc = "1: Input is CT3 value."]
1203 CT3 = 1,
1204 #[doc = "0: Input is CT2 value."]
1205 CT2 = 0,
1206}
1207impl From<CFGB0_A> for bool {
1208 #[inline(always)]
1209 fn from(variant: CFGB0_A) -> Self {
1210 variant as u8 != 0
1211 }
1212}
1213#[doc = "Field `CFGB0` reader - CTIMER B0 input configuration"]
1214pub struct CFGB0_R(crate::FieldReader<bool, CFGB0_A>);
1215impl CFGB0_R {
1216 pub(crate) fn new(bits: bool) -> Self {
1217 CFGB0_R(crate::FieldReader::new(bits))
1218 }
1219 #[doc = r"Get enumerated values variant"]
1220 #[inline(always)]
1221 pub fn variant(&self) -> CFGB0_A {
1222 match self.bits {
1223 true => CFGB0_A::CT3,
1224 false => CFGB0_A::CT2,
1225 }
1226 }
1227 #[doc = "Checks if the value of the field is `CT3`"]
1228 #[inline(always)]
1229 pub fn is_ct3(&self) -> bool {
1230 **self == CFGB0_A::CT3
1231 }
1232 #[doc = "Checks if the value of the field is `CT2`"]
1233 #[inline(always)]
1234 pub fn is_ct2(&self) -> bool {
1235 **self == CFGB0_A::CT2
1236 }
1237}
1238impl core::ops::Deref for CFGB0_R {
1239 type Target = crate::FieldReader<bool, CFGB0_A>;
1240 #[inline(always)]
1241 fn deref(&self) -> &Self::Target {
1242 &self.0
1243 }
1244}
1245#[doc = "Field `CFGB0` writer - CTIMER B0 input configuration"]
1246pub struct CFGB0_W<'a> {
1247 w: &'a mut W,
1248}
1249impl<'a> CFGB0_W<'a> {
1250 #[doc = r"Writes `variant` to the field"]
1251 #[inline(always)]
1252 pub fn variant(self, variant: CFGB0_A) -> &'a mut W {
1253 self.bit(variant.into())
1254 }
1255 #[doc = "Input is CT3 value."]
1256 #[inline(always)]
1257 pub fn ct3(self) -> &'a mut W {
1258 self.variant(CFGB0_A::CT3)
1259 }
1260 #[doc = "Input is CT2 value."]
1261 #[inline(always)]
1262 pub fn ct2(self) -> &'a mut W {
1263 self.variant(CFGB0_A::CT2)
1264 }
1265 #[doc = r"Sets the field bit"]
1266 #[inline(always)]
1267 pub fn set_bit(self) -> &'a mut W {
1268 self.bit(true)
1269 }
1270 #[doc = r"Clears the field bit"]
1271 #[inline(always)]
1272 pub fn clear_bit(self) -> &'a mut W {
1273 self.bit(false)
1274 }
1275 #[doc = r"Writes raw bits to the field"]
1276 #[inline(always)]
1277 pub fn bit(self, value: bool) -> &'a mut W {
1278 self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
1279 self.w
1280 }
1281}
1282#[doc = "CTIMER A0 input configuration\n\nValue on reset: 0"]
1283#[derive(Clone, Copy, Debug, PartialEq)]
1284pub enum CFGA0_A {
1285 #[doc = "1: Input is CT1 value."]
1286 CT1 = 1,
1287 #[doc = "0: Input is CT0 value."]
1288 CT0 = 0,
1289}
1290impl From<CFGA0_A> for bool {
1291 #[inline(always)]
1292 fn from(variant: CFGA0_A) -> Self {
1293 variant as u8 != 0
1294 }
1295}
1296#[doc = "Field `CFGA0` reader - CTIMER A0 input configuration"]
1297pub struct CFGA0_R(crate::FieldReader<bool, CFGA0_A>);
1298impl CFGA0_R {
1299 pub(crate) fn new(bits: bool) -> Self {
1300 CFGA0_R(crate::FieldReader::new(bits))
1301 }
1302 #[doc = r"Get enumerated values variant"]
1303 #[inline(always)]
1304 pub fn variant(&self) -> CFGA0_A {
1305 match self.bits {
1306 true => CFGA0_A::CT1,
1307 false => CFGA0_A::CT0,
1308 }
1309 }
1310 #[doc = "Checks if the value of the field is `CT1`"]
1311 #[inline(always)]
1312 pub fn is_ct1(&self) -> bool {
1313 **self == CFGA0_A::CT1
1314 }
1315 #[doc = "Checks if the value of the field is `CT0`"]
1316 #[inline(always)]
1317 pub fn is_ct0(&self) -> bool {
1318 **self == CFGA0_A::CT0
1319 }
1320}
1321impl core::ops::Deref for CFGA0_R {
1322 type Target = crate::FieldReader<bool, CFGA0_A>;
1323 #[inline(always)]
1324 fn deref(&self) -> &Self::Target {
1325 &self.0
1326 }
1327}
1328#[doc = "Field `CFGA0` writer - CTIMER A0 input configuration"]
1329pub struct CFGA0_W<'a> {
1330 w: &'a mut W,
1331}
1332impl<'a> CFGA0_W<'a> {
1333 #[doc = r"Writes `variant` to the field"]
1334 #[inline(always)]
1335 pub fn variant(self, variant: CFGA0_A) -> &'a mut W {
1336 self.bit(variant.into())
1337 }
1338 #[doc = "Input is CT1 value."]
1339 #[inline(always)]
1340 pub fn ct1(self) -> &'a mut W {
1341 self.variant(CFGA0_A::CT1)
1342 }
1343 #[doc = "Input is CT0 value."]
1344 #[inline(always)]
1345 pub fn ct0(self) -> &'a mut W {
1346 self.variant(CFGA0_A::CT0)
1347 }
1348 #[doc = r"Sets the field bit"]
1349 #[inline(always)]
1350 pub fn set_bit(self) -> &'a mut W {
1351 self.bit(true)
1352 }
1353 #[doc = r"Clears the field bit"]
1354 #[inline(always)]
1355 pub fn clear_bit(self) -> &'a mut W {
1356 self.bit(false)
1357 }
1358 #[doc = r"Writes raw bits to the field"]
1359 #[inline(always)]
1360 pub fn bit(self, value: bool) -> &'a mut W {
1361 self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
1362 self.w
1363 }
1364}
1365impl R {
1366 #[doc = "Bit 15 - CTIMER B7 input configuration"]
1367 #[inline(always)]
1368 pub fn cfgb7(&self) -> CFGB7_R {
1369 CFGB7_R::new(((self.bits >> 15) & 0x01) != 0)
1370 }
1371 #[doc = "Bit 14 - CTIMER A7 input configuration"]
1372 #[inline(always)]
1373 pub fn cfga7(&self) -> CFGA7_R {
1374 CFGA7_R::new(((self.bits >> 14) & 0x01) != 0)
1375 }
1376 #[doc = "Bit 13 - CTIMER B6 input configuration"]
1377 #[inline(always)]
1378 pub fn cfgb6(&self) -> CFGB6_R {
1379 CFGB6_R::new(((self.bits >> 13) & 0x01) != 0)
1380 }
1381 #[doc = "Bit 12 - CTIMER A6 input configuration"]
1382 #[inline(always)]
1383 pub fn cfga6(&self) -> CFGA6_R {
1384 CFGA6_R::new(((self.bits >> 12) & 0x01) != 0)
1385 }
1386 #[doc = "Bit 11 - CTIMER B5 input configuration"]
1387 #[inline(always)]
1388 pub fn cfgb5(&self) -> CFGB5_R {
1389 CFGB5_R::new(((self.bits >> 11) & 0x01) != 0)
1390 }
1391 #[doc = "Bit 10 - CTIMER A5 input configuration"]
1392 #[inline(always)]
1393 pub fn cfga5(&self) -> CFGA5_R {
1394 CFGA5_R::new(((self.bits >> 10) & 0x01) != 0)
1395 }
1396 #[doc = "Bit 9 - CTIMER B4 input configuration"]
1397 #[inline(always)]
1398 pub fn cfgb4(&self) -> CFGB4_R {
1399 CFGB4_R::new(((self.bits >> 9) & 0x01) != 0)
1400 }
1401 #[doc = "Bit 8 - CTIMER A4 input configuration"]
1402 #[inline(always)]
1403 pub fn cfga4(&self) -> CFGA4_R {
1404 CFGA4_R::new(((self.bits >> 8) & 0x01) != 0)
1405 }
1406 #[doc = "Bit 7 - CTIMER B3 input configuration"]
1407 #[inline(always)]
1408 pub fn cfgb3(&self) -> CFGB3_R {
1409 CFGB3_R::new(((self.bits >> 7) & 0x01) != 0)
1410 }
1411 #[doc = "Bit 6 - CTIMER A3 input configuration"]
1412 #[inline(always)]
1413 pub fn cfga3(&self) -> CFGA3_R {
1414 CFGA3_R::new(((self.bits >> 6) & 0x01) != 0)
1415 }
1416 #[doc = "Bit 5 - CTIMER B2 input configuration"]
1417 #[inline(always)]
1418 pub fn cfgb2(&self) -> CFGB2_R {
1419 CFGB2_R::new(((self.bits >> 5) & 0x01) != 0)
1420 }
1421 #[doc = "Bit 4 - CTIMER A2 input configuration"]
1422 #[inline(always)]
1423 pub fn cfga2(&self) -> CFGA2_R {
1424 CFGA2_R::new(((self.bits >> 4) & 0x01) != 0)
1425 }
1426 #[doc = "Bit 3 - CTIMER B1 input configuration"]
1427 #[inline(always)]
1428 pub fn cfgb1(&self) -> CFGB1_R {
1429 CFGB1_R::new(((self.bits >> 3) & 0x01) != 0)
1430 }
1431 #[doc = "Bit 2 - CTIMER A1 input configuration"]
1432 #[inline(always)]
1433 pub fn cfga1(&self) -> CFGA1_R {
1434 CFGA1_R::new(((self.bits >> 2) & 0x01) != 0)
1435 }
1436 #[doc = "Bit 1 - CTIMER B0 input configuration"]
1437 #[inline(always)]
1438 pub fn cfgb0(&self) -> CFGB0_R {
1439 CFGB0_R::new(((self.bits >> 1) & 0x01) != 0)
1440 }
1441 #[doc = "Bit 0 - CTIMER A0 input configuration"]
1442 #[inline(always)]
1443 pub fn cfga0(&self) -> CFGA0_R {
1444 CFGA0_R::new((self.bits & 0x01) != 0)
1445 }
1446}
1447impl W {
1448 #[doc = "Bit 15 - CTIMER B7 input configuration"]
1449 #[inline(always)]
1450 pub fn cfgb7(&mut self) -> CFGB7_W {
1451 CFGB7_W { w: self }
1452 }
1453 #[doc = "Bit 14 - CTIMER A7 input configuration"]
1454 #[inline(always)]
1455 pub fn cfga7(&mut self) -> CFGA7_W {
1456 CFGA7_W { w: self }
1457 }
1458 #[doc = "Bit 13 - CTIMER B6 input configuration"]
1459 #[inline(always)]
1460 pub fn cfgb6(&mut self) -> CFGB6_W {
1461 CFGB6_W { w: self }
1462 }
1463 #[doc = "Bit 12 - CTIMER A6 input configuration"]
1464 #[inline(always)]
1465 pub fn cfga6(&mut self) -> CFGA6_W {
1466 CFGA6_W { w: self }
1467 }
1468 #[doc = "Bit 11 - CTIMER B5 input configuration"]
1469 #[inline(always)]
1470 pub fn cfgb5(&mut self) -> CFGB5_W {
1471 CFGB5_W { w: self }
1472 }
1473 #[doc = "Bit 10 - CTIMER A5 input configuration"]
1474 #[inline(always)]
1475 pub fn cfga5(&mut self) -> CFGA5_W {
1476 CFGA5_W { w: self }
1477 }
1478 #[doc = "Bit 9 - CTIMER B4 input configuration"]
1479 #[inline(always)]
1480 pub fn cfgb4(&mut self) -> CFGB4_W {
1481 CFGB4_W { w: self }
1482 }
1483 #[doc = "Bit 8 - CTIMER A4 input configuration"]
1484 #[inline(always)]
1485 pub fn cfga4(&mut self) -> CFGA4_W {
1486 CFGA4_W { w: self }
1487 }
1488 #[doc = "Bit 7 - CTIMER B3 input configuration"]
1489 #[inline(always)]
1490 pub fn cfgb3(&mut self) -> CFGB3_W {
1491 CFGB3_W { w: self }
1492 }
1493 #[doc = "Bit 6 - CTIMER A3 input configuration"]
1494 #[inline(always)]
1495 pub fn cfga3(&mut self) -> CFGA3_W {
1496 CFGA3_W { w: self }
1497 }
1498 #[doc = "Bit 5 - CTIMER B2 input configuration"]
1499 #[inline(always)]
1500 pub fn cfgb2(&mut self) -> CFGB2_W {
1501 CFGB2_W { w: self }
1502 }
1503 #[doc = "Bit 4 - CTIMER A2 input configuration"]
1504 #[inline(always)]
1505 pub fn cfga2(&mut self) -> CFGA2_W {
1506 CFGA2_W { w: self }
1507 }
1508 #[doc = "Bit 3 - CTIMER B1 input configuration"]
1509 #[inline(always)]
1510 pub fn cfgb1(&mut self) -> CFGB1_W {
1511 CFGB1_W { w: self }
1512 }
1513 #[doc = "Bit 2 - CTIMER A1 input configuration"]
1514 #[inline(always)]
1515 pub fn cfga1(&mut self) -> CFGA1_W {
1516 CFGA1_W { w: self }
1517 }
1518 #[doc = "Bit 1 - CTIMER B0 input configuration"]
1519 #[inline(always)]
1520 pub fn cfgb0(&mut self) -> CFGB0_W {
1521 CFGB0_W { w: self }
1522 }
1523 #[doc = "Bit 0 - CTIMER A0 input configuration"]
1524 #[inline(always)]
1525 pub fn cfga0(&mut self) -> CFGA0_W {
1526 CFGA0_W { w: self }
1527 }
1528 #[doc = "Writes raw bits to the register."]
1529 #[inline(always)]
1530 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1531 self.0.bits(bits);
1532 self
1533 }
1534}
1535#[doc = "Counter/Timer Input Config\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 [incfg](index.html) module"]
1536pub struct INCFG_SPEC;
1537impl crate::RegisterSpec for INCFG_SPEC {
1538 type Ux = u32;
1539}
1540#[doc = "`read()` method returns [incfg::R](R) reader structure"]
1541impl crate::Readable for INCFG_SPEC {
1542 type Reader = R;
1543}
1544#[doc = "`write(|w| ..)` method takes [incfg::W](W) writer structure"]
1545impl crate::Writable for INCFG_SPEC {
1546 type Writer = W;
1547}
1548#[doc = "`reset()` method sets INCFG to value 0"]
1549impl crate::Resettable for INCFG_SPEC {
1550 #[inline(always)]
1551 fn reset_value() -> Self::Ux {
1552 0
1553 }
1554}