1#[doc = "Register `TC` reader"]
2pub type R = crate::R<TC_SPEC>;
3#[doc = "Register `TC` writer"]
4pub type W = crate::W<TC_SPEC>;
5#[doc = "Timer Counting Mode\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7pub enum TCM_A {
8 #[doc = "0: Edge aligned mode"]
9 VALUE1 = 0,
10 #[doc = "1: Center aligned mode"]
11 VALUE2 = 1,
12}
13impl From<TCM_A> for bool {
14 #[inline(always)]
15 fn from(variant: TCM_A) -> Self {
16 variant as u8 != 0
17 }
18}
19#[doc = "Field `TCM` reader - Timer Counting Mode"]
20pub type TCM_R = crate::BitReader<TCM_A>;
21impl TCM_R {
22 #[doc = "Get enumerated values variant"]
23 #[inline(always)]
24 pub const fn variant(&self) -> TCM_A {
25 match self.bits {
26 false => TCM_A::VALUE1,
27 true => TCM_A::VALUE2,
28 }
29 }
30 #[doc = "Edge aligned mode"]
31 #[inline(always)]
32 pub fn is_value1(&self) -> bool {
33 *self == TCM_A::VALUE1
34 }
35 #[doc = "Center aligned mode"]
36 #[inline(always)]
37 pub fn is_value2(&self) -> bool {
38 *self == TCM_A::VALUE2
39 }
40}
41#[doc = "Field `TCM` writer - Timer Counting Mode"]
42pub type TCM_W<'a, REG> = crate::BitWriter<'a, REG, TCM_A>;
43impl<'a, REG> TCM_W<'a, REG>
44where
45 REG: crate::Writable + crate::RegisterSpec,
46{
47 #[doc = "Edge aligned mode"]
48 #[inline(always)]
49 pub fn value1(self) -> &'a mut crate::W<REG> {
50 self.variant(TCM_A::VALUE1)
51 }
52 #[doc = "Center aligned mode"]
53 #[inline(always)]
54 pub fn value2(self) -> &'a mut crate::W<REG> {
55 self.variant(TCM_A::VALUE2)
56 }
57}
58#[doc = "Timer Single Shot Mode\n\nValue on reset: 0"]
59#[derive(Clone, Copy, Debug, PartialEq, Eq)]
60pub enum TSSM_A {
61 #[doc = "0: Single shot mode is disabled"]
62 VALUE1 = 0,
63 #[doc = "1: Single shot mode is enabled"]
64 VALUE2 = 1,
65}
66impl From<TSSM_A> for bool {
67 #[inline(always)]
68 fn from(variant: TSSM_A) -> Self {
69 variant as u8 != 0
70 }
71}
72#[doc = "Field `TSSM` reader - Timer Single Shot Mode"]
73pub type TSSM_R = crate::BitReader<TSSM_A>;
74impl TSSM_R {
75 #[doc = "Get enumerated values variant"]
76 #[inline(always)]
77 pub const fn variant(&self) -> TSSM_A {
78 match self.bits {
79 false => TSSM_A::VALUE1,
80 true => TSSM_A::VALUE2,
81 }
82 }
83 #[doc = "Single shot mode is disabled"]
84 #[inline(always)]
85 pub fn is_value1(&self) -> bool {
86 *self == TSSM_A::VALUE1
87 }
88 #[doc = "Single shot mode is enabled"]
89 #[inline(always)]
90 pub fn is_value2(&self) -> bool {
91 *self == TSSM_A::VALUE2
92 }
93}
94#[doc = "Field `TSSM` writer - Timer Single Shot Mode"]
95pub type TSSM_W<'a, REG> = crate::BitWriter<'a, REG, TSSM_A>;
96impl<'a, REG> TSSM_W<'a, REG>
97where
98 REG: crate::Writable + crate::RegisterSpec,
99{
100 #[doc = "Single shot mode is disabled"]
101 #[inline(always)]
102 pub fn value1(self) -> &'a mut crate::W<REG> {
103 self.variant(TSSM_A::VALUE1)
104 }
105 #[doc = "Single shot mode is enabled"]
106 #[inline(always)]
107 pub fn value2(self) -> &'a mut crate::W<REG> {
108 self.variant(TSSM_A::VALUE2)
109 }
110}
111#[doc = "Field `CLST` reader - Shadow Transfer on Clear"]
112pub type CLST_R = crate::BitReader;
113#[doc = "Field `CLST` writer - Shadow Transfer on Clear"]
114pub type CLST_W<'a, REG> = crate::BitWriter<'a, REG>;
115#[doc = "Capture Compare Mode\n\nValue on reset: 0"]
116#[derive(Clone, Copy, Debug, PartialEq, Eq)]
117pub enum CMOD_A {
118 #[doc = "0: Compare Mode"]
119 VALUE1 = 0,
120 #[doc = "1: Capture Mode"]
121 VALUE2 = 1,
122}
123impl From<CMOD_A> for bool {
124 #[inline(always)]
125 fn from(variant: CMOD_A) -> Self {
126 variant as u8 != 0
127 }
128}
129#[doc = "Field `CMOD` reader - Capture Compare Mode"]
130pub type CMOD_R = crate::BitReader<CMOD_A>;
131impl CMOD_R {
132 #[doc = "Get enumerated values variant"]
133 #[inline(always)]
134 pub const fn variant(&self) -> CMOD_A {
135 match self.bits {
136 false => CMOD_A::VALUE1,
137 true => CMOD_A::VALUE2,
138 }
139 }
140 #[doc = "Compare Mode"]
141 #[inline(always)]
142 pub fn is_value1(&self) -> bool {
143 *self == CMOD_A::VALUE1
144 }
145 #[doc = "Capture Mode"]
146 #[inline(always)]
147 pub fn is_value2(&self) -> bool {
148 *self == CMOD_A::VALUE2
149 }
150}
151#[doc = "Extended Capture Mode\n\nValue on reset: 0"]
152#[derive(Clone, Copy, Debug, PartialEq, Eq)]
153pub enum ECM_A {
154 #[doc = "0: Normal Capture Mode. Clear of the Full Flag of each capture register is done by accessing the registers individually only."]
155 VALUE1 = 0,
156 #[doc = "1: Extended Capture Mode. Clear of the Full Flag of each capture register is done not only by accessing the individual registers but also by accessing the ECRD register. When reading the ECRD register, only the capture register register full flag pointed by the ECRD.VPTR is cleared."]
157 VALUE2 = 1,
158}
159impl From<ECM_A> for bool {
160 #[inline(always)]
161 fn from(variant: ECM_A) -> Self {
162 variant as u8 != 0
163 }
164}
165#[doc = "Field `ECM` reader - Extended Capture Mode"]
166pub type ECM_R = crate::BitReader<ECM_A>;
167impl ECM_R {
168 #[doc = "Get enumerated values variant"]
169 #[inline(always)]
170 pub const fn variant(&self) -> ECM_A {
171 match self.bits {
172 false => ECM_A::VALUE1,
173 true => ECM_A::VALUE2,
174 }
175 }
176 #[doc = "Normal Capture Mode. Clear of the Full Flag of each capture register is done by accessing the registers individually only."]
177 #[inline(always)]
178 pub fn is_value1(&self) -> bool {
179 *self == ECM_A::VALUE1
180 }
181 #[doc = "Extended Capture Mode. Clear of the Full Flag of each capture register is done not only by accessing the individual registers but also by accessing the ECRD register. When reading the ECRD register, only the capture register register full flag pointed by the ECRD.VPTR is cleared."]
182 #[inline(always)]
183 pub fn is_value2(&self) -> bool {
184 *self == ECM_A::VALUE2
185 }
186}
187#[doc = "Field `ECM` writer - Extended Capture Mode"]
188pub type ECM_W<'a, REG> = crate::BitWriter<'a, REG, ECM_A>;
189impl<'a, REG> ECM_W<'a, REG>
190where
191 REG: crate::Writable + crate::RegisterSpec,
192{
193 #[doc = "Normal Capture Mode. Clear of the Full Flag of each capture register is done by accessing the registers individually only."]
194 #[inline(always)]
195 pub fn value1(self) -> &'a mut crate::W<REG> {
196 self.variant(ECM_A::VALUE1)
197 }
198 #[doc = "Extended Capture Mode. Clear of the Full Flag of each capture register is done not only by accessing the individual registers but also by accessing the ECRD register. When reading the ECRD register, only the capture register register full flag pointed by the ECRD.VPTR is cleared."]
199 #[inline(always)]
200 pub fn value2(self) -> &'a mut crate::W<REG> {
201 self.variant(ECM_A::VALUE2)
202 }
203}
204#[doc = "Clear on Capture Control\n\nValue on reset: 0"]
205#[derive(Clone, Copy, Debug, PartialEq, Eq)]
206#[repr(u8)]
207pub enum CAPC_A {
208 #[doc = "0: Timer is never cleared on a capture event"]
209 VALUE1 = 0,
210 #[doc = "1: Timer is cleared on a capture event into capture registers 2 and 3. (When SCE = 1#, Timer is always cleared in a capture event)"]
211 VALUE2 = 1,
212 #[doc = "2: Timer is cleared on a capture event into capture registers 0 and 1. (When SCE = 1#, Timer is always cleared in a capture event)"]
213 VALUE3 = 2,
214 #[doc = "3: Timer is always cleared in a capture event."]
215 VALUE4 = 3,
216}
217impl From<CAPC_A> for u8 {
218 #[inline(always)]
219 fn from(variant: CAPC_A) -> Self {
220 variant as _
221 }
222}
223impl crate::FieldSpec for CAPC_A {
224 type Ux = u8;
225}
226impl crate::IsEnum for CAPC_A {}
227#[doc = "Field `CAPC` reader - Clear on Capture Control"]
228pub type CAPC_R = crate::FieldReader<CAPC_A>;
229impl CAPC_R {
230 #[doc = "Get enumerated values variant"]
231 #[inline(always)]
232 pub const fn variant(&self) -> CAPC_A {
233 match self.bits {
234 0 => CAPC_A::VALUE1,
235 1 => CAPC_A::VALUE2,
236 2 => CAPC_A::VALUE3,
237 3 => CAPC_A::VALUE4,
238 _ => unreachable!(),
239 }
240 }
241 #[doc = "Timer is never cleared on a capture event"]
242 #[inline(always)]
243 pub fn is_value1(&self) -> bool {
244 *self == CAPC_A::VALUE1
245 }
246 #[doc = "Timer is cleared on a capture event into capture registers 2 and 3. (When SCE = 1#, Timer is always cleared in a capture event)"]
247 #[inline(always)]
248 pub fn is_value2(&self) -> bool {
249 *self == CAPC_A::VALUE2
250 }
251 #[doc = "Timer is cleared on a capture event into capture registers 0 and 1. (When SCE = 1#, Timer is always cleared in a capture event)"]
252 #[inline(always)]
253 pub fn is_value3(&self) -> bool {
254 *self == CAPC_A::VALUE3
255 }
256 #[doc = "Timer is always cleared in a capture event."]
257 #[inline(always)]
258 pub fn is_value4(&self) -> bool {
259 *self == CAPC_A::VALUE4
260 }
261}
262#[doc = "Field `CAPC` writer - Clear on Capture Control"]
263pub type CAPC_W<'a, REG> = crate::FieldWriter<'a, REG, 2, CAPC_A, crate::Safe>;
264impl<'a, REG> CAPC_W<'a, REG>
265where
266 REG: crate::Writable + crate::RegisterSpec,
267 REG::Ux: From<u8>,
268{
269 #[doc = "Timer is never cleared on a capture event"]
270 #[inline(always)]
271 pub fn value1(self) -> &'a mut crate::W<REG> {
272 self.variant(CAPC_A::VALUE1)
273 }
274 #[doc = "Timer is cleared on a capture event into capture registers 2 and 3. (When SCE = 1#, Timer is always cleared in a capture event)"]
275 #[inline(always)]
276 pub fn value2(self) -> &'a mut crate::W<REG> {
277 self.variant(CAPC_A::VALUE2)
278 }
279 #[doc = "Timer is cleared on a capture event into capture registers 0 and 1. (When SCE = 1#, Timer is always cleared in a capture event)"]
280 #[inline(always)]
281 pub fn value3(self) -> &'a mut crate::W<REG> {
282 self.variant(CAPC_A::VALUE3)
283 }
284 #[doc = "Timer is always cleared in a capture event."]
285 #[inline(always)]
286 pub fn value4(self) -> &'a mut crate::W<REG> {
287 self.variant(CAPC_A::VALUE4)
288 }
289}
290#[doc = "Extended Stop Function Control\n\nValue on reset: 0"]
291#[derive(Clone, Copy, Debug, PartialEq, Eq)]
292#[repr(u8)]
293pub enum ENDM_A {
294 #[doc = "0: Clears the timer run bit only (default stop)"]
295 VALUE1 = 0,
296 #[doc = "1: Clears the timer only (flush)"]
297 VALUE2 = 1,
298 #[doc = "2: Clears the timer and run bit (flush/stop)"]
299 VALUE3 = 2,
300}
301impl From<ENDM_A> for u8 {
302 #[inline(always)]
303 fn from(variant: ENDM_A) -> Self {
304 variant as _
305 }
306}
307impl crate::FieldSpec for ENDM_A {
308 type Ux = u8;
309}
310impl crate::IsEnum for ENDM_A {}
311#[doc = "Field `ENDM` reader - Extended Stop Function Control"]
312pub type ENDM_R = crate::FieldReader<ENDM_A>;
313impl ENDM_R {
314 #[doc = "Get enumerated values variant"]
315 #[inline(always)]
316 pub const fn variant(&self) -> Option<ENDM_A> {
317 match self.bits {
318 0 => Some(ENDM_A::VALUE1),
319 1 => Some(ENDM_A::VALUE2),
320 2 => Some(ENDM_A::VALUE3),
321 _ => None,
322 }
323 }
324 #[doc = "Clears the timer run bit only (default stop)"]
325 #[inline(always)]
326 pub fn is_value1(&self) -> bool {
327 *self == ENDM_A::VALUE1
328 }
329 #[doc = "Clears the timer only (flush)"]
330 #[inline(always)]
331 pub fn is_value2(&self) -> bool {
332 *self == ENDM_A::VALUE2
333 }
334 #[doc = "Clears the timer and run bit (flush/stop)"]
335 #[inline(always)]
336 pub fn is_value3(&self) -> bool {
337 *self == ENDM_A::VALUE3
338 }
339}
340#[doc = "Field `ENDM` writer - Extended Stop Function Control"]
341pub type ENDM_W<'a, REG> = crate::FieldWriter<'a, REG, 2, ENDM_A>;
342impl<'a, REG> ENDM_W<'a, REG>
343where
344 REG: crate::Writable + crate::RegisterSpec,
345 REG::Ux: From<u8>,
346{
347 #[doc = "Clears the timer run bit only (default stop)"]
348 #[inline(always)]
349 pub fn value1(self) -> &'a mut crate::W<REG> {
350 self.variant(ENDM_A::VALUE1)
351 }
352 #[doc = "Clears the timer only (flush)"]
353 #[inline(always)]
354 pub fn value2(self) -> &'a mut crate::W<REG> {
355 self.variant(ENDM_A::VALUE2)
356 }
357 #[doc = "Clears the timer and run bit (flush/stop)"]
358 #[inline(always)]
359 pub fn value3(self) -> &'a mut crate::W<REG> {
360 self.variant(ENDM_A::VALUE3)
361 }
362}
363#[doc = "Extended Start Function Control\n\nValue on reset: 0"]
364#[derive(Clone, Copy, Debug, PartialEq, Eq)]
365pub enum STRM_A {
366 #[doc = "0: Sets run bit only (default start)"]
367 VALUE1 = 0,
368 #[doc = "1: Clears the timer and sets run bit (flush/start)"]
369 VALUE2 = 1,
370}
371impl From<STRM_A> for bool {
372 #[inline(always)]
373 fn from(variant: STRM_A) -> Self {
374 variant as u8 != 0
375 }
376}
377#[doc = "Field `STRM` reader - Extended Start Function Control"]
378pub type STRM_R = crate::BitReader<STRM_A>;
379impl STRM_R {
380 #[doc = "Get enumerated values variant"]
381 #[inline(always)]
382 pub const fn variant(&self) -> STRM_A {
383 match self.bits {
384 false => STRM_A::VALUE1,
385 true => STRM_A::VALUE2,
386 }
387 }
388 #[doc = "Sets run bit only (default start)"]
389 #[inline(always)]
390 pub fn is_value1(&self) -> bool {
391 *self == STRM_A::VALUE1
392 }
393 #[doc = "Clears the timer and sets run bit (flush/start)"]
394 #[inline(always)]
395 pub fn is_value2(&self) -> bool {
396 *self == STRM_A::VALUE2
397 }
398}
399#[doc = "Field `STRM` writer - Extended Start Function Control"]
400pub type STRM_W<'a, REG> = crate::BitWriter<'a, REG, STRM_A>;
401impl<'a, REG> STRM_W<'a, REG>
402where
403 REG: crate::Writable + crate::RegisterSpec,
404{
405 #[doc = "Sets run bit only (default start)"]
406 #[inline(always)]
407 pub fn value1(self) -> &'a mut crate::W<REG> {
408 self.variant(STRM_A::VALUE1)
409 }
410 #[doc = "Clears the timer and sets run bit (flush/start)"]
411 #[inline(always)]
412 pub fn value2(self) -> &'a mut crate::W<REG> {
413 self.variant(STRM_A::VALUE2)
414 }
415}
416#[doc = "Equal Capture Event enable\n\nValue on reset: 0"]
417#[derive(Clone, Copy, Debug, PartialEq, Eq)]
418pub enum SCE_A {
419 #[doc = "0: Capture into CC4yC0VThis register contains the values associated with the Capture 0 field./CC4yC1VThis register contains the values associated with the Capture 1 field. registers control by CCycapt0 and capture into CC4yC3VThis register contains the values associated with the Capture 3 field./CC4yC2VThis register contains the values associated with the Capture 2 field. control by CCycapt1"]
420 VALUE1 = 0,
421 #[doc = "1: Capture into CC4yC0VThis register contains the values associated with the Capture 0 field./CC4yC1VThis register contains the values associated with the Capture 1 field. and CC4yC3VThis register contains the values associated with the Capture 3 field./CC4yC2VThis register contains the values associated with the Capture 2 field. control by CCycapt1"]
422 VALUE2 = 1,
423}
424impl From<SCE_A> for bool {
425 #[inline(always)]
426 fn from(variant: SCE_A) -> Self {
427 variant as u8 != 0
428 }
429}
430#[doc = "Field `SCE` reader - Equal Capture Event enable"]
431pub type SCE_R = crate::BitReader<SCE_A>;
432impl SCE_R {
433 #[doc = "Get enumerated values variant"]
434 #[inline(always)]
435 pub const fn variant(&self) -> SCE_A {
436 match self.bits {
437 false => SCE_A::VALUE1,
438 true => SCE_A::VALUE2,
439 }
440 }
441 #[doc = "Capture into CC4yC0VThis register contains the values associated with the Capture 0 field./CC4yC1VThis register contains the values associated with the Capture 1 field. registers control by CCycapt0 and capture into CC4yC3VThis register contains the values associated with the Capture 3 field./CC4yC2VThis register contains the values associated with the Capture 2 field. control by CCycapt1"]
442 #[inline(always)]
443 pub fn is_value1(&self) -> bool {
444 *self == SCE_A::VALUE1
445 }
446 #[doc = "Capture into CC4yC0VThis register contains the values associated with the Capture 0 field./CC4yC1VThis register contains the values associated with the Capture 1 field. and CC4yC3VThis register contains the values associated with the Capture 3 field./CC4yC2VThis register contains the values associated with the Capture 2 field. control by CCycapt1"]
447 #[inline(always)]
448 pub fn is_value2(&self) -> bool {
449 *self == SCE_A::VALUE2
450 }
451}
452#[doc = "Field `SCE` writer - Equal Capture Event enable"]
453pub type SCE_W<'a, REG> = crate::BitWriter<'a, REG, SCE_A>;
454impl<'a, REG> SCE_W<'a, REG>
455where
456 REG: crate::Writable + crate::RegisterSpec,
457{
458 #[doc = "Capture into CC4yC0VThis register contains the values associated with the Capture 0 field./CC4yC1VThis register contains the values associated with the Capture 1 field. registers control by CCycapt0 and capture into CC4yC3VThis register contains the values associated with the Capture 3 field./CC4yC2VThis register contains the values associated with the Capture 2 field. control by CCycapt1"]
459 #[inline(always)]
460 pub fn value1(self) -> &'a mut crate::W<REG> {
461 self.variant(SCE_A::VALUE1)
462 }
463 #[doc = "Capture into CC4yC0VThis register contains the values associated with the Capture 0 field./CC4yC1VThis register contains the values associated with the Capture 1 field. and CC4yC3VThis register contains the values associated with the Capture 3 field./CC4yC2VThis register contains the values associated with the Capture 2 field. control by CCycapt1"]
464 #[inline(always)]
465 pub fn value2(self) -> &'a mut crate::W<REG> {
466 self.variant(SCE_A::VALUE2)
467 }
468}
469#[doc = "Continuous Capture Enable\n\nValue on reset: 0"]
470#[derive(Clone, Copy, Debug, PartialEq, Eq)]
471pub enum CCS_A {
472 #[doc = "0: The capture into a specific capture register is done with the rules linked with the full flags, described at ."]
473 VALUE1 = 0,
474 #[doc = "1: The capture into the capture registers is always done regardless of the full flag status (even if the register has not been read back)."]
475 VALUE2 = 1,
476}
477impl From<CCS_A> for bool {
478 #[inline(always)]
479 fn from(variant: CCS_A) -> Self {
480 variant as u8 != 0
481 }
482}
483#[doc = "Field `CCS` reader - Continuous Capture Enable"]
484pub type CCS_R = crate::BitReader<CCS_A>;
485impl CCS_R {
486 #[doc = "Get enumerated values variant"]
487 #[inline(always)]
488 pub const fn variant(&self) -> CCS_A {
489 match self.bits {
490 false => CCS_A::VALUE1,
491 true => CCS_A::VALUE2,
492 }
493 }
494 #[doc = "The capture into a specific capture register is done with the rules linked with the full flags, described at ."]
495 #[inline(always)]
496 pub fn is_value1(&self) -> bool {
497 *self == CCS_A::VALUE1
498 }
499 #[doc = "The capture into the capture registers is always done regardless of the full flag status (even if the register has not been read back)."]
500 #[inline(always)]
501 pub fn is_value2(&self) -> bool {
502 *self == CCS_A::VALUE2
503 }
504}
505#[doc = "Field `CCS` writer - Continuous Capture Enable"]
506pub type CCS_W<'a, REG> = crate::BitWriter<'a, REG, CCS_A>;
507impl<'a, REG> CCS_W<'a, REG>
508where
509 REG: crate::Writable + crate::RegisterSpec,
510{
511 #[doc = "The capture into a specific capture register is done with the rules linked with the full flags, described at ."]
512 #[inline(always)]
513 pub fn value1(self) -> &'a mut crate::W<REG> {
514 self.variant(CCS_A::VALUE1)
515 }
516 #[doc = "The capture into the capture registers is always done regardless of the full flag status (even if the register has not been read back)."]
517 #[inline(always)]
518 pub fn value2(self) -> &'a mut crate::W<REG> {
519 self.variant(CCS_A::VALUE2)
520 }
521}
522#[doc = "Dither Enable\n\nValue on reset: 0"]
523#[derive(Clone, Copy, Debug, PartialEq, Eq)]
524#[repr(u8)]
525pub enum DITHE_A {
526 #[doc = "0: Dither is disabled"]
527 VALUE1 = 0,
528 #[doc = "1: Dither is applied to the Period"]
529 VALUE2 = 1,
530 #[doc = "2: Dither is applied to the Compare"]
531 VALUE3 = 2,
532 #[doc = "3: Dither is applied to the Period and Compare"]
533 VALUE4 = 3,
534}
535impl From<DITHE_A> for u8 {
536 #[inline(always)]
537 fn from(variant: DITHE_A) -> Self {
538 variant as _
539 }
540}
541impl crate::FieldSpec for DITHE_A {
542 type Ux = u8;
543}
544impl crate::IsEnum for DITHE_A {}
545#[doc = "Field `DITHE` reader - Dither Enable"]
546pub type DITHE_R = crate::FieldReader<DITHE_A>;
547impl DITHE_R {
548 #[doc = "Get enumerated values variant"]
549 #[inline(always)]
550 pub const fn variant(&self) -> DITHE_A {
551 match self.bits {
552 0 => DITHE_A::VALUE1,
553 1 => DITHE_A::VALUE2,
554 2 => DITHE_A::VALUE3,
555 3 => DITHE_A::VALUE4,
556 _ => unreachable!(),
557 }
558 }
559 #[doc = "Dither is disabled"]
560 #[inline(always)]
561 pub fn is_value1(&self) -> bool {
562 *self == DITHE_A::VALUE1
563 }
564 #[doc = "Dither is applied to the Period"]
565 #[inline(always)]
566 pub fn is_value2(&self) -> bool {
567 *self == DITHE_A::VALUE2
568 }
569 #[doc = "Dither is applied to the Compare"]
570 #[inline(always)]
571 pub fn is_value3(&self) -> bool {
572 *self == DITHE_A::VALUE3
573 }
574 #[doc = "Dither is applied to the Period and Compare"]
575 #[inline(always)]
576 pub fn is_value4(&self) -> bool {
577 *self == DITHE_A::VALUE4
578 }
579}
580#[doc = "Field `DITHE` writer - Dither Enable"]
581pub type DITHE_W<'a, REG> = crate::FieldWriter<'a, REG, 2, DITHE_A, crate::Safe>;
582impl<'a, REG> DITHE_W<'a, REG>
583where
584 REG: crate::Writable + crate::RegisterSpec,
585 REG::Ux: From<u8>,
586{
587 #[doc = "Dither is disabled"]
588 #[inline(always)]
589 pub fn value1(self) -> &'a mut crate::W<REG> {
590 self.variant(DITHE_A::VALUE1)
591 }
592 #[doc = "Dither is applied to the Period"]
593 #[inline(always)]
594 pub fn value2(self) -> &'a mut crate::W<REG> {
595 self.variant(DITHE_A::VALUE2)
596 }
597 #[doc = "Dither is applied to the Compare"]
598 #[inline(always)]
599 pub fn value3(self) -> &'a mut crate::W<REG> {
600 self.variant(DITHE_A::VALUE3)
601 }
602 #[doc = "Dither is applied to the Period and Compare"]
603 #[inline(always)]
604 pub fn value4(self) -> &'a mut crate::W<REG> {
605 self.variant(DITHE_A::VALUE4)
606 }
607}
608#[doc = "Dither input selector\n\nValue on reset: 0"]
609#[derive(Clone, Copy, Debug, PartialEq, Eq)]
610pub enum DIM_A {
611 #[doc = "0: Slice is using its own dither unit"]
612 VALUE1 = 0,
613 #[doc = "1: Slice is connected to the dither unit of slice 0."]
614 VALUE2 = 1,
615}
616impl From<DIM_A> for bool {
617 #[inline(always)]
618 fn from(variant: DIM_A) -> Self {
619 variant as u8 != 0
620 }
621}
622#[doc = "Field `DIM` reader - Dither input selector"]
623pub type DIM_R = crate::BitReader<DIM_A>;
624impl DIM_R {
625 #[doc = "Get enumerated values variant"]
626 #[inline(always)]
627 pub const fn variant(&self) -> DIM_A {
628 match self.bits {
629 false => DIM_A::VALUE1,
630 true => DIM_A::VALUE2,
631 }
632 }
633 #[doc = "Slice is using its own dither unit"]
634 #[inline(always)]
635 pub fn is_value1(&self) -> bool {
636 *self == DIM_A::VALUE1
637 }
638 #[doc = "Slice is connected to the dither unit of slice 0."]
639 #[inline(always)]
640 pub fn is_value2(&self) -> bool {
641 *self == DIM_A::VALUE2
642 }
643}
644#[doc = "Field `DIM` writer - Dither input selector"]
645pub type DIM_W<'a, REG> = crate::BitWriter<'a, REG, DIM_A>;
646impl<'a, REG> DIM_W<'a, REG>
647where
648 REG: crate::Writable + crate::RegisterSpec,
649{
650 #[doc = "Slice is using its own dither unit"]
651 #[inline(always)]
652 pub fn value1(self) -> &'a mut crate::W<REG> {
653 self.variant(DIM_A::VALUE1)
654 }
655 #[doc = "Slice is connected to the dither unit of slice 0."]
656 #[inline(always)]
657 pub fn value2(self) -> &'a mut crate::W<REG> {
658 self.variant(DIM_A::VALUE2)
659 }
660}
661#[doc = "Floating Prescaler enable\n\nValue on reset: 0"]
662#[derive(Clone, Copy, Debug, PartialEq, Eq)]
663pub enum FPE_A {
664 #[doc = "0: Floating prescaler mode is disabled"]
665 VALUE1 = 0,
666 #[doc = "1: Floating prescaler mode is enabled"]
667 VALUE2 = 1,
668}
669impl From<FPE_A> for bool {
670 #[inline(always)]
671 fn from(variant: FPE_A) -> Self {
672 variant as u8 != 0
673 }
674}
675#[doc = "Field `FPE` reader - Floating Prescaler enable"]
676pub type FPE_R = crate::BitReader<FPE_A>;
677impl FPE_R {
678 #[doc = "Get enumerated values variant"]
679 #[inline(always)]
680 pub const fn variant(&self) -> FPE_A {
681 match self.bits {
682 false => FPE_A::VALUE1,
683 true => FPE_A::VALUE2,
684 }
685 }
686 #[doc = "Floating prescaler mode is disabled"]
687 #[inline(always)]
688 pub fn is_value1(&self) -> bool {
689 *self == FPE_A::VALUE1
690 }
691 #[doc = "Floating prescaler mode is enabled"]
692 #[inline(always)]
693 pub fn is_value2(&self) -> bool {
694 *self == FPE_A::VALUE2
695 }
696}
697#[doc = "Field `FPE` writer - Floating Prescaler enable"]
698pub type FPE_W<'a, REG> = crate::BitWriter<'a, REG, FPE_A>;
699impl<'a, REG> FPE_W<'a, REG>
700where
701 REG: crate::Writable + crate::RegisterSpec,
702{
703 #[doc = "Floating prescaler mode is disabled"]
704 #[inline(always)]
705 pub fn value1(self) -> &'a mut crate::W<REG> {
706 self.variant(FPE_A::VALUE1)
707 }
708 #[doc = "Floating prescaler mode is enabled"]
709 #[inline(always)]
710 pub fn value2(self) -> &'a mut crate::W<REG> {
711 self.variant(FPE_A::VALUE2)
712 }
713}
714#[doc = "TRAP enable\n\nValue on reset: 0"]
715#[derive(Clone, Copy, Debug, PartialEq, Eq)]
716pub enum TRAPE_A {
717 #[doc = "0: TRAP functionality has no effect on the output"]
718 VALUE1 = 0,
719 #[doc = "1: TRAP functionality affects the output"]
720 VALUE2 = 1,
721}
722impl From<TRAPE_A> for bool {
723 #[inline(always)]
724 fn from(variant: TRAPE_A) -> Self {
725 variant as u8 != 0
726 }
727}
728#[doc = "Field `TRAPE` reader - TRAP enable"]
729pub type TRAPE_R = crate::BitReader<TRAPE_A>;
730impl TRAPE_R {
731 #[doc = "Get enumerated values variant"]
732 #[inline(always)]
733 pub const fn variant(&self) -> TRAPE_A {
734 match self.bits {
735 false => TRAPE_A::VALUE1,
736 true => TRAPE_A::VALUE2,
737 }
738 }
739 #[doc = "TRAP functionality has no effect on the output"]
740 #[inline(always)]
741 pub fn is_value1(&self) -> bool {
742 *self == TRAPE_A::VALUE1
743 }
744 #[doc = "TRAP functionality affects the output"]
745 #[inline(always)]
746 pub fn is_value2(&self) -> bool {
747 *self == TRAPE_A::VALUE2
748 }
749}
750#[doc = "Field `TRAPE` writer - TRAP enable"]
751pub type TRAPE_W<'a, REG> = crate::BitWriter<'a, REG, TRAPE_A>;
752impl<'a, REG> TRAPE_W<'a, REG>
753where
754 REG: crate::Writable + crate::RegisterSpec,
755{
756 #[doc = "TRAP functionality has no effect on the output"]
757 #[inline(always)]
758 pub fn value1(self) -> &'a mut crate::W<REG> {
759 self.variant(TRAPE_A::VALUE1)
760 }
761 #[doc = "TRAP functionality affects the output"]
762 #[inline(always)]
763 pub fn value2(self) -> &'a mut crate::W<REG> {
764 self.variant(TRAPE_A::VALUE2)
765 }
766}
767#[doc = "TRAP Synchronization Enable\n\nValue on reset: 0"]
768#[derive(Clone, Copy, Debug, PartialEq, Eq)]
769pub enum TRPSE_A {
770 #[doc = "0: Exiting from TRAP state isn't synchronized with the PWM signal"]
771 VALUE1 = 0,
772 #[doc = "1: Exiting from TRAP state is synchronized with the PWM signal"]
773 VALUE2 = 1,
774}
775impl From<TRPSE_A> for bool {
776 #[inline(always)]
777 fn from(variant: TRPSE_A) -> Self {
778 variant as u8 != 0
779 }
780}
781#[doc = "Field `TRPSE` reader - TRAP Synchronization Enable"]
782pub type TRPSE_R = crate::BitReader<TRPSE_A>;
783impl TRPSE_R {
784 #[doc = "Get enumerated values variant"]
785 #[inline(always)]
786 pub const fn variant(&self) -> TRPSE_A {
787 match self.bits {
788 false => TRPSE_A::VALUE1,
789 true => TRPSE_A::VALUE2,
790 }
791 }
792 #[doc = "Exiting from TRAP state isn't synchronized with the PWM signal"]
793 #[inline(always)]
794 pub fn is_value1(&self) -> bool {
795 *self == TRPSE_A::VALUE1
796 }
797 #[doc = "Exiting from TRAP state is synchronized with the PWM signal"]
798 #[inline(always)]
799 pub fn is_value2(&self) -> bool {
800 *self == TRPSE_A::VALUE2
801 }
802}
803#[doc = "Field `TRPSE` writer - TRAP Synchronization Enable"]
804pub type TRPSE_W<'a, REG> = crate::BitWriter<'a, REG, TRPSE_A>;
805impl<'a, REG> TRPSE_W<'a, REG>
806where
807 REG: crate::Writable + crate::RegisterSpec,
808{
809 #[doc = "Exiting from TRAP state isn't synchronized with the PWM signal"]
810 #[inline(always)]
811 pub fn value1(self) -> &'a mut crate::W<REG> {
812 self.variant(TRPSE_A::VALUE1)
813 }
814 #[doc = "Exiting from TRAP state is synchronized with the PWM signal"]
815 #[inline(always)]
816 pub fn value2(self) -> &'a mut crate::W<REG> {
817 self.variant(TRPSE_A::VALUE2)
818 }
819}
820#[doc = "TRAP State Clear Control\n\nValue on reset: 0"]
821#[derive(Clone, Copy, Debug, PartialEq, Eq)]
822pub enum TRPSW_A {
823 #[doc = "0: The slice exits the TRAP state automatically when the TRAP condition is not present"]
824 VALUE1 = 0,
825 #[doc = "1: The TRAP state can only be exited by a SW request."]
826 VALUE2 = 1,
827}
828impl From<TRPSW_A> for bool {
829 #[inline(always)]
830 fn from(variant: TRPSW_A) -> Self {
831 variant as u8 != 0
832 }
833}
834#[doc = "Field `TRPSW` reader - TRAP State Clear Control"]
835pub type TRPSW_R = crate::BitReader<TRPSW_A>;
836impl TRPSW_R {
837 #[doc = "Get enumerated values variant"]
838 #[inline(always)]
839 pub const fn variant(&self) -> TRPSW_A {
840 match self.bits {
841 false => TRPSW_A::VALUE1,
842 true => TRPSW_A::VALUE2,
843 }
844 }
845 #[doc = "The slice exits the TRAP state automatically when the TRAP condition is not present"]
846 #[inline(always)]
847 pub fn is_value1(&self) -> bool {
848 *self == TRPSW_A::VALUE1
849 }
850 #[doc = "The TRAP state can only be exited by a SW request."]
851 #[inline(always)]
852 pub fn is_value2(&self) -> bool {
853 *self == TRPSW_A::VALUE2
854 }
855}
856#[doc = "Field `TRPSW` writer - TRAP State Clear Control"]
857pub type TRPSW_W<'a, REG> = crate::BitWriter<'a, REG, TRPSW_A>;
858impl<'a, REG> TRPSW_W<'a, REG>
859where
860 REG: crate::Writable + crate::RegisterSpec,
861{
862 #[doc = "The slice exits the TRAP state automatically when the TRAP condition is not present"]
863 #[inline(always)]
864 pub fn value1(self) -> &'a mut crate::W<REG> {
865 self.variant(TRPSW_A::VALUE1)
866 }
867 #[doc = "The TRAP state can only be exited by a SW request."]
868 #[inline(always)]
869 pub fn value2(self) -> &'a mut crate::W<REG> {
870 self.variant(TRPSW_A::VALUE2)
871 }
872}
873#[doc = "External Modulation Synchronization\n\nValue on reset: 0"]
874#[derive(Clone, Copy, Debug, PartialEq, Eq)]
875pub enum EMS_A {
876 #[doc = "0: External Modulation functionality is not synchronized with the PWM signal"]
877 VALUE1 = 0,
878 #[doc = "1: External Modulation functionality is synchronized with the PWM signal"]
879 VALUE2 = 1,
880}
881impl From<EMS_A> for bool {
882 #[inline(always)]
883 fn from(variant: EMS_A) -> Self {
884 variant as u8 != 0
885 }
886}
887#[doc = "Field `EMS` reader - External Modulation Synchronization"]
888pub type EMS_R = crate::BitReader<EMS_A>;
889impl EMS_R {
890 #[doc = "Get enumerated values variant"]
891 #[inline(always)]
892 pub const fn variant(&self) -> EMS_A {
893 match self.bits {
894 false => EMS_A::VALUE1,
895 true => EMS_A::VALUE2,
896 }
897 }
898 #[doc = "External Modulation functionality is not synchronized with the PWM signal"]
899 #[inline(always)]
900 pub fn is_value1(&self) -> bool {
901 *self == EMS_A::VALUE1
902 }
903 #[doc = "External Modulation functionality is synchronized with the PWM signal"]
904 #[inline(always)]
905 pub fn is_value2(&self) -> bool {
906 *self == EMS_A::VALUE2
907 }
908}
909#[doc = "Field `EMS` writer - External Modulation Synchronization"]
910pub type EMS_W<'a, REG> = crate::BitWriter<'a, REG, EMS_A>;
911impl<'a, REG> EMS_W<'a, REG>
912where
913 REG: crate::Writable + crate::RegisterSpec,
914{
915 #[doc = "External Modulation functionality is not synchronized with the PWM signal"]
916 #[inline(always)]
917 pub fn value1(self) -> &'a mut crate::W<REG> {
918 self.variant(EMS_A::VALUE1)
919 }
920 #[doc = "External Modulation functionality is synchronized with the PWM signal"]
921 #[inline(always)]
922 pub fn value2(self) -> &'a mut crate::W<REG> {
923 self.variant(EMS_A::VALUE2)
924 }
925}
926#[doc = "External Modulation Type\n\nValue on reset: 0"]
927#[derive(Clone, Copy, Debug, PartialEq, Eq)]
928pub enum EMT_A {
929 #[doc = "0: External Modulation functionality is clearing the CC4yST bit."]
930 VALUE1 = 0,
931 #[doc = "1: External Modulation functionality is gating the outputs."]
932 VALUE2 = 1,
933}
934impl From<EMT_A> for bool {
935 #[inline(always)]
936 fn from(variant: EMT_A) -> Self {
937 variant as u8 != 0
938 }
939}
940#[doc = "Field `EMT` reader - External Modulation Type"]
941pub type EMT_R = crate::BitReader<EMT_A>;
942impl EMT_R {
943 #[doc = "Get enumerated values variant"]
944 #[inline(always)]
945 pub const fn variant(&self) -> EMT_A {
946 match self.bits {
947 false => EMT_A::VALUE1,
948 true => EMT_A::VALUE2,
949 }
950 }
951 #[doc = "External Modulation functionality is clearing the CC4yST bit."]
952 #[inline(always)]
953 pub fn is_value1(&self) -> bool {
954 *self == EMT_A::VALUE1
955 }
956 #[doc = "External Modulation functionality is gating the outputs."]
957 #[inline(always)]
958 pub fn is_value2(&self) -> bool {
959 *self == EMT_A::VALUE2
960 }
961}
962#[doc = "Field `EMT` writer - External Modulation Type"]
963pub type EMT_W<'a, REG> = crate::BitWriter<'a, REG, EMT_A>;
964impl<'a, REG> EMT_W<'a, REG>
965where
966 REG: crate::Writable + crate::RegisterSpec,
967{
968 #[doc = "External Modulation functionality is clearing the CC4yST bit."]
969 #[inline(always)]
970 pub fn value1(self) -> &'a mut crate::W<REG> {
971 self.variant(EMT_A::VALUE1)
972 }
973 #[doc = "External Modulation functionality is gating the outputs."]
974 #[inline(always)]
975 pub fn value2(self) -> &'a mut crate::W<REG> {
976 self.variant(EMT_A::VALUE2)
977 }
978}
979#[doc = "Multi Channel Mode Enable\n\nValue on reset: 0"]
980#[derive(Clone, Copy, Debug, PartialEq, Eq)]
981pub enum MCME_A {
982 #[doc = "0: Multi Channel Mode is disabled"]
983 VALUE1 = 0,
984 #[doc = "1: Multi Channel Mode is enabled"]
985 VALUE2 = 1,
986}
987impl From<MCME_A> for bool {
988 #[inline(always)]
989 fn from(variant: MCME_A) -> Self {
990 variant as u8 != 0
991 }
992}
993#[doc = "Field `MCME` reader - Multi Channel Mode Enable"]
994pub type MCME_R = crate::BitReader<MCME_A>;
995impl MCME_R {
996 #[doc = "Get enumerated values variant"]
997 #[inline(always)]
998 pub const fn variant(&self) -> MCME_A {
999 match self.bits {
1000 false => MCME_A::VALUE1,
1001 true => MCME_A::VALUE2,
1002 }
1003 }
1004 #[doc = "Multi Channel Mode is disabled"]
1005 #[inline(always)]
1006 pub fn is_value1(&self) -> bool {
1007 *self == MCME_A::VALUE1
1008 }
1009 #[doc = "Multi Channel Mode is enabled"]
1010 #[inline(always)]
1011 pub fn is_value2(&self) -> bool {
1012 *self == MCME_A::VALUE2
1013 }
1014}
1015#[doc = "Field `MCME` writer - Multi Channel Mode Enable"]
1016pub type MCME_W<'a, REG> = crate::BitWriter<'a, REG, MCME_A>;
1017impl<'a, REG> MCME_W<'a, REG>
1018where
1019 REG: crate::Writable + crate::RegisterSpec,
1020{
1021 #[doc = "Multi Channel Mode is disabled"]
1022 #[inline(always)]
1023 pub fn value1(self) -> &'a mut crate::W<REG> {
1024 self.variant(MCME_A::VALUE1)
1025 }
1026 #[doc = "Multi Channel Mode is enabled"]
1027 #[inline(always)]
1028 pub fn value2(self) -> &'a mut crate::W<REG> {
1029 self.variant(MCME_A::VALUE2)
1030 }
1031}
1032impl R {
1033 #[doc = "Bit 0 - Timer Counting Mode"]
1034 #[inline(always)]
1035 pub fn tcm(&self) -> TCM_R {
1036 TCM_R::new((self.bits & 1) != 0)
1037 }
1038 #[doc = "Bit 1 - Timer Single Shot Mode"]
1039 #[inline(always)]
1040 pub fn tssm(&self) -> TSSM_R {
1041 TSSM_R::new(((self.bits >> 1) & 1) != 0)
1042 }
1043 #[doc = "Bit 2 - Shadow Transfer on Clear"]
1044 #[inline(always)]
1045 pub fn clst(&self) -> CLST_R {
1046 CLST_R::new(((self.bits >> 2) & 1) != 0)
1047 }
1048 #[doc = "Bit 3 - Capture Compare Mode"]
1049 #[inline(always)]
1050 pub fn cmod(&self) -> CMOD_R {
1051 CMOD_R::new(((self.bits >> 3) & 1) != 0)
1052 }
1053 #[doc = "Bit 4 - Extended Capture Mode"]
1054 #[inline(always)]
1055 pub fn ecm(&self) -> ECM_R {
1056 ECM_R::new(((self.bits >> 4) & 1) != 0)
1057 }
1058 #[doc = "Bits 5:6 - Clear on Capture Control"]
1059 #[inline(always)]
1060 pub fn capc(&self) -> CAPC_R {
1061 CAPC_R::new(((self.bits >> 5) & 3) as u8)
1062 }
1063 #[doc = "Bits 8:9 - Extended Stop Function Control"]
1064 #[inline(always)]
1065 pub fn endm(&self) -> ENDM_R {
1066 ENDM_R::new(((self.bits >> 8) & 3) as u8)
1067 }
1068 #[doc = "Bit 10 - Extended Start Function Control"]
1069 #[inline(always)]
1070 pub fn strm(&self) -> STRM_R {
1071 STRM_R::new(((self.bits >> 10) & 1) != 0)
1072 }
1073 #[doc = "Bit 11 - Equal Capture Event enable"]
1074 #[inline(always)]
1075 pub fn sce(&self) -> SCE_R {
1076 SCE_R::new(((self.bits >> 11) & 1) != 0)
1077 }
1078 #[doc = "Bit 12 - Continuous Capture Enable"]
1079 #[inline(always)]
1080 pub fn ccs(&self) -> CCS_R {
1081 CCS_R::new(((self.bits >> 12) & 1) != 0)
1082 }
1083 #[doc = "Bits 13:14 - Dither Enable"]
1084 #[inline(always)]
1085 pub fn dithe(&self) -> DITHE_R {
1086 DITHE_R::new(((self.bits >> 13) & 3) as u8)
1087 }
1088 #[doc = "Bit 15 - Dither input selector"]
1089 #[inline(always)]
1090 pub fn dim(&self) -> DIM_R {
1091 DIM_R::new(((self.bits >> 15) & 1) != 0)
1092 }
1093 #[doc = "Bit 16 - Floating Prescaler enable"]
1094 #[inline(always)]
1095 pub fn fpe(&self) -> FPE_R {
1096 FPE_R::new(((self.bits >> 16) & 1) != 0)
1097 }
1098 #[doc = "Bit 17 - TRAP enable"]
1099 #[inline(always)]
1100 pub fn trape(&self) -> TRAPE_R {
1101 TRAPE_R::new(((self.bits >> 17) & 1) != 0)
1102 }
1103 #[doc = "Bit 21 - TRAP Synchronization Enable"]
1104 #[inline(always)]
1105 pub fn trpse(&self) -> TRPSE_R {
1106 TRPSE_R::new(((self.bits >> 21) & 1) != 0)
1107 }
1108 #[doc = "Bit 22 - TRAP State Clear Control"]
1109 #[inline(always)]
1110 pub fn trpsw(&self) -> TRPSW_R {
1111 TRPSW_R::new(((self.bits >> 22) & 1) != 0)
1112 }
1113 #[doc = "Bit 23 - External Modulation Synchronization"]
1114 #[inline(always)]
1115 pub fn ems(&self) -> EMS_R {
1116 EMS_R::new(((self.bits >> 23) & 1) != 0)
1117 }
1118 #[doc = "Bit 24 - External Modulation Type"]
1119 #[inline(always)]
1120 pub fn emt(&self) -> EMT_R {
1121 EMT_R::new(((self.bits >> 24) & 1) != 0)
1122 }
1123 #[doc = "Bit 25 - Multi Channel Mode Enable"]
1124 #[inline(always)]
1125 pub fn mcme(&self) -> MCME_R {
1126 MCME_R::new(((self.bits >> 25) & 1) != 0)
1127 }
1128}
1129impl W {
1130 #[doc = "Bit 0 - Timer Counting Mode"]
1131 #[inline(always)]
1132 pub fn tcm(&mut self) -> TCM_W<TC_SPEC> {
1133 TCM_W::new(self, 0)
1134 }
1135 #[doc = "Bit 1 - Timer Single Shot Mode"]
1136 #[inline(always)]
1137 pub fn tssm(&mut self) -> TSSM_W<TC_SPEC> {
1138 TSSM_W::new(self, 1)
1139 }
1140 #[doc = "Bit 2 - Shadow Transfer on Clear"]
1141 #[inline(always)]
1142 pub fn clst(&mut self) -> CLST_W<TC_SPEC> {
1143 CLST_W::new(self, 2)
1144 }
1145 #[doc = "Bit 4 - Extended Capture Mode"]
1146 #[inline(always)]
1147 pub fn ecm(&mut self) -> ECM_W<TC_SPEC> {
1148 ECM_W::new(self, 4)
1149 }
1150 #[doc = "Bits 5:6 - Clear on Capture Control"]
1151 #[inline(always)]
1152 pub fn capc(&mut self) -> CAPC_W<TC_SPEC> {
1153 CAPC_W::new(self, 5)
1154 }
1155 #[doc = "Bits 8:9 - Extended Stop Function Control"]
1156 #[inline(always)]
1157 pub fn endm(&mut self) -> ENDM_W<TC_SPEC> {
1158 ENDM_W::new(self, 8)
1159 }
1160 #[doc = "Bit 10 - Extended Start Function Control"]
1161 #[inline(always)]
1162 pub fn strm(&mut self) -> STRM_W<TC_SPEC> {
1163 STRM_W::new(self, 10)
1164 }
1165 #[doc = "Bit 11 - Equal Capture Event enable"]
1166 #[inline(always)]
1167 pub fn sce(&mut self) -> SCE_W<TC_SPEC> {
1168 SCE_W::new(self, 11)
1169 }
1170 #[doc = "Bit 12 - Continuous Capture Enable"]
1171 #[inline(always)]
1172 pub fn ccs(&mut self) -> CCS_W<TC_SPEC> {
1173 CCS_W::new(self, 12)
1174 }
1175 #[doc = "Bits 13:14 - Dither Enable"]
1176 #[inline(always)]
1177 pub fn dithe(&mut self) -> DITHE_W<TC_SPEC> {
1178 DITHE_W::new(self, 13)
1179 }
1180 #[doc = "Bit 15 - Dither input selector"]
1181 #[inline(always)]
1182 pub fn dim(&mut self) -> DIM_W<TC_SPEC> {
1183 DIM_W::new(self, 15)
1184 }
1185 #[doc = "Bit 16 - Floating Prescaler enable"]
1186 #[inline(always)]
1187 pub fn fpe(&mut self) -> FPE_W<TC_SPEC> {
1188 FPE_W::new(self, 16)
1189 }
1190 #[doc = "Bit 17 - TRAP enable"]
1191 #[inline(always)]
1192 pub fn trape(&mut self) -> TRAPE_W<TC_SPEC> {
1193 TRAPE_W::new(self, 17)
1194 }
1195 #[doc = "Bit 21 - TRAP Synchronization Enable"]
1196 #[inline(always)]
1197 pub fn trpse(&mut self) -> TRPSE_W<TC_SPEC> {
1198 TRPSE_W::new(self, 21)
1199 }
1200 #[doc = "Bit 22 - TRAP State Clear Control"]
1201 #[inline(always)]
1202 pub fn trpsw(&mut self) -> TRPSW_W<TC_SPEC> {
1203 TRPSW_W::new(self, 22)
1204 }
1205 #[doc = "Bit 23 - External Modulation Synchronization"]
1206 #[inline(always)]
1207 pub fn ems(&mut self) -> EMS_W<TC_SPEC> {
1208 EMS_W::new(self, 23)
1209 }
1210 #[doc = "Bit 24 - External Modulation Type"]
1211 #[inline(always)]
1212 pub fn emt(&mut self) -> EMT_W<TC_SPEC> {
1213 EMT_W::new(self, 24)
1214 }
1215 #[doc = "Bit 25 - Multi Channel Mode Enable"]
1216 #[inline(always)]
1217 pub fn mcme(&mut self) -> MCME_W<TC_SPEC> {
1218 MCME_W::new(self, 25)
1219 }
1220}
1221#[doc = "Slice Timer Control\n\nYou can [`read`](crate::Reg::read) this register and get [`tc::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`tc::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1222pub struct TC_SPEC;
1223impl crate::RegisterSpec for TC_SPEC {
1224 type Ux = u32;
1225}
1226#[doc = "`read()` method returns [`tc::R`](R) reader structure"]
1227impl crate::Readable for TC_SPEC {}
1228#[doc = "`write(|w| ..)` method takes [`tc::W`](W) writer structure"]
1229impl crate::Writable for TC_SPEC {
1230 type Safety = crate::Unsafe;
1231 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1232 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1233}
1234#[doc = "`reset()` method sets TC to value 0"]
1235impl crate::Resettable for TC_SPEC {
1236 const RESET_VALUE: u32 = 0;
1237}