1#[doc = "Register `CMR0_WAVEFORM_MODE` reader"]
2pub type R = crate::R<WaveformModeCmr0WaveformModeSpec>;
3#[doc = "Register `CMR0_WAVEFORM_MODE` writer"]
4pub type W = crate::W<WaveformModeCmr0WaveformModeSpec>;
5#[doc = "Clock Selection\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7#[repr(u8)]
8pub enum Tcclks {
9 #[doc = "0: Clock selected: internal MCK/2 clock signal (from PMC)"]
10 TimerClock1 = 0,
11 #[doc = "1: Clock selected: internal MCK/8 clock signal (from PMC)"]
12 TimerClock2 = 1,
13 #[doc = "2: Clock selected: internal MCK/32 clock signal (from PMC)"]
14 TimerClock3 = 2,
15 #[doc = "3: Clock selected: internal MCK/128 clock signal (from PMC)"]
16 TimerClock4 = 3,
17 #[doc = "4: Clock selected: internal SLCK clock signal (from PMC)"]
18 TimerClock5 = 4,
19 #[doc = "5: Clock selected: XC0"]
20 Xc0 = 5,
21 #[doc = "6: Clock selected: XC1"]
22 Xc1 = 6,
23 #[doc = "7: Clock selected: XC2"]
24 Xc2 = 7,
25}
26impl From<Tcclks> for u8 {
27 #[inline(always)]
28 fn from(variant: Tcclks) -> Self {
29 variant as _
30 }
31}
32impl crate::FieldSpec for Tcclks {
33 type Ux = u8;
34}
35impl crate::IsEnum for Tcclks {}
36#[doc = "Field `TCCLKS` reader - Clock Selection"]
37pub type TcclksR = crate::FieldReader<Tcclks>;
38impl TcclksR {
39 #[doc = "Get enumerated values variant"]
40 #[inline(always)]
41 pub const fn variant(&self) -> Tcclks {
42 match self.bits {
43 0 => Tcclks::TimerClock1,
44 1 => Tcclks::TimerClock2,
45 2 => Tcclks::TimerClock3,
46 3 => Tcclks::TimerClock4,
47 4 => Tcclks::TimerClock5,
48 5 => Tcclks::Xc0,
49 6 => Tcclks::Xc1,
50 7 => Tcclks::Xc2,
51 _ => unreachable!(),
52 }
53 }
54 #[doc = "Clock selected: internal MCK/2 clock signal (from PMC)"]
55 #[inline(always)]
56 pub fn is_timer_clock1(&self) -> bool {
57 *self == Tcclks::TimerClock1
58 }
59 #[doc = "Clock selected: internal MCK/8 clock signal (from PMC)"]
60 #[inline(always)]
61 pub fn is_timer_clock2(&self) -> bool {
62 *self == Tcclks::TimerClock2
63 }
64 #[doc = "Clock selected: internal MCK/32 clock signal (from PMC)"]
65 #[inline(always)]
66 pub fn is_timer_clock3(&self) -> bool {
67 *self == Tcclks::TimerClock3
68 }
69 #[doc = "Clock selected: internal MCK/128 clock signal (from PMC)"]
70 #[inline(always)]
71 pub fn is_timer_clock4(&self) -> bool {
72 *self == Tcclks::TimerClock4
73 }
74 #[doc = "Clock selected: internal SLCK clock signal (from PMC)"]
75 #[inline(always)]
76 pub fn is_timer_clock5(&self) -> bool {
77 *self == Tcclks::TimerClock5
78 }
79 #[doc = "Clock selected: XC0"]
80 #[inline(always)]
81 pub fn is_xc0(&self) -> bool {
82 *self == Tcclks::Xc0
83 }
84 #[doc = "Clock selected: XC1"]
85 #[inline(always)]
86 pub fn is_xc1(&self) -> bool {
87 *self == Tcclks::Xc1
88 }
89 #[doc = "Clock selected: XC2"]
90 #[inline(always)]
91 pub fn is_xc2(&self) -> bool {
92 *self == Tcclks::Xc2
93 }
94}
95#[doc = "Field `TCCLKS` writer - Clock Selection"]
96pub type TcclksW<'a, REG> = crate::FieldWriter<'a, REG, 3, Tcclks, crate::Safe>;
97impl<'a, REG> TcclksW<'a, REG>
98where
99 REG: crate::Writable + crate::RegisterSpec,
100 REG::Ux: From<u8>,
101{
102 #[doc = "Clock selected: internal MCK/2 clock signal (from PMC)"]
103 #[inline(always)]
104 pub fn timer_clock1(self) -> &'a mut crate::W<REG> {
105 self.variant(Tcclks::TimerClock1)
106 }
107 #[doc = "Clock selected: internal MCK/8 clock signal (from PMC)"]
108 #[inline(always)]
109 pub fn timer_clock2(self) -> &'a mut crate::W<REG> {
110 self.variant(Tcclks::TimerClock2)
111 }
112 #[doc = "Clock selected: internal MCK/32 clock signal (from PMC)"]
113 #[inline(always)]
114 pub fn timer_clock3(self) -> &'a mut crate::W<REG> {
115 self.variant(Tcclks::TimerClock3)
116 }
117 #[doc = "Clock selected: internal MCK/128 clock signal (from PMC)"]
118 #[inline(always)]
119 pub fn timer_clock4(self) -> &'a mut crate::W<REG> {
120 self.variant(Tcclks::TimerClock4)
121 }
122 #[doc = "Clock selected: internal SLCK clock signal (from PMC)"]
123 #[inline(always)]
124 pub fn timer_clock5(self) -> &'a mut crate::W<REG> {
125 self.variant(Tcclks::TimerClock5)
126 }
127 #[doc = "Clock selected: XC0"]
128 #[inline(always)]
129 pub fn xc0(self) -> &'a mut crate::W<REG> {
130 self.variant(Tcclks::Xc0)
131 }
132 #[doc = "Clock selected: XC1"]
133 #[inline(always)]
134 pub fn xc1(self) -> &'a mut crate::W<REG> {
135 self.variant(Tcclks::Xc1)
136 }
137 #[doc = "Clock selected: XC2"]
138 #[inline(always)]
139 pub fn xc2(self) -> &'a mut crate::W<REG> {
140 self.variant(Tcclks::Xc2)
141 }
142}
143#[doc = "Field `CLKI` reader - Clock Invert"]
144pub type ClkiR = crate::BitReader;
145#[doc = "Field `CLKI` writer - Clock Invert"]
146pub type ClkiW<'a, REG> = crate::BitWriter<'a, REG>;
147#[doc = "Burst Signal Selection\n\nValue on reset: 0"]
148#[derive(Clone, Copy, Debug, PartialEq, Eq)]
149#[repr(u8)]
150pub enum Burst {
151 #[doc = "0: The clock is not gated by an external signal."]
152 None = 0,
153 #[doc = "1: XC0 is ANDed with the selected clock."]
154 Xc0 = 1,
155 #[doc = "2: XC1 is ANDed with the selected clock."]
156 Xc1 = 2,
157 #[doc = "3: XC2 is ANDed with the selected clock."]
158 Xc2 = 3,
159}
160impl From<Burst> for u8 {
161 #[inline(always)]
162 fn from(variant: Burst) -> Self {
163 variant as _
164 }
165}
166impl crate::FieldSpec for Burst {
167 type Ux = u8;
168}
169impl crate::IsEnum for Burst {}
170#[doc = "Field `BURST` reader - Burst Signal Selection"]
171pub type BurstR = crate::FieldReader<Burst>;
172impl BurstR {
173 #[doc = "Get enumerated values variant"]
174 #[inline(always)]
175 pub const fn variant(&self) -> Burst {
176 match self.bits {
177 0 => Burst::None,
178 1 => Burst::Xc0,
179 2 => Burst::Xc1,
180 3 => Burst::Xc2,
181 _ => unreachable!(),
182 }
183 }
184 #[doc = "The clock is not gated by an external signal."]
185 #[inline(always)]
186 pub fn is_none(&self) -> bool {
187 *self == Burst::None
188 }
189 #[doc = "XC0 is ANDed with the selected clock."]
190 #[inline(always)]
191 pub fn is_xc0(&self) -> bool {
192 *self == Burst::Xc0
193 }
194 #[doc = "XC1 is ANDed with the selected clock."]
195 #[inline(always)]
196 pub fn is_xc1(&self) -> bool {
197 *self == Burst::Xc1
198 }
199 #[doc = "XC2 is ANDed with the selected clock."]
200 #[inline(always)]
201 pub fn is_xc2(&self) -> bool {
202 *self == Burst::Xc2
203 }
204}
205#[doc = "Field `BURST` writer - Burst Signal Selection"]
206pub type BurstW<'a, REG> = crate::FieldWriter<'a, REG, 2, Burst, crate::Safe>;
207impl<'a, REG> BurstW<'a, REG>
208where
209 REG: crate::Writable + crate::RegisterSpec,
210 REG::Ux: From<u8>,
211{
212 #[doc = "The clock is not gated by an external signal."]
213 #[inline(always)]
214 pub fn none(self) -> &'a mut crate::W<REG> {
215 self.variant(Burst::None)
216 }
217 #[doc = "XC0 is ANDed with the selected clock."]
218 #[inline(always)]
219 pub fn xc0(self) -> &'a mut crate::W<REG> {
220 self.variant(Burst::Xc0)
221 }
222 #[doc = "XC1 is ANDed with the selected clock."]
223 #[inline(always)]
224 pub fn xc1(self) -> &'a mut crate::W<REG> {
225 self.variant(Burst::Xc1)
226 }
227 #[doc = "XC2 is ANDed with the selected clock."]
228 #[inline(always)]
229 pub fn xc2(self) -> &'a mut crate::W<REG> {
230 self.variant(Burst::Xc2)
231 }
232}
233#[doc = "Field `CPCSTOP` reader - Counter Clock Stopped with RC Compare"]
234pub type CpcstopR = crate::BitReader;
235#[doc = "Field `CPCSTOP` writer - Counter Clock Stopped with RC Compare"]
236pub type CpcstopW<'a, REG> = crate::BitWriter<'a, REG>;
237#[doc = "Field `CPCDIS` reader - Counter Clock Disable with RC Compare"]
238pub type CpcdisR = crate::BitReader;
239#[doc = "Field `CPCDIS` writer - Counter Clock Disable with RC Compare"]
240pub type CpcdisW<'a, REG> = crate::BitWriter<'a, REG>;
241#[doc = "External Event Edge Selection\n\nValue on reset: 0"]
242#[derive(Clone, Copy, Debug, PartialEq, Eq)]
243#[repr(u8)]
244pub enum Eevtedg {
245 #[doc = "0: None"]
246 None = 0,
247 #[doc = "1: Rising edge"]
248 Rising = 1,
249 #[doc = "2: Falling edge"]
250 Falling = 2,
251 #[doc = "3: Each edge"]
252 Edge = 3,
253}
254impl From<Eevtedg> for u8 {
255 #[inline(always)]
256 fn from(variant: Eevtedg) -> Self {
257 variant as _
258 }
259}
260impl crate::FieldSpec for Eevtedg {
261 type Ux = u8;
262}
263impl crate::IsEnum for Eevtedg {}
264#[doc = "Field `EEVTEDG` reader - External Event Edge Selection"]
265pub type EevtedgR = crate::FieldReader<Eevtedg>;
266impl EevtedgR {
267 #[doc = "Get enumerated values variant"]
268 #[inline(always)]
269 pub const fn variant(&self) -> Eevtedg {
270 match self.bits {
271 0 => Eevtedg::None,
272 1 => Eevtedg::Rising,
273 2 => Eevtedg::Falling,
274 3 => Eevtedg::Edge,
275 _ => unreachable!(),
276 }
277 }
278 #[doc = "None"]
279 #[inline(always)]
280 pub fn is_none(&self) -> bool {
281 *self == Eevtedg::None
282 }
283 #[doc = "Rising edge"]
284 #[inline(always)]
285 pub fn is_rising(&self) -> bool {
286 *self == Eevtedg::Rising
287 }
288 #[doc = "Falling edge"]
289 #[inline(always)]
290 pub fn is_falling(&self) -> bool {
291 *self == Eevtedg::Falling
292 }
293 #[doc = "Each edge"]
294 #[inline(always)]
295 pub fn is_edge(&self) -> bool {
296 *self == Eevtedg::Edge
297 }
298}
299#[doc = "Field `EEVTEDG` writer - External Event Edge Selection"]
300pub type EevtedgW<'a, REG> = crate::FieldWriter<'a, REG, 2, Eevtedg, crate::Safe>;
301impl<'a, REG> EevtedgW<'a, REG>
302where
303 REG: crate::Writable + crate::RegisterSpec,
304 REG::Ux: From<u8>,
305{
306 #[doc = "None"]
307 #[inline(always)]
308 pub fn none(self) -> &'a mut crate::W<REG> {
309 self.variant(Eevtedg::None)
310 }
311 #[doc = "Rising edge"]
312 #[inline(always)]
313 pub fn rising(self) -> &'a mut crate::W<REG> {
314 self.variant(Eevtedg::Rising)
315 }
316 #[doc = "Falling edge"]
317 #[inline(always)]
318 pub fn falling(self) -> &'a mut crate::W<REG> {
319 self.variant(Eevtedg::Falling)
320 }
321 #[doc = "Each edge"]
322 #[inline(always)]
323 pub fn edge(self) -> &'a mut crate::W<REG> {
324 self.variant(Eevtedg::Edge)
325 }
326}
327#[doc = "External Event Selection\n\nValue on reset: 0"]
328#[derive(Clone, Copy, Debug, PartialEq, Eq)]
329#[repr(u8)]
330pub enum Eevt {
331 #[doc = "0: TIOB"]
332 Tiob = 0,
333 #[doc = "1: XC0"]
334 Xc0 = 1,
335 #[doc = "2: XC1"]
336 Xc1 = 2,
337 #[doc = "3: XC2"]
338 Xc2 = 3,
339}
340impl From<Eevt> for u8 {
341 #[inline(always)]
342 fn from(variant: Eevt) -> Self {
343 variant as _
344 }
345}
346impl crate::FieldSpec for Eevt {
347 type Ux = u8;
348}
349impl crate::IsEnum for Eevt {}
350#[doc = "Field `EEVT` reader - External Event Selection"]
351pub type EevtR = crate::FieldReader<Eevt>;
352impl EevtR {
353 #[doc = "Get enumerated values variant"]
354 #[inline(always)]
355 pub const fn variant(&self) -> Eevt {
356 match self.bits {
357 0 => Eevt::Tiob,
358 1 => Eevt::Xc0,
359 2 => Eevt::Xc1,
360 3 => Eevt::Xc2,
361 _ => unreachable!(),
362 }
363 }
364 #[doc = "TIOB"]
365 #[inline(always)]
366 pub fn is_tiob(&self) -> bool {
367 *self == Eevt::Tiob
368 }
369 #[doc = "XC0"]
370 #[inline(always)]
371 pub fn is_xc0(&self) -> bool {
372 *self == Eevt::Xc0
373 }
374 #[doc = "XC1"]
375 #[inline(always)]
376 pub fn is_xc1(&self) -> bool {
377 *self == Eevt::Xc1
378 }
379 #[doc = "XC2"]
380 #[inline(always)]
381 pub fn is_xc2(&self) -> bool {
382 *self == Eevt::Xc2
383 }
384}
385#[doc = "Field `EEVT` writer - External Event Selection"]
386pub type EevtW<'a, REG> = crate::FieldWriter<'a, REG, 2, Eevt, crate::Safe>;
387impl<'a, REG> EevtW<'a, REG>
388where
389 REG: crate::Writable + crate::RegisterSpec,
390 REG::Ux: From<u8>,
391{
392 #[doc = "TIOB"]
393 #[inline(always)]
394 pub fn tiob(self) -> &'a mut crate::W<REG> {
395 self.variant(Eevt::Tiob)
396 }
397 #[doc = "XC0"]
398 #[inline(always)]
399 pub fn xc0(self) -> &'a mut crate::W<REG> {
400 self.variant(Eevt::Xc0)
401 }
402 #[doc = "XC1"]
403 #[inline(always)]
404 pub fn xc1(self) -> &'a mut crate::W<REG> {
405 self.variant(Eevt::Xc1)
406 }
407 #[doc = "XC2"]
408 #[inline(always)]
409 pub fn xc2(self) -> &'a mut crate::W<REG> {
410 self.variant(Eevt::Xc2)
411 }
412}
413#[doc = "Field `ENETRG` reader - External Event Trigger Enable"]
414pub type EnetrgR = crate::BitReader;
415#[doc = "Field `ENETRG` writer - External Event Trigger Enable"]
416pub type EnetrgW<'a, REG> = crate::BitWriter<'a, REG>;
417#[doc = "Waveform Selection\n\nValue on reset: 0"]
418#[derive(Clone, Copy, Debug, PartialEq, Eq)]
419#[repr(u8)]
420pub enum Wavsel {
421 #[doc = "0: UP mode without automatic trigger on RC Compare"]
422 Up = 0,
423 #[doc = "1: UPDOWN mode without automatic trigger on RC Compare"]
424 Updown = 1,
425 #[doc = "2: UP mode with automatic trigger on RC Compare"]
426 UpRc = 2,
427 #[doc = "3: UPDOWN mode with automatic trigger on RC Compare"]
428 UpdownRc = 3,
429}
430impl From<Wavsel> for u8 {
431 #[inline(always)]
432 fn from(variant: Wavsel) -> Self {
433 variant as _
434 }
435}
436impl crate::FieldSpec for Wavsel {
437 type Ux = u8;
438}
439impl crate::IsEnum for Wavsel {}
440#[doc = "Field `WAVSEL` reader - Waveform Selection"]
441pub type WavselR = crate::FieldReader<Wavsel>;
442impl WavselR {
443 #[doc = "Get enumerated values variant"]
444 #[inline(always)]
445 pub const fn variant(&self) -> Wavsel {
446 match self.bits {
447 0 => Wavsel::Up,
448 1 => Wavsel::Updown,
449 2 => Wavsel::UpRc,
450 3 => Wavsel::UpdownRc,
451 _ => unreachable!(),
452 }
453 }
454 #[doc = "UP mode without automatic trigger on RC Compare"]
455 #[inline(always)]
456 pub fn is_up(&self) -> bool {
457 *self == Wavsel::Up
458 }
459 #[doc = "UPDOWN mode without automatic trigger on RC Compare"]
460 #[inline(always)]
461 pub fn is_updown(&self) -> bool {
462 *self == Wavsel::Updown
463 }
464 #[doc = "UP mode with automatic trigger on RC Compare"]
465 #[inline(always)]
466 pub fn is_up_rc(&self) -> bool {
467 *self == Wavsel::UpRc
468 }
469 #[doc = "UPDOWN mode with automatic trigger on RC Compare"]
470 #[inline(always)]
471 pub fn is_updown_rc(&self) -> bool {
472 *self == Wavsel::UpdownRc
473 }
474}
475#[doc = "Field `WAVSEL` writer - Waveform Selection"]
476pub type WavselW<'a, REG> = crate::FieldWriter<'a, REG, 2, Wavsel, crate::Safe>;
477impl<'a, REG> WavselW<'a, REG>
478where
479 REG: crate::Writable + crate::RegisterSpec,
480 REG::Ux: From<u8>,
481{
482 #[doc = "UP mode without automatic trigger on RC Compare"]
483 #[inline(always)]
484 pub fn up(self) -> &'a mut crate::W<REG> {
485 self.variant(Wavsel::Up)
486 }
487 #[doc = "UPDOWN mode without automatic trigger on RC Compare"]
488 #[inline(always)]
489 pub fn updown(self) -> &'a mut crate::W<REG> {
490 self.variant(Wavsel::Updown)
491 }
492 #[doc = "UP mode with automatic trigger on RC Compare"]
493 #[inline(always)]
494 pub fn up_rc(self) -> &'a mut crate::W<REG> {
495 self.variant(Wavsel::UpRc)
496 }
497 #[doc = "UPDOWN mode with automatic trigger on RC Compare"]
498 #[inline(always)]
499 pub fn updown_rc(self) -> &'a mut crate::W<REG> {
500 self.variant(Wavsel::UpdownRc)
501 }
502}
503#[doc = "Field `WAVE` reader - Waveform Mode"]
504pub type WaveR = crate::BitReader;
505#[doc = "Field `WAVE` writer - Waveform Mode"]
506pub type WaveW<'a, REG> = crate::BitWriter<'a, REG>;
507#[doc = "RA Compare Effect on TIOA\n\nValue on reset: 0"]
508#[derive(Clone, Copy, Debug, PartialEq, Eq)]
509#[repr(u8)]
510pub enum Acpa {
511 #[doc = "0: None"]
512 None = 0,
513 #[doc = "1: Set"]
514 Set = 1,
515 #[doc = "2: Clear"]
516 Clear = 2,
517 #[doc = "3: Toggle"]
518 Toggle = 3,
519}
520impl From<Acpa> for u8 {
521 #[inline(always)]
522 fn from(variant: Acpa) -> Self {
523 variant as _
524 }
525}
526impl crate::FieldSpec for Acpa {
527 type Ux = u8;
528}
529impl crate::IsEnum for Acpa {}
530#[doc = "Field `ACPA` reader - RA Compare Effect on TIOA"]
531pub type AcpaR = crate::FieldReader<Acpa>;
532impl AcpaR {
533 #[doc = "Get enumerated values variant"]
534 #[inline(always)]
535 pub const fn variant(&self) -> Acpa {
536 match self.bits {
537 0 => Acpa::None,
538 1 => Acpa::Set,
539 2 => Acpa::Clear,
540 3 => Acpa::Toggle,
541 _ => unreachable!(),
542 }
543 }
544 #[doc = "None"]
545 #[inline(always)]
546 pub fn is_none(&self) -> bool {
547 *self == Acpa::None
548 }
549 #[doc = "Set"]
550 #[inline(always)]
551 pub fn is_set(&self) -> bool {
552 *self == Acpa::Set
553 }
554 #[doc = "Clear"]
555 #[inline(always)]
556 pub fn is_clear(&self) -> bool {
557 *self == Acpa::Clear
558 }
559 #[doc = "Toggle"]
560 #[inline(always)]
561 pub fn is_toggle(&self) -> bool {
562 *self == Acpa::Toggle
563 }
564}
565#[doc = "Field `ACPA` writer - RA Compare Effect on TIOA"]
566pub type AcpaW<'a, REG> = crate::FieldWriter<'a, REG, 2, Acpa, crate::Safe>;
567impl<'a, REG> AcpaW<'a, REG>
568where
569 REG: crate::Writable + crate::RegisterSpec,
570 REG::Ux: From<u8>,
571{
572 #[doc = "None"]
573 #[inline(always)]
574 pub fn none(self) -> &'a mut crate::W<REG> {
575 self.variant(Acpa::None)
576 }
577 #[doc = "Set"]
578 #[inline(always)]
579 pub fn set_(self) -> &'a mut crate::W<REG> {
580 self.variant(Acpa::Set)
581 }
582 #[doc = "Clear"]
583 #[inline(always)]
584 pub fn clear(self) -> &'a mut crate::W<REG> {
585 self.variant(Acpa::Clear)
586 }
587 #[doc = "Toggle"]
588 #[inline(always)]
589 pub fn toggle(self) -> &'a mut crate::W<REG> {
590 self.variant(Acpa::Toggle)
591 }
592}
593#[doc = "RC Compare Effect on TIOA\n\nValue on reset: 0"]
594#[derive(Clone, Copy, Debug, PartialEq, Eq)]
595#[repr(u8)]
596pub enum Acpc {
597 #[doc = "0: None"]
598 None = 0,
599 #[doc = "1: Set"]
600 Set = 1,
601 #[doc = "2: Clear"]
602 Clear = 2,
603 #[doc = "3: Toggle"]
604 Toggle = 3,
605}
606impl From<Acpc> for u8 {
607 #[inline(always)]
608 fn from(variant: Acpc) -> Self {
609 variant as _
610 }
611}
612impl crate::FieldSpec for Acpc {
613 type Ux = u8;
614}
615impl crate::IsEnum for Acpc {}
616#[doc = "Field `ACPC` reader - RC Compare Effect on TIOA"]
617pub type AcpcR = crate::FieldReader<Acpc>;
618impl AcpcR {
619 #[doc = "Get enumerated values variant"]
620 #[inline(always)]
621 pub const fn variant(&self) -> Acpc {
622 match self.bits {
623 0 => Acpc::None,
624 1 => Acpc::Set,
625 2 => Acpc::Clear,
626 3 => Acpc::Toggle,
627 _ => unreachable!(),
628 }
629 }
630 #[doc = "None"]
631 #[inline(always)]
632 pub fn is_none(&self) -> bool {
633 *self == Acpc::None
634 }
635 #[doc = "Set"]
636 #[inline(always)]
637 pub fn is_set(&self) -> bool {
638 *self == Acpc::Set
639 }
640 #[doc = "Clear"]
641 #[inline(always)]
642 pub fn is_clear(&self) -> bool {
643 *self == Acpc::Clear
644 }
645 #[doc = "Toggle"]
646 #[inline(always)]
647 pub fn is_toggle(&self) -> bool {
648 *self == Acpc::Toggle
649 }
650}
651#[doc = "Field `ACPC` writer - RC Compare Effect on TIOA"]
652pub type AcpcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Acpc, crate::Safe>;
653impl<'a, REG> AcpcW<'a, REG>
654where
655 REG: crate::Writable + crate::RegisterSpec,
656 REG::Ux: From<u8>,
657{
658 #[doc = "None"]
659 #[inline(always)]
660 pub fn none(self) -> &'a mut crate::W<REG> {
661 self.variant(Acpc::None)
662 }
663 #[doc = "Set"]
664 #[inline(always)]
665 pub fn set_(self) -> &'a mut crate::W<REG> {
666 self.variant(Acpc::Set)
667 }
668 #[doc = "Clear"]
669 #[inline(always)]
670 pub fn clear(self) -> &'a mut crate::W<REG> {
671 self.variant(Acpc::Clear)
672 }
673 #[doc = "Toggle"]
674 #[inline(always)]
675 pub fn toggle(self) -> &'a mut crate::W<REG> {
676 self.variant(Acpc::Toggle)
677 }
678}
679#[doc = "External Event Effect on TIOA\n\nValue on reset: 0"]
680#[derive(Clone, Copy, Debug, PartialEq, Eq)]
681#[repr(u8)]
682pub enum Aeevt {
683 #[doc = "0: None"]
684 None = 0,
685 #[doc = "1: Set"]
686 Set = 1,
687 #[doc = "2: Clear"]
688 Clear = 2,
689 #[doc = "3: Toggle"]
690 Toggle = 3,
691}
692impl From<Aeevt> for u8 {
693 #[inline(always)]
694 fn from(variant: Aeevt) -> Self {
695 variant as _
696 }
697}
698impl crate::FieldSpec for Aeevt {
699 type Ux = u8;
700}
701impl crate::IsEnum for Aeevt {}
702#[doc = "Field `AEEVT` reader - External Event Effect on TIOA"]
703pub type AeevtR = crate::FieldReader<Aeevt>;
704impl AeevtR {
705 #[doc = "Get enumerated values variant"]
706 #[inline(always)]
707 pub const fn variant(&self) -> Aeevt {
708 match self.bits {
709 0 => Aeevt::None,
710 1 => Aeevt::Set,
711 2 => Aeevt::Clear,
712 3 => Aeevt::Toggle,
713 _ => unreachable!(),
714 }
715 }
716 #[doc = "None"]
717 #[inline(always)]
718 pub fn is_none(&self) -> bool {
719 *self == Aeevt::None
720 }
721 #[doc = "Set"]
722 #[inline(always)]
723 pub fn is_set(&self) -> bool {
724 *self == Aeevt::Set
725 }
726 #[doc = "Clear"]
727 #[inline(always)]
728 pub fn is_clear(&self) -> bool {
729 *self == Aeevt::Clear
730 }
731 #[doc = "Toggle"]
732 #[inline(always)]
733 pub fn is_toggle(&self) -> bool {
734 *self == Aeevt::Toggle
735 }
736}
737#[doc = "Field `AEEVT` writer - External Event Effect on TIOA"]
738pub type AeevtW<'a, REG> = crate::FieldWriter<'a, REG, 2, Aeevt, crate::Safe>;
739impl<'a, REG> AeevtW<'a, REG>
740where
741 REG: crate::Writable + crate::RegisterSpec,
742 REG::Ux: From<u8>,
743{
744 #[doc = "None"]
745 #[inline(always)]
746 pub fn none(self) -> &'a mut crate::W<REG> {
747 self.variant(Aeevt::None)
748 }
749 #[doc = "Set"]
750 #[inline(always)]
751 pub fn set_(self) -> &'a mut crate::W<REG> {
752 self.variant(Aeevt::Set)
753 }
754 #[doc = "Clear"]
755 #[inline(always)]
756 pub fn clear(self) -> &'a mut crate::W<REG> {
757 self.variant(Aeevt::Clear)
758 }
759 #[doc = "Toggle"]
760 #[inline(always)]
761 pub fn toggle(self) -> &'a mut crate::W<REG> {
762 self.variant(Aeevt::Toggle)
763 }
764}
765#[doc = "Software Trigger Effect on TIOA\n\nValue on reset: 0"]
766#[derive(Clone, Copy, Debug, PartialEq, Eq)]
767#[repr(u8)]
768pub enum Aswtrg {
769 #[doc = "0: None"]
770 None = 0,
771 #[doc = "1: Set"]
772 Set = 1,
773 #[doc = "2: Clear"]
774 Clear = 2,
775 #[doc = "3: Toggle"]
776 Toggle = 3,
777}
778impl From<Aswtrg> for u8 {
779 #[inline(always)]
780 fn from(variant: Aswtrg) -> Self {
781 variant as _
782 }
783}
784impl crate::FieldSpec for Aswtrg {
785 type Ux = u8;
786}
787impl crate::IsEnum for Aswtrg {}
788#[doc = "Field `ASWTRG` reader - Software Trigger Effect on TIOA"]
789pub type AswtrgR = crate::FieldReader<Aswtrg>;
790impl AswtrgR {
791 #[doc = "Get enumerated values variant"]
792 #[inline(always)]
793 pub const fn variant(&self) -> Aswtrg {
794 match self.bits {
795 0 => Aswtrg::None,
796 1 => Aswtrg::Set,
797 2 => Aswtrg::Clear,
798 3 => Aswtrg::Toggle,
799 _ => unreachable!(),
800 }
801 }
802 #[doc = "None"]
803 #[inline(always)]
804 pub fn is_none(&self) -> bool {
805 *self == Aswtrg::None
806 }
807 #[doc = "Set"]
808 #[inline(always)]
809 pub fn is_set(&self) -> bool {
810 *self == Aswtrg::Set
811 }
812 #[doc = "Clear"]
813 #[inline(always)]
814 pub fn is_clear(&self) -> bool {
815 *self == Aswtrg::Clear
816 }
817 #[doc = "Toggle"]
818 #[inline(always)]
819 pub fn is_toggle(&self) -> bool {
820 *self == Aswtrg::Toggle
821 }
822}
823#[doc = "Field `ASWTRG` writer - Software Trigger Effect on TIOA"]
824pub type AswtrgW<'a, REG> = crate::FieldWriter<'a, REG, 2, Aswtrg, crate::Safe>;
825impl<'a, REG> AswtrgW<'a, REG>
826where
827 REG: crate::Writable + crate::RegisterSpec,
828 REG::Ux: From<u8>,
829{
830 #[doc = "None"]
831 #[inline(always)]
832 pub fn none(self) -> &'a mut crate::W<REG> {
833 self.variant(Aswtrg::None)
834 }
835 #[doc = "Set"]
836 #[inline(always)]
837 pub fn set_(self) -> &'a mut crate::W<REG> {
838 self.variant(Aswtrg::Set)
839 }
840 #[doc = "Clear"]
841 #[inline(always)]
842 pub fn clear(self) -> &'a mut crate::W<REG> {
843 self.variant(Aswtrg::Clear)
844 }
845 #[doc = "Toggle"]
846 #[inline(always)]
847 pub fn toggle(self) -> &'a mut crate::W<REG> {
848 self.variant(Aswtrg::Toggle)
849 }
850}
851#[doc = "RB Compare Effect on TIOB\n\nValue on reset: 0"]
852#[derive(Clone, Copy, Debug, PartialEq, Eq)]
853#[repr(u8)]
854pub enum Bcpb {
855 #[doc = "0: None"]
856 None = 0,
857 #[doc = "1: Set"]
858 Set = 1,
859 #[doc = "2: Clear"]
860 Clear = 2,
861 #[doc = "3: Toggle"]
862 Toggle = 3,
863}
864impl From<Bcpb> for u8 {
865 #[inline(always)]
866 fn from(variant: Bcpb) -> Self {
867 variant as _
868 }
869}
870impl crate::FieldSpec for Bcpb {
871 type Ux = u8;
872}
873impl crate::IsEnum for Bcpb {}
874#[doc = "Field `BCPB` reader - RB Compare Effect on TIOB"]
875pub type BcpbR = crate::FieldReader<Bcpb>;
876impl BcpbR {
877 #[doc = "Get enumerated values variant"]
878 #[inline(always)]
879 pub const fn variant(&self) -> Bcpb {
880 match self.bits {
881 0 => Bcpb::None,
882 1 => Bcpb::Set,
883 2 => Bcpb::Clear,
884 3 => Bcpb::Toggle,
885 _ => unreachable!(),
886 }
887 }
888 #[doc = "None"]
889 #[inline(always)]
890 pub fn is_none(&self) -> bool {
891 *self == Bcpb::None
892 }
893 #[doc = "Set"]
894 #[inline(always)]
895 pub fn is_set(&self) -> bool {
896 *self == Bcpb::Set
897 }
898 #[doc = "Clear"]
899 #[inline(always)]
900 pub fn is_clear(&self) -> bool {
901 *self == Bcpb::Clear
902 }
903 #[doc = "Toggle"]
904 #[inline(always)]
905 pub fn is_toggle(&self) -> bool {
906 *self == Bcpb::Toggle
907 }
908}
909#[doc = "Field `BCPB` writer - RB Compare Effect on TIOB"]
910pub type BcpbW<'a, REG> = crate::FieldWriter<'a, REG, 2, Bcpb, crate::Safe>;
911impl<'a, REG> BcpbW<'a, REG>
912where
913 REG: crate::Writable + crate::RegisterSpec,
914 REG::Ux: From<u8>,
915{
916 #[doc = "None"]
917 #[inline(always)]
918 pub fn none(self) -> &'a mut crate::W<REG> {
919 self.variant(Bcpb::None)
920 }
921 #[doc = "Set"]
922 #[inline(always)]
923 pub fn set_(self) -> &'a mut crate::W<REG> {
924 self.variant(Bcpb::Set)
925 }
926 #[doc = "Clear"]
927 #[inline(always)]
928 pub fn clear(self) -> &'a mut crate::W<REG> {
929 self.variant(Bcpb::Clear)
930 }
931 #[doc = "Toggle"]
932 #[inline(always)]
933 pub fn toggle(self) -> &'a mut crate::W<REG> {
934 self.variant(Bcpb::Toggle)
935 }
936}
937#[doc = "RC Compare Effect on TIOB\n\nValue on reset: 0"]
938#[derive(Clone, Copy, Debug, PartialEq, Eq)]
939#[repr(u8)]
940pub enum Bcpc {
941 #[doc = "0: None"]
942 None = 0,
943 #[doc = "1: Set"]
944 Set = 1,
945 #[doc = "2: Clear"]
946 Clear = 2,
947 #[doc = "3: Toggle"]
948 Toggle = 3,
949}
950impl From<Bcpc> for u8 {
951 #[inline(always)]
952 fn from(variant: Bcpc) -> Self {
953 variant as _
954 }
955}
956impl crate::FieldSpec for Bcpc {
957 type Ux = u8;
958}
959impl crate::IsEnum for Bcpc {}
960#[doc = "Field `BCPC` reader - RC Compare Effect on TIOB"]
961pub type BcpcR = crate::FieldReader<Bcpc>;
962impl BcpcR {
963 #[doc = "Get enumerated values variant"]
964 #[inline(always)]
965 pub const fn variant(&self) -> Bcpc {
966 match self.bits {
967 0 => Bcpc::None,
968 1 => Bcpc::Set,
969 2 => Bcpc::Clear,
970 3 => Bcpc::Toggle,
971 _ => unreachable!(),
972 }
973 }
974 #[doc = "None"]
975 #[inline(always)]
976 pub fn is_none(&self) -> bool {
977 *self == Bcpc::None
978 }
979 #[doc = "Set"]
980 #[inline(always)]
981 pub fn is_set(&self) -> bool {
982 *self == Bcpc::Set
983 }
984 #[doc = "Clear"]
985 #[inline(always)]
986 pub fn is_clear(&self) -> bool {
987 *self == Bcpc::Clear
988 }
989 #[doc = "Toggle"]
990 #[inline(always)]
991 pub fn is_toggle(&self) -> bool {
992 *self == Bcpc::Toggle
993 }
994}
995#[doc = "Field `BCPC` writer - RC Compare Effect on TIOB"]
996pub type BcpcW<'a, REG> = crate::FieldWriter<'a, REG, 2, Bcpc, crate::Safe>;
997impl<'a, REG> BcpcW<'a, REG>
998where
999 REG: crate::Writable + crate::RegisterSpec,
1000 REG::Ux: From<u8>,
1001{
1002 #[doc = "None"]
1003 #[inline(always)]
1004 pub fn none(self) -> &'a mut crate::W<REG> {
1005 self.variant(Bcpc::None)
1006 }
1007 #[doc = "Set"]
1008 #[inline(always)]
1009 pub fn set_(self) -> &'a mut crate::W<REG> {
1010 self.variant(Bcpc::Set)
1011 }
1012 #[doc = "Clear"]
1013 #[inline(always)]
1014 pub fn clear(self) -> &'a mut crate::W<REG> {
1015 self.variant(Bcpc::Clear)
1016 }
1017 #[doc = "Toggle"]
1018 #[inline(always)]
1019 pub fn toggle(self) -> &'a mut crate::W<REG> {
1020 self.variant(Bcpc::Toggle)
1021 }
1022}
1023#[doc = "External Event Effect on TIOB\n\nValue on reset: 0"]
1024#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1025#[repr(u8)]
1026pub enum Beevt {
1027 #[doc = "0: None"]
1028 None = 0,
1029 #[doc = "1: Set"]
1030 Set = 1,
1031 #[doc = "2: Clear"]
1032 Clear = 2,
1033 #[doc = "3: Toggle"]
1034 Toggle = 3,
1035}
1036impl From<Beevt> for u8 {
1037 #[inline(always)]
1038 fn from(variant: Beevt) -> Self {
1039 variant as _
1040 }
1041}
1042impl crate::FieldSpec for Beevt {
1043 type Ux = u8;
1044}
1045impl crate::IsEnum for Beevt {}
1046#[doc = "Field `BEEVT` reader - External Event Effect on TIOB"]
1047pub type BeevtR = crate::FieldReader<Beevt>;
1048impl BeevtR {
1049 #[doc = "Get enumerated values variant"]
1050 #[inline(always)]
1051 pub const fn variant(&self) -> Beevt {
1052 match self.bits {
1053 0 => Beevt::None,
1054 1 => Beevt::Set,
1055 2 => Beevt::Clear,
1056 3 => Beevt::Toggle,
1057 _ => unreachable!(),
1058 }
1059 }
1060 #[doc = "None"]
1061 #[inline(always)]
1062 pub fn is_none(&self) -> bool {
1063 *self == Beevt::None
1064 }
1065 #[doc = "Set"]
1066 #[inline(always)]
1067 pub fn is_set(&self) -> bool {
1068 *self == Beevt::Set
1069 }
1070 #[doc = "Clear"]
1071 #[inline(always)]
1072 pub fn is_clear(&self) -> bool {
1073 *self == Beevt::Clear
1074 }
1075 #[doc = "Toggle"]
1076 #[inline(always)]
1077 pub fn is_toggle(&self) -> bool {
1078 *self == Beevt::Toggle
1079 }
1080}
1081#[doc = "Field `BEEVT` writer - External Event Effect on TIOB"]
1082pub type BeevtW<'a, REG> = crate::FieldWriter<'a, REG, 2, Beevt, crate::Safe>;
1083impl<'a, REG> BeevtW<'a, REG>
1084where
1085 REG: crate::Writable + crate::RegisterSpec,
1086 REG::Ux: From<u8>,
1087{
1088 #[doc = "None"]
1089 #[inline(always)]
1090 pub fn none(self) -> &'a mut crate::W<REG> {
1091 self.variant(Beevt::None)
1092 }
1093 #[doc = "Set"]
1094 #[inline(always)]
1095 pub fn set_(self) -> &'a mut crate::W<REG> {
1096 self.variant(Beevt::Set)
1097 }
1098 #[doc = "Clear"]
1099 #[inline(always)]
1100 pub fn clear(self) -> &'a mut crate::W<REG> {
1101 self.variant(Beevt::Clear)
1102 }
1103 #[doc = "Toggle"]
1104 #[inline(always)]
1105 pub fn toggle(self) -> &'a mut crate::W<REG> {
1106 self.variant(Beevt::Toggle)
1107 }
1108}
1109#[doc = "Software Trigger Effect on TIOB\n\nValue on reset: 0"]
1110#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1111#[repr(u8)]
1112pub enum Bswtrg {
1113 #[doc = "0: None"]
1114 None = 0,
1115 #[doc = "1: Set"]
1116 Set = 1,
1117 #[doc = "2: Clear"]
1118 Clear = 2,
1119 #[doc = "3: Toggle"]
1120 Toggle = 3,
1121}
1122impl From<Bswtrg> for u8 {
1123 #[inline(always)]
1124 fn from(variant: Bswtrg) -> Self {
1125 variant as _
1126 }
1127}
1128impl crate::FieldSpec for Bswtrg {
1129 type Ux = u8;
1130}
1131impl crate::IsEnum for Bswtrg {}
1132#[doc = "Field `BSWTRG` reader - Software Trigger Effect on TIOB"]
1133pub type BswtrgR = crate::FieldReader<Bswtrg>;
1134impl BswtrgR {
1135 #[doc = "Get enumerated values variant"]
1136 #[inline(always)]
1137 pub const fn variant(&self) -> Bswtrg {
1138 match self.bits {
1139 0 => Bswtrg::None,
1140 1 => Bswtrg::Set,
1141 2 => Bswtrg::Clear,
1142 3 => Bswtrg::Toggle,
1143 _ => unreachable!(),
1144 }
1145 }
1146 #[doc = "None"]
1147 #[inline(always)]
1148 pub fn is_none(&self) -> bool {
1149 *self == Bswtrg::None
1150 }
1151 #[doc = "Set"]
1152 #[inline(always)]
1153 pub fn is_set(&self) -> bool {
1154 *self == Bswtrg::Set
1155 }
1156 #[doc = "Clear"]
1157 #[inline(always)]
1158 pub fn is_clear(&self) -> bool {
1159 *self == Bswtrg::Clear
1160 }
1161 #[doc = "Toggle"]
1162 #[inline(always)]
1163 pub fn is_toggle(&self) -> bool {
1164 *self == Bswtrg::Toggle
1165 }
1166}
1167#[doc = "Field `BSWTRG` writer - Software Trigger Effect on TIOB"]
1168pub type BswtrgW<'a, REG> = crate::FieldWriter<'a, REG, 2, Bswtrg, crate::Safe>;
1169impl<'a, REG> BswtrgW<'a, REG>
1170where
1171 REG: crate::Writable + crate::RegisterSpec,
1172 REG::Ux: From<u8>,
1173{
1174 #[doc = "None"]
1175 #[inline(always)]
1176 pub fn none(self) -> &'a mut crate::W<REG> {
1177 self.variant(Bswtrg::None)
1178 }
1179 #[doc = "Set"]
1180 #[inline(always)]
1181 pub fn set_(self) -> &'a mut crate::W<REG> {
1182 self.variant(Bswtrg::Set)
1183 }
1184 #[doc = "Clear"]
1185 #[inline(always)]
1186 pub fn clear(self) -> &'a mut crate::W<REG> {
1187 self.variant(Bswtrg::Clear)
1188 }
1189 #[doc = "Toggle"]
1190 #[inline(always)]
1191 pub fn toggle(self) -> &'a mut crate::W<REG> {
1192 self.variant(Bswtrg::Toggle)
1193 }
1194}
1195impl R {
1196 #[doc = "Bits 0:2 - Clock Selection"]
1197 #[inline(always)]
1198 pub fn tcclks(&self) -> TcclksR {
1199 TcclksR::new((self.bits & 7) as u8)
1200 }
1201 #[doc = "Bit 3 - Clock Invert"]
1202 #[inline(always)]
1203 pub fn clki(&self) -> ClkiR {
1204 ClkiR::new(((self.bits >> 3) & 1) != 0)
1205 }
1206 #[doc = "Bits 4:5 - Burst Signal Selection"]
1207 #[inline(always)]
1208 pub fn burst(&self) -> BurstR {
1209 BurstR::new(((self.bits >> 4) & 3) as u8)
1210 }
1211 #[doc = "Bit 6 - Counter Clock Stopped with RC Compare"]
1212 #[inline(always)]
1213 pub fn cpcstop(&self) -> CpcstopR {
1214 CpcstopR::new(((self.bits >> 6) & 1) != 0)
1215 }
1216 #[doc = "Bit 7 - Counter Clock Disable with RC Compare"]
1217 #[inline(always)]
1218 pub fn cpcdis(&self) -> CpcdisR {
1219 CpcdisR::new(((self.bits >> 7) & 1) != 0)
1220 }
1221 #[doc = "Bits 8:9 - External Event Edge Selection"]
1222 #[inline(always)]
1223 pub fn eevtedg(&self) -> EevtedgR {
1224 EevtedgR::new(((self.bits >> 8) & 3) as u8)
1225 }
1226 #[doc = "Bits 10:11 - External Event Selection"]
1227 #[inline(always)]
1228 pub fn eevt(&self) -> EevtR {
1229 EevtR::new(((self.bits >> 10) & 3) as u8)
1230 }
1231 #[doc = "Bit 12 - External Event Trigger Enable"]
1232 #[inline(always)]
1233 pub fn enetrg(&self) -> EnetrgR {
1234 EnetrgR::new(((self.bits >> 12) & 1) != 0)
1235 }
1236 #[doc = "Bits 13:14 - Waveform Selection"]
1237 #[inline(always)]
1238 pub fn wavsel(&self) -> WavselR {
1239 WavselR::new(((self.bits >> 13) & 3) as u8)
1240 }
1241 #[doc = "Bit 15 - Waveform Mode"]
1242 #[inline(always)]
1243 pub fn wave(&self) -> WaveR {
1244 WaveR::new(((self.bits >> 15) & 1) != 0)
1245 }
1246 #[doc = "Bits 16:17 - RA Compare Effect on TIOA"]
1247 #[inline(always)]
1248 pub fn acpa(&self) -> AcpaR {
1249 AcpaR::new(((self.bits >> 16) & 3) as u8)
1250 }
1251 #[doc = "Bits 18:19 - RC Compare Effect on TIOA"]
1252 #[inline(always)]
1253 pub fn acpc(&self) -> AcpcR {
1254 AcpcR::new(((self.bits >> 18) & 3) as u8)
1255 }
1256 #[doc = "Bits 20:21 - External Event Effect on TIOA"]
1257 #[inline(always)]
1258 pub fn aeevt(&self) -> AeevtR {
1259 AeevtR::new(((self.bits >> 20) & 3) as u8)
1260 }
1261 #[doc = "Bits 22:23 - Software Trigger Effect on TIOA"]
1262 #[inline(always)]
1263 pub fn aswtrg(&self) -> AswtrgR {
1264 AswtrgR::new(((self.bits >> 22) & 3) as u8)
1265 }
1266 #[doc = "Bits 24:25 - RB Compare Effect on TIOB"]
1267 #[inline(always)]
1268 pub fn bcpb(&self) -> BcpbR {
1269 BcpbR::new(((self.bits >> 24) & 3) as u8)
1270 }
1271 #[doc = "Bits 26:27 - RC Compare Effect on TIOB"]
1272 #[inline(always)]
1273 pub fn bcpc(&self) -> BcpcR {
1274 BcpcR::new(((self.bits >> 26) & 3) as u8)
1275 }
1276 #[doc = "Bits 28:29 - External Event Effect on TIOB"]
1277 #[inline(always)]
1278 pub fn beevt(&self) -> BeevtR {
1279 BeevtR::new(((self.bits >> 28) & 3) as u8)
1280 }
1281 #[doc = "Bits 30:31 - Software Trigger Effect on TIOB"]
1282 #[inline(always)]
1283 pub fn bswtrg(&self) -> BswtrgR {
1284 BswtrgR::new(((self.bits >> 30) & 3) as u8)
1285 }
1286}
1287impl W {
1288 #[doc = "Bits 0:2 - Clock Selection"]
1289 #[inline(always)]
1290 #[must_use]
1291 pub fn tcclks(&mut self) -> TcclksW<WaveformModeCmr0WaveformModeSpec> {
1292 TcclksW::new(self, 0)
1293 }
1294 #[doc = "Bit 3 - Clock Invert"]
1295 #[inline(always)]
1296 #[must_use]
1297 pub fn clki(&mut self) -> ClkiW<WaveformModeCmr0WaveformModeSpec> {
1298 ClkiW::new(self, 3)
1299 }
1300 #[doc = "Bits 4:5 - Burst Signal Selection"]
1301 #[inline(always)]
1302 #[must_use]
1303 pub fn burst(&mut self) -> BurstW<WaveformModeCmr0WaveformModeSpec> {
1304 BurstW::new(self, 4)
1305 }
1306 #[doc = "Bit 6 - Counter Clock Stopped with RC Compare"]
1307 #[inline(always)]
1308 #[must_use]
1309 pub fn cpcstop(&mut self) -> CpcstopW<WaveformModeCmr0WaveformModeSpec> {
1310 CpcstopW::new(self, 6)
1311 }
1312 #[doc = "Bit 7 - Counter Clock Disable with RC Compare"]
1313 #[inline(always)]
1314 #[must_use]
1315 pub fn cpcdis(&mut self) -> CpcdisW<WaveformModeCmr0WaveformModeSpec> {
1316 CpcdisW::new(self, 7)
1317 }
1318 #[doc = "Bits 8:9 - External Event Edge Selection"]
1319 #[inline(always)]
1320 #[must_use]
1321 pub fn eevtedg(&mut self) -> EevtedgW<WaveformModeCmr0WaveformModeSpec> {
1322 EevtedgW::new(self, 8)
1323 }
1324 #[doc = "Bits 10:11 - External Event Selection"]
1325 #[inline(always)]
1326 #[must_use]
1327 pub fn eevt(&mut self) -> EevtW<WaveformModeCmr0WaveformModeSpec> {
1328 EevtW::new(self, 10)
1329 }
1330 #[doc = "Bit 12 - External Event Trigger Enable"]
1331 #[inline(always)]
1332 #[must_use]
1333 pub fn enetrg(&mut self) -> EnetrgW<WaveformModeCmr0WaveformModeSpec> {
1334 EnetrgW::new(self, 12)
1335 }
1336 #[doc = "Bits 13:14 - Waveform Selection"]
1337 #[inline(always)]
1338 #[must_use]
1339 pub fn wavsel(&mut self) -> WavselW<WaveformModeCmr0WaveformModeSpec> {
1340 WavselW::new(self, 13)
1341 }
1342 #[doc = "Bit 15 - Waveform Mode"]
1343 #[inline(always)]
1344 #[must_use]
1345 pub fn wave(&mut self) -> WaveW<WaveformModeCmr0WaveformModeSpec> {
1346 WaveW::new(self, 15)
1347 }
1348 #[doc = "Bits 16:17 - RA Compare Effect on TIOA"]
1349 #[inline(always)]
1350 #[must_use]
1351 pub fn acpa(&mut self) -> AcpaW<WaveformModeCmr0WaveformModeSpec> {
1352 AcpaW::new(self, 16)
1353 }
1354 #[doc = "Bits 18:19 - RC Compare Effect on TIOA"]
1355 #[inline(always)]
1356 #[must_use]
1357 pub fn acpc(&mut self) -> AcpcW<WaveformModeCmr0WaveformModeSpec> {
1358 AcpcW::new(self, 18)
1359 }
1360 #[doc = "Bits 20:21 - External Event Effect on TIOA"]
1361 #[inline(always)]
1362 #[must_use]
1363 pub fn aeevt(&mut self) -> AeevtW<WaveformModeCmr0WaveformModeSpec> {
1364 AeevtW::new(self, 20)
1365 }
1366 #[doc = "Bits 22:23 - Software Trigger Effect on TIOA"]
1367 #[inline(always)]
1368 #[must_use]
1369 pub fn aswtrg(&mut self) -> AswtrgW<WaveformModeCmr0WaveformModeSpec> {
1370 AswtrgW::new(self, 22)
1371 }
1372 #[doc = "Bits 24:25 - RB Compare Effect on TIOB"]
1373 #[inline(always)]
1374 #[must_use]
1375 pub fn bcpb(&mut self) -> BcpbW<WaveformModeCmr0WaveformModeSpec> {
1376 BcpbW::new(self, 24)
1377 }
1378 #[doc = "Bits 26:27 - RC Compare Effect on TIOB"]
1379 #[inline(always)]
1380 #[must_use]
1381 pub fn bcpc(&mut self) -> BcpcW<WaveformModeCmr0WaveformModeSpec> {
1382 BcpcW::new(self, 26)
1383 }
1384 #[doc = "Bits 28:29 - External Event Effect on TIOB"]
1385 #[inline(always)]
1386 #[must_use]
1387 pub fn beevt(&mut self) -> BeevtW<WaveformModeCmr0WaveformModeSpec> {
1388 BeevtW::new(self, 28)
1389 }
1390 #[doc = "Bits 30:31 - Software Trigger Effect on TIOB"]
1391 #[inline(always)]
1392 #[must_use]
1393 pub fn bswtrg(&mut self) -> BswtrgW<WaveformModeCmr0WaveformModeSpec> {
1394 BswtrgW::new(self, 30)
1395 }
1396}
1397#[doc = "Channel Mode Register (channel = 0)\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`waveform_mode_cmr0_waveform_mode::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`waveform_mode_cmr0_waveform_mode::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1398pub struct WaveformModeCmr0WaveformModeSpec;
1399impl crate::RegisterSpec for WaveformModeCmr0WaveformModeSpec {
1400 type Ux = u32;
1401}
1402#[doc = "`read()` method returns [`waveform_mode_cmr0_waveform_mode::R`](R) reader structure"]
1403impl crate::Readable for WaveformModeCmr0WaveformModeSpec {}
1404#[doc = "`write(|w| ..)` method takes [`waveform_mode_cmr0_waveform_mode::W`](W) writer structure"]
1405impl crate::Writable for WaveformModeCmr0WaveformModeSpec {
1406 type Safety = crate::Unsafe;
1407 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1408 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1409}
1410#[doc = "`reset()` method sets CMR0_WAVEFORM_MODE to value 0"]
1411impl crate::Resettable for WaveformModeCmr0WaveformModeSpec {
1412 const RESET_VALUE: u32 = 0;
1413}