lpc550x/ctimer0/
emr.rs

1#[doc = "Register `EMR` reader"]
2pub struct R(crate::R<EMR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<EMR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<EMR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<EMR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `EMR` writer"]
17pub struct W(crate::W<EMR_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<EMR_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<EMR_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<EMR_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `EM0` reader - External Match 0. This bit reflects the state of output MAT0, whether or not this output is connected to a pin. When a match occurs between the TC and MR0, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[5:4\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
38pub type EM0_R = crate::BitReader<bool>;
39#[doc = "Field `EM0` writer - External Match 0. This bit reflects the state of output MAT0, whether or not this output is connected to a pin. When a match occurs between the TC and MR0, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[5:4\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
40pub type EM0_W<'a, const O: u8> = crate::BitWriter<'a, u32, EMR_SPEC, bool, O>;
41#[doc = "Field `EM1` reader - External Match 1. This bit reflects the state of output MAT1, whether or not this output is connected to a pin. When a match occurs between the TC and MR1, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[7:6\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
42pub type EM1_R = crate::BitReader<bool>;
43#[doc = "Field `EM1` writer - External Match 1. This bit reflects the state of output MAT1, whether or not this output is connected to a pin. When a match occurs between the TC and MR1, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[7:6\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
44pub type EM1_W<'a, const O: u8> = crate::BitWriter<'a, u32, EMR_SPEC, bool, O>;
45#[doc = "Field `EM2` reader - External Match 2. This bit reflects the state of output MAT2, whether or not this output is connected to a pin. When a match occurs between the TC and MR2, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[9:8\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
46pub type EM2_R = crate::BitReader<bool>;
47#[doc = "Field `EM2` writer - External Match 2. This bit reflects the state of output MAT2, whether or not this output is connected to a pin. When a match occurs between the TC and MR2, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[9:8\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
48pub type EM2_W<'a, const O: u8> = crate::BitWriter<'a, u32, EMR_SPEC, bool, O>;
49#[doc = "Field `EM3` reader - External Match 3. This bit reflects the state of output MAT3, whether or not this output is connected to a pin. When a match occurs between the TC and MR3, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by MR\\[11:10\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
50pub type EM3_R = crate::BitReader<bool>;
51#[doc = "Field `EM3` writer - External Match 3. This bit reflects the state of output MAT3, whether or not this output is connected to a pin. When a match occurs between the TC and MR3, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by MR\\[11:10\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
52pub type EM3_W<'a, const O: u8> = crate::BitWriter<'a, u32, EMR_SPEC, bool, O>;
53#[doc = "Field `EMC0` reader - External Match Control 0. Determines the functionality of External Match 0."]
54pub type EMC0_R = crate::FieldReader<u8, EMC0_A>;
55#[doc = "External Match Control 0. Determines the functionality of External Match 0.\n\nValue on reset: 0"]
56#[derive(Clone, Copy, Debug, PartialEq, Eq)]
57#[repr(u8)]
58pub enum EMC0_A {
59    #[doc = "0: Do Nothing."]
60    DO_NOTHING = 0,
61    #[doc = "1: Clear. Clear the corresponding External Match bit/output to 0 (MAT0 pin is LOW if pinned out)."]
62    CLEAR = 1,
63    #[doc = "2: Set. Set the corresponding External Match bit/output to 1 (MAT0 pin is HIGH if pinned out)."]
64    SET = 2,
65    #[doc = "3: Toggle. Toggle the corresponding External Match bit/output."]
66    TOGGLE = 3,
67}
68impl From<EMC0_A> for u8 {
69    #[inline(always)]
70    fn from(variant: EMC0_A) -> Self {
71        variant as _
72    }
73}
74impl EMC0_R {
75    #[doc = "Get enumerated values variant"]
76    #[inline(always)]
77    pub fn variant(&self) -> EMC0_A {
78        match self.bits {
79            0 => EMC0_A::DO_NOTHING,
80            1 => EMC0_A::CLEAR,
81            2 => EMC0_A::SET,
82            3 => EMC0_A::TOGGLE,
83            _ => unreachable!(),
84        }
85    }
86    #[doc = "Checks if the value of the field is `DO_NOTHING`"]
87    #[inline(always)]
88    pub fn is_do_nothing(&self) -> bool {
89        *self == EMC0_A::DO_NOTHING
90    }
91    #[doc = "Checks if the value of the field is `CLEAR`"]
92    #[inline(always)]
93    pub fn is_clear(&self) -> bool {
94        *self == EMC0_A::CLEAR
95    }
96    #[doc = "Checks if the value of the field is `SET`"]
97    #[inline(always)]
98    pub fn is_set(&self) -> bool {
99        *self == EMC0_A::SET
100    }
101    #[doc = "Checks if the value of the field is `TOGGLE`"]
102    #[inline(always)]
103    pub fn is_toggle(&self) -> bool {
104        *self == EMC0_A::TOGGLE
105    }
106}
107#[doc = "Field `EMC0` writer - External Match Control 0. Determines the functionality of External Match 0."]
108pub type EMC0_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, EMR_SPEC, u8, EMC0_A, 2, O>;
109impl<'a, const O: u8> EMC0_W<'a, O> {
110    #[doc = "Do Nothing."]
111    #[inline(always)]
112    pub fn do_nothing(self) -> &'a mut W {
113        self.variant(EMC0_A::DO_NOTHING)
114    }
115    #[doc = "Clear. Clear the corresponding External Match bit/output to 0 (MAT0 pin is LOW if pinned out)."]
116    #[inline(always)]
117    pub fn clear(self) -> &'a mut W {
118        self.variant(EMC0_A::CLEAR)
119    }
120    #[doc = "Set. Set the corresponding External Match bit/output to 1 (MAT0 pin is HIGH if pinned out)."]
121    #[inline(always)]
122    pub fn set(self) -> &'a mut W {
123        self.variant(EMC0_A::SET)
124    }
125    #[doc = "Toggle. Toggle the corresponding External Match bit/output."]
126    #[inline(always)]
127    pub fn toggle(self) -> &'a mut W {
128        self.variant(EMC0_A::TOGGLE)
129    }
130}
131#[doc = "Field `EMC1` reader - External Match Control 1. Determines the functionality of External Match 1."]
132pub type EMC1_R = crate::FieldReader<u8, EMC1_A>;
133#[doc = "External Match Control 1. Determines the functionality of External Match 1.\n\nValue on reset: 0"]
134#[derive(Clone, Copy, Debug, PartialEq, Eq)]
135#[repr(u8)]
136pub enum EMC1_A {
137    #[doc = "0: Do Nothing."]
138    DO_NOTHING = 0,
139    #[doc = "1: Clear. Clear the corresponding External Match bit/output to 0 (MAT1 pin is LOW if pinned out)."]
140    CLEAR = 1,
141    #[doc = "2: Set. Set the corresponding External Match bit/output to 1 (MAT1 pin is HIGH if pinned out)."]
142    SET = 2,
143    #[doc = "3: Toggle. Toggle the corresponding External Match bit/output."]
144    TOGGLE = 3,
145}
146impl From<EMC1_A> for u8 {
147    #[inline(always)]
148    fn from(variant: EMC1_A) -> Self {
149        variant as _
150    }
151}
152impl EMC1_R {
153    #[doc = "Get enumerated values variant"]
154    #[inline(always)]
155    pub fn variant(&self) -> EMC1_A {
156        match self.bits {
157            0 => EMC1_A::DO_NOTHING,
158            1 => EMC1_A::CLEAR,
159            2 => EMC1_A::SET,
160            3 => EMC1_A::TOGGLE,
161            _ => unreachable!(),
162        }
163    }
164    #[doc = "Checks if the value of the field is `DO_NOTHING`"]
165    #[inline(always)]
166    pub fn is_do_nothing(&self) -> bool {
167        *self == EMC1_A::DO_NOTHING
168    }
169    #[doc = "Checks if the value of the field is `CLEAR`"]
170    #[inline(always)]
171    pub fn is_clear(&self) -> bool {
172        *self == EMC1_A::CLEAR
173    }
174    #[doc = "Checks if the value of the field is `SET`"]
175    #[inline(always)]
176    pub fn is_set(&self) -> bool {
177        *self == EMC1_A::SET
178    }
179    #[doc = "Checks if the value of the field is `TOGGLE`"]
180    #[inline(always)]
181    pub fn is_toggle(&self) -> bool {
182        *self == EMC1_A::TOGGLE
183    }
184}
185#[doc = "Field `EMC1` writer - External Match Control 1. Determines the functionality of External Match 1."]
186pub type EMC1_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, EMR_SPEC, u8, EMC1_A, 2, O>;
187impl<'a, const O: u8> EMC1_W<'a, O> {
188    #[doc = "Do Nothing."]
189    #[inline(always)]
190    pub fn do_nothing(self) -> &'a mut W {
191        self.variant(EMC1_A::DO_NOTHING)
192    }
193    #[doc = "Clear. Clear the corresponding External Match bit/output to 0 (MAT1 pin is LOW if pinned out)."]
194    #[inline(always)]
195    pub fn clear(self) -> &'a mut W {
196        self.variant(EMC1_A::CLEAR)
197    }
198    #[doc = "Set. Set the corresponding External Match bit/output to 1 (MAT1 pin is HIGH if pinned out)."]
199    #[inline(always)]
200    pub fn set(self) -> &'a mut W {
201        self.variant(EMC1_A::SET)
202    }
203    #[doc = "Toggle. Toggle the corresponding External Match bit/output."]
204    #[inline(always)]
205    pub fn toggle(self) -> &'a mut W {
206        self.variant(EMC1_A::TOGGLE)
207    }
208}
209#[doc = "Field `EMC2` reader - External Match Control 2. Determines the functionality of External Match 2."]
210pub type EMC2_R = crate::FieldReader<u8, EMC2_A>;
211#[doc = "External Match Control 2. Determines the functionality of External Match 2.\n\nValue on reset: 0"]
212#[derive(Clone, Copy, Debug, PartialEq, Eq)]
213#[repr(u8)]
214pub enum EMC2_A {
215    #[doc = "0: Do Nothing."]
216    DO_NOTHING = 0,
217    #[doc = "1: Clear. Clear the corresponding External Match bit/output to 0 (MAT2 pin is LOW if pinned out)."]
218    CLEAR = 1,
219    #[doc = "2: Set. Set the corresponding External Match bit/output to 1 (MAT2 pin is HIGH if pinned out)."]
220    SET = 2,
221    #[doc = "3: Toggle. Toggle the corresponding External Match bit/output."]
222    TOGGLE = 3,
223}
224impl From<EMC2_A> for u8 {
225    #[inline(always)]
226    fn from(variant: EMC2_A) -> Self {
227        variant as _
228    }
229}
230impl EMC2_R {
231    #[doc = "Get enumerated values variant"]
232    #[inline(always)]
233    pub fn variant(&self) -> EMC2_A {
234        match self.bits {
235            0 => EMC2_A::DO_NOTHING,
236            1 => EMC2_A::CLEAR,
237            2 => EMC2_A::SET,
238            3 => EMC2_A::TOGGLE,
239            _ => unreachable!(),
240        }
241    }
242    #[doc = "Checks if the value of the field is `DO_NOTHING`"]
243    #[inline(always)]
244    pub fn is_do_nothing(&self) -> bool {
245        *self == EMC2_A::DO_NOTHING
246    }
247    #[doc = "Checks if the value of the field is `CLEAR`"]
248    #[inline(always)]
249    pub fn is_clear(&self) -> bool {
250        *self == EMC2_A::CLEAR
251    }
252    #[doc = "Checks if the value of the field is `SET`"]
253    #[inline(always)]
254    pub fn is_set(&self) -> bool {
255        *self == EMC2_A::SET
256    }
257    #[doc = "Checks if the value of the field is `TOGGLE`"]
258    #[inline(always)]
259    pub fn is_toggle(&self) -> bool {
260        *self == EMC2_A::TOGGLE
261    }
262}
263#[doc = "Field `EMC2` writer - External Match Control 2. Determines the functionality of External Match 2."]
264pub type EMC2_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, EMR_SPEC, u8, EMC2_A, 2, O>;
265impl<'a, const O: u8> EMC2_W<'a, O> {
266    #[doc = "Do Nothing."]
267    #[inline(always)]
268    pub fn do_nothing(self) -> &'a mut W {
269        self.variant(EMC2_A::DO_NOTHING)
270    }
271    #[doc = "Clear. Clear the corresponding External Match bit/output to 0 (MAT2 pin is LOW if pinned out)."]
272    #[inline(always)]
273    pub fn clear(self) -> &'a mut W {
274        self.variant(EMC2_A::CLEAR)
275    }
276    #[doc = "Set. Set the corresponding External Match bit/output to 1 (MAT2 pin is HIGH if pinned out)."]
277    #[inline(always)]
278    pub fn set(self) -> &'a mut W {
279        self.variant(EMC2_A::SET)
280    }
281    #[doc = "Toggle. Toggle the corresponding External Match bit/output."]
282    #[inline(always)]
283    pub fn toggle(self) -> &'a mut W {
284        self.variant(EMC2_A::TOGGLE)
285    }
286}
287#[doc = "Field `EMC3` reader - External Match Control 3. Determines the functionality of External Match 3."]
288pub type EMC3_R = crate::FieldReader<u8, EMC3_A>;
289#[doc = "External Match Control 3. Determines the functionality of External Match 3.\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq, Eq)]
291#[repr(u8)]
292pub enum EMC3_A {
293    #[doc = "0: Do Nothing."]
294    DO_NOTHING = 0,
295    #[doc = "1: Clear. Clear the corresponding External Match bit/output to 0 (MAT3 pin is LOW if pinned out)."]
296    CLEAR = 1,
297    #[doc = "2: Set. Set the corresponding External Match bit/output to 1 (MAT3 pin is HIGH if pinned out)."]
298    SET = 2,
299    #[doc = "3: Toggle. Toggle the corresponding External Match bit/output."]
300    TOGGLE = 3,
301}
302impl From<EMC3_A> for u8 {
303    #[inline(always)]
304    fn from(variant: EMC3_A) -> Self {
305        variant as _
306    }
307}
308impl EMC3_R {
309    #[doc = "Get enumerated values variant"]
310    #[inline(always)]
311    pub fn variant(&self) -> EMC3_A {
312        match self.bits {
313            0 => EMC3_A::DO_NOTHING,
314            1 => EMC3_A::CLEAR,
315            2 => EMC3_A::SET,
316            3 => EMC3_A::TOGGLE,
317            _ => unreachable!(),
318        }
319    }
320    #[doc = "Checks if the value of the field is `DO_NOTHING`"]
321    #[inline(always)]
322    pub fn is_do_nothing(&self) -> bool {
323        *self == EMC3_A::DO_NOTHING
324    }
325    #[doc = "Checks if the value of the field is `CLEAR`"]
326    #[inline(always)]
327    pub fn is_clear(&self) -> bool {
328        *self == EMC3_A::CLEAR
329    }
330    #[doc = "Checks if the value of the field is `SET`"]
331    #[inline(always)]
332    pub fn is_set(&self) -> bool {
333        *self == EMC3_A::SET
334    }
335    #[doc = "Checks if the value of the field is `TOGGLE`"]
336    #[inline(always)]
337    pub fn is_toggle(&self) -> bool {
338        *self == EMC3_A::TOGGLE
339    }
340}
341#[doc = "Field `EMC3` writer - External Match Control 3. Determines the functionality of External Match 3."]
342pub type EMC3_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, EMR_SPEC, u8, EMC3_A, 2, O>;
343impl<'a, const O: u8> EMC3_W<'a, O> {
344    #[doc = "Do Nothing."]
345    #[inline(always)]
346    pub fn do_nothing(self) -> &'a mut W {
347        self.variant(EMC3_A::DO_NOTHING)
348    }
349    #[doc = "Clear. Clear the corresponding External Match bit/output to 0 (MAT3 pin is LOW if pinned out)."]
350    #[inline(always)]
351    pub fn clear(self) -> &'a mut W {
352        self.variant(EMC3_A::CLEAR)
353    }
354    #[doc = "Set. Set the corresponding External Match bit/output to 1 (MAT3 pin is HIGH if pinned out)."]
355    #[inline(always)]
356    pub fn set(self) -> &'a mut W {
357        self.variant(EMC3_A::SET)
358    }
359    #[doc = "Toggle. Toggle the corresponding External Match bit/output."]
360    #[inline(always)]
361    pub fn toggle(self) -> &'a mut W {
362        self.variant(EMC3_A::TOGGLE)
363    }
364}
365impl R {
366    #[doc = "Bit 0 - External Match 0. This bit reflects the state of output MAT0, whether or not this output is connected to a pin. When a match occurs between the TC and MR0, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[5:4\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
367    #[inline(always)]
368    pub fn em0(&self) -> EM0_R {
369        EM0_R::new((self.bits & 1) != 0)
370    }
371    #[doc = "Bit 1 - External Match 1. This bit reflects the state of output MAT1, whether or not this output is connected to a pin. When a match occurs between the TC and MR1, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[7:6\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
372    #[inline(always)]
373    pub fn em1(&self) -> EM1_R {
374        EM1_R::new(((self.bits >> 1) & 1) != 0)
375    }
376    #[doc = "Bit 2 - External Match 2. This bit reflects the state of output MAT2, whether or not this output is connected to a pin. When a match occurs between the TC and MR2, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[9:8\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
377    #[inline(always)]
378    pub fn em2(&self) -> EM2_R {
379        EM2_R::new(((self.bits >> 2) & 1) != 0)
380    }
381    #[doc = "Bit 3 - External Match 3. This bit reflects the state of output MAT3, whether or not this output is connected to a pin. When a match occurs between the TC and MR3, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by MR\\[11:10\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
382    #[inline(always)]
383    pub fn em3(&self) -> EM3_R {
384        EM3_R::new(((self.bits >> 3) & 1) != 0)
385    }
386    #[doc = "Bits 4:5 - External Match Control 0. Determines the functionality of External Match 0."]
387    #[inline(always)]
388    pub fn emc0(&self) -> EMC0_R {
389        EMC0_R::new(((self.bits >> 4) & 3) as u8)
390    }
391    #[doc = "Bits 6:7 - External Match Control 1. Determines the functionality of External Match 1."]
392    #[inline(always)]
393    pub fn emc1(&self) -> EMC1_R {
394        EMC1_R::new(((self.bits >> 6) & 3) as u8)
395    }
396    #[doc = "Bits 8:9 - External Match Control 2. Determines the functionality of External Match 2."]
397    #[inline(always)]
398    pub fn emc2(&self) -> EMC2_R {
399        EMC2_R::new(((self.bits >> 8) & 3) as u8)
400    }
401    #[doc = "Bits 10:11 - External Match Control 3. Determines the functionality of External Match 3."]
402    #[inline(always)]
403    pub fn emc3(&self) -> EMC3_R {
404        EMC3_R::new(((self.bits >> 10) & 3) as u8)
405    }
406}
407impl W {
408    #[doc = "Bit 0 - External Match 0. This bit reflects the state of output MAT0, whether or not this output is connected to a pin. When a match occurs between the TC and MR0, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[5:4\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
409    #[inline(always)]
410    pub fn em0(&mut self) -> EM0_W<0> {
411        EM0_W::new(self)
412    }
413    #[doc = "Bit 1 - External Match 1. This bit reflects the state of output MAT1, whether or not this output is connected to a pin. When a match occurs between the TC and MR1, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[7:6\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
414    #[inline(always)]
415    pub fn em1(&mut self) -> EM1_W<1> {
416        EM1_W::new(self)
417    }
418    #[doc = "Bit 2 - External Match 2. This bit reflects the state of output MAT2, whether or not this output is connected to a pin. When a match occurs between the TC and MR2, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by EMR\\[9:8\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
419    #[inline(always)]
420    pub fn em2(&mut self) -> EM2_W<2> {
421        EM2_W::new(self)
422    }
423    #[doc = "Bit 3 - External Match 3. This bit reflects the state of output MAT3, whether or not this output is connected to a pin. When a match occurs between the TC and MR3, this bit can either toggle, go LOW, go HIGH, or do nothing, as selected by MR\\[11:10\\]. This bit is driven to the MAT pins if the match function is selected via IOCON. 0 = LOW. 1 = HIGH."]
424    #[inline(always)]
425    pub fn em3(&mut self) -> EM3_W<3> {
426        EM3_W::new(self)
427    }
428    #[doc = "Bits 4:5 - External Match Control 0. Determines the functionality of External Match 0."]
429    #[inline(always)]
430    pub fn emc0(&mut self) -> EMC0_W<4> {
431        EMC0_W::new(self)
432    }
433    #[doc = "Bits 6:7 - External Match Control 1. Determines the functionality of External Match 1."]
434    #[inline(always)]
435    pub fn emc1(&mut self) -> EMC1_W<6> {
436        EMC1_W::new(self)
437    }
438    #[doc = "Bits 8:9 - External Match Control 2. Determines the functionality of External Match 2."]
439    #[inline(always)]
440    pub fn emc2(&mut self) -> EMC2_W<8> {
441        EMC2_W::new(self)
442    }
443    #[doc = "Bits 10:11 - External Match Control 3. Determines the functionality of External Match 3."]
444    #[inline(always)]
445    pub fn emc3(&mut self) -> EMC3_W<10> {
446        EMC3_W::new(self)
447    }
448    #[doc = "Writes raw bits to the register."]
449    #[inline(always)]
450    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
451        self.0.bits(bits);
452        self
453    }
454}
455#[doc = "External Match Register. The EMR controls the match function and the external match pins.\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 [emr](index.html) module"]
456pub struct EMR_SPEC;
457impl crate::RegisterSpec for EMR_SPEC {
458    type Ux = u32;
459}
460#[doc = "`read()` method returns [emr::R](R) reader structure"]
461impl crate::Readable for EMR_SPEC {
462    type Reader = R;
463}
464#[doc = "`write(|w| ..)` method takes [emr::W](W) writer structure"]
465impl crate::Writable for EMR_SPEC {
466    type Writer = W;
467}
468#[doc = "`reset()` method sets EMR to value 0"]
469impl crate::Resettable for EMR_SPEC {
470    #[inline(always)]
471    fn reset_value() -> Self::Ux {
472        0
473    }
474}