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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
#[doc = "Register `EXTISS2` reader"]
pub type R = crate::R<Extiss2Spec>;
#[doc = "Register `EXTISS2` writer"]
pub type W = crate::W<Extiss2Spec>;
#[doc = "EXTI 8 sources selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exti8Ss {
    #[doc = "0: PA8 pin"]
    Pa8 = 0,
    #[doc = "1: PB8 pin"]
    Pb8 = 1,
    #[doc = "2: PC8 pin"]
    Pc8 = 2,
}
impl From<Exti8Ss> for u8 {
    #[inline(always)]
    fn from(variant: Exti8Ss) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exti8Ss {
    type Ux = u8;
}
#[doc = "Field `EXTI8_SS` reader - EXTI 8 sources selection"]
pub type Exti8SsR = crate::FieldReader<Exti8Ss>;
impl Exti8SsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Exti8Ss> {
        match self.bits {
            0 => Some(Exti8Ss::Pa8),
            1 => Some(Exti8Ss::Pb8),
            2 => Some(Exti8Ss::Pc8),
            _ => None,
        }
    }
    #[doc = "PA8 pin"]
    #[inline(always)]
    pub fn is_pa8(&self) -> bool {
        *self == Exti8Ss::Pa8
    }
    #[doc = "PB8 pin"]
    #[inline(always)]
    pub fn is_pb8(&self) -> bool {
        *self == Exti8Ss::Pb8
    }
    #[doc = "PC8 pin"]
    #[inline(always)]
    pub fn is_pc8(&self) -> bool {
        *self == Exti8Ss::Pc8
    }
}
#[doc = "Field `EXTI8_SS` writer - EXTI 8 sources selection"]
pub type Exti8SsW<'a, REG> = crate::FieldWriter<'a, REG, 4, Exti8Ss>;
impl<'a, REG> Exti8SsW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "PA8 pin"]
    #[inline(always)]
    pub fn pa8(self) -> &'a mut crate::W<REG> {
        self.variant(Exti8Ss::Pa8)
    }
    #[doc = "PB8 pin"]
    #[inline(always)]
    pub fn pb8(self) -> &'a mut crate::W<REG> {
        self.variant(Exti8Ss::Pb8)
    }
    #[doc = "PC8 pin"]
    #[inline(always)]
    pub fn pc8(self) -> &'a mut crate::W<REG> {
        self.variant(Exti8Ss::Pc8)
    }
}
#[doc = "EXTI 9 sources selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exti9Ss {
    #[doc = "0: PA9 pin"]
    Pa9 = 0,
    #[doc = "1: PB9 pin"]
    Pb9 = 1,
    #[doc = "2: PC9 pin"]
    Pc9 = 2,
}
impl From<Exti9Ss> for u8 {
    #[inline(always)]
    fn from(variant: Exti9Ss) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exti9Ss {
    type Ux = u8;
}
#[doc = "Field `EXTI9_SS` reader - EXTI 9 sources selection"]
pub type Exti9SsR = crate::FieldReader<Exti9Ss>;
impl Exti9SsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Exti9Ss> {
        match self.bits {
            0 => Some(Exti9Ss::Pa9),
            1 => Some(Exti9Ss::Pb9),
            2 => Some(Exti9Ss::Pc9),
            _ => None,
        }
    }
    #[doc = "PA9 pin"]
    #[inline(always)]
    pub fn is_pa9(&self) -> bool {
        *self == Exti9Ss::Pa9
    }
    #[doc = "PB9 pin"]
    #[inline(always)]
    pub fn is_pb9(&self) -> bool {
        *self == Exti9Ss::Pb9
    }
    #[doc = "PC9 pin"]
    #[inline(always)]
    pub fn is_pc9(&self) -> bool {
        *self == Exti9Ss::Pc9
    }
}
#[doc = "Field `EXTI9_SS` writer - EXTI 9 sources selection"]
pub type Exti9SsW<'a, REG> = crate::FieldWriter<'a, REG, 4, Exti9Ss>;
impl<'a, REG> Exti9SsW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "PA9 pin"]
    #[inline(always)]
    pub fn pa9(self) -> &'a mut crate::W<REG> {
        self.variant(Exti9Ss::Pa9)
    }
    #[doc = "PB9 pin"]
    #[inline(always)]
    pub fn pb9(self) -> &'a mut crate::W<REG> {
        self.variant(Exti9Ss::Pb9)
    }
    #[doc = "PC9 pin"]
    #[inline(always)]
    pub fn pc9(self) -> &'a mut crate::W<REG> {
        self.variant(Exti9Ss::Pc9)
    }
}
#[doc = "EXTI 10 sources selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exti10Ss {
    #[doc = "0: PA10 pin"]
    Pa10 = 0,
    #[doc = "1: PB10 pin"]
    Pb10 = 1,
    #[doc = "2: PC10 pin"]
    Pc10 = 2,
}
impl From<Exti10Ss> for u8 {
    #[inline(always)]
    fn from(variant: Exti10Ss) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exti10Ss {
    type Ux = u8;
}
#[doc = "Field `EXTI10_SS` reader - EXTI 10 sources selection"]
pub type Exti10SsR = crate::FieldReader<Exti10Ss>;
impl Exti10SsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Exti10Ss> {
        match self.bits {
            0 => Some(Exti10Ss::Pa10),
            1 => Some(Exti10Ss::Pb10),
            2 => Some(Exti10Ss::Pc10),
            _ => None,
        }
    }
    #[doc = "PA10 pin"]
    #[inline(always)]
    pub fn is_pa10(&self) -> bool {
        *self == Exti10Ss::Pa10
    }
    #[doc = "PB10 pin"]
    #[inline(always)]
    pub fn is_pb10(&self) -> bool {
        *self == Exti10Ss::Pb10
    }
    #[doc = "PC10 pin"]
    #[inline(always)]
    pub fn is_pc10(&self) -> bool {
        *self == Exti10Ss::Pc10
    }
}
#[doc = "Field `EXTI10_SS` writer - EXTI 10 sources selection"]
pub type Exti10SsW<'a, REG> = crate::FieldWriter<'a, REG, 4, Exti10Ss>;
impl<'a, REG> Exti10SsW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "PA10 pin"]
    #[inline(always)]
    pub fn pa10(self) -> &'a mut crate::W<REG> {
        self.variant(Exti10Ss::Pa10)
    }
    #[doc = "PB10 pin"]
    #[inline(always)]
    pub fn pb10(self) -> &'a mut crate::W<REG> {
        self.variant(Exti10Ss::Pb10)
    }
    #[doc = "PC10 pin"]
    #[inline(always)]
    pub fn pc10(self) -> &'a mut crate::W<REG> {
        self.variant(Exti10Ss::Pc10)
    }
}
#[doc = "EXTI 11 sources selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum Exti11Ss {
    #[doc = "0: PA11 pin"]
    Pa11 = 0,
    #[doc = "1: PB11 pin"]
    Pb11 = 1,
    #[doc = "2: PC11 pin"]
    Pc11 = 2,
}
impl From<Exti11Ss> for u8 {
    #[inline(always)]
    fn from(variant: Exti11Ss) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for Exti11Ss {
    type Ux = u8;
}
#[doc = "Field `EXTI11_SS` reader - EXTI 11 sources selection"]
pub type Exti11SsR = crate::FieldReader<Exti11Ss>;
impl Exti11SsR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<Exti11Ss> {
        match self.bits {
            0 => Some(Exti11Ss::Pa11),
            1 => Some(Exti11Ss::Pb11),
            2 => Some(Exti11Ss::Pc11),
            _ => None,
        }
    }
    #[doc = "PA11 pin"]
    #[inline(always)]
    pub fn is_pa11(&self) -> bool {
        *self == Exti11Ss::Pa11
    }
    #[doc = "PB11 pin"]
    #[inline(always)]
    pub fn is_pb11(&self) -> bool {
        *self == Exti11Ss::Pb11
    }
    #[doc = "PC11 pin"]
    #[inline(always)]
    pub fn is_pc11(&self) -> bool {
        *self == Exti11Ss::Pc11
    }
}
#[doc = "Field `EXTI11_SS` writer - EXTI 11 sources selection"]
pub type Exti11SsW<'a, REG> = crate::FieldWriter<'a, REG, 4, Exti11Ss>;
impl<'a, REG> Exti11SsW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
    REG::Ux: From<u8>,
{
    #[doc = "PA11 pin"]
    #[inline(always)]
    pub fn pa11(self) -> &'a mut crate::W<REG> {
        self.variant(Exti11Ss::Pa11)
    }
    #[doc = "PB11 pin"]
    #[inline(always)]
    pub fn pb11(self) -> &'a mut crate::W<REG> {
        self.variant(Exti11Ss::Pb11)
    }
    #[doc = "PC11 pin"]
    #[inline(always)]
    pub fn pc11(self) -> &'a mut crate::W<REG> {
        self.variant(Exti11Ss::Pc11)
    }
}
impl R {
    #[doc = "Bits 0:3 - EXTI 8 sources selection"]
    #[inline(always)]
    pub fn exti8_ss(&self) -> Exti8SsR {
        Exti8SsR::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bits 4:7 - EXTI 9 sources selection"]
    #[inline(always)]
    pub fn exti9_ss(&self) -> Exti9SsR {
        Exti9SsR::new(((self.bits >> 4) & 0x0f) as u8)
    }
    #[doc = "Bits 8:11 - EXTI 10 sources selection"]
    #[inline(always)]
    pub fn exti10_ss(&self) -> Exti10SsR {
        Exti10SsR::new(((self.bits >> 8) & 0x0f) as u8)
    }
    #[doc = "Bits 12:15 - EXTI 11 sources selection"]
    #[inline(always)]
    pub fn exti11_ss(&self) -> Exti11SsR {
        Exti11SsR::new(((self.bits >> 12) & 0x0f) as u8)
    }
}
impl W {
    #[doc = "Bits 0:3 - EXTI 8 sources selection"]
    #[inline(always)]
    #[must_use]
    pub fn exti8_ss(&mut self) -> Exti8SsW<Extiss2Spec> {
        Exti8SsW::new(self, 0)
    }
    #[doc = "Bits 4:7 - EXTI 9 sources selection"]
    #[inline(always)]
    #[must_use]
    pub fn exti9_ss(&mut self) -> Exti9SsW<Extiss2Spec> {
        Exti9SsW::new(self, 4)
    }
    #[doc = "Bits 8:11 - EXTI 10 sources selection"]
    #[inline(always)]
    #[must_use]
    pub fn exti10_ss(&mut self) -> Exti10SsW<Extiss2Spec> {
        Exti10SsW::new(self, 8)
    }
    #[doc = "Bits 12:15 - EXTI 11 sources selection"]
    #[inline(always)]
    #[must_use]
    pub fn exti11_ss(&mut self) -> Exti11SsW<Extiss2Spec> {
        Exti11SsW::new(self, 12)
    }
}
#[doc = "EXTI sources selection register 2\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`extiss2::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 [`extiss2::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct Extiss2Spec;
impl crate::RegisterSpec for Extiss2Spec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`extiss2::R`](R) reader structure"]
impl crate::Readable for Extiss2Spec {}
#[doc = "`write(|w| ..)` method takes [`extiss2::W`](W) writer structure"]
impl crate::Writable for Extiss2Spec {
    type Safety = crate::Unsafe;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets EXTISS2 to value 0"]
impl crate::Resettable for Extiss2Spec {
    const RESET_VALUE: u32 = 0;
}