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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
#[doc = "Register `sth` reader"]
pub struct R(crate::R<STH_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<STH_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<STH_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<STH_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `sth` writer"]
pub struct W(crate::W<STH_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<STH_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<STH_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<STH_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `priority` reader - "]
pub type PRIORITY_R = crate::FieldReader<u8, PRIORITY_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum PRIORITY_A {
    #[doc = "0: Priority 0 (never interrupt)"]
    P0 = 0,
    #[doc = "1: Priority 1"]
    P1 = 1,
    #[doc = "2: Priority 2"]
    P2 = 2,
    #[doc = "3: Priority 3"]
    P3 = 3,
    #[doc = "4: Priority 4"]
    P4 = 4,
    #[doc = "5: Priority 5"]
    P5 = 5,
    #[doc = "6: Priority 6"]
    P6 = 6,
    #[doc = "7: Priority 7"]
    P7 = 7,
    #[doc = "8: Priority 8"]
    P8 = 8,
    #[doc = "9: Priority 9"]
    P9 = 9,
    #[doc = "10: Priority 10"]
    P10 = 10,
    #[doc = "11: Priority 11"]
    P11 = 11,
    #[doc = "12: Priority 12"]
    P12 = 12,
    #[doc = "13: Priority 13"]
    P13 = 13,
    #[doc = "14: Priority 14"]
    P14 = 14,
    #[doc = "15: Priority 15"]
    P15 = 15,
    #[doc = "16: Priority 16"]
    P16 = 16,
    #[doc = "17: Priority 17"]
    P17 = 17,
    #[doc = "18: Priority 18"]
    P18 = 18,
    #[doc = "19: Priority 19"]
    P19 = 19,
    #[doc = "20: Priority 20"]
    P20 = 20,
    #[doc = "21: Priority 21"]
    P21 = 21,
    #[doc = "22: Priority 22"]
    P22 = 22,
    #[doc = "23: Priority 23"]
    P23 = 23,
    #[doc = "24: Priority 24"]
    P24 = 24,
    #[doc = "25: Priority 25"]
    P25 = 25,
    #[doc = "26: Priority 26"]
    P26 = 26,
    #[doc = "27: Priority 27"]
    P27 = 27,
    #[doc = "28: Priority 28"]
    P28 = 28,
    #[doc = "29: Priority 29"]
    P29 = 29,
    #[doc = "30: Priority 30"]
    P30 = 30,
    #[doc = "31: Priority 31"]
    P31 = 31,
}
impl From<PRIORITY_A> for u8 {
    #[inline(always)]
    fn from(variant: PRIORITY_A) -> Self {
        variant as _
    }
}
impl PRIORITY_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> PRIORITY_A {
        match self.bits {
            0 => PRIORITY_A::P0,
            1 => PRIORITY_A::P1,
            2 => PRIORITY_A::P2,
            3 => PRIORITY_A::P3,
            4 => PRIORITY_A::P4,
            5 => PRIORITY_A::P5,
            6 => PRIORITY_A::P6,
            7 => PRIORITY_A::P7,
            8 => PRIORITY_A::P8,
            9 => PRIORITY_A::P9,
            10 => PRIORITY_A::P10,
            11 => PRIORITY_A::P11,
            12 => PRIORITY_A::P12,
            13 => PRIORITY_A::P13,
            14 => PRIORITY_A::P14,
            15 => PRIORITY_A::P15,
            16 => PRIORITY_A::P16,
            17 => PRIORITY_A::P17,
            18 => PRIORITY_A::P18,
            19 => PRIORITY_A::P19,
            20 => PRIORITY_A::P20,
            21 => PRIORITY_A::P21,
            22 => PRIORITY_A::P22,
            23 => PRIORITY_A::P23,
            24 => PRIORITY_A::P24,
            25 => PRIORITY_A::P25,
            26 => PRIORITY_A::P26,
            27 => PRIORITY_A::P27,
            28 => PRIORITY_A::P28,
            29 => PRIORITY_A::P29,
            30 => PRIORITY_A::P30,
            31 => PRIORITY_A::P31,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `P0`"]
    #[inline(always)]
    pub fn is_p0(&self) -> bool {
        *self == PRIORITY_A::P0
    }
    #[doc = "Checks if the value of the field is `P1`"]
    #[inline(always)]
    pub fn is_p1(&self) -> bool {
        *self == PRIORITY_A::P1
    }
    #[doc = "Checks if the value of the field is `P2`"]
    #[inline(always)]
    pub fn is_p2(&self) -> bool {
        *self == PRIORITY_A::P2
    }
    #[doc = "Checks if the value of the field is `P3`"]
    #[inline(always)]
    pub fn is_p3(&self) -> bool {
        *self == PRIORITY_A::P3
    }
    #[doc = "Checks if the value of the field is `P4`"]
    #[inline(always)]
    pub fn is_p4(&self) -> bool {
        *self == PRIORITY_A::P4
    }
    #[doc = "Checks if the value of the field is `P5`"]
    #[inline(always)]
    pub fn is_p5(&self) -> bool {
        *self == PRIORITY_A::P5
    }
    #[doc = "Checks if the value of the field is `P6`"]
    #[inline(always)]
    pub fn is_p6(&self) -> bool {
        *self == PRIORITY_A::P6
    }
    #[doc = "Checks if the value of the field is `P7`"]
    #[inline(always)]
    pub fn is_p7(&self) -> bool {
        *self == PRIORITY_A::P7
    }
    #[doc = "Checks if the value of the field is `P8`"]
    #[inline(always)]
    pub fn is_p8(&self) -> bool {
        *self == PRIORITY_A::P8
    }
    #[doc = "Checks if the value of the field is `P9`"]
    #[inline(always)]
    pub fn is_p9(&self) -> bool {
        *self == PRIORITY_A::P9
    }
    #[doc = "Checks if the value of the field is `P10`"]
    #[inline(always)]
    pub fn is_p10(&self) -> bool {
        *self == PRIORITY_A::P10
    }
    #[doc = "Checks if the value of the field is `P11`"]
    #[inline(always)]
    pub fn is_p11(&self) -> bool {
        *self == PRIORITY_A::P11
    }
    #[doc = "Checks if the value of the field is `P12`"]
    #[inline(always)]
    pub fn is_p12(&self) -> bool {
        *self == PRIORITY_A::P12
    }
    #[doc = "Checks if the value of the field is `P13`"]
    #[inline(always)]
    pub fn is_p13(&self) -> bool {
        *self == PRIORITY_A::P13
    }
    #[doc = "Checks if the value of the field is `P14`"]
    #[inline(always)]
    pub fn is_p14(&self) -> bool {
        *self == PRIORITY_A::P14
    }
    #[doc = "Checks if the value of the field is `P15`"]
    #[inline(always)]
    pub fn is_p15(&self) -> bool {
        *self == PRIORITY_A::P15
    }
    #[doc = "Checks if the value of the field is `P16`"]
    #[inline(always)]
    pub fn is_p16(&self) -> bool {
        *self == PRIORITY_A::P16
    }
    #[doc = "Checks if the value of the field is `P17`"]
    #[inline(always)]
    pub fn is_p17(&self) -> bool {
        *self == PRIORITY_A::P17
    }
    #[doc = "Checks if the value of the field is `P18`"]
    #[inline(always)]
    pub fn is_p18(&self) -> bool {
        *self == PRIORITY_A::P18
    }
    #[doc = "Checks if the value of the field is `P19`"]
    #[inline(always)]
    pub fn is_p19(&self) -> bool {
        *self == PRIORITY_A::P19
    }
    #[doc = "Checks if the value of the field is `P20`"]
    #[inline(always)]
    pub fn is_p20(&self) -> bool {
        *self == PRIORITY_A::P20
    }
    #[doc = "Checks if the value of the field is `P21`"]
    #[inline(always)]
    pub fn is_p21(&self) -> bool {
        *self == PRIORITY_A::P21
    }
    #[doc = "Checks if the value of the field is `P22`"]
    #[inline(always)]
    pub fn is_p22(&self) -> bool {
        *self == PRIORITY_A::P22
    }
    #[doc = "Checks if the value of the field is `P23`"]
    #[inline(always)]
    pub fn is_p23(&self) -> bool {
        *self == PRIORITY_A::P23
    }
    #[doc = "Checks if the value of the field is `P24`"]
    #[inline(always)]
    pub fn is_p24(&self) -> bool {
        *self == PRIORITY_A::P24
    }
    #[doc = "Checks if the value of the field is `P25`"]
    #[inline(always)]
    pub fn is_p25(&self) -> bool {
        *self == PRIORITY_A::P25
    }
    #[doc = "Checks if the value of the field is `P26`"]
    #[inline(always)]
    pub fn is_p26(&self) -> bool {
        *self == PRIORITY_A::P26
    }
    #[doc = "Checks if the value of the field is `P27`"]
    #[inline(always)]
    pub fn is_p27(&self) -> bool {
        *self == PRIORITY_A::P27
    }
    #[doc = "Checks if the value of the field is `P28`"]
    #[inline(always)]
    pub fn is_p28(&self) -> bool {
        *self == PRIORITY_A::P28
    }
    #[doc = "Checks if the value of the field is `P29`"]
    #[inline(always)]
    pub fn is_p29(&self) -> bool {
        *self == PRIORITY_A::P29
    }
    #[doc = "Checks if the value of the field is `P30`"]
    #[inline(always)]
    pub fn is_p30(&self) -> bool {
        *self == PRIORITY_A::P30
    }
    #[doc = "Checks if the value of the field is `P31`"]
    #[inline(always)]
    pub fn is_p31(&self) -> bool {
        *self == PRIORITY_A::P31
    }
}
#[doc = "Field `priority` writer - "]
pub type PRIORITY_W<'a, const O: u8> =
    crate::FieldWriterSafe<'a, u32, STH_SPEC, u8, PRIORITY_A, 5, O>;
impl<'a, const O: u8> PRIORITY_W<'a, O> {
    #[doc = "Priority 0 (never interrupt)"]
    #[inline(always)]
    pub fn p0(self) -> &'a mut W {
        self.variant(PRIORITY_A::P0)
    }
    #[doc = "Priority 1"]
    #[inline(always)]
    pub fn p1(self) -> &'a mut W {
        self.variant(PRIORITY_A::P1)
    }
    #[doc = "Priority 2"]
    #[inline(always)]
    pub fn p2(self) -> &'a mut W {
        self.variant(PRIORITY_A::P2)
    }
    #[doc = "Priority 3"]
    #[inline(always)]
    pub fn p3(self) -> &'a mut W {
        self.variant(PRIORITY_A::P3)
    }
    #[doc = "Priority 4"]
    #[inline(always)]
    pub fn p4(self) -> &'a mut W {
        self.variant(PRIORITY_A::P4)
    }
    #[doc = "Priority 5"]
    #[inline(always)]
    pub fn p5(self) -> &'a mut W {
        self.variant(PRIORITY_A::P5)
    }
    #[doc = "Priority 6"]
    #[inline(always)]
    pub fn p6(self) -> &'a mut W {
        self.variant(PRIORITY_A::P6)
    }
    #[doc = "Priority 7"]
    #[inline(always)]
    pub fn p7(self) -> &'a mut W {
        self.variant(PRIORITY_A::P7)
    }
    #[doc = "Priority 8"]
    #[inline(always)]
    pub fn p8(self) -> &'a mut W {
        self.variant(PRIORITY_A::P8)
    }
    #[doc = "Priority 9"]
    #[inline(always)]
    pub fn p9(self) -> &'a mut W {
        self.variant(PRIORITY_A::P9)
    }
    #[doc = "Priority 10"]
    #[inline(always)]
    pub fn p10(self) -> &'a mut W {
        self.variant(PRIORITY_A::P10)
    }
    #[doc = "Priority 11"]
    #[inline(always)]
    pub fn p11(self) -> &'a mut W {
        self.variant(PRIORITY_A::P11)
    }
    #[doc = "Priority 12"]
    #[inline(always)]
    pub fn p12(self) -> &'a mut W {
        self.variant(PRIORITY_A::P12)
    }
    #[doc = "Priority 13"]
    #[inline(always)]
    pub fn p13(self) -> &'a mut W {
        self.variant(PRIORITY_A::P13)
    }
    #[doc = "Priority 14"]
    #[inline(always)]
    pub fn p14(self) -> &'a mut W {
        self.variant(PRIORITY_A::P14)
    }
    #[doc = "Priority 15"]
    #[inline(always)]
    pub fn p15(self) -> &'a mut W {
        self.variant(PRIORITY_A::P15)
    }
    #[doc = "Priority 16"]
    #[inline(always)]
    pub fn p16(self) -> &'a mut W {
        self.variant(PRIORITY_A::P16)
    }
    #[doc = "Priority 17"]
    #[inline(always)]
    pub fn p17(self) -> &'a mut W {
        self.variant(PRIORITY_A::P17)
    }
    #[doc = "Priority 18"]
    #[inline(always)]
    pub fn p18(self) -> &'a mut W {
        self.variant(PRIORITY_A::P18)
    }
    #[doc = "Priority 19"]
    #[inline(always)]
    pub fn p19(self) -> &'a mut W {
        self.variant(PRIORITY_A::P19)
    }
    #[doc = "Priority 20"]
    #[inline(always)]
    pub fn p20(self) -> &'a mut W {
        self.variant(PRIORITY_A::P20)
    }
    #[doc = "Priority 21"]
    #[inline(always)]
    pub fn p21(self) -> &'a mut W {
        self.variant(PRIORITY_A::P21)
    }
    #[doc = "Priority 22"]
    #[inline(always)]
    pub fn p22(self) -> &'a mut W {
        self.variant(PRIORITY_A::P22)
    }
    #[doc = "Priority 23"]
    #[inline(always)]
    pub fn p23(self) -> &'a mut W {
        self.variant(PRIORITY_A::P23)
    }
    #[doc = "Priority 24"]
    #[inline(always)]
    pub fn p24(self) -> &'a mut W {
        self.variant(PRIORITY_A::P24)
    }
    #[doc = "Priority 25"]
    #[inline(always)]
    pub fn p25(self) -> &'a mut W {
        self.variant(PRIORITY_A::P25)
    }
    #[doc = "Priority 26"]
    #[inline(always)]
    pub fn p26(self) -> &'a mut W {
        self.variant(PRIORITY_A::P26)
    }
    #[doc = "Priority 27"]
    #[inline(always)]
    pub fn p27(self) -> &'a mut W {
        self.variant(PRIORITY_A::P27)
    }
    #[doc = "Priority 28"]
    #[inline(always)]
    pub fn p28(self) -> &'a mut W {
        self.variant(PRIORITY_A::P28)
    }
    #[doc = "Priority 29"]
    #[inline(always)]
    pub fn p29(self) -> &'a mut W {
        self.variant(PRIORITY_A::P29)
    }
    #[doc = "Priority 30"]
    #[inline(always)]
    pub fn p30(self) -> &'a mut W {
        self.variant(PRIORITY_A::P30)
    }
    #[doc = "Priority 31"]
    #[inline(always)]
    pub fn p31(self) -> &'a mut W {
        self.variant(PRIORITY_A::P31)
    }
}
impl R {
    #[doc = "Bits 0:4"]
    #[inline(always)]
    pub fn priority(&self) -> PRIORITY_R {
        PRIORITY_R::new((self.bits & 0x1f) as u8)
    }
}
impl W {
    #[doc = "Bits 0:4"]
    #[inline(always)]
    #[must_use]
    pub fn priority(&mut self) -> PRIORITY_W<0> {
        PRIORITY_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Supervisor Mode Priority Threshold Register\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 [sth](index.html) module"]
pub struct STH_SPEC;
impl crate::RegisterSpec for STH_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [sth::R](R) reader structure"]
impl crate::Readable for STH_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [sth::W](W) writer structure"]
impl crate::Writable for STH_SPEC {
    type Writer = W;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets sth to value 0"]
impl crate::Resettable for STH_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}