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