lpc82x_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}
643impl R {
644    #[doc = "Bits 0:1 - Effect of simultaneous set and clear on output 0."]
645    #[inline(always)]
646    pub fn o0res(&self) -> O0RES_R {
647        O0RES_R::new((self.bits & 0x03) as u8)
648    }
649    #[doc = "Bits 2:3 - Effect of simultaneous set and clear on output 1."]
650    #[inline(always)]
651    pub fn o1res(&self) -> O1RES_R {
652        O1RES_R::new(((self.bits >> 2) & 0x03) as u8)
653    }
654    #[doc = "Bits 4:5 - Effect of simultaneous set and clear on output 2."]
655    #[inline(always)]
656    pub fn o2res(&self) -> O2RES_R {
657        O2RES_R::new(((self.bits >> 4) & 0x03) as u8)
658    }
659    #[doc = "Bits 6:7 - Effect of simultaneous set and clear on output 3."]
660    #[inline(always)]
661    pub fn o3res(&self) -> O3RES_R {
662        O3RES_R::new(((self.bits >> 6) & 0x03) as u8)
663    }
664    #[doc = "Bits 8:9 - Effect of simultaneous set and clear on output 4."]
665    #[inline(always)]
666    pub fn o4res(&self) -> O4RES_R {
667        O4RES_R::new(((self.bits >> 8) & 0x03) as u8)
668    }
669    #[doc = "Bits 10:11 - Effect of simultaneous set and clear on output 5."]
670    #[inline(always)]
671    pub fn o5res(&self) -> O5RES_R {
672        O5RES_R::new(((self.bits >> 10) & 0x03) as u8)
673    }
674}
675impl W {
676    #[doc = "Bits 0:1 - Effect of simultaneous set and clear on output 0."]
677    #[inline(always)]
678    pub fn o0res(&mut self) -> O0RES_W {
679        O0RES_W { w: self }
680    }
681    #[doc = "Bits 2:3 - Effect of simultaneous set and clear on output 1."]
682    #[inline(always)]
683    pub fn o1res(&mut self) -> O1RES_W {
684        O1RES_W { w: self }
685    }
686    #[doc = "Bits 4:5 - Effect of simultaneous set and clear on output 2."]
687    #[inline(always)]
688    pub fn o2res(&mut self) -> O2RES_W {
689        O2RES_W { w: self }
690    }
691    #[doc = "Bits 6:7 - Effect of simultaneous set and clear on output 3."]
692    #[inline(always)]
693    pub fn o3res(&mut self) -> O3RES_W {
694        O3RES_W { w: self }
695    }
696    #[doc = "Bits 8:9 - Effect of simultaneous set and clear on output 4."]
697    #[inline(always)]
698    pub fn o4res(&mut self) -> O4RES_W {
699        O4RES_W { w: self }
700    }
701    #[doc = "Bits 10:11 - Effect of simultaneous set and clear on output 5."]
702    #[inline(always)]
703    pub fn o5res(&mut self) -> O5RES_W {
704        O5RES_W { w: self }
705    }
706    #[doc = "Writes raw bits to the register."]
707    #[inline(always)]
708    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
709        self.0.bits(bits);
710        self
711    }
712}
713#[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"]
714pub struct RES_SPEC;
715impl crate::RegisterSpec for RES_SPEC {
716    type Ux = u32;
717}
718#[doc = "`read()` method returns [res::R](R) reader structure"]
719impl crate::Readable for RES_SPEC {
720    type Reader = R;
721}
722#[doc = "`write(|w| ..)` method takes [res::W](W) writer structure"]
723impl crate::Writable for RES_SPEC {
724    type Writer = W;
725}
726#[doc = "`reset()` method sets RES to value 0"]
727impl crate::Resettable for RES_SPEC {
728    #[inline(always)]
729    fn reset_value() -> Self::Ux {
730        0
731    }
732}