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
#[doc = "Register `EVCTRL` reader"]
pub type R = crate::R<EVCTRL_SPEC>;
#[doc = "Register `EVCTRL` writer"]
pub type W = crate::W<EVCTRL_SPEC>;
#[doc = "Field `PEREO0` reader - Periodic Interval 0 Event Output Enable"]
pub type PEREO0_R = crate::BitReader;
#[doc = "Field `PEREO0` writer - Periodic Interval 0 Event Output Enable"]
pub type PEREO0_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `PEREO1` reader - Periodic Interval 1 Event Output Enable"]
pub type PEREO1_R = crate::BitReader;
#[doc = "Field `PEREO1` writer - Periodic Interval 1 Event Output Enable"]
pub type PEREO1_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `PEREO2` reader - Periodic Interval 2 Event Output Enable"]
pub type PEREO2_R = crate::BitReader;
#[doc = "Field `PEREO2` writer - Periodic Interval 2 Event Output Enable"]
pub type PEREO2_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `PEREO3` reader - Periodic Interval 3 Event Output Enable"]
pub type PEREO3_R = crate::BitReader;
#[doc = "Field `PEREO3` writer - Periodic Interval 3 Event Output Enable"]
pub type PEREO3_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `PEREO4` reader - Periodic Interval 4 Event Output Enable"]
pub type PEREO4_R = crate::BitReader;
#[doc = "Field `PEREO4` writer - Periodic Interval 4 Event Output Enable"]
pub type PEREO4_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `PEREO5` reader - Periodic Interval 5 Event Output Enable"]
pub type PEREO5_R = crate::BitReader;
#[doc = "Field `PEREO5` writer - Periodic Interval 5 Event Output Enable"]
pub type PEREO5_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `PEREO6` reader - Periodic Interval 6 Event Output Enable"]
pub type PEREO6_R = crate::BitReader;
#[doc = "Field `PEREO6` writer - Periodic Interval 6 Event Output Enable"]
pub type PEREO6_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `PEREO7` reader - Periodic Interval 7 Event Output Enable"]
pub type PEREO7_R = crate::BitReader;
#[doc = "Field `PEREO7` writer - Periodic Interval 7 Event Output Enable"]
pub type PEREO7_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `CMPEO0` reader - Compare 0 Event Output Enable"]
pub type CMPEO0_R = crate::BitReader;
#[doc = "Field `CMPEO0` writer - Compare 0 Event Output Enable"]
pub type CMPEO0_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `CMPEO1` reader - Compare 1 Event Output Enable"]
pub type CMPEO1_R = crate::BitReader;
#[doc = "Field `CMPEO1` writer - Compare 1 Event Output Enable"]
pub type CMPEO1_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `CMPEO2` reader - Compare 2 Event Output Enable"]
pub type CMPEO2_R = crate::BitReader;
#[doc = "Field `CMPEO2` writer - Compare 2 Event Output Enable"]
pub type CMPEO2_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `CMPEO3` reader - Compare 3 Event Output Enable"]
pub type CMPEO3_R = crate::BitReader;
#[doc = "Field `CMPEO3` writer - Compare 3 Event Output Enable"]
pub type CMPEO3_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `TAMPEREO` reader - Tamper Event Output Enable"]
pub type TAMPEREO_R = crate::BitReader;
#[doc = "Field `TAMPEREO` writer - Tamper Event Output Enable"]
pub type TAMPEREO_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `OVFEO` reader - Overflow Event Output Enable"]
pub type OVFEO_R = crate::BitReader;
#[doc = "Field `OVFEO` writer - Overflow Event Output Enable"]
pub type OVFEO_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `TAMPEVEI` reader - Tamper Event Input Enable"]
pub type TAMPEVEI_R = crate::BitReader;
#[doc = "Field `TAMPEVEI` writer - Tamper Event Input Enable"]
pub type TAMPEVEI_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
impl R {
    #[doc = "Bit 0 - Periodic Interval 0 Event Output Enable"]
    #[inline(always)]
    pub fn pereo0(&self) -> PEREO0_R {
        PEREO0_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Periodic Interval 1 Event Output Enable"]
    #[inline(always)]
    pub fn pereo1(&self) -> PEREO1_R {
        PEREO1_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Periodic Interval 2 Event Output Enable"]
    #[inline(always)]
    pub fn pereo2(&self) -> PEREO2_R {
        PEREO2_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Periodic Interval 3 Event Output Enable"]
    #[inline(always)]
    pub fn pereo3(&self) -> PEREO3_R {
        PEREO3_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - Periodic Interval 4 Event Output Enable"]
    #[inline(always)]
    pub fn pereo4(&self) -> PEREO4_R {
        PEREO4_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Periodic Interval 5 Event Output Enable"]
    #[inline(always)]
    pub fn pereo5(&self) -> PEREO5_R {
        PEREO5_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Periodic Interval 6 Event Output Enable"]
    #[inline(always)]
    pub fn pereo6(&self) -> PEREO6_R {
        PEREO6_R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - Periodic Interval 7 Event Output Enable"]
    #[inline(always)]
    pub fn pereo7(&self) -> PEREO7_R {
        PEREO7_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - Compare 0 Event Output Enable"]
    #[inline(always)]
    pub fn cmpeo0(&self) -> CMPEO0_R {
        CMPEO0_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - Compare 1 Event Output Enable"]
    #[inline(always)]
    pub fn cmpeo1(&self) -> CMPEO1_R {
        CMPEO1_R::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - Compare 2 Event Output Enable"]
    #[inline(always)]
    pub fn cmpeo2(&self) -> CMPEO2_R {
        CMPEO2_R::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - Compare 3 Event Output Enable"]
    #[inline(always)]
    pub fn cmpeo3(&self) -> CMPEO3_R {
        CMPEO3_R::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bit 14 - Tamper Event Output Enable"]
    #[inline(always)]
    pub fn tampereo(&self) -> TAMPEREO_R {
        TAMPEREO_R::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bit 15 - Overflow Event Output Enable"]
    #[inline(always)]
    pub fn ovfeo(&self) -> OVFEO_R {
        OVFEO_R::new(((self.bits >> 15) & 1) != 0)
    }
    #[doc = "Bit 16 - Tamper Event Input Enable"]
    #[inline(always)]
    pub fn tampevei(&self) -> TAMPEVEI_R {
        TAMPEVEI_R::new(((self.bits >> 16) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - Periodic Interval 0 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn pereo0(&mut self) -> PEREO0_W<EVCTRL_SPEC, 0> {
        PEREO0_W::new(self)
    }
    #[doc = "Bit 1 - Periodic Interval 1 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn pereo1(&mut self) -> PEREO1_W<EVCTRL_SPEC, 1> {
        PEREO1_W::new(self)
    }
    #[doc = "Bit 2 - Periodic Interval 2 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn pereo2(&mut self) -> PEREO2_W<EVCTRL_SPEC, 2> {
        PEREO2_W::new(self)
    }
    #[doc = "Bit 3 - Periodic Interval 3 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn pereo3(&mut self) -> PEREO3_W<EVCTRL_SPEC, 3> {
        PEREO3_W::new(self)
    }
    #[doc = "Bit 4 - Periodic Interval 4 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn pereo4(&mut self) -> PEREO4_W<EVCTRL_SPEC, 4> {
        PEREO4_W::new(self)
    }
    #[doc = "Bit 5 - Periodic Interval 5 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn pereo5(&mut self) -> PEREO5_W<EVCTRL_SPEC, 5> {
        PEREO5_W::new(self)
    }
    #[doc = "Bit 6 - Periodic Interval 6 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn pereo6(&mut self) -> PEREO6_W<EVCTRL_SPEC, 6> {
        PEREO6_W::new(self)
    }
    #[doc = "Bit 7 - Periodic Interval 7 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn pereo7(&mut self) -> PEREO7_W<EVCTRL_SPEC, 7> {
        PEREO7_W::new(self)
    }
    #[doc = "Bit 8 - Compare 0 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn cmpeo0(&mut self) -> CMPEO0_W<EVCTRL_SPEC, 8> {
        CMPEO0_W::new(self)
    }
    #[doc = "Bit 9 - Compare 1 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn cmpeo1(&mut self) -> CMPEO1_W<EVCTRL_SPEC, 9> {
        CMPEO1_W::new(self)
    }
    #[doc = "Bit 10 - Compare 2 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn cmpeo2(&mut self) -> CMPEO2_W<EVCTRL_SPEC, 10> {
        CMPEO2_W::new(self)
    }
    #[doc = "Bit 11 - Compare 3 Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn cmpeo3(&mut self) -> CMPEO3_W<EVCTRL_SPEC, 11> {
        CMPEO3_W::new(self)
    }
    #[doc = "Bit 14 - Tamper Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn tampereo(&mut self) -> TAMPEREO_W<EVCTRL_SPEC, 14> {
        TAMPEREO_W::new(self)
    }
    #[doc = "Bit 15 - Overflow Event Output Enable"]
    #[inline(always)]
    #[must_use]
    pub fn ovfeo(&mut self) -> OVFEO_W<EVCTRL_SPEC, 15> {
        OVFEO_W::new(self)
    }
    #[doc = "Bit 16 - Tamper Event Input Enable"]
    #[inline(always)]
    #[must_use]
    pub fn tampevei(&mut self) -> TAMPEVEI_W<EVCTRL_SPEC, 16> {
        TAMPEVEI_W::new(self)
    }
    #[doc = r" Writes raw bits to the register."]
    #[doc = r""]
    #[doc = r" # Safety"]
    #[doc = r""]
    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.bits = bits;
        self
    }
}
#[doc = "MODE1 Event Control\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`evctrl::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`evctrl::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct EVCTRL_SPEC;
impl crate::RegisterSpec for EVCTRL_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`evctrl::R`](R) reader structure"]
impl crate::Readable for EVCTRL_SPEC {}
#[doc = "`write(|w| ..)` method takes [`evctrl::W`](W) writer structure"]
impl crate::Writable for EVCTRL_SPEC {
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets EVCTRL to value 0"]
impl crate::Resettable for EVCTRL_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}