ke04z4_pac/ftm0/
outmask.rs

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