1#[doc = "Register `OUTPUTDIRCTRL` reader"]
2pub struct R(crate::R<OUTPUTDIRCTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<OUTPUTDIRCTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<OUTPUTDIRCTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<OUTPUTDIRCTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `OUTPUTDIRCTRL` writer"]
17pub struct W(crate::W<OUTPUTDIRCTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<OUTPUTDIRCTRL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<OUTPUTDIRCTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<OUTPUTDIRCTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Set/clear operation on output 0. Value 0x3 is reserved. Do not program this value.\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum SETCLR0_A {
41 #[doc = "0: Set and clear do not depend on the direction of any counter."]
42 INDEPENDENT = 0,
43 #[doc = "1: Set and clear are reversed when counter L or the unified counter is counting down."]
44 L_REVERSED = 1,
45 #[doc = "2: Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
46 H_REVERSED = 2,
47}
48impl From<SETCLR0_A> for u8 {
49 #[inline(always)]
50 fn from(variant: SETCLR0_A) -> Self {
51 variant as _
52 }
53}
54#[doc = "Field `SETCLR0` reader - Set/clear operation on output 0. Value 0x3 is reserved. Do not program this value."]
55pub struct SETCLR0_R(crate::FieldReader<u8, SETCLR0_A>);
56impl SETCLR0_R {
57 pub(crate) fn new(bits: u8) -> Self {
58 SETCLR0_R(crate::FieldReader::new(bits))
59 }
60 #[doc = r"Get enumerated values variant"]
61 #[inline(always)]
62 pub fn variant(&self) -> Option<SETCLR0_A> {
63 match self.bits {
64 0 => Some(SETCLR0_A::INDEPENDENT),
65 1 => Some(SETCLR0_A::L_REVERSED),
66 2 => Some(SETCLR0_A::H_REVERSED),
67 _ => None,
68 }
69 }
70 #[doc = "Checks if the value of the field is `INDEPENDENT`"]
71 #[inline(always)]
72 pub fn is_independent(&self) -> bool {
73 **self == SETCLR0_A::INDEPENDENT
74 }
75 #[doc = "Checks if the value of the field is `L_REVERSED`"]
76 #[inline(always)]
77 pub fn is_l_reversed(&self) -> bool {
78 **self == SETCLR0_A::L_REVERSED
79 }
80 #[doc = "Checks if the value of the field is `H_REVERSED`"]
81 #[inline(always)]
82 pub fn is_h_reversed(&self) -> bool {
83 **self == SETCLR0_A::H_REVERSED
84 }
85}
86impl core::ops::Deref for SETCLR0_R {
87 type Target = crate::FieldReader<u8, SETCLR0_A>;
88 #[inline(always)]
89 fn deref(&self) -> &Self::Target {
90 &self.0
91 }
92}
93#[doc = "Field `SETCLR0` writer - Set/clear operation on output 0. Value 0x3 is reserved. Do not program this value."]
94pub struct SETCLR0_W<'a> {
95 w: &'a mut W,
96}
97impl<'a> SETCLR0_W<'a> {
98 #[doc = r"Writes `variant` to the field"]
99 #[inline(always)]
100 pub fn variant(self, variant: SETCLR0_A) -> &'a mut W {
101 unsafe { self.bits(variant.into()) }
102 }
103 #[doc = "Set and clear do not depend on the direction of any counter."]
104 #[inline(always)]
105 pub fn independent(self) -> &'a mut W {
106 self.variant(SETCLR0_A::INDEPENDENT)
107 }
108 #[doc = "Set and clear are reversed when counter L or the unified counter is counting down."]
109 #[inline(always)]
110 pub fn l_reversed(self) -> &'a mut W {
111 self.variant(SETCLR0_A::L_REVERSED)
112 }
113 #[doc = "Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
114 #[inline(always)]
115 pub fn h_reversed(self) -> &'a mut W {
116 self.variant(SETCLR0_A::H_REVERSED)
117 }
118 #[doc = r"Writes raw bits to the field"]
119 #[inline(always)]
120 pub unsafe fn bits(self, value: u8) -> &'a mut W {
121 self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03);
122 self.w
123 }
124}
125#[doc = "Set/clear operation on output 1. Value 0x3 is reserved. Do not program this value.\n\nValue on reset: 0"]
126#[derive(Clone, Copy, Debug, PartialEq)]
127#[repr(u8)]
128pub enum SETCLR1_A {
129 #[doc = "0: Set and clear do not depend on the direction of any counter."]
130 INDEPENDENT = 0,
131 #[doc = "1: Set and clear are reversed when counter L or the unified counter is counting down."]
132 L_REVERSED = 1,
133 #[doc = "2: Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
134 H_REVERSED = 2,
135}
136impl From<SETCLR1_A> for u8 {
137 #[inline(always)]
138 fn from(variant: SETCLR1_A) -> Self {
139 variant as _
140 }
141}
142#[doc = "Field `SETCLR1` reader - Set/clear operation on output 1. Value 0x3 is reserved. Do not program this value."]
143pub struct SETCLR1_R(crate::FieldReader<u8, SETCLR1_A>);
144impl SETCLR1_R {
145 pub(crate) fn new(bits: u8) -> Self {
146 SETCLR1_R(crate::FieldReader::new(bits))
147 }
148 #[doc = r"Get enumerated values variant"]
149 #[inline(always)]
150 pub fn variant(&self) -> Option<SETCLR1_A> {
151 match self.bits {
152 0 => Some(SETCLR1_A::INDEPENDENT),
153 1 => Some(SETCLR1_A::L_REVERSED),
154 2 => Some(SETCLR1_A::H_REVERSED),
155 _ => None,
156 }
157 }
158 #[doc = "Checks if the value of the field is `INDEPENDENT`"]
159 #[inline(always)]
160 pub fn is_independent(&self) -> bool {
161 **self == SETCLR1_A::INDEPENDENT
162 }
163 #[doc = "Checks if the value of the field is `L_REVERSED`"]
164 #[inline(always)]
165 pub fn is_l_reversed(&self) -> bool {
166 **self == SETCLR1_A::L_REVERSED
167 }
168 #[doc = "Checks if the value of the field is `H_REVERSED`"]
169 #[inline(always)]
170 pub fn is_h_reversed(&self) -> bool {
171 **self == SETCLR1_A::H_REVERSED
172 }
173}
174impl core::ops::Deref for SETCLR1_R {
175 type Target = crate::FieldReader<u8, SETCLR1_A>;
176 #[inline(always)]
177 fn deref(&self) -> &Self::Target {
178 &self.0
179 }
180}
181#[doc = "Field `SETCLR1` writer - Set/clear operation on output 1. Value 0x3 is reserved. Do not program this value."]
182pub struct SETCLR1_W<'a> {
183 w: &'a mut W,
184}
185impl<'a> SETCLR1_W<'a> {
186 #[doc = r"Writes `variant` to the field"]
187 #[inline(always)]
188 pub fn variant(self, variant: SETCLR1_A) -> &'a mut W {
189 unsafe { self.bits(variant.into()) }
190 }
191 #[doc = "Set and clear do not depend on the direction of any counter."]
192 #[inline(always)]
193 pub fn independent(self) -> &'a mut W {
194 self.variant(SETCLR1_A::INDEPENDENT)
195 }
196 #[doc = "Set and clear are reversed when counter L or the unified counter is counting down."]
197 #[inline(always)]
198 pub fn l_reversed(self) -> &'a mut W {
199 self.variant(SETCLR1_A::L_REVERSED)
200 }
201 #[doc = "Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
202 #[inline(always)]
203 pub fn h_reversed(self) -> &'a mut W {
204 self.variant(SETCLR1_A::H_REVERSED)
205 }
206 #[doc = r"Writes raw bits to the field"]
207 #[inline(always)]
208 pub unsafe fn bits(self, value: u8) -> &'a mut W {
209 self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2);
210 self.w
211 }
212}
213#[doc = "Set/clear operation on output 2. Value 0x3 is reserved. Do not program this value.\n\nValue on reset: 0"]
214#[derive(Clone, Copy, Debug, PartialEq)]
215#[repr(u8)]
216pub enum SETCLR2_A {
217 #[doc = "0: Set and clear do not depend on the direction of any counter."]
218 INDEPENDENT = 0,
219 #[doc = "1: Set and clear are reversed when counter L or the unified counter is counting down."]
220 L_REVERSED = 1,
221 #[doc = "2: Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
222 H_REVERSED = 2,
223}
224impl From<SETCLR2_A> for u8 {
225 #[inline(always)]
226 fn from(variant: SETCLR2_A) -> Self {
227 variant as _
228 }
229}
230#[doc = "Field `SETCLR2` reader - Set/clear operation on output 2. Value 0x3 is reserved. Do not program this value."]
231pub struct SETCLR2_R(crate::FieldReader<u8, SETCLR2_A>);
232impl SETCLR2_R {
233 pub(crate) fn new(bits: u8) -> Self {
234 SETCLR2_R(crate::FieldReader::new(bits))
235 }
236 #[doc = r"Get enumerated values variant"]
237 #[inline(always)]
238 pub fn variant(&self) -> Option<SETCLR2_A> {
239 match self.bits {
240 0 => Some(SETCLR2_A::INDEPENDENT),
241 1 => Some(SETCLR2_A::L_REVERSED),
242 2 => Some(SETCLR2_A::H_REVERSED),
243 _ => None,
244 }
245 }
246 #[doc = "Checks if the value of the field is `INDEPENDENT`"]
247 #[inline(always)]
248 pub fn is_independent(&self) -> bool {
249 **self == SETCLR2_A::INDEPENDENT
250 }
251 #[doc = "Checks if the value of the field is `L_REVERSED`"]
252 #[inline(always)]
253 pub fn is_l_reversed(&self) -> bool {
254 **self == SETCLR2_A::L_REVERSED
255 }
256 #[doc = "Checks if the value of the field is `H_REVERSED`"]
257 #[inline(always)]
258 pub fn is_h_reversed(&self) -> bool {
259 **self == SETCLR2_A::H_REVERSED
260 }
261}
262impl core::ops::Deref for SETCLR2_R {
263 type Target = crate::FieldReader<u8, SETCLR2_A>;
264 #[inline(always)]
265 fn deref(&self) -> &Self::Target {
266 &self.0
267 }
268}
269#[doc = "Field `SETCLR2` writer - Set/clear operation on output 2. Value 0x3 is reserved. Do not program this value."]
270pub struct SETCLR2_W<'a> {
271 w: &'a mut W,
272}
273impl<'a> SETCLR2_W<'a> {
274 #[doc = r"Writes `variant` to the field"]
275 #[inline(always)]
276 pub fn variant(self, variant: SETCLR2_A) -> &'a mut W {
277 unsafe { self.bits(variant.into()) }
278 }
279 #[doc = "Set and clear do not depend on the direction of any counter."]
280 #[inline(always)]
281 pub fn independent(self) -> &'a mut W {
282 self.variant(SETCLR2_A::INDEPENDENT)
283 }
284 #[doc = "Set and clear are reversed when counter L or the unified counter is counting down."]
285 #[inline(always)]
286 pub fn l_reversed(self) -> &'a mut W {
287 self.variant(SETCLR2_A::L_REVERSED)
288 }
289 #[doc = "Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
290 #[inline(always)]
291 pub fn h_reversed(self) -> &'a mut W {
292 self.variant(SETCLR2_A::H_REVERSED)
293 }
294 #[doc = r"Writes raw bits to the field"]
295 #[inline(always)]
296 pub unsafe fn bits(self, value: u8) -> &'a mut W {
297 self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4);
298 self.w
299 }
300}
301#[doc = "Set/clear operation on output 3. Value 0x3 is reserved. Do not program this value.\n\nValue on reset: 0"]
302#[derive(Clone, Copy, Debug, PartialEq)]
303#[repr(u8)]
304pub enum SETCLR3_A {
305 #[doc = "0: Set and clear do not depend on the direction of any counter."]
306 INDEPENDENT = 0,
307 #[doc = "1: Set and clear are reversed when counter L or the unified counter is counting down."]
308 L_REVERSED = 1,
309 #[doc = "2: Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
310 H_REVERSED = 2,
311}
312impl From<SETCLR3_A> for u8 {
313 #[inline(always)]
314 fn from(variant: SETCLR3_A) -> Self {
315 variant as _
316 }
317}
318#[doc = "Field `SETCLR3` reader - Set/clear operation on output 3. Value 0x3 is reserved. Do not program this value."]
319pub struct SETCLR3_R(crate::FieldReader<u8, SETCLR3_A>);
320impl SETCLR3_R {
321 pub(crate) fn new(bits: u8) -> Self {
322 SETCLR3_R(crate::FieldReader::new(bits))
323 }
324 #[doc = r"Get enumerated values variant"]
325 #[inline(always)]
326 pub fn variant(&self) -> Option<SETCLR3_A> {
327 match self.bits {
328 0 => Some(SETCLR3_A::INDEPENDENT),
329 1 => Some(SETCLR3_A::L_REVERSED),
330 2 => Some(SETCLR3_A::H_REVERSED),
331 _ => None,
332 }
333 }
334 #[doc = "Checks if the value of the field is `INDEPENDENT`"]
335 #[inline(always)]
336 pub fn is_independent(&self) -> bool {
337 **self == SETCLR3_A::INDEPENDENT
338 }
339 #[doc = "Checks if the value of the field is `L_REVERSED`"]
340 #[inline(always)]
341 pub fn is_l_reversed(&self) -> bool {
342 **self == SETCLR3_A::L_REVERSED
343 }
344 #[doc = "Checks if the value of the field is `H_REVERSED`"]
345 #[inline(always)]
346 pub fn is_h_reversed(&self) -> bool {
347 **self == SETCLR3_A::H_REVERSED
348 }
349}
350impl core::ops::Deref for SETCLR3_R {
351 type Target = crate::FieldReader<u8, SETCLR3_A>;
352 #[inline(always)]
353 fn deref(&self) -> &Self::Target {
354 &self.0
355 }
356}
357#[doc = "Field `SETCLR3` writer - Set/clear operation on output 3. Value 0x3 is reserved. Do not program this value."]
358pub struct SETCLR3_W<'a> {
359 w: &'a mut W,
360}
361impl<'a> SETCLR3_W<'a> {
362 #[doc = r"Writes `variant` to the field"]
363 #[inline(always)]
364 pub fn variant(self, variant: SETCLR3_A) -> &'a mut W {
365 unsafe { self.bits(variant.into()) }
366 }
367 #[doc = "Set and clear do not depend on the direction of any counter."]
368 #[inline(always)]
369 pub fn independent(self) -> &'a mut W {
370 self.variant(SETCLR3_A::INDEPENDENT)
371 }
372 #[doc = "Set and clear are reversed when counter L or the unified counter is counting down."]
373 #[inline(always)]
374 pub fn l_reversed(self) -> &'a mut W {
375 self.variant(SETCLR3_A::L_REVERSED)
376 }
377 #[doc = "Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
378 #[inline(always)]
379 pub fn h_reversed(self) -> &'a mut W {
380 self.variant(SETCLR3_A::H_REVERSED)
381 }
382 #[doc = r"Writes raw bits to the field"]
383 #[inline(always)]
384 pub unsafe fn bits(self, value: u8) -> &'a mut W {
385 self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6);
386 self.w
387 }
388}
389#[doc = "Set/clear operation on output 4. Value 0x3 is reserved. Do not program this value.\n\nValue on reset: 0"]
390#[derive(Clone, Copy, Debug, PartialEq)]
391#[repr(u8)]
392pub enum SETCLR4_A {
393 #[doc = "0: Set and clear do not depend on the direction of any counter."]
394 INDEPENDENT = 0,
395 #[doc = "1: Set and clear are reversed when counter L or the unified counter is counting down."]
396 L_REVERSED = 1,
397 #[doc = "2: Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
398 H_REVERSED = 2,
399}
400impl From<SETCLR4_A> for u8 {
401 #[inline(always)]
402 fn from(variant: SETCLR4_A) -> Self {
403 variant as _
404 }
405}
406#[doc = "Field `SETCLR4` reader - Set/clear operation on output 4. Value 0x3 is reserved. Do not program this value."]
407pub struct SETCLR4_R(crate::FieldReader<u8, SETCLR4_A>);
408impl SETCLR4_R {
409 pub(crate) fn new(bits: u8) -> Self {
410 SETCLR4_R(crate::FieldReader::new(bits))
411 }
412 #[doc = r"Get enumerated values variant"]
413 #[inline(always)]
414 pub fn variant(&self) -> Option<SETCLR4_A> {
415 match self.bits {
416 0 => Some(SETCLR4_A::INDEPENDENT),
417 1 => Some(SETCLR4_A::L_REVERSED),
418 2 => Some(SETCLR4_A::H_REVERSED),
419 _ => None,
420 }
421 }
422 #[doc = "Checks if the value of the field is `INDEPENDENT`"]
423 #[inline(always)]
424 pub fn is_independent(&self) -> bool {
425 **self == SETCLR4_A::INDEPENDENT
426 }
427 #[doc = "Checks if the value of the field is `L_REVERSED`"]
428 #[inline(always)]
429 pub fn is_l_reversed(&self) -> bool {
430 **self == SETCLR4_A::L_REVERSED
431 }
432 #[doc = "Checks if the value of the field is `H_REVERSED`"]
433 #[inline(always)]
434 pub fn is_h_reversed(&self) -> bool {
435 **self == SETCLR4_A::H_REVERSED
436 }
437}
438impl core::ops::Deref for SETCLR4_R {
439 type Target = crate::FieldReader<u8, SETCLR4_A>;
440 #[inline(always)]
441 fn deref(&self) -> &Self::Target {
442 &self.0
443 }
444}
445#[doc = "Field `SETCLR4` writer - Set/clear operation on output 4. Value 0x3 is reserved. Do not program this value."]
446pub struct SETCLR4_W<'a> {
447 w: &'a mut W,
448}
449impl<'a> SETCLR4_W<'a> {
450 #[doc = r"Writes `variant` to the field"]
451 #[inline(always)]
452 pub fn variant(self, variant: SETCLR4_A) -> &'a mut W {
453 unsafe { self.bits(variant.into()) }
454 }
455 #[doc = "Set and clear do not depend on the direction of any counter."]
456 #[inline(always)]
457 pub fn independent(self) -> &'a mut W {
458 self.variant(SETCLR4_A::INDEPENDENT)
459 }
460 #[doc = "Set and clear are reversed when counter L or the unified counter is counting down."]
461 #[inline(always)]
462 pub fn l_reversed(self) -> &'a mut W {
463 self.variant(SETCLR4_A::L_REVERSED)
464 }
465 #[doc = "Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
466 #[inline(always)]
467 pub fn h_reversed(self) -> &'a mut W {
468 self.variant(SETCLR4_A::H_REVERSED)
469 }
470 #[doc = r"Writes raw bits to the field"]
471 #[inline(always)]
472 pub unsafe fn bits(self, value: u8) -> &'a mut W {
473 self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8);
474 self.w
475 }
476}
477#[doc = "Set/clear operation on output 5. Value 0x3 is reserved. Do not program this value.\n\nValue on reset: 0"]
478#[derive(Clone, Copy, Debug, PartialEq)]
479#[repr(u8)]
480pub enum SETCLR5_A {
481 #[doc = "0: Set and clear do not depend on the direction of any counter."]
482 INDEPENDENT = 0,
483 #[doc = "1: Set and clear are reversed when counter L or the unified counter is counting down."]
484 L_REVERSED = 1,
485 #[doc = "2: Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
486 H_REVERSED = 2,
487}
488impl From<SETCLR5_A> for u8 {
489 #[inline(always)]
490 fn from(variant: SETCLR5_A) -> Self {
491 variant as _
492 }
493}
494#[doc = "Field `SETCLR5` reader - Set/clear operation on output 5. Value 0x3 is reserved. Do not program this value."]
495pub struct SETCLR5_R(crate::FieldReader<u8, SETCLR5_A>);
496impl SETCLR5_R {
497 pub(crate) fn new(bits: u8) -> Self {
498 SETCLR5_R(crate::FieldReader::new(bits))
499 }
500 #[doc = r"Get enumerated values variant"]
501 #[inline(always)]
502 pub fn variant(&self) -> Option<SETCLR5_A> {
503 match self.bits {
504 0 => Some(SETCLR5_A::INDEPENDENT),
505 1 => Some(SETCLR5_A::L_REVERSED),
506 2 => Some(SETCLR5_A::H_REVERSED),
507 _ => None,
508 }
509 }
510 #[doc = "Checks if the value of the field is `INDEPENDENT`"]
511 #[inline(always)]
512 pub fn is_independent(&self) -> bool {
513 **self == SETCLR5_A::INDEPENDENT
514 }
515 #[doc = "Checks if the value of the field is `L_REVERSED`"]
516 #[inline(always)]
517 pub fn is_l_reversed(&self) -> bool {
518 **self == SETCLR5_A::L_REVERSED
519 }
520 #[doc = "Checks if the value of the field is `H_REVERSED`"]
521 #[inline(always)]
522 pub fn is_h_reversed(&self) -> bool {
523 **self == SETCLR5_A::H_REVERSED
524 }
525}
526impl core::ops::Deref for SETCLR5_R {
527 type Target = crate::FieldReader<u8, SETCLR5_A>;
528 #[inline(always)]
529 fn deref(&self) -> &Self::Target {
530 &self.0
531 }
532}
533#[doc = "Field `SETCLR5` writer - Set/clear operation on output 5. Value 0x3 is reserved. Do not program this value."]
534pub struct SETCLR5_W<'a> {
535 w: &'a mut W,
536}
537impl<'a> SETCLR5_W<'a> {
538 #[doc = r"Writes `variant` to the field"]
539 #[inline(always)]
540 pub fn variant(self, variant: SETCLR5_A) -> &'a mut W {
541 unsafe { self.bits(variant.into()) }
542 }
543 #[doc = "Set and clear do not depend on the direction of any counter."]
544 #[inline(always)]
545 pub fn independent(self) -> &'a mut W {
546 self.variant(SETCLR5_A::INDEPENDENT)
547 }
548 #[doc = "Set and clear are reversed when counter L or the unified counter is counting down."]
549 #[inline(always)]
550 pub fn l_reversed(self) -> &'a mut W {
551 self.variant(SETCLR5_A::L_REVERSED)
552 }
553 #[doc = "Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1."]
554 #[inline(always)]
555 pub fn h_reversed(self) -> &'a mut W {
556 self.variant(SETCLR5_A::H_REVERSED)
557 }
558 #[doc = r"Writes raw bits to the field"]
559 #[inline(always)]
560 pub unsafe fn bits(self, value: u8) -> &'a mut W {
561 self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10);
562 self.w
563 }
564}
565impl R {
566 #[doc = "Bits 0:1 - Set/clear operation on output 0. Value 0x3 is reserved. Do not program this value."]
567 #[inline(always)]
568 pub fn setclr0(&self) -> SETCLR0_R {
569 SETCLR0_R::new((self.bits & 0x03) as u8)
570 }
571 #[doc = "Bits 2:3 - Set/clear operation on output 1. Value 0x3 is reserved. Do not program this value."]
572 #[inline(always)]
573 pub fn setclr1(&self) -> SETCLR1_R {
574 SETCLR1_R::new(((self.bits >> 2) & 0x03) as u8)
575 }
576 #[doc = "Bits 4:5 - Set/clear operation on output 2. Value 0x3 is reserved. Do not program this value."]
577 #[inline(always)]
578 pub fn setclr2(&self) -> SETCLR2_R {
579 SETCLR2_R::new(((self.bits >> 4) & 0x03) as u8)
580 }
581 #[doc = "Bits 6:7 - Set/clear operation on output 3. Value 0x3 is reserved. Do not program this value."]
582 #[inline(always)]
583 pub fn setclr3(&self) -> SETCLR3_R {
584 SETCLR3_R::new(((self.bits >> 6) & 0x03) as u8)
585 }
586 #[doc = "Bits 8:9 - Set/clear operation on output 4. Value 0x3 is reserved. Do not program this value."]
587 #[inline(always)]
588 pub fn setclr4(&self) -> SETCLR4_R {
589 SETCLR4_R::new(((self.bits >> 8) & 0x03) as u8)
590 }
591 #[doc = "Bits 10:11 - Set/clear operation on output 5. Value 0x3 is reserved. Do not program this value."]
592 #[inline(always)]
593 pub fn setclr5(&self) -> SETCLR5_R {
594 SETCLR5_R::new(((self.bits >> 10) & 0x03) as u8)
595 }
596}
597impl W {
598 #[doc = "Bits 0:1 - Set/clear operation on output 0. Value 0x3 is reserved. Do not program this value."]
599 #[inline(always)]
600 pub fn setclr0(&mut self) -> SETCLR0_W {
601 SETCLR0_W { w: self }
602 }
603 #[doc = "Bits 2:3 - Set/clear operation on output 1. Value 0x3 is reserved. Do not program this value."]
604 #[inline(always)]
605 pub fn setclr1(&mut self) -> SETCLR1_W {
606 SETCLR1_W { w: self }
607 }
608 #[doc = "Bits 4:5 - Set/clear operation on output 2. Value 0x3 is reserved. Do not program this value."]
609 #[inline(always)]
610 pub fn setclr2(&mut self) -> SETCLR2_W {
611 SETCLR2_W { w: self }
612 }
613 #[doc = "Bits 6:7 - Set/clear operation on output 3. Value 0x3 is reserved. Do not program this value."]
614 #[inline(always)]
615 pub fn setclr3(&mut self) -> SETCLR3_W {
616 SETCLR3_W { w: self }
617 }
618 #[doc = "Bits 8:9 - Set/clear operation on output 4. Value 0x3 is reserved. Do not program this value."]
619 #[inline(always)]
620 pub fn setclr4(&mut self) -> SETCLR4_W {
621 SETCLR4_W { w: self }
622 }
623 #[doc = "Bits 10:11 - Set/clear operation on output 5. Value 0x3 is reserved. Do not program this value."]
624 #[inline(always)]
625 pub fn setclr5(&mut self) -> SETCLR5_W {
626 SETCLR5_W { w: self }
627 }
628 #[doc = "Writes raw bits to the register."]
629 #[inline(always)]
630 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
631 self.0.bits(bits);
632 self
633 }
634}
635#[doc = "SCT output counter direction control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [outputdirctrl](index.html) module"]
636pub struct OUTPUTDIRCTRL_SPEC;
637impl crate::RegisterSpec for OUTPUTDIRCTRL_SPEC {
638 type Ux = u32;
639}
640#[doc = "`read()` method returns [outputdirctrl::R](R) reader structure"]
641impl crate::Readable for OUTPUTDIRCTRL_SPEC {
642 type Reader = R;
643}
644#[doc = "`write(|w| ..)` method takes [outputdirctrl::W](W) writer structure"]
645impl crate::Writable for OUTPUTDIRCTRL_SPEC {
646 type Writer = W;
647}
648#[doc = "`reset()` method sets OUTPUTDIRCTRL to value 0"]
649impl crate::Resettable for OUTPUTDIRCTRL_SPEC {
650 #[inline(always)]
651 fn reset_value() -> Self::Ux {
652 0
653 }
654}