lpc845_pac/sct0/
res.rs

1#[doc = "Register `RES` reader"]
2pub struct R(crate::R<RES_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<RES_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<RES_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<RES_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `RES` writer"]
17pub struct W(crate::W<RES_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<RES_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<RES_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<RES_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Effect of simultaneous set and clear on output 0.\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum O0RES_A {
41    #[doc = "0: No change."]
42    NO_CHANGE = 0,
43    #[doc = "1: Set output (or clear based on the SETCLR0 field in the OUTPUTDIRCTRL register)."]
44    SET = 1,
45    #[doc = "2: Clear output (or set based on the SETCLR0 field)."]
46    CLEAR = 2,
47    #[doc = "3: Toggle output."]
48    TOGGLE_OUTPUT = 3,
49}
50impl From<O0RES_A> for u8 {
51    #[inline(always)]
52    fn from(variant: O0RES_A) -> Self {
53        variant as _
54    }
55}
56#[doc = "Field `O0RES` reader - Effect of simultaneous set and clear on output 0."]
57pub struct O0RES_R(crate::FieldReader<u8, O0RES_A>);
58impl O0RES_R {
59    pub(crate) fn new(bits: u8) -> Self {
60        O0RES_R(crate::FieldReader::new(bits))
61    }
62    #[doc = r"Get enumerated values variant"]
63    #[inline(always)]
64    pub fn variant(&self) -> O0RES_A {
65        match self.bits {
66            0 => O0RES_A::NO_CHANGE,
67            1 => O0RES_A::SET,
68            2 => O0RES_A::CLEAR,
69            3 => O0RES_A::TOGGLE_OUTPUT,
70            _ => unreachable!(),
71        }
72    }
73    #[doc = "Checks if the value of the field is `NO_CHANGE`"]
74    #[inline(always)]
75    pub fn is_no_change(&self) -> bool {
76        **self == O0RES_A::NO_CHANGE
77    }
78    #[doc = "Checks if the value of the field is `SET`"]
79    #[inline(always)]
80    pub fn is_set(&self) -> bool {
81        **self == O0RES_A::SET
82    }
83    #[doc = "Checks if the value of the field is `CLEAR`"]
84    #[inline(always)]
85    pub fn is_clear(&self) -> bool {
86        **self == O0RES_A::CLEAR
87    }
88    #[doc = "Checks if the value of the field is `TOGGLE_OUTPUT`"]
89    #[inline(always)]
90    pub fn is_toggle_output(&self) -> bool {
91        **self == O0RES_A::TOGGLE_OUTPUT
92    }
93}
94impl core::ops::Deref for O0RES_R {
95    type Target = crate::FieldReader<u8, O0RES_A>;
96    #[inline(always)]
97    fn deref(&self) -> &Self::Target {
98        &self.0
99    }
100}
101#[doc = "Field `O0RES` writer - Effect of simultaneous set and clear on output 0."]
102pub struct O0RES_W<'a> {
103    w: &'a mut W,
104}
105impl<'a> O0RES_W<'a> {
106    #[doc = r"Writes `variant` to the field"]
107    #[inline(always)]
108    pub fn variant(self, variant: O0RES_A) -> &'a mut W {
109        self.bits(variant.into())
110    }
111    #[doc = "No change."]
112    #[inline(always)]
113    pub fn no_change(self) -> &'a mut W {
114        self.variant(O0RES_A::NO_CHANGE)
115    }
116    #[doc = "Set output (or clear based on the SETCLR0 field in the OUTPUTDIRCTRL register)."]
117    #[inline(always)]
118    pub fn set(self) -> &'a mut W {
119        self.variant(O0RES_A::SET)
120    }
121    #[doc = "Clear output (or set based on the SETCLR0 field)."]
122    #[inline(always)]
123    pub fn clear(self) -> &'a mut W {
124        self.variant(O0RES_A::CLEAR)
125    }
126    #[doc = "Toggle output."]
127    #[inline(always)]
128    pub fn toggle_output(self) -> &'a mut W {
129        self.variant(O0RES_A::TOGGLE_OUTPUT)
130    }
131    #[doc = r"Writes raw bits to the field"]
132    #[inline(always)]
133    pub fn bits(self, value: u8) -> &'a mut W {
134        self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03);
135        self.w
136    }
137}
138#[doc = "Effect of simultaneous set and clear on output 1.\n\nValue on reset: 0"]
139#[derive(Clone, Copy, Debug, PartialEq)]
140#[repr(u8)]
141pub enum O1RES_A {
142    #[doc = "0: No change."]
143    NO_CHANGE = 0,
144    #[doc = "1: Set output (or clear based on the SETCLR1 field in the OUTPUTDIRCTRL register)."]
145    SET = 1,
146    #[doc = "2: Clear output (or set based on the SETCLR1 field)."]
147    CLEAR = 2,
148    #[doc = "3: Toggle output."]
149    TOGGLE_OUTPUT = 3,
150}
151impl From<O1RES_A> for u8 {
152    #[inline(always)]
153    fn from(variant: O1RES_A) -> Self {
154        variant as _
155    }
156}
157#[doc = "Field `O1RES` reader - Effect of simultaneous set and clear on output 1."]
158pub struct O1RES_R(crate::FieldReader<u8, O1RES_A>);
159impl O1RES_R {
160    pub(crate) fn new(bits: u8) -> Self {
161        O1RES_R(crate::FieldReader::new(bits))
162    }
163    #[doc = r"Get enumerated values variant"]
164    #[inline(always)]
165    pub fn variant(&self) -> O1RES_A {
166        match self.bits {
167            0 => O1RES_A::NO_CHANGE,
168            1 => O1RES_A::SET,
169            2 => O1RES_A::CLEAR,
170            3 => O1RES_A::TOGGLE_OUTPUT,
171            _ => unreachable!(),
172        }
173    }
174    #[doc = "Checks if the value of the field is `NO_CHANGE`"]
175    #[inline(always)]
176    pub fn is_no_change(&self) -> bool {
177        **self == O1RES_A::NO_CHANGE
178    }
179    #[doc = "Checks if the value of the field is `SET`"]
180    #[inline(always)]
181    pub fn is_set(&self) -> bool {
182        **self == O1RES_A::SET
183    }
184    #[doc = "Checks if the value of the field is `CLEAR`"]
185    #[inline(always)]
186    pub fn is_clear(&self) -> bool {
187        **self == O1RES_A::CLEAR
188    }
189    #[doc = "Checks if the value of the field is `TOGGLE_OUTPUT`"]
190    #[inline(always)]
191    pub fn is_toggle_output(&self) -> bool {
192        **self == O1RES_A::TOGGLE_OUTPUT
193    }
194}
195impl core::ops::Deref for O1RES_R {
196    type Target = crate::FieldReader<u8, O1RES_A>;
197    #[inline(always)]
198    fn deref(&self) -> &Self::Target {
199        &self.0
200    }
201}
202#[doc = "Field `O1RES` writer - Effect of simultaneous set and clear on output 1."]
203pub struct O1RES_W<'a> {
204    w: &'a mut W,
205}
206impl<'a> O1RES_W<'a> {
207    #[doc = r"Writes `variant` to the field"]
208    #[inline(always)]
209    pub fn variant(self, variant: O1RES_A) -> &'a mut W {
210        self.bits(variant.into())
211    }
212    #[doc = "No change."]
213    #[inline(always)]
214    pub fn no_change(self) -> &'a mut W {
215        self.variant(O1RES_A::NO_CHANGE)
216    }
217    #[doc = "Set output (or clear based on the SETCLR1 field in the OUTPUTDIRCTRL register)."]
218    #[inline(always)]
219    pub fn set(self) -> &'a mut W {
220        self.variant(O1RES_A::SET)
221    }
222    #[doc = "Clear output (or set based on the SETCLR1 field)."]
223    #[inline(always)]
224    pub fn clear(self) -> &'a mut W {
225        self.variant(O1RES_A::CLEAR)
226    }
227    #[doc = "Toggle output."]
228    #[inline(always)]
229    pub fn toggle_output(self) -> &'a mut W {
230        self.variant(O1RES_A::TOGGLE_OUTPUT)
231    }
232    #[doc = r"Writes raw bits to the field"]
233    #[inline(always)]
234    pub fn bits(self, value: u8) -> &'a mut W {
235        self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2);
236        self.w
237    }
238}
239#[doc = "Effect of simultaneous set and clear on output 2.\n\nValue on reset: 0"]
240#[derive(Clone, Copy, Debug, PartialEq)]
241#[repr(u8)]
242pub enum O2RES_A {
243    #[doc = "0: No change."]
244    NO_CHANGE = 0,
245    #[doc = "1: Set output (or clear based on the SETCLR2 field in the OUTPUTDIRCTRL register)."]
246    SET = 1,
247    #[doc = "2: Clear output n (or set based on the SETCLR2 field)."]
248    CLEAR = 2,
249    #[doc = "3: Toggle output."]
250    TOGGLE_OUTPUT = 3,
251}
252impl From<O2RES_A> for u8 {
253    #[inline(always)]
254    fn from(variant: O2RES_A) -> Self {
255        variant as _
256    }
257}
258#[doc = "Field `O2RES` reader - Effect of simultaneous set and clear on output 2."]
259pub struct O2RES_R(crate::FieldReader<u8, O2RES_A>);
260impl O2RES_R {
261    pub(crate) fn new(bits: u8) -> Self {
262        O2RES_R(crate::FieldReader::new(bits))
263    }
264    #[doc = r"Get enumerated values variant"]
265    #[inline(always)]
266    pub fn variant(&self) -> O2RES_A {
267        match self.bits {
268            0 => O2RES_A::NO_CHANGE,
269            1 => O2RES_A::SET,
270            2 => O2RES_A::CLEAR,
271            3 => O2RES_A::TOGGLE_OUTPUT,
272            _ => unreachable!(),
273        }
274    }
275    #[doc = "Checks if the value of the field is `NO_CHANGE`"]
276    #[inline(always)]
277    pub fn is_no_change(&self) -> bool {
278        **self == O2RES_A::NO_CHANGE
279    }
280    #[doc = "Checks if the value of the field is `SET`"]
281    #[inline(always)]
282    pub fn is_set(&self) -> bool {
283        **self == O2RES_A::SET
284    }
285    #[doc = "Checks if the value of the field is `CLEAR`"]
286    #[inline(always)]
287    pub fn is_clear(&self) -> bool {
288        **self == O2RES_A::CLEAR
289    }
290    #[doc = "Checks if the value of the field is `TOGGLE_OUTPUT`"]
291    #[inline(always)]
292    pub fn is_toggle_output(&self) -> bool {
293        **self == O2RES_A::TOGGLE_OUTPUT
294    }
295}
296impl core::ops::Deref for O2RES_R {
297    type Target = crate::FieldReader<u8, O2RES_A>;
298    #[inline(always)]
299    fn deref(&self) -> &Self::Target {
300        &self.0
301    }
302}
303#[doc = "Field `O2RES` writer - Effect of simultaneous set and clear on output 2."]
304pub struct O2RES_W<'a> {
305    w: &'a mut W,
306}
307impl<'a> O2RES_W<'a> {
308    #[doc = r"Writes `variant` to the field"]
309    #[inline(always)]
310    pub fn variant(self, variant: O2RES_A) -> &'a mut W {
311        self.bits(variant.into())
312    }
313    #[doc = "No change."]
314    #[inline(always)]
315    pub fn no_change(self) -> &'a mut W {
316        self.variant(O2RES_A::NO_CHANGE)
317    }
318    #[doc = "Set output (or clear based on the SETCLR2 field in the OUTPUTDIRCTRL register)."]
319    #[inline(always)]
320    pub fn set(self) -> &'a mut W {
321        self.variant(O2RES_A::SET)
322    }
323    #[doc = "Clear output n (or set based on the SETCLR2 field)."]
324    #[inline(always)]
325    pub fn clear(self) -> &'a mut W {
326        self.variant(O2RES_A::CLEAR)
327    }
328    #[doc = "Toggle output."]
329    #[inline(always)]
330    pub fn toggle_output(self) -> &'a mut W {
331        self.variant(O2RES_A::TOGGLE_OUTPUT)
332    }
333    #[doc = r"Writes raw bits to the field"]
334    #[inline(always)]
335    pub fn bits(self, value: u8) -> &'a mut W {
336        self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4);
337        self.w
338    }
339}
340#[doc = "Effect of simultaneous set and clear on output 3.\n\nValue on reset: 0"]
341#[derive(Clone, Copy, Debug, PartialEq)]
342#[repr(u8)]
343pub enum O3RES_A {
344    #[doc = "0: No change."]
345    NO_CHANGE = 0,
346    #[doc = "1: Set output (or clear based on the SETCLR3 field in the OUTPUTDIRCTRL register)."]
347    SET = 1,
348    #[doc = "2: Clear output (or set based on the SETCLR3 field)."]
349    CLEAR = 2,
350    #[doc = "3: Toggle output."]
351    TOGGLE_OUTPUT = 3,
352}
353impl From<O3RES_A> for u8 {
354    #[inline(always)]
355    fn from(variant: O3RES_A) -> Self {
356        variant as _
357    }
358}
359#[doc = "Field `O3RES` reader - Effect of simultaneous set and clear on output 3."]
360pub struct O3RES_R(crate::FieldReader<u8, O3RES_A>);
361impl O3RES_R {
362    pub(crate) fn new(bits: u8) -> Self {
363        O3RES_R(crate::FieldReader::new(bits))
364    }
365    #[doc = r"Get enumerated values variant"]
366    #[inline(always)]
367    pub fn variant(&self) -> O3RES_A {
368        match self.bits {
369            0 => O3RES_A::NO_CHANGE,
370            1 => O3RES_A::SET,
371            2 => O3RES_A::CLEAR,
372            3 => O3RES_A::TOGGLE_OUTPUT,
373            _ => unreachable!(),
374        }
375    }
376    #[doc = "Checks if the value of the field is `NO_CHANGE`"]
377    #[inline(always)]
378    pub fn is_no_change(&self) -> bool {
379        **self == O3RES_A::NO_CHANGE
380    }
381    #[doc = "Checks if the value of the field is `SET`"]
382    #[inline(always)]
383    pub fn is_set(&self) -> bool {
384        **self == O3RES_A::SET
385    }
386    #[doc = "Checks if the value of the field is `CLEAR`"]
387    #[inline(always)]
388    pub fn is_clear(&self) -> bool {
389        **self == O3RES_A::CLEAR
390    }
391    #[doc = "Checks if the value of the field is `TOGGLE_OUTPUT`"]
392    #[inline(always)]
393    pub fn is_toggle_output(&self) -> bool {
394        **self == O3RES_A::TOGGLE_OUTPUT
395    }
396}
397impl core::ops::Deref for O3RES_R {
398    type Target = crate::FieldReader<u8, O3RES_A>;
399    #[inline(always)]
400    fn deref(&self) -> &Self::Target {
401        &self.0
402    }
403}
404#[doc = "Field `O3RES` writer - Effect of simultaneous set and clear on output 3."]
405pub struct O3RES_W<'a> {
406    w: &'a mut W,
407}
408impl<'a> O3RES_W<'a> {
409    #[doc = r"Writes `variant` to the field"]
410    #[inline(always)]
411    pub fn variant(self, variant: O3RES_A) -> &'a mut W {
412        self.bits(variant.into())
413    }
414    #[doc = "No change."]
415    #[inline(always)]
416    pub fn no_change(self) -> &'a mut W {
417        self.variant(O3RES_A::NO_CHANGE)
418    }
419    #[doc = "Set output (or clear based on the SETCLR3 field in the OUTPUTDIRCTRL register)."]
420    #[inline(always)]
421    pub fn set(self) -> &'a mut W {
422        self.variant(O3RES_A::SET)
423    }
424    #[doc = "Clear output (or set based on the SETCLR3 field)."]
425    #[inline(always)]
426    pub fn clear(self) -> &'a mut W {
427        self.variant(O3RES_A::CLEAR)
428    }
429    #[doc = "Toggle output."]
430    #[inline(always)]
431    pub fn toggle_output(self) -> &'a mut W {
432        self.variant(O3RES_A::TOGGLE_OUTPUT)
433    }
434    #[doc = r"Writes raw bits to the field"]
435    #[inline(always)]
436    pub fn bits(self, value: u8) -> &'a mut W {
437        self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6);
438        self.w
439    }
440}
441#[doc = "Effect of simultaneous set and clear on output 4.\n\nValue on reset: 0"]
442#[derive(Clone, Copy, Debug, PartialEq)]
443#[repr(u8)]
444pub enum O4RES_A {
445    #[doc = "0: No change."]
446    NO_CHANGE = 0,
447    #[doc = "1: Set output (or clear based on the SETCLR4 field in the OUTPUTDIRCTRL register)."]
448    SET = 1,
449    #[doc = "2: Clear output (or set based on the SETCLR4 field)."]
450    CLEAR = 2,
451    #[doc = "3: Toggle output."]
452    TOGGLE_OUTPUT = 3,
453}
454impl From<O4RES_A> for u8 {
455    #[inline(always)]
456    fn from(variant: O4RES_A) -> Self {
457        variant as _
458    }
459}
460#[doc = "Field `O4RES` reader - Effect of simultaneous set and clear on output 4."]
461pub struct O4RES_R(crate::FieldReader<u8, O4RES_A>);
462impl O4RES_R {
463    pub(crate) fn new(bits: u8) -> Self {
464        O4RES_R(crate::FieldReader::new(bits))
465    }
466    #[doc = r"Get enumerated values variant"]
467    #[inline(always)]
468    pub fn variant(&self) -> O4RES_A {
469        match self.bits {
470            0 => O4RES_A::NO_CHANGE,
471            1 => O4RES_A::SET,
472            2 => O4RES_A::CLEAR,
473            3 => O4RES_A::TOGGLE_OUTPUT,
474            _ => unreachable!(),
475        }
476    }
477    #[doc = "Checks if the value of the field is `NO_CHANGE`"]
478    #[inline(always)]
479    pub fn is_no_change(&self) -> bool {
480        **self == O4RES_A::NO_CHANGE
481    }
482    #[doc = "Checks if the value of the field is `SET`"]
483    #[inline(always)]
484    pub fn is_set(&self) -> bool {
485        **self == O4RES_A::SET
486    }
487    #[doc = "Checks if the value of the field is `CLEAR`"]
488    #[inline(always)]
489    pub fn is_clear(&self) -> bool {
490        **self == O4RES_A::CLEAR
491    }
492    #[doc = "Checks if the value of the field is `TOGGLE_OUTPUT`"]
493    #[inline(always)]
494    pub fn is_toggle_output(&self) -> bool {
495        **self == O4RES_A::TOGGLE_OUTPUT
496    }
497}
498impl core::ops::Deref for O4RES_R {
499    type Target = crate::FieldReader<u8, O4RES_A>;
500    #[inline(always)]
501    fn deref(&self) -> &Self::Target {
502        &self.0
503    }
504}
505#[doc = "Field `O4RES` writer - Effect of simultaneous set and clear on output 4."]
506pub struct O4RES_W<'a> {
507    w: &'a mut W,
508}
509impl<'a> O4RES_W<'a> {
510    #[doc = r"Writes `variant` to the field"]
511    #[inline(always)]
512    pub fn variant(self, variant: O4RES_A) -> &'a mut W {
513        self.bits(variant.into())
514    }
515    #[doc = "No change."]
516    #[inline(always)]
517    pub fn no_change(self) -> &'a mut W {
518        self.variant(O4RES_A::NO_CHANGE)
519    }
520    #[doc = "Set output (or clear based on the SETCLR4 field in the OUTPUTDIRCTRL register)."]
521    #[inline(always)]
522    pub fn set(self) -> &'a mut W {
523        self.variant(O4RES_A::SET)
524    }
525    #[doc = "Clear output (or set based on the SETCLR4 field)."]
526    #[inline(always)]
527    pub fn clear(self) -> &'a mut W {
528        self.variant(O4RES_A::CLEAR)
529    }
530    #[doc = "Toggle output."]
531    #[inline(always)]
532    pub fn toggle_output(self) -> &'a mut W {
533        self.variant(O4RES_A::TOGGLE_OUTPUT)
534    }
535    #[doc = r"Writes raw bits to the field"]
536    #[inline(always)]
537    pub fn bits(self, value: u8) -> &'a mut W {
538        self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8);
539        self.w
540    }
541}
542#[doc = "Effect of simultaneous set and clear on output 5.\n\nValue on reset: 0"]
543#[derive(Clone, Copy, Debug, PartialEq)]
544#[repr(u8)]
545pub enum O5RES_A {
546    #[doc = "0: No change."]
547    NO_CHANGE = 0,
548    #[doc = "1: Set output (or clear based on the SETCLR5 field in the OUTPUTDIRCTRL register)."]
549    SET = 1,
550    #[doc = "2: Clear output (or set based on the SETCLR5 field)."]
551    CLEAR = 2,
552    #[doc = "3: Toggle output."]
553    TOGGLE_OUTPUT = 3,
554}
555impl From<O5RES_A> for u8 {
556    #[inline(always)]
557    fn from(variant: O5RES_A) -> Self {
558        variant as _
559    }
560}
561#[doc = "Field `O5RES` reader - Effect of simultaneous set and clear on output 5."]
562pub struct O5RES_R(crate::FieldReader<u8, O5RES_A>);
563impl O5RES_R {
564    pub(crate) fn new(bits: u8) -> Self {
565        O5RES_R(crate::FieldReader::new(bits))
566    }
567    #[doc = r"Get enumerated values variant"]
568    #[inline(always)]
569    pub fn variant(&self) -> O5RES_A {
570        match self.bits {
571            0 => O5RES_A::NO_CHANGE,
572            1 => O5RES_A::SET,
573            2 => O5RES_A::CLEAR,
574            3 => O5RES_A::TOGGLE_OUTPUT,
575            _ => unreachable!(),
576        }
577    }
578    #[doc = "Checks if the value of the field is `NO_CHANGE`"]
579    #[inline(always)]
580    pub fn is_no_change(&self) -> bool {
581        **self == O5RES_A::NO_CHANGE
582    }
583    #[doc = "Checks if the value of the field is `SET`"]
584    #[inline(always)]
585    pub fn is_set(&self) -> bool {
586        **self == O5RES_A::SET
587    }
588    #[doc = "Checks if the value of the field is `CLEAR`"]
589    #[inline(always)]
590    pub fn is_clear(&self) -> bool {
591        **self == O5RES_A::CLEAR
592    }
593    #[doc = "Checks if the value of the field is `TOGGLE_OUTPUT`"]
594    #[inline(always)]
595    pub fn is_toggle_output(&self) -> bool {
596        **self == O5RES_A::TOGGLE_OUTPUT
597    }
598}
599impl core::ops::Deref for O5RES_R {
600    type Target = crate::FieldReader<u8, O5RES_A>;
601    #[inline(always)]
602    fn deref(&self) -> &Self::Target {
603        &self.0
604    }
605}
606#[doc = "Field `O5RES` writer - Effect of simultaneous set and clear on output 5."]
607pub struct O5RES_W<'a> {
608    w: &'a mut W,
609}
610impl<'a> O5RES_W<'a> {
611    #[doc = r"Writes `variant` to the field"]
612    #[inline(always)]
613    pub fn variant(self, variant: O5RES_A) -> &'a mut W {
614        self.bits(variant.into())
615    }
616    #[doc = "No change."]
617    #[inline(always)]
618    pub fn no_change(self) -> &'a mut W {
619        self.variant(O5RES_A::NO_CHANGE)
620    }
621    #[doc = "Set output (or clear based on the SETCLR5 field in the OUTPUTDIRCTRL register)."]
622    #[inline(always)]
623    pub fn set(self) -> &'a mut W {
624        self.variant(O5RES_A::SET)
625    }
626    #[doc = "Clear output (or set based on the SETCLR5 field)."]
627    #[inline(always)]
628    pub fn clear(self) -> &'a mut W {
629        self.variant(O5RES_A::CLEAR)
630    }
631    #[doc = "Toggle output."]
632    #[inline(always)]
633    pub fn toggle_output(self) -> &'a mut W {
634        self.variant(O5RES_A::TOGGLE_OUTPUT)
635    }
636    #[doc = r"Writes raw bits to the field"]
637    #[inline(always)]
638    pub fn bits(self, value: u8) -> &'a mut W {
639        self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10);
640        self.w
641    }
642}
643#[doc = "Effect of simultaneous set and clear on output 6.\n\nValue on reset: 0"]
644#[derive(Clone, Copy, Debug, PartialEq)]
645#[repr(u8)]
646pub enum O6RES_A {
647    #[doc = "0: No change."]
648    NO_CHANGE = 0,
649    #[doc = "1: Set output (or clear based on the SETCLR6 field in the OUTPUTDIRCTRL register)."]
650    SET = 1,
651    #[doc = "2: Clear output (or set based on the SETCLR6 field)."]
652    CLEAR = 2,
653    #[doc = "3: Toggle output."]
654    TOGGLE_OUTPUT = 3,
655}
656impl From<O6RES_A> for u8 {
657    #[inline(always)]
658    fn from(variant: O6RES_A) -> Self {
659        variant as _
660    }
661}
662#[doc = "Field `O6RES` reader - Effect of simultaneous set and clear on output 6."]
663pub struct O6RES_R(crate::FieldReader<u8, O6RES_A>);
664impl O6RES_R {
665    pub(crate) fn new(bits: u8) -> Self {
666        O6RES_R(crate::FieldReader::new(bits))
667    }
668    #[doc = r"Get enumerated values variant"]
669    #[inline(always)]
670    pub fn variant(&self) -> O6RES_A {
671        match self.bits {
672            0 => O6RES_A::NO_CHANGE,
673            1 => O6RES_A::SET,
674            2 => O6RES_A::CLEAR,
675            3 => O6RES_A::TOGGLE_OUTPUT,
676            _ => unreachable!(),
677        }
678    }
679    #[doc = "Checks if the value of the field is `NO_CHANGE`"]
680    #[inline(always)]
681    pub fn is_no_change(&self) -> bool {
682        **self == O6RES_A::NO_CHANGE
683    }
684    #[doc = "Checks if the value of the field is `SET`"]
685    #[inline(always)]
686    pub fn is_set(&self) -> bool {
687        **self == O6RES_A::SET
688    }
689    #[doc = "Checks if the value of the field is `CLEAR`"]
690    #[inline(always)]
691    pub fn is_clear(&self) -> bool {
692        **self == O6RES_A::CLEAR
693    }
694    #[doc = "Checks if the value of the field is `TOGGLE_OUTPUT`"]
695    #[inline(always)]
696    pub fn is_toggle_output(&self) -> bool {
697        **self == O6RES_A::TOGGLE_OUTPUT
698    }
699}
700impl core::ops::Deref for O6RES_R {
701    type Target = crate::FieldReader<u8, O6RES_A>;
702    #[inline(always)]
703    fn deref(&self) -> &Self::Target {
704        &self.0
705    }
706}
707#[doc = "Field `O6RES` writer - Effect of simultaneous set and clear on output 6."]
708pub struct O6RES_W<'a> {
709    w: &'a mut W,
710}
711impl<'a> O6RES_W<'a> {
712    #[doc = r"Writes `variant` to the field"]
713    #[inline(always)]
714    pub fn variant(self, variant: O6RES_A) -> &'a mut W {
715        self.bits(variant.into())
716    }
717    #[doc = "No change."]
718    #[inline(always)]
719    pub fn no_change(self) -> &'a mut W {
720        self.variant(O6RES_A::NO_CHANGE)
721    }
722    #[doc = "Set output (or clear based on the SETCLR6 field in the OUTPUTDIRCTRL register)."]
723    #[inline(always)]
724    pub fn set(self) -> &'a mut W {
725        self.variant(O6RES_A::SET)
726    }
727    #[doc = "Clear output (or set based on the SETCLR6 field)."]
728    #[inline(always)]
729    pub fn clear(self) -> &'a mut W {
730        self.variant(O6RES_A::CLEAR)
731    }
732    #[doc = "Toggle output."]
733    #[inline(always)]
734    pub fn toggle_output(self) -> &'a mut W {
735        self.variant(O6RES_A::TOGGLE_OUTPUT)
736    }
737    #[doc = r"Writes raw bits to the field"]
738    #[inline(always)]
739    pub fn bits(self, value: u8) -> &'a mut W {
740        self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12);
741        self.w
742    }
743}
744impl R {
745    #[doc = "Bits 0:1 - Effect of simultaneous set and clear on output 0."]
746    #[inline(always)]
747    pub fn o0res(&self) -> O0RES_R {
748        O0RES_R::new((self.bits & 0x03) as u8)
749    }
750    #[doc = "Bits 2:3 - Effect of simultaneous set and clear on output 1."]
751    #[inline(always)]
752    pub fn o1res(&self) -> O1RES_R {
753        O1RES_R::new(((self.bits >> 2) & 0x03) as u8)
754    }
755    #[doc = "Bits 4:5 - Effect of simultaneous set and clear on output 2."]
756    #[inline(always)]
757    pub fn o2res(&self) -> O2RES_R {
758        O2RES_R::new(((self.bits >> 4) & 0x03) as u8)
759    }
760    #[doc = "Bits 6:7 - Effect of simultaneous set and clear on output 3."]
761    #[inline(always)]
762    pub fn o3res(&self) -> O3RES_R {
763        O3RES_R::new(((self.bits >> 6) & 0x03) as u8)
764    }
765    #[doc = "Bits 8:9 - Effect of simultaneous set and clear on output 4."]
766    #[inline(always)]
767    pub fn o4res(&self) -> O4RES_R {
768        O4RES_R::new(((self.bits >> 8) & 0x03) as u8)
769    }
770    #[doc = "Bits 10:11 - Effect of simultaneous set and clear on output 5."]
771    #[inline(always)]
772    pub fn o5res(&self) -> O5RES_R {
773        O5RES_R::new(((self.bits >> 10) & 0x03) as u8)
774    }
775    #[doc = "Bits 12:13 - Effect of simultaneous set and clear on output 6."]
776    #[inline(always)]
777    pub fn o6res(&self) -> O6RES_R {
778        O6RES_R::new(((self.bits >> 12) & 0x03) as u8)
779    }
780}
781impl W {
782    #[doc = "Bits 0:1 - Effect of simultaneous set and clear on output 0."]
783    #[inline(always)]
784    pub fn o0res(&mut self) -> O0RES_W {
785        O0RES_W { w: self }
786    }
787    #[doc = "Bits 2:3 - Effect of simultaneous set and clear on output 1."]
788    #[inline(always)]
789    pub fn o1res(&mut self) -> O1RES_W {
790        O1RES_W { w: self }
791    }
792    #[doc = "Bits 4:5 - Effect of simultaneous set and clear on output 2."]
793    #[inline(always)]
794    pub fn o2res(&mut self) -> O2RES_W {
795        O2RES_W { w: self }
796    }
797    #[doc = "Bits 6:7 - Effect of simultaneous set and clear on output 3."]
798    #[inline(always)]
799    pub fn o3res(&mut self) -> O3RES_W {
800        O3RES_W { w: self }
801    }
802    #[doc = "Bits 8:9 - Effect of simultaneous set and clear on output 4."]
803    #[inline(always)]
804    pub fn o4res(&mut self) -> O4RES_W {
805        O4RES_W { w: self }
806    }
807    #[doc = "Bits 10:11 - Effect of simultaneous set and clear on output 5."]
808    #[inline(always)]
809    pub fn o5res(&mut self) -> O5RES_W {
810        O5RES_W { w: self }
811    }
812    #[doc = "Bits 12:13 - Effect of simultaneous set and clear on output 6."]
813    #[inline(always)]
814    pub fn o6res(&mut self) -> O6RES_W {
815        O6RES_W { w: self }
816    }
817    #[doc = "Writes raw bits to the register."]
818    #[inline(always)]
819    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
820        self.0.bits(bits);
821        self
822    }
823}
824#[doc = "SCT conflict resolution 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 [res](index.html) module"]
825pub struct RES_SPEC;
826impl crate::RegisterSpec for RES_SPEC {
827    type Ux = u32;
828}
829#[doc = "`read()` method returns [res::R](R) reader structure"]
830impl crate::Readable for RES_SPEC {
831    type Reader = R;
832}
833#[doc = "`write(|w| ..)` method takes [res::W](W) writer structure"]
834impl crate::Writable for RES_SPEC {
835    type Writer = W;
836}
837#[doc = "`reset()` method sets RES to value 0"]
838impl crate::Resettable for RES_SPEC {
839    #[inline(always)]
840    fn reset_value() -> Self::Ux {
841        0
842    }
843}