1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
#[doc = "Register `INTS` reader"]
pub type R = crate::R<IntsSpec>;
#[doc = "Period Match while Counting Up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Pmus {
    #[doc = "0: Period match while counting up not detected"]
    Value1 = 0,
    #[doc = "1: Period match while counting up detected"]
    Value2 = 1,
}
impl From<Pmus> for bool {
    #[inline(always)]
    fn from(variant: Pmus) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PMUS` reader - Period Match while Counting Up"]
pub type PmusR = crate::BitReader<Pmus>;
impl PmusR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Pmus {
        match self.bits {
            false => Pmus::Value1,
            true => Pmus::Value2,
        }
    }
    #[doc = "Period match while counting up not detected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Pmus::Value1
    }
    #[doc = "Period match while counting up detected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Pmus::Value2
    }
}
#[doc = "One Match while Counting Down\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Omds {
    #[doc = "0: One match while counting down not detected"]
    Value1 = 0,
    #[doc = "1: One match while counting down detected"]
    Value2 = 1,
}
impl From<Omds> for bool {
    #[inline(always)]
    fn from(variant: Omds) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `OMDS` reader - One Match while Counting Down"]
pub type OmdsR = crate::BitReader<Omds>;
impl OmdsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Omds {
        match self.bits {
            false => Omds::Value1,
            true => Omds::Value2,
        }
    }
    #[doc = "One match while counting down not detected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Omds::Value1
    }
    #[doc = "One match while counting down detected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Omds::Value2
    }
}
#[doc = "Compare Match while Counting Up\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Cmus {
    #[doc = "0: Compare match while counting up not detected"]
    Value1 = 0,
    #[doc = "1: Compare match while counting up detected"]
    Value2 = 1,
}
impl From<Cmus> for bool {
    #[inline(always)]
    fn from(variant: Cmus) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CMUS` reader - Compare Match while Counting Up"]
pub type CmusR = crate::BitReader<Cmus>;
impl CmusR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Cmus {
        match self.bits {
            false => Cmus::Value1,
            true => Cmus::Value2,
        }
    }
    #[doc = "Compare match while counting up not detected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Cmus::Value1
    }
    #[doc = "Compare match while counting up detected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Cmus::Value2
    }
}
#[doc = "Compare Match while Counting Down\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Cmds {
    #[doc = "0: Compare match while counting down not detected"]
    Value1 = 0,
    #[doc = "1: Compare match while counting down detected"]
    Value2 = 1,
}
impl From<Cmds> for bool {
    #[inline(always)]
    fn from(variant: Cmds) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `CMDS` reader - Compare Match while Counting Down"]
pub type CmdsR = crate::BitReader<Cmds>;
impl CmdsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Cmds {
        match self.bits {
            false => Cmds::Value1,
            true => Cmds::Value2,
        }
    }
    #[doc = "Compare match while counting down not detected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Cmds::Value1
    }
    #[doc = "Compare match while counting down detected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Cmds::Value2
    }
}
#[doc = "Event 0 Detection Status\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum E0as {
    #[doc = "0: Event 0 not detected"]
    Value1 = 0,
    #[doc = "1: Event 0 detected"]
    Value2 = 1,
}
impl From<E0as> for bool {
    #[inline(always)]
    fn from(variant: E0as) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `E0AS` reader - Event 0 Detection Status"]
pub type E0asR = crate::BitReader<E0as>;
impl E0asR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> E0as {
        match self.bits {
            false => E0as::Value1,
            true => E0as::Value2,
        }
    }
    #[doc = "Event 0 not detected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == E0as::Value1
    }
    #[doc = "Event 0 detected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == E0as::Value2
    }
}
#[doc = "Event 1 Detection Status\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum E1as {
    #[doc = "0: Event 1 not detected"]
    Value1 = 0,
    #[doc = "1: Event 1 detected"]
    Value2 = 1,
}
impl From<E1as> for bool {
    #[inline(always)]
    fn from(variant: E1as) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `E1AS` reader - Event 1 Detection Status"]
pub type E1asR = crate::BitReader<E1as>;
impl E1asR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> E1as {
        match self.bits {
            false => E1as::Value1,
            true => E1as::Value2,
        }
    }
    #[doc = "Event 1 not detected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == E1as::Value1
    }
    #[doc = "Event 1 detected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == E1as::Value2
    }
}
#[doc = "Event 2 Detection Status\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum E2as {
    #[doc = "0: Event 2 not detected"]
    Value1 = 0,
    #[doc = "1: Event 2 detected"]
    Value2 = 1,
}
impl From<E2as> for bool {
    #[inline(always)]
    fn from(variant: E2as) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `E2AS` reader - Event 2 Detection Status"]
pub type E2asR = crate::BitReader<E2as>;
impl E2asR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> E2as {
        match self.bits {
            false => E2as::Value1,
            true => E2as::Value2,
        }
    }
    #[doc = "Event 2 not detected"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == E2as::Value1
    }
    #[doc = "Event 2 detected"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == E2as::Value2
    }
}
#[doc = "Field `TRPF` reader - Trap Flag Status"]
pub type TrpfR = crate::BitReader;
impl R {
    #[doc = "Bit 0 - Period Match while Counting Up"]
    #[inline(always)]
    pub fn pmus(&self) -> PmusR {
        PmusR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - One Match while Counting Down"]
    #[inline(always)]
    pub fn omds(&self) -> OmdsR {
        OmdsR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Compare Match while Counting Up"]
    #[inline(always)]
    pub fn cmus(&self) -> CmusR {
        CmusR::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Compare Match while Counting Down"]
    #[inline(always)]
    pub fn cmds(&self) -> CmdsR {
        CmdsR::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 8 - Event 0 Detection Status"]
    #[inline(always)]
    pub fn e0as(&self) -> E0asR {
        E0asR::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - Event 1 Detection Status"]
    #[inline(always)]
    pub fn e1as(&self) -> E1asR {
        E1asR::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - Event 2 Detection Status"]
    #[inline(always)]
    pub fn e2as(&self) -> E2asR {
        E2asR::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - Trap Flag Status"]
    #[inline(always)]
    pub fn trpf(&self) -> TrpfR {
        TrpfR::new(((self.bits >> 11) & 1) != 0)
    }
}
#[doc = "Interrupt Status\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ints::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct IntsSpec;
impl crate::RegisterSpec for IntsSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`ints::R`](R) reader structure"]
impl crate::Readable for IntsSpec {}
#[doc = "`reset()` method sets INTS to value 0"]
impl crate::Resettable for IntsSpec {
    const RESET_VALUE: u32 = 0;
}