1#[doc = "Register `CMC` reader"]
2pub type R = crate::R<CMC_SPEC>;
3#[doc = "Register `CMC` writer"]
4pub type W = crate::W<CMC_SPEC>;
5#[doc = "External Start Functionality Selector\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7#[repr(u8)]
8pub enum STRTS_A {
9 #[doc = "0: External Start Function deactivated"]
10 VALUE1 = 0,
11 #[doc = "1: External Start Function triggered by Event 0"]
12 VALUE2 = 1,
13 #[doc = "2: External Start Function triggered by Event 1"]
14 VALUE3 = 2,
15 #[doc = "3: External Start Function triggered by Event 2"]
16 VALUE4 = 3,
17}
18impl From<STRTS_A> for u8 {
19 #[inline(always)]
20 fn from(variant: STRTS_A) -> Self {
21 variant as _
22 }
23}
24impl crate::FieldSpec for STRTS_A {
25 type Ux = u8;
26}
27impl crate::IsEnum for STRTS_A {}
28#[doc = "Field `STRTS` reader - External Start Functionality Selector"]
29pub type STRTS_R = crate::FieldReader<STRTS_A>;
30impl STRTS_R {
31 #[doc = "Get enumerated values variant"]
32 #[inline(always)]
33 pub const fn variant(&self) -> STRTS_A {
34 match self.bits {
35 0 => STRTS_A::VALUE1,
36 1 => STRTS_A::VALUE2,
37 2 => STRTS_A::VALUE3,
38 3 => STRTS_A::VALUE4,
39 _ => unreachable!(),
40 }
41 }
42 #[doc = "External Start Function deactivated"]
43 #[inline(always)]
44 pub fn is_value1(&self) -> bool {
45 *self == STRTS_A::VALUE1
46 }
47 #[doc = "External Start Function triggered by Event 0"]
48 #[inline(always)]
49 pub fn is_value2(&self) -> bool {
50 *self == STRTS_A::VALUE2
51 }
52 #[doc = "External Start Function triggered by Event 1"]
53 #[inline(always)]
54 pub fn is_value3(&self) -> bool {
55 *self == STRTS_A::VALUE3
56 }
57 #[doc = "External Start Function triggered by Event 2"]
58 #[inline(always)]
59 pub fn is_value4(&self) -> bool {
60 *self == STRTS_A::VALUE4
61 }
62}
63#[doc = "Field `STRTS` writer - External Start Functionality Selector"]
64pub type STRTS_W<'a, REG> = crate::FieldWriter<'a, REG, 2, STRTS_A, crate::Safe>;
65impl<'a, REG> STRTS_W<'a, REG>
66where
67 REG: crate::Writable + crate::RegisterSpec,
68 REG::Ux: From<u8>,
69{
70 #[doc = "External Start Function deactivated"]
71 #[inline(always)]
72 pub fn value1(self) -> &'a mut crate::W<REG> {
73 self.variant(STRTS_A::VALUE1)
74 }
75 #[doc = "External Start Function triggered by Event 0"]
76 #[inline(always)]
77 pub fn value2(self) -> &'a mut crate::W<REG> {
78 self.variant(STRTS_A::VALUE2)
79 }
80 #[doc = "External Start Function triggered by Event 1"]
81 #[inline(always)]
82 pub fn value3(self) -> &'a mut crate::W<REG> {
83 self.variant(STRTS_A::VALUE3)
84 }
85 #[doc = "External Start Function triggered by Event 2"]
86 #[inline(always)]
87 pub fn value4(self) -> &'a mut crate::W<REG> {
88 self.variant(STRTS_A::VALUE4)
89 }
90}
91#[doc = "External Stop Functionality Selector\n\nValue on reset: 0"]
92#[derive(Clone, Copy, Debug, PartialEq, Eq)]
93#[repr(u8)]
94pub enum ENDS_A {
95 #[doc = "0: External Stop Function deactivated"]
96 VALUE1 = 0,
97 #[doc = "1: External Stop Function triggered by Event 0"]
98 VALUE2 = 1,
99 #[doc = "2: External Stop Function triggered by Event 1"]
100 VALUE3 = 2,
101 #[doc = "3: External Stop Function triggered by Event 2"]
102 VALUE4 = 3,
103}
104impl From<ENDS_A> for u8 {
105 #[inline(always)]
106 fn from(variant: ENDS_A) -> Self {
107 variant as _
108 }
109}
110impl crate::FieldSpec for ENDS_A {
111 type Ux = u8;
112}
113impl crate::IsEnum for ENDS_A {}
114#[doc = "Field `ENDS` reader - External Stop Functionality Selector"]
115pub type ENDS_R = crate::FieldReader<ENDS_A>;
116impl ENDS_R {
117 #[doc = "Get enumerated values variant"]
118 #[inline(always)]
119 pub const fn variant(&self) -> ENDS_A {
120 match self.bits {
121 0 => ENDS_A::VALUE1,
122 1 => ENDS_A::VALUE2,
123 2 => ENDS_A::VALUE3,
124 3 => ENDS_A::VALUE4,
125 _ => unreachable!(),
126 }
127 }
128 #[doc = "External Stop Function deactivated"]
129 #[inline(always)]
130 pub fn is_value1(&self) -> bool {
131 *self == ENDS_A::VALUE1
132 }
133 #[doc = "External Stop Function triggered by Event 0"]
134 #[inline(always)]
135 pub fn is_value2(&self) -> bool {
136 *self == ENDS_A::VALUE2
137 }
138 #[doc = "External Stop Function triggered by Event 1"]
139 #[inline(always)]
140 pub fn is_value3(&self) -> bool {
141 *self == ENDS_A::VALUE3
142 }
143 #[doc = "External Stop Function triggered by Event 2"]
144 #[inline(always)]
145 pub fn is_value4(&self) -> bool {
146 *self == ENDS_A::VALUE4
147 }
148}
149#[doc = "Field `ENDS` writer - External Stop Functionality Selector"]
150pub type ENDS_W<'a, REG> = crate::FieldWriter<'a, REG, 2, ENDS_A, crate::Safe>;
151impl<'a, REG> ENDS_W<'a, REG>
152where
153 REG: crate::Writable + crate::RegisterSpec,
154 REG::Ux: From<u8>,
155{
156 #[doc = "External Stop Function deactivated"]
157 #[inline(always)]
158 pub fn value1(self) -> &'a mut crate::W<REG> {
159 self.variant(ENDS_A::VALUE1)
160 }
161 #[doc = "External Stop Function triggered by Event 0"]
162 #[inline(always)]
163 pub fn value2(self) -> &'a mut crate::W<REG> {
164 self.variant(ENDS_A::VALUE2)
165 }
166 #[doc = "External Stop Function triggered by Event 1"]
167 #[inline(always)]
168 pub fn value3(self) -> &'a mut crate::W<REG> {
169 self.variant(ENDS_A::VALUE3)
170 }
171 #[doc = "External Stop Function triggered by Event 2"]
172 #[inline(always)]
173 pub fn value4(self) -> &'a mut crate::W<REG> {
174 self.variant(ENDS_A::VALUE4)
175 }
176}
177#[doc = "External Capture 0 Functionality Selector\n\nValue on reset: 0"]
178#[derive(Clone, Copy, Debug, PartialEq, Eq)]
179#[repr(u8)]
180pub enum CAP0S_A {
181 #[doc = "0: External Capture 0 Function deactivated"]
182 VALUE1 = 0,
183 #[doc = "1: External Capture 0 Function triggered by Event 0"]
184 VALUE2 = 1,
185 #[doc = "2: External Capture 0 Function triggered by Event 1"]
186 VALUE3 = 2,
187 #[doc = "3: External Capture 0 Function triggered by Event 2"]
188 VALUE4 = 3,
189}
190impl From<CAP0S_A> for u8 {
191 #[inline(always)]
192 fn from(variant: CAP0S_A) -> Self {
193 variant as _
194 }
195}
196impl crate::FieldSpec for CAP0S_A {
197 type Ux = u8;
198}
199impl crate::IsEnum for CAP0S_A {}
200#[doc = "Field `CAP0S` reader - External Capture 0 Functionality Selector"]
201pub type CAP0S_R = crate::FieldReader<CAP0S_A>;
202impl CAP0S_R {
203 #[doc = "Get enumerated values variant"]
204 #[inline(always)]
205 pub const fn variant(&self) -> CAP0S_A {
206 match self.bits {
207 0 => CAP0S_A::VALUE1,
208 1 => CAP0S_A::VALUE2,
209 2 => CAP0S_A::VALUE3,
210 3 => CAP0S_A::VALUE4,
211 _ => unreachable!(),
212 }
213 }
214 #[doc = "External Capture 0 Function deactivated"]
215 #[inline(always)]
216 pub fn is_value1(&self) -> bool {
217 *self == CAP0S_A::VALUE1
218 }
219 #[doc = "External Capture 0 Function triggered by Event 0"]
220 #[inline(always)]
221 pub fn is_value2(&self) -> bool {
222 *self == CAP0S_A::VALUE2
223 }
224 #[doc = "External Capture 0 Function triggered by Event 1"]
225 #[inline(always)]
226 pub fn is_value3(&self) -> bool {
227 *self == CAP0S_A::VALUE3
228 }
229 #[doc = "External Capture 0 Function triggered by Event 2"]
230 #[inline(always)]
231 pub fn is_value4(&self) -> bool {
232 *self == CAP0S_A::VALUE4
233 }
234}
235#[doc = "Field `CAP0S` writer - External Capture 0 Functionality Selector"]
236pub type CAP0S_W<'a, REG> = crate::FieldWriter<'a, REG, 2, CAP0S_A, crate::Safe>;
237impl<'a, REG> CAP0S_W<'a, REG>
238where
239 REG: crate::Writable + crate::RegisterSpec,
240 REG::Ux: From<u8>,
241{
242 #[doc = "External Capture 0 Function deactivated"]
243 #[inline(always)]
244 pub fn value1(self) -> &'a mut crate::W<REG> {
245 self.variant(CAP0S_A::VALUE1)
246 }
247 #[doc = "External Capture 0 Function triggered by Event 0"]
248 #[inline(always)]
249 pub fn value2(self) -> &'a mut crate::W<REG> {
250 self.variant(CAP0S_A::VALUE2)
251 }
252 #[doc = "External Capture 0 Function triggered by Event 1"]
253 #[inline(always)]
254 pub fn value3(self) -> &'a mut crate::W<REG> {
255 self.variant(CAP0S_A::VALUE3)
256 }
257 #[doc = "External Capture 0 Function triggered by Event 2"]
258 #[inline(always)]
259 pub fn value4(self) -> &'a mut crate::W<REG> {
260 self.variant(CAP0S_A::VALUE4)
261 }
262}
263#[doc = "External Capture 1 Functionality Selector\n\nValue on reset: 0"]
264#[derive(Clone, Copy, Debug, PartialEq, Eq)]
265#[repr(u8)]
266pub enum CAP1S_A {
267 #[doc = "0: External Capture 1 Function deactivated"]
268 VALUE1 = 0,
269 #[doc = "1: External Capture 1 Function triggered by Event 0"]
270 VALUE2 = 1,
271 #[doc = "2: External Capture 1 Function triggered by Event 1"]
272 VALUE3 = 2,
273 #[doc = "3: External Capture 1 Function triggered by Event 2"]
274 VALUE4 = 3,
275}
276impl From<CAP1S_A> for u8 {
277 #[inline(always)]
278 fn from(variant: CAP1S_A) -> Self {
279 variant as _
280 }
281}
282impl crate::FieldSpec for CAP1S_A {
283 type Ux = u8;
284}
285impl crate::IsEnum for CAP1S_A {}
286#[doc = "Field `CAP1S` reader - External Capture 1 Functionality Selector"]
287pub type CAP1S_R = crate::FieldReader<CAP1S_A>;
288impl CAP1S_R {
289 #[doc = "Get enumerated values variant"]
290 #[inline(always)]
291 pub const fn variant(&self) -> CAP1S_A {
292 match self.bits {
293 0 => CAP1S_A::VALUE1,
294 1 => CAP1S_A::VALUE2,
295 2 => CAP1S_A::VALUE3,
296 3 => CAP1S_A::VALUE4,
297 _ => unreachable!(),
298 }
299 }
300 #[doc = "External Capture 1 Function deactivated"]
301 #[inline(always)]
302 pub fn is_value1(&self) -> bool {
303 *self == CAP1S_A::VALUE1
304 }
305 #[doc = "External Capture 1 Function triggered by Event 0"]
306 #[inline(always)]
307 pub fn is_value2(&self) -> bool {
308 *self == CAP1S_A::VALUE2
309 }
310 #[doc = "External Capture 1 Function triggered by Event 1"]
311 #[inline(always)]
312 pub fn is_value3(&self) -> bool {
313 *self == CAP1S_A::VALUE3
314 }
315 #[doc = "External Capture 1 Function triggered by Event 2"]
316 #[inline(always)]
317 pub fn is_value4(&self) -> bool {
318 *self == CAP1S_A::VALUE4
319 }
320}
321#[doc = "Field `CAP1S` writer - External Capture 1 Functionality Selector"]
322pub type CAP1S_W<'a, REG> = crate::FieldWriter<'a, REG, 2, CAP1S_A, crate::Safe>;
323impl<'a, REG> CAP1S_W<'a, REG>
324where
325 REG: crate::Writable + crate::RegisterSpec,
326 REG::Ux: From<u8>,
327{
328 #[doc = "External Capture 1 Function deactivated"]
329 #[inline(always)]
330 pub fn value1(self) -> &'a mut crate::W<REG> {
331 self.variant(CAP1S_A::VALUE1)
332 }
333 #[doc = "External Capture 1 Function triggered by Event 0"]
334 #[inline(always)]
335 pub fn value2(self) -> &'a mut crate::W<REG> {
336 self.variant(CAP1S_A::VALUE2)
337 }
338 #[doc = "External Capture 1 Function triggered by Event 1"]
339 #[inline(always)]
340 pub fn value3(self) -> &'a mut crate::W<REG> {
341 self.variant(CAP1S_A::VALUE3)
342 }
343 #[doc = "External Capture 1 Function triggered by Event 2"]
344 #[inline(always)]
345 pub fn value4(self) -> &'a mut crate::W<REG> {
346 self.variant(CAP1S_A::VALUE4)
347 }
348}
349#[doc = "External Gate Functionality Selector\n\nValue on reset: 0"]
350#[derive(Clone, Copy, Debug, PartialEq, Eq)]
351#[repr(u8)]
352pub enum GATES_A {
353 #[doc = "0: External Gating Function deactivated"]
354 VALUE1 = 0,
355 #[doc = "1: External Gating Function triggered by Event 0"]
356 VALUE2 = 1,
357 #[doc = "2: External Gating Function triggered by Event 1"]
358 VALUE3 = 2,
359 #[doc = "3: External Gating Function triggered by Event 2"]
360 VALUE4 = 3,
361}
362impl From<GATES_A> for u8 {
363 #[inline(always)]
364 fn from(variant: GATES_A) -> Self {
365 variant as _
366 }
367}
368impl crate::FieldSpec for GATES_A {
369 type Ux = u8;
370}
371impl crate::IsEnum for GATES_A {}
372#[doc = "Field `GATES` reader - External Gate Functionality Selector"]
373pub type GATES_R = crate::FieldReader<GATES_A>;
374impl GATES_R {
375 #[doc = "Get enumerated values variant"]
376 #[inline(always)]
377 pub const fn variant(&self) -> GATES_A {
378 match self.bits {
379 0 => GATES_A::VALUE1,
380 1 => GATES_A::VALUE2,
381 2 => GATES_A::VALUE3,
382 3 => GATES_A::VALUE4,
383 _ => unreachable!(),
384 }
385 }
386 #[doc = "External Gating Function deactivated"]
387 #[inline(always)]
388 pub fn is_value1(&self) -> bool {
389 *self == GATES_A::VALUE1
390 }
391 #[doc = "External Gating Function triggered by Event 0"]
392 #[inline(always)]
393 pub fn is_value2(&self) -> bool {
394 *self == GATES_A::VALUE2
395 }
396 #[doc = "External Gating Function triggered by Event 1"]
397 #[inline(always)]
398 pub fn is_value3(&self) -> bool {
399 *self == GATES_A::VALUE3
400 }
401 #[doc = "External Gating Function triggered by Event 2"]
402 #[inline(always)]
403 pub fn is_value4(&self) -> bool {
404 *self == GATES_A::VALUE4
405 }
406}
407#[doc = "Field `GATES` writer - External Gate Functionality Selector"]
408pub type GATES_W<'a, REG> = crate::FieldWriter<'a, REG, 2, GATES_A, crate::Safe>;
409impl<'a, REG> GATES_W<'a, REG>
410where
411 REG: crate::Writable + crate::RegisterSpec,
412 REG::Ux: From<u8>,
413{
414 #[doc = "External Gating Function deactivated"]
415 #[inline(always)]
416 pub fn value1(self) -> &'a mut crate::W<REG> {
417 self.variant(GATES_A::VALUE1)
418 }
419 #[doc = "External Gating Function triggered by Event 0"]
420 #[inline(always)]
421 pub fn value2(self) -> &'a mut crate::W<REG> {
422 self.variant(GATES_A::VALUE2)
423 }
424 #[doc = "External Gating Function triggered by Event 1"]
425 #[inline(always)]
426 pub fn value3(self) -> &'a mut crate::W<REG> {
427 self.variant(GATES_A::VALUE3)
428 }
429 #[doc = "External Gating Function triggered by Event 2"]
430 #[inline(always)]
431 pub fn value4(self) -> &'a mut crate::W<REG> {
432 self.variant(GATES_A::VALUE4)
433 }
434}
435#[doc = "External Up/Down Functionality Selector\n\nValue on reset: 0"]
436#[derive(Clone, Copy, Debug, PartialEq, Eq)]
437#[repr(u8)]
438pub enum UDS_A {
439 #[doc = "0: External Up/Down Function deactivated"]
440 VALUE1 = 0,
441 #[doc = "1: External Up/Down Function triggered by Event 0"]
442 VALUE2 = 1,
443 #[doc = "2: External Up/Down Function triggered by Event 1"]
444 VALUE3 = 2,
445 #[doc = "3: External Up/Down Function triggered by Event 2"]
446 VALUE4 = 3,
447}
448impl From<UDS_A> for u8 {
449 #[inline(always)]
450 fn from(variant: UDS_A) -> Self {
451 variant as _
452 }
453}
454impl crate::FieldSpec for UDS_A {
455 type Ux = u8;
456}
457impl crate::IsEnum for UDS_A {}
458#[doc = "Field `UDS` reader - External Up/Down Functionality Selector"]
459pub type UDS_R = crate::FieldReader<UDS_A>;
460impl UDS_R {
461 #[doc = "Get enumerated values variant"]
462 #[inline(always)]
463 pub const fn variant(&self) -> UDS_A {
464 match self.bits {
465 0 => UDS_A::VALUE1,
466 1 => UDS_A::VALUE2,
467 2 => UDS_A::VALUE3,
468 3 => UDS_A::VALUE4,
469 _ => unreachable!(),
470 }
471 }
472 #[doc = "External Up/Down Function deactivated"]
473 #[inline(always)]
474 pub fn is_value1(&self) -> bool {
475 *self == UDS_A::VALUE1
476 }
477 #[doc = "External Up/Down Function triggered by Event 0"]
478 #[inline(always)]
479 pub fn is_value2(&self) -> bool {
480 *self == UDS_A::VALUE2
481 }
482 #[doc = "External Up/Down Function triggered by Event 1"]
483 #[inline(always)]
484 pub fn is_value3(&self) -> bool {
485 *self == UDS_A::VALUE3
486 }
487 #[doc = "External Up/Down Function triggered by Event 2"]
488 #[inline(always)]
489 pub fn is_value4(&self) -> bool {
490 *self == UDS_A::VALUE4
491 }
492}
493#[doc = "Field `UDS` writer - External Up/Down Functionality Selector"]
494pub type UDS_W<'a, REG> = crate::FieldWriter<'a, REG, 2, UDS_A, crate::Safe>;
495impl<'a, REG> UDS_W<'a, REG>
496where
497 REG: crate::Writable + crate::RegisterSpec,
498 REG::Ux: From<u8>,
499{
500 #[doc = "External Up/Down Function deactivated"]
501 #[inline(always)]
502 pub fn value1(self) -> &'a mut crate::W<REG> {
503 self.variant(UDS_A::VALUE1)
504 }
505 #[doc = "External Up/Down Function triggered by Event 0"]
506 #[inline(always)]
507 pub fn value2(self) -> &'a mut crate::W<REG> {
508 self.variant(UDS_A::VALUE2)
509 }
510 #[doc = "External Up/Down Function triggered by Event 1"]
511 #[inline(always)]
512 pub fn value3(self) -> &'a mut crate::W<REG> {
513 self.variant(UDS_A::VALUE3)
514 }
515 #[doc = "External Up/Down Function triggered by Event 2"]
516 #[inline(always)]
517 pub fn value4(self) -> &'a mut crate::W<REG> {
518 self.variant(UDS_A::VALUE4)
519 }
520}
521#[doc = "Field `LDS` reader - External Timer Load Functionality Selector"]
522pub type LDS_R = crate::FieldReader;
523#[doc = "Field `LDS` writer - External Timer Load Functionality Selector"]
524pub type LDS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
525#[doc = "External Count Selector\n\nValue on reset: 0"]
526#[derive(Clone, Copy, Debug, PartialEq, Eq)]
527#[repr(u8)]
528pub enum CNTS_A {
529 #[doc = "0: External Count Function deactivated"]
530 VALUE1 = 0,
531 #[doc = "1: External Count Function triggered by Event 0"]
532 VALUE2 = 1,
533 #[doc = "2: External Count Function triggered by Event 1"]
534 VALUE3 = 2,
535 #[doc = "3: External Count Function triggered by Event 2"]
536 VALUE4 = 3,
537}
538impl From<CNTS_A> for u8 {
539 #[inline(always)]
540 fn from(variant: CNTS_A) -> Self {
541 variant as _
542 }
543}
544impl crate::FieldSpec for CNTS_A {
545 type Ux = u8;
546}
547impl crate::IsEnum for CNTS_A {}
548#[doc = "Field `CNTS` reader - External Count Selector"]
549pub type CNTS_R = crate::FieldReader<CNTS_A>;
550impl CNTS_R {
551 #[doc = "Get enumerated values variant"]
552 #[inline(always)]
553 pub const fn variant(&self) -> CNTS_A {
554 match self.bits {
555 0 => CNTS_A::VALUE1,
556 1 => CNTS_A::VALUE2,
557 2 => CNTS_A::VALUE3,
558 3 => CNTS_A::VALUE4,
559 _ => unreachable!(),
560 }
561 }
562 #[doc = "External Count Function deactivated"]
563 #[inline(always)]
564 pub fn is_value1(&self) -> bool {
565 *self == CNTS_A::VALUE1
566 }
567 #[doc = "External Count Function triggered by Event 0"]
568 #[inline(always)]
569 pub fn is_value2(&self) -> bool {
570 *self == CNTS_A::VALUE2
571 }
572 #[doc = "External Count Function triggered by Event 1"]
573 #[inline(always)]
574 pub fn is_value3(&self) -> bool {
575 *self == CNTS_A::VALUE3
576 }
577 #[doc = "External Count Function triggered by Event 2"]
578 #[inline(always)]
579 pub fn is_value4(&self) -> bool {
580 *self == CNTS_A::VALUE4
581 }
582}
583#[doc = "Field `CNTS` writer - External Count Selector"]
584pub type CNTS_W<'a, REG> = crate::FieldWriter<'a, REG, 2, CNTS_A, crate::Safe>;
585impl<'a, REG> CNTS_W<'a, REG>
586where
587 REG: crate::Writable + crate::RegisterSpec,
588 REG::Ux: From<u8>,
589{
590 #[doc = "External Count Function deactivated"]
591 #[inline(always)]
592 pub fn value1(self) -> &'a mut crate::W<REG> {
593 self.variant(CNTS_A::VALUE1)
594 }
595 #[doc = "External Count Function triggered by Event 0"]
596 #[inline(always)]
597 pub fn value2(self) -> &'a mut crate::W<REG> {
598 self.variant(CNTS_A::VALUE2)
599 }
600 #[doc = "External Count Function triggered by Event 1"]
601 #[inline(always)]
602 pub fn value3(self) -> &'a mut crate::W<REG> {
603 self.variant(CNTS_A::VALUE3)
604 }
605 #[doc = "External Count Function triggered by Event 2"]
606 #[inline(always)]
607 pub fn value4(self) -> &'a mut crate::W<REG> {
608 self.variant(CNTS_A::VALUE4)
609 }
610}
611#[doc = "Override Function Selector\n\nValue on reset: 0"]
612#[derive(Clone, Copy, Debug, PartialEq, Eq)]
613pub enum OFS_A {
614 #[doc = "0: Override functionality disabled"]
615 VALUE1 = 0,
616 #[doc = "1: Status bit trigger override connected to Event 1; Status bit value override connected to Event 2"]
617 VALUE2 = 1,
618}
619impl From<OFS_A> for bool {
620 #[inline(always)]
621 fn from(variant: OFS_A) -> Self {
622 variant as u8 != 0
623 }
624}
625#[doc = "Field `OFS` reader - Override Function Selector"]
626pub type OFS_R = crate::BitReader<OFS_A>;
627impl OFS_R {
628 #[doc = "Get enumerated values variant"]
629 #[inline(always)]
630 pub const fn variant(&self) -> OFS_A {
631 match self.bits {
632 false => OFS_A::VALUE1,
633 true => OFS_A::VALUE2,
634 }
635 }
636 #[doc = "Override functionality disabled"]
637 #[inline(always)]
638 pub fn is_value1(&self) -> bool {
639 *self == OFS_A::VALUE1
640 }
641 #[doc = "Status bit trigger override connected to Event 1; Status bit value override connected to Event 2"]
642 #[inline(always)]
643 pub fn is_value2(&self) -> bool {
644 *self == OFS_A::VALUE2
645 }
646}
647#[doc = "Field `OFS` writer - Override Function Selector"]
648pub type OFS_W<'a, REG> = crate::BitWriter<'a, REG, OFS_A>;
649impl<'a, REG> OFS_W<'a, REG>
650where
651 REG: crate::Writable + crate::RegisterSpec,
652{
653 #[doc = "Override functionality disabled"]
654 #[inline(always)]
655 pub fn value1(self) -> &'a mut crate::W<REG> {
656 self.variant(OFS_A::VALUE1)
657 }
658 #[doc = "Status bit trigger override connected to Event 1; Status bit value override connected to Event 2"]
659 #[inline(always)]
660 pub fn value2(self) -> &'a mut crate::W<REG> {
661 self.variant(OFS_A::VALUE2)
662 }
663}
664#[doc = "Trap Function Selector\n\nValue on reset: 0"]
665#[derive(Clone, Copy, Debug, PartialEq, Eq)]
666pub enum TS_A {
667 #[doc = "0: Trap function disabled"]
668 VALUE1 = 0,
669 #[doc = "1: TRAP function connected to Event 2"]
670 VALUE2 = 1,
671}
672impl From<TS_A> for bool {
673 #[inline(always)]
674 fn from(variant: TS_A) -> Self {
675 variant as u8 != 0
676 }
677}
678#[doc = "Field `TS` reader - Trap Function Selector"]
679pub type TS_R = crate::BitReader<TS_A>;
680impl TS_R {
681 #[doc = "Get enumerated values variant"]
682 #[inline(always)]
683 pub const fn variant(&self) -> TS_A {
684 match self.bits {
685 false => TS_A::VALUE1,
686 true => TS_A::VALUE2,
687 }
688 }
689 #[doc = "Trap function disabled"]
690 #[inline(always)]
691 pub fn is_value1(&self) -> bool {
692 *self == TS_A::VALUE1
693 }
694 #[doc = "TRAP function connected to Event 2"]
695 #[inline(always)]
696 pub fn is_value2(&self) -> bool {
697 *self == TS_A::VALUE2
698 }
699}
700#[doc = "Field `TS` writer - Trap Function Selector"]
701pub type TS_W<'a, REG> = crate::BitWriter<'a, REG, TS_A>;
702impl<'a, REG> TS_W<'a, REG>
703where
704 REG: crate::Writable + crate::RegisterSpec,
705{
706 #[doc = "Trap function disabled"]
707 #[inline(always)]
708 pub fn value1(self) -> &'a mut crate::W<REG> {
709 self.variant(TS_A::VALUE1)
710 }
711 #[doc = "TRAP function connected to Event 2"]
712 #[inline(always)]
713 pub fn value2(self) -> &'a mut crate::W<REG> {
714 self.variant(TS_A::VALUE2)
715 }
716}
717#[doc = "Field `MOS` reader - External Modulation Functionality Selector"]
718pub type MOS_R = crate::FieldReader;
719#[doc = "Field `MOS` writer - External Modulation Functionality Selector"]
720pub type MOS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
721#[doc = "Timer Concatenation Enable\n\nValue on reset: 0"]
722#[derive(Clone, Copy, Debug, PartialEq, Eq)]
723pub enum TCE_A {
724 #[doc = "0: Timer concatenation is disabled"]
725 VALUE1 = 0,
726 #[doc = "1: Timer concatenation is enabled"]
727 VALUE2 = 1,
728}
729impl From<TCE_A> for bool {
730 #[inline(always)]
731 fn from(variant: TCE_A) -> Self {
732 variant as u8 != 0
733 }
734}
735#[doc = "Field `TCE` reader - Timer Concatenation Enable"]
736pub type TCE_R = crate::BitReader<TCE_A>;
737impl TCE_R {
738 #[doc = "Get enumerated values variant"]
739 #[inline(always)]
740 pub const fn variant(&self) -> TCE_A {
741 match self.bits {
742 false => TCE_A::VALUE1,
743 true => TCE_A::VALUE2,
744 }
745 }
746 #[doc = "Timer concatenation is disabled"]
747 #[inline(always)]
748 pub fn is_value1(&self) -> bool {
749 *self == TCE_A::VALUE1
750 }
751 #[doc = "Timer concatenation is enabled"]
752 #[inline(always)]
753 pub fn is_value2(&self) -> bool {
754 *self == TCE_A::VALUE2
755 }
756}
757#[doc = "Field `TCE` writer - Timer Concatenation Enable"]
758pub type TCE_W<'a, REG> = crate::BitWriter<'a, REG, TCE_A>;
759impl<'a, REG> TCE_W<'a, REG>
760where
761 REG: crate::Writable + crate::RegisterSpec,
762{
763 #[doc = "Timer concatenation is disabled"]
764 #[inline(always)]
765 pub fn value1(self) -> &'a mut crate::W<REG> {
766 self.variant(TCE_A::VALUE1)
767 }
768 #[doc = "Timer concatenation is enabled"]
769 #[inline(always)]
770 pub fn value2(self) -> &'a mut crate::W<REG> {
771 self.variant(TCE_A::VALUE2)
772 }
773}
774impl R {
775 #[doc = "Bits 0:1 - External Start Functionality Selector"]
776 #[inline(always)]
777 pub fn strts(&self) -> STRTS_R {
778 STRTS_R::new((self.bits & 3) as u8)
779 }
780 #[doc = "Bits 2:3 - External Stop Functionality Selector"]
781 #[inline(always)]
782 pub fn ends(&self) -> ENDS_R {
783 ENDS_R::new(((self.bits >> 2) & 3) as u8)
784 }
785 #[doc = "Bits 4:5 - External Capture 0 Functionality Selector"]
786 #[inline(always)]
787 pub fn cap0s(&self) -> CAP0S_R {
788 CAP0S_R::new(((self.bits >> 4) & 3) as u8)
789 }
790 #[doc = "Bits 6:7 - External Capture 1 Functionality Selector"]
791 #[inline(always)]
792 pub fn cap1s(&self) -> CAP1S_R {
793 CAP1S_R::new(((self.bits >> 6) & 3) as u8)
794 }
795 #[doc = "Bits 8:9 - External Gate Functionality Selector"]
796 #[inline(always)]
797 pub fn gates(&self) -> GATES_R {
798 GATES_R::new(((self.bits >> 8) & 3) as u8)
799 }
800 #[doc = "Bits 10:11 - External Up/Down Functionality Selector"]
801 #[inline(always)]
802 pub fn uds(&self) -> UDS_R {
803 UDS_R::new(((self.bits >> 10) & 3) as u8)
804 }
805 #[doc = "Bits 12:13 - External Timer Load Functionality Selector"]
806 #[inline(always)]
807 pub fn lds(&self) -> LDS_R {
808 LDS_R::new(((self.bits >> 12) & 3) as u8)
809 }
810 #[doc = "Bits 14:15 - External Count Selector"]
811 #[inline(always)]
812 pub fn cnts(&self) -> CNTS_R {
813 CNTS_R::new(((self.bits >> 14) & 3) as u8)
814 }
815 #[doc = "Bit 16 - Override Function Selector"]
816 #[inline(always)]
817 pub fn ofs(&self) -> OFS_R {
818 OFS_R::new(((self.bits >> 16) & 1) != 0)
819 }
820 #[doc = "Bit 17 - Trap Function Selector"]
821 #[inline(always)]
822 pub fn ts(&self) -> TS_R {
823 TS_R::new(((self.bits >> 17) & 1) != 0)
824 }
825 #[doc = "Bits 18:19 - External Modulation Functionality Selector"]
826 #[inline(always)]
827 pub fn mos(&self) -> MOS_R {
828 MOS_R::new(((self.bits >> 18) & 3) as u8)
829 }
830 #[doc = "Bit 20 - Timer Concatenation Enable"]
831 #[inline(always)]
832 pub fn tce(&self) -> TCE_R {
833 TCE_R::new(((self.bits >> 20) & 1) != 0)
834 }
835}
836impl W {
837 #[doc = "Bits 0:1 - External Start Functionality Selector"]
838 #[inline(always)]
839 pub fn strts(&mut self) -> STRTS_W<CMC_SPEC> {
840 STRTS_W::new(self, 0)
841 }
842 #[doc = "Bits 2:3 - External Stop Functionality Selector"]
843 #[inline(always)]
844 pub fn ends(&mut self) -> ENDS_W<CMC_SPEC> {
845 ENDS_W::new(self, 2)
846 }
847 #[doc = "Bits 4:5 - External Capture 0 Functionality Selector"]
848 #[inline(always)]
849 pub fn cap0s(&mut self) -> CAP0S_W<CMC_SPEC> {
850 CAP0S_W::new(self, 4)
851 }
852 #[doc = "Bits 6:7 - External Capture 1 Functionality Selector"]
853 #[inline(always)]
854 pub fn cap1s(&mut self) -> CAP1S_W<CMC_SPEC> {
855 CAP1S_W::new(self, 6)
856 }
857 #[doc = "Bits 8:9 - External Gate Functionality Selector"]
858 #[inline(always)]
859 pub fn gates(&mut self) -> GATES_W<CMC_SPEC> {
860 GATES_W::new(self, 8)
861 }
862 #[doc = "Bits 10:11 - External Up/Down Functionality Selector"]
863 #[inline(always)]
864 pub fn uds(&mut self) -> UDS_W<CMC_SPEC> {
865 UDS_W::new(self, 10)
866 }
867 #[doc = "Bits 12:13 - External Timer Load Functionality Selector"]
868 #[inline(always)]
869 pub fn lds(&mut self) -> LDS_W<CMC_SPEC> {
870 LDS_W::new(self, 12)
871 }
872 #[doc = "Bits 14:15 - External Count Selector"]
873 #[inline(always)]
874 pub fn cnts(&mut self) -> CNTS_W<CMC_SPEC> {
875 CNTS_W::new(self, 14)
876 }
877 #[doc = "Bit 16 - Override Function Selector"]
878 #[inline(always)]
879 pub fn ofs(&mut self) -> OFS_W<CMC_SPEC> {
880 OFS_W::new(self, 16)
881 }
882 #[doc = "Bit 17 - Trap Function Selector"]
883 #[inline(always)]
884 pub fn ts(&mut self) -> TS_W<CMC_SPEC> {
885 TS_W::new(self, 17)
886 }
887 #[doc = "Bits 18:19 - External Modulation Functionality Selector"]
888 #[inline(always)]
889 pub fn mos(&mut self) -> MOS_W<CMC_SPEC> {
890 MOS_W::new(self, 18)
891 }
892 #[doc = "Bit 20 - Timer Concatenation Enable"]
893 #[inline(always)]
894 pub fn tce(&mut self) -> TCE_W<CMC_SPEC> {
895 TCE_W::new(self, 20)
896 }
897}
898#[doc = "Connection Matrix Control\n\nYou can [`read`](crate::Reg::read) this register and get [`cmc::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmc::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
899pub struct CMC_SPEC;
900impl crate::RegisterSpec for CMC_SPEC {
901 type Ux = u32;
902}
903#[doc = "`read()` method returns [`cmc::R`](R) reader structure"]
904impl crate::Readable for CMC_SPEC {}
905#[doc = "`write(|w| ..)` method takes [`cmc::W`](W) writer structure"]
906impl crate::Writable for CMC_SPEC {
907 type Safety = crate::Unsafe;
908 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
909 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
910}
911#[doc = "`reset()` method sets CMC to value 0"]
912impl crate::Resettable for CMC_SPEC {
913 const RESET_VALUE: u32 = 0;
914}