va108xx 0.6.1

PAC for the Vorago VA108xx family of microcontrollers
Documentation
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
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
#![doc = "Peripheral access API for VA108XX microcontrollers (generated using svd2rust v0.37.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next] svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.37.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![no_std]
#![cfg_attr(docsrs, feature(doc_cfg))]
#[doc = r"Number available in the NVIC for configuring priority"]
pub const NVIC_PRIO_BITS: u8 = 2;
#[cfg(feature = "rt")]
pub use self::Interrupt as interrupt;
#[cfg(feature = "rt")]
pub use cortex_m_rt::interrupt;
#[allow(unused_imports)]
use generic::*;
#[doc = r"Common register and bit access and modify traits"]
pub mod generic;
#[cfg(feature = "rt")]
extern "C" {
    fn OC0();
    fn OC1();
    fn OC2();
    fn OC3();
    fn OC4();
    fn OC5();
    fn OC6();
    fn OC7();
    fn OC8();
    fn OC9();
    fn OC10();
    fn OC11();
    fn OC12();
    fn OC13();
    fn OC14();
    fn OC15();
    fn OC16();
    fn OC17();
    fn OC18();
    fn OC19();
    fn OC20();
    fn OC21();
    fn OC22();
    fn OC23();
    fn OC24();
    fn OC25();
    fn OC26();
    fn OC27();
    fn OC28();
    fn OC29();
    fn OC30();
    fn OC31();
}
#[doc(hidden)]
#[repr(C)]
pub union Vector {
    _handler: unsafe extern "C" fn(),
    _reserved: u32,
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".vector_table.interrupts"]
#[no_mangle]
pub static __INTERRUPTS: [Vector; 32] = [
    Vector { _handler: OC0 },
    Vector { _handler: OC1 },
    Vector { _handler: OC2 },
    Vector { _handler: OC3 },
    Vector { _handler: OC4 },
    Vector { _handler: OC5 },
    Vector { _handler: OC6 },
    Vector { _handler: OC7 },
    Vector { _handler: OC8 },
    Vector { _handler: OC9 },
    Vector { _handler: OC10 },
    Vector { _handler: OC11 },
    Vector { _handler: OC12 },
    Vector { _handler: OC13 },
    Vector { _handler: OC14 },
    Vector { _handler: OC15 },
    Vector { _handler: OC16 },
    Vector { _handler: OC17 },
    Vector { _handler: OC18 },
    Vector { _handler: OC19 },
    Vector { _handler: OC20 },
    Vector { _handler: OC21 },
    Vector { _handler: OC22 },
    Vector { _handler: OC23 },
    Vector { _handler: OC24 },
    Vector { _handler: OC25 },
    Vector { _handler: OC26 },
    Vector { _handler: OC27 },
    Vector { _handler: OC28 },
    Vector { _handler: OC29 },
    Vector { _handler: OC30 },
    Vector { _handler: OC31 },
];
#[doc = r"Enumeration of all the interrupts."]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[repr(u16)]
pub enum Interrupt {
    #[doc = "0 - OC0"]
    OC0 = 0,
    #[doc = "1 - OC1"]
    OC1 = 1,
    #[doc = "2 - OC2"]
    OC2 = 2,
    #[doc = "3 - OC3"]
    OC3 = 3,
    #[doc = "4 - OC4"]
    OC4 = 4,
    #[doc = "5 - OC5"]
    OC5 = 5,
    #[doc = "6 - OC6"]
    OC6 = 6,
    #[doc = "7 - OC7"]
    OC7 = 7,
    #[doc = "8 - OC8"]
    OC8 = 8,
    #[doc = "9 - OC9"]
    OC9 = 9,
    #[doc = "10 - OC10"]
    OC10 = 10,
    #[doc = "11 - OC11"]
    OC11 = 11,
    #[doc = "12 - OC12"]
    OC12 = 12,
    #[doc = "13 - OC13"]
    OC13 = 13,
    #[doc = "14 - OC14"]
    OC14 = 14,
    #[doc = "15 - OC15"]
    OC15 = 15,
    #[doc = "16 - OC16"]
    OC16 = 16,
    #[doc = "17 - OC17"]
    OC17 = 17,
    #[doc = "18 - OC18"]
    OC18 = 18,
    #[doc = "19 - OC19"]
    OC19 = 19,
    #[doc = "20 - OC20"]
    OC20 = 20,
    #[doc = "21 - OC21"]
    OC21 = 21,
    #[doc = "22 - OC22"]
    OC22 = 22,
    #[doc = "23 - OC23"]
    OC23 = 23,
    #[doc = "24 - OC24"]
    OC24 = 24,
    #[doc = "25 - OC25"]
    OC25 = 25,
    #[doc = "26 - OC26"]
    OC26 = 26,
    #[doc = "27 - OC27"]
    OC27 = 27,
    #[doc = "28 - OC28"]
    OC28 = 28,
    #[doc = "29 - OC29"]
    OC29 = 29,
    #[doc = "30 - OC30"]
    OC30 = 30,
    #[doc = "31 - OC31"]
    OC31 = 31,
}
unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
    #[inline(always)]
    fn number(self) -> u16 {
        self as u16
    }
}
#[doc = "System Configuration Peripheral"]
pub type Sysconfig = crate::Periph<sysconfig::RegisterBlock, 0x4000_0000>;
impl core::fmt::Debug for Sysconfig {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Sysconfig").finish()
    }
}
#[doc = "System Configuration Peripheral"]
pub mod sysconfig;
#[doc = "Interrupt Selector Peripheral"]
pub type Irqsel = crate::Periph<irqsel::RegisterBlock, 0x4000_1000>;
impl core::fmt::Debug for Irqsel {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Irqsel").finish()
    }
}
#[doc = "Interrupt Selector Peripheral"]
pub mod irqsel;
#[doc = "IO Pin Configuration Peripheral"]
pub type Ioconfig = crate::Periph<ioconfig::RegisterBlock, 0x4000_2000>;
impl core::fmt::Debug for Ioconfig {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Ioconfig").finish()
    }
}
#[doc = "IO Pin Configuration Peripheral"]
pub mod ioconfig;
#[doc = "Utility Peripheral"]
pub type Utility = crate::Periph<utility::RegisterBlock, 0x4000_3000>;
impl core::fmt::Debug for Utility {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Utility").finish()
    }
}
#[doc = "Utility Peripheral"]
pub mod utility;
#[doc = "GPIO Peripheral"]
pub type Porta = crate::Periph<porta::RegisterBlock, 0x5000_0000>;
impl core::fmt::Debug for Porta {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Porta").finish()
    }
}
#[doc = "GPIO Peripheral"]
pub mod porta;
#[doc = "GPIO Peripheral"]
pub type Portb = crate::Periph<porta::RegisterBlock, 0x5000_1000>;
impl core::fmt::Debug for Portb {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Portb").finish()
    }
}
#[doc = "GPIO Peripheral"]
pub use self::porta as portb;
#[doc = "Timer/Counter Peripheral"]
pub type Tim0 = crate::Periph<tim0::RegisterBlock, 0x4002_0000>;
impl core::fmt::Debug for Tim0 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim0").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub mod tim0;
#[doc = "Timer/Counter Peripheral"]
pub type Tim1 = crate::Periph<tim0::RegisterBlock, 0x4002_1000>;
impl core::fmt::Debug for Tim1 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim1").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim1;
#[doc = "Timer/Counter Peripheral"]
pub type Tim2 = crate::Periph<tim0::RegisterBlock, 0x4002_2000>;
impl core::fmt::Debug for Tim2 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim2").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim2;
#[doc = "Timer/Counter Peripheral"]
pub type Tim3 = crate::Periph<tim0::RegisterBlock, 0x4002_3000>;
impl core::fmt::Debug for Tim3 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim3").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim3;
#[doc = "Timer/Counter Peripheral"]
pub type Tim4 = crate::Periph<tim0::RegisterBlock, 0x4002_4000>;
impl core::fmt::Debug for Tim4 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim4").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim4;
#[doc = "Timer/Counter Peripheral"]
pub type Tim5 = crate::Periph<tim0::RegisterBlock, 0x4002_5000>;
impl core::fmt::Debug for Tim5 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim5").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim5;
#[doc = "Timer/Counter Peripheral"]
pub type Tim6 = crate::Periph<tim0::RegisterBlock, 0x4002_6000>;
impl core::fmt::Debug for Tim6 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim6").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim6;
#[doc = "Timer/Counter Peripheral"]
pub type Tim7 = crate::Periph<tim0::RegisterBlock, 0x4002_7000>;
impl core::fmt::Debug for Tim7 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim7").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim7;
#[doc = "Timer/Counter Peripheral"]
pub type Tim8 = crate::Periph<tim0::RegisterBlock, 0x4002_8000>;
impl core::fmt::Debug for Tim8 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim8").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim8;
#[doc = "Timer/Counter Peripheral"]
pub type Tim9 = crate::Periph<tim0::RegisterBlock, 0x4002_9000>;
impl core::fmt::Debug for Tim9 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim9").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim9;
#[doc = "Timer/Counter Peripheral"]
pub type Tim10 = crate::Periph<tim0::RegisterBlock, 0x4002_a000>;
impl core::fmt::Debug for Tim10 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim10").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim10;
#[doc = "Timer/Counter Peripheral"]
pub type Tim11 = crate::Periph<tim0::RegisterBlock, 0x4002_b000>;
impl core::fmt::Debug for Tim11 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim11").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim11;
#[doc = "Timer/Counter Peripheral"]
pub type Tim12 = crate::Periph<tim0::RegisterBlock, 0x4002_c000>;
impl core::fmt::Debug for Tim12 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim12").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim12;
#[doc = "Timer/Counter Peripheral"]
pub type Tim13 = crate::Periph<tim0::RegisterBlock, 0x4002_d000>;
impl core::fmt::Debug for Tim13 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim13").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim13;
#[doc = "Timer/Counter Peripheral"]
pub type Tim14 = crate::Periph<tim0::RegisterBlock, 0x4002_e000>;
impl core::fmt::Debug for Tim14 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim14").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim14;
#[doc = "Timer/Counter Peripheral"]
pub type Tim15 = crate::Periph<tim0::RegisterBlock, 0x4002_f000>;
impl core::fmt::Debug for Tim15 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim15").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim15;
#[doc = "Timer/Counter Peripheral"]
pub type Tim16 = crate::Periph<tim0::RegisterBlock, 0x4003_0000>;
impl core::fmt::Debug for Tim16 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim16").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim16;
#[doc = "Timer/Counter Peripheral"]
pub type Tim17 = crate::Periph<tim0::RegisterBlock, 0x4003_1000>;
impl core::fmt::Debug for Tim17 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim17").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim17;
#[doc = "Timer/Counter Peripheral"]
pub type Tim18 = crate::Periph<tim0::RegisterBlock, 0x4003_2000>;
impl core::fmt::Debug for Tim18 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim18").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim18;
#[doc = "Timer/Counter Peripheral"]
pub type Tim19 = crate::Periph<tim0::RegisterBlock, 0x4003_3000>;
impl core::fmt::Debug for Tim19 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim19").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim19;
#[doc = "Timer/Counter Peripheral"]
pub type Tim20 = crate::Periph<tim0::RegisterBlock, 0x4003_4000>;
impl core::fmt::Debug for Tim20 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim20").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim20;
#[doc = "Timer/Counter Peripheral"]
pub type Tim21 = crate::Periph<tim0::RegisterBlock, 0x4003_5000>;
impl core::fmt::Debug for Tim21 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim21").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim21;
#[doc = "Timer/Counter Peripheral"]
pub type Tim22 = crate::Periph<tim0::RegisterBlock, 0x4003_6000>;
impl core::fmt::Debug for Tim22 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim22").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim22;
#[doc = "Timer/Counter Peripheral"]
pub type Tim23 = crate::Periph<tim0::RegisterBlock, 0x4003_7000>;
impl core::fmt::Debug for Tim23 {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Tim23").finish()
    }
}
#[doc = "Timer/Counter Peripheral"]
pub use self::tim0 as tim23;
#[doc = "UART Peripheral"]
pub type Uarta = crate::Periph<uarta::RegisterBlock, 0x4004_0000>;
impl core::fmt::Debug for Uarta {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Uarta").finish()
    }
}
#[doc = "UART Peripheral"]
pub mod uarta;
#[doc = "UART Peripheral"]
pub type Uartb = crate::Periph<uarta::RegisterBlock, 0x4004_1000>;
impl core::fmt::Debug for Uartb {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Uartb").finish()
    }
}
#[doc = "UART Peripheral"]
pub use self::uarta as uartb;
#[doc = "SPI Peripheral"]
pub type Spia = crate::Periph<spia::RegisterBlock, 0x4005_0000>;
impl core::fmt::Debug for Spia {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Spia").finish()
    }
}
#[doc = "SPI Peripheral"]
pub mod spia;
#[doc = "SPI Peripheral"]
pub type Spib = crate::Periph<spia::RegisterBlock, 0x4005_1000>;
impl core::fmt::Debug for Spib {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Spib").finish()
    }
}
#[doc = "SPI Peripheral"]
pub use self::spia as spib;
#[doc = "SPI Peripheral"]
pub type Spic = crate::Periph<spia::RegisterBlock, 0x4005_2000>;
impl core::fmt::Debug for Spic {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("Spic").finish()
    }
}
#[doc = "SPI Peripheral"]
pub use self::spia as spic;
#[doc = "I2C Peripheral"]
pub type I2ca = crate::Periph<i2ca::RegisterBlock, 0x4006_0000>;
impl core::fmt::Debug for I2ca {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("I2ca").finish()
    }
}
#[doc = "I2C Peripheral"]
pub mod i2ca;
#[doc = "I2C Peripheral"]
pub type I2cb = crate::Periph<i2ca::RegisterBlock, 0x4006_1000>;
impl core::fmt::Debug for I2cb {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("I2cb").finish()
    }
}
#[doc = "I2C Peripheral"]
pub use self::i2ca as i2cb;
#[no_mangle]
static mut DEVICE_PERIPHERALS: bool = false;
#[doc = r" All the peripherals."]
#[allow(non_snake_case)]
pub struct Peripherals {
    #[doc = "SYSCONFIG"]
    pub sysconfig: Sysconfig,
    #[doc = "IRQSEL"]
    pub irqsel: Irqsel,
    #[doc = "IOCONFIG"]
    pub ioconfig: Ioconfig,
    #[doc = "UTILITY"]
    pub utility: Utility,
    #[doc = "PORTA"]
    pub porta: Porta,
    #[doc = "PORTB"]
    pub portb: Portb,
    #[doc = "TIM0"]
    pub tim0: Tim0,
    #[doc = "TIM1"]
    pub tim1: Tim1,
    #[doc = "TIM2"]
    pub tim2: Tim2,
    #[doc = "TIM3"]
    pub tim3: Tim3,
    #[doc = "TIM4"]
    pub tim4: Tim4,
    #[doc = "TIM5"]
    pub tim5: Tim5,
    #[doc = "TIM6"]
    pub tim6: Tim6,
    #[doc = "TIM7"]
    pub tim7: Tim7,
    #[doc = "TIM8"]
    pub tim8: Tim8,
    #[doc = "TIM9"]
    pub tim9: Tim9,
    #[doc = "TIM10"]
    pub tim10: Tim10,
    #[doc = "TIM11"]
    pub tim11: Tim11,
    #[doc = "TIM12"]
    pub tim12: Tim12,
    #[doc = "TIM13"]
    pub tim13: Tim13,
    #[doc = "TIM14"]
    pub tim14: Tim14,
    #[doc = "TIM15"]
    pub tim15: Tim15,
    #[doc = "TIM16"]
    pub tim16: Tim16,
    #[doc = "TIM17"]
    pub tim17: Tim17,
    #[doc = "TIM18"]
    pub tim18: Tim18,
    #[doc = "TIM19"]
    pub tim19: Tim19,
    #[doc = "TIM20"]
    pub tim20: Tim20,
    #[doc = "TIM21"]
    pub tim21: Tim21,
    #[doc = "TIM22"]
    pub tim22: Tim22,
    #[doc = "TIM23"]
    pub tim23: Tim23,
    #[doc = "UARTA"]
    pub uarta: Uarta,
    #[doc = "UARTB"]
    pub uartb: Uartb,
    #[doc = "SPIA"]
    pub spia: Spia,
    #[doc = "SPIB"]
    pub spib: Spib,
    #[doc = "SPIC"]
    pub spic: Spic,
    #[doc = "I2CA"]
    pub i2ca: I2ca,
    #[doc = "I2CB"]
    pub i2cb: I2cb,
}
impl Peripherals {
    #[doc = r" Returns all the peripherals *once*."]
    #[cfg(feature = "critical-section")]
    #[inline]
    pub fn take() -> Option<Self> {
        critical_section::with(|_| {
            if unsafe { DEVICE_PERIPHERALS } {
                return None;
            }
            Some(unsafe { Peripherals::steal() })
        })
    }
    #[doc = r" Unchecked version of `Peripherals::take`."]
    #[doc = r""]
    #[doc = r" # Safety"]
    #[doc = r""]
    #[doc = r" Each of the returned peripherals must be used at most once."]
    #[inline]
    pub unsafe fn steal() -> Self {
        DEVICE_PERIPHERALS = true;
        Peripherals {
            sysconfig: Sysconfig::steal(),
            irqsel: Irqsel::steal(),
            ioconfig: Ioconfig::steal(),
            utility: Utility::steal(),
            porta: Porta::steal(),
            portb: Portb::steal(),
            tim0: Tim0::steal(),
            tim1: Tim1::steal(),
            tim2: Tim2::steal(),
            tim3: Tim3::steal(),
            tim4: Tim4::steal(),
            tim5: Tim5::steal(),
            tim6: Tim6::steal(),
            tim7: Tim7::steal(),
            tim8: Tim8::steal(),
            tim9: Tim9::steal(),
            tim10: Tim10::steal(),
            tim11: Tim11::steal(),
            tim12: Tim12::steal(),
            tim13: Tim13::steal(),
            tim14: Tim14::steal(),
            tim15: Tim15::steal(),
            tim16: Tim16::steal(),
            tim17: Tim17::steal(),
            tim18: Tim18::steal(),
            tim19: Tim19::steal(),
            tim20: Tim20::steal(),
            tim21: Tim21::steal(),
            tim22: Tim22::steal(),
            tim23: Tim23::steal(),
            uarta: Uarta::steal(),
            uartb: Uartb::steal(),
            spia: Spia::steal(),
            spib: Spib::steal(),
            spic: Spic::steal(),
            i2ca: I2ca::steal(),
            i2cb: I2cb::steal(),
        }
    }
}