1#![doc = "Peripheral access API for ATSAMD21J microcontrollers (generated using svd2rust v0.33.5 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
2svd2rust 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.33.5/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
3#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5#![allow(clippy::all)]
6#![allow(unknown_lints)]
7#![allow(mismatched_lifetime_syntaxes)]
8#![no_std]
9use core::marker::PhantomData;
10use core::ops::Deref;
11#[doc = r"Number available in the NVIC for configuring priority"]
12pub const NVIC_PRIO_BITS: u8 = 2;
13#[cfg(feature = "rt")]
14pub use self::Interrupt as interrupt;
15pub use cortex_m::peripheral::Peripherals as CorePeripherals;
16pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, ITM, MPU, NVIC, SCB, SYST, TPIU};
17#[cfg(feature = "rt")]
18pub use cortex_m_rt::interrupt;
19#[allow(unused_imports)]
20use generic::*;
21#[doc = r"Common register and bit access and modify traits"]
22pub mod generic;
23#[cfg(feature = "rt")]
24extern "C" {
25 fn PM();
26 fn SYSCTRL();
27 fn WDT();
28 fn RTC();
29 fn EIC();
30 fn NVMCTRL();
31 fn DMAC();
32 fn USB();
33 fn EVSYS();
34 fn SERCOM0();
35 fn SERCOM1();
36 fn SERCOM2();
37 fn SERCOM3();
38 fn SERCOM4();
39 fn SERCOM5();
40 fn TCC0();
41 fn TCC1();
42 fn TCC2();
43 fn TC3();
44 fn TC4();
45 fn TC5();
46 fn TC6();
47 fn TC7();
48 fn ADC();
49 fn AC();
50 fn DAC();
51 fn I2S();
52}
53#[doc(hidden)]
54#[repr(C)]
55pub union Vector {
56 _handler: unsafe extern "C" fn(),
57 _reserved: u32,
58}
59#[cfg(feature = "rt")]
60#[doc(hidden)]
61#[link_section = ".vector_table.interrupts"]
62#[no_mangle]
63pub static __INTERRUPTS: [Vector; 28] = [
64 Vector { _handler: PM },
65 Vector { _handler: SYSCTRL },
66 Vector { _handler: WDT },
67 Vector { _handler: RTC },
68 Vector { _handler: EIC },
69 Vector { _handler: NVMCTRL },
70 Vector { _handler: DMAC },
71 Vector { _handler: USB },
72 Vector { _handler: EVSYS },
73 Vector { _handler: SERCOM0 },
74 Vector { _handler: SERCOM1 },
75 Vector { _handler: SERCOM2 },
76 Vector { _handler: SERCOM3 },
77 Vector { _handler: SERCOM4 },
78 Vector { _handler: SERCOM5 },
79 Vector { _handler: TCC0 },
80 Vector { _handler: TCC1 },
81 Vector { _handler: TCC2 },
82 Vector { _handler: TC3 },
83 Vector { _handler: TC4 },
84 Vector { _handler: TC5 },
85 Vector { _handler: TC6 },
86 Vector { _handler: TC7 },
87 Vector { _handler: ADC },
88 Vector { _handler: AC },
89 Vector { _handler: DAC },
90 Vector { _reserved: 0 },
91 Vector { _handler: I2S },
92];
93#[doc = r"Enumeration of all the interrupts."]
94#[derive(Copy, Clone, Debug, PartialEq, Eq)]
95#[repr(u16)]
96pub enum Interrupt {
97 #[doc = "0 - PM"]
98 PM = 0,
99 #[doc = "1 - SYSCTRL"]
100 SYSCTRL = 1,
101 #[doc = "2 - WDT"]
102 WDT = 2,
103 #[doc = "3 - RTC"]
104 RTC = 3,
105 #[doc = "4 - EIC"]
106 EIC = 4,
107 #[doc = "5 - NVMCTRL"]
108 NVMCTRL = 5,
109 #[doc = "6 - DMAC"]
110 DMAC = 6,
111 #[doc = "7 - USB"]
112 USB = 7,
113 #[doc = "8 - EVSYS"]
114 EVSYS = 8,
115 #[doc = "9 - SERCOM0"]
116 SERCOM0 = 9,
117 #[doc = "10 - SERCOM1"]
118 SERCOM1 = 10,
119 #[doc = "11 - SERCOM2"]
120 SERCOM2 = 11,
121 #[doc = "12 - SERCOM3"]
122 SERCOM3 = 12,
123 #[doc = "13 - SERCOM4"]
124 SERCOM4 = 13,
125 #[doc = "14 - SERCOM5"]
126 SERCOM5 = 14,
127 #[doc = "15 - TCC0"]
128 TCC0 = 15,
129 #[doc = "16 - TCC1"]
130 TCC1 = 16,
131 #[doc = "17 - TCC2"]
132 TCC2 = 17,
133 #[doc = "18 - TC3"]
134 TC3 = 18,
135 #[doc = "19 - TC4"]
136 TC4 = 19,
137 #[doc = "20 - TC5"]
138 TC5 = 20,
139 #[doc = "21 - TC6"]
140 TC6 = 21,
141 #[doc = "22 - TC7"]
142 TC7 = 22,
143 #[doc = "23 - ADC"]
144 ADC = 23,
145 #[doc = "24 - AC"]
146 AC = 24,
147 #[doc = "25 - DAC"]
148 DAC = 25,
149 #[doc = "27 - I2S"]
150 I2S = 27,
151}
152unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
153 #[inline(always)]
154 fn number(self) -> u16 {
155 self as u16
156 }
157}
158#[doc = "Analog Comparators"]
159pub struct Ac {
160 _marker: PhantomData<*const ()>,
161}
162unsafe impl Send for Ac {}
163impl Ac {
164 #[doc = r"Pointer to the register block"]
165 pub const PTR: *const ac::RegisterBlock = 0x4200_4400 as *const _;
166 #[doc = r"Return the pointer to the register block"]
167 #[inline(always)]
168 pub const fn ptr() -> *const ac::RegisterBlock {
169 Self::PTR
170 }
171 #[doc = r" Steal an instance of this peripheral"]
172 #[doc = r""]
173 #[doc = r" # Safety"]
174 #[doc = r""]
175 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
176 #[doc = r" that may race with any existing instances, for example by only"]
177 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
178 #[doc = r" original peripheral and using critical sections to coordinate"]
179 #[doc = r" access between multiple new instances."]
180 #[doc = r""]
181 #[doc = r" Additionally, other software such as HALs may rely on only one"]
182 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
183 #[doc = r" no stolen instances are passed to such software."]
184 pub unsafe fn steal() -> Self {
185 Self {
186 _marker: PhantomData,
187 }
188 }
189}
190impl Deref for Ac {
191 type Target = ac::RegisterBlock;
192 #[inline(always)]
193 fn deref(&self) -> &Self::Target {
194 unsafe { &*Self::PTR }
195 }
196}
197impl core::fmt::Debug for Ac {
198 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
199 f.debug_struct("Ac").finish()
200 }
201}
202#[doc = "Analog Comparators"]
203pub mod ac;
204#[doc = "Analog Digital Converter"]
205pub struct Adc {
206 _marker: PhantomData<*const ()>,
207}
208unsafe impl Send for Adc {}
209impl Adc {
210 #[doc = r"Pointer to the register block"]
211 pub const PTR: *const adc::RegisterBlock = 0x4200_4000 as *const _;
212 #[doc = r"Return the pointer to the register block"]
213 #[inline(always)]
214 pub const fn ptr() -> *const adc::RegisterBlock {
215 Self::PTR
216 }
217 #[doc = r" Steal an instance of this peripheral"]
218 #[doc = r""]
219 #[doc = r" # Safety"]
220 #[doc = r""]
221 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
222 #[doc = r" that may race with any existing instances, for example by only"]
223 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
224 #[doc = r" original peripheral and using critical sections to coordinate"]
225 #[doc = r" access between multiple new instances."]
226 #[doc = r""]
227 #[doc = r" Additionally, other software such as HALs may rely on only one"]
228 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
229 #[doc = r" no stolen instances are passed to such software."]
230 pub unsafe fn steal() -> Self {
231 Self {
232 _marker: PhantomData,
233 }
234 }
235}
236impl Deref for Adc {
237 type Target = adc::RegisterBlock;
238 #[inline(always)]
239 fn deref(&self) -> &Self::Target {
240 unsafe { &*Self::PTR }
241 }
242}
243impl core::fmt::Debug for Adc {
244 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
245 f.debug_struct("Adc").finish()
246 }
247}
248#[doc = "Analog Digital Converter"]
249pub mod adc;
250#[doc = "Digital Analog Converter"]
251pub struct Dac {
252 _marker: PhantomData<*const ()>,
253}
254unsafe impl Send for Dac {}
255impl Dac {
256 #[doc = r"Pointer to the register block"]
257 pub const PTR: *const dac::RegisterBlock = 0x4200_4800 as *const _;
258 #[doc = r"Return the pointer to the register block"]
259 #[inline(always)]
260 pub const fn ptr() -> *const dac::RegisterBlock {
261 Self::PTR
262 }
263 #[doc = r" Steal an instance of this peripheral"]
264 #[doc = r""]
265 #[doc = r" # Safety"]
266 #[doc = r""]
267 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
268 #[doc = r" that may race with any existing instances, for example by only"]
269 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
270 #[doc = r" original peripheral and using critical sections to coordinate"]
271 #[doc = r" access between multiple new instances."]
272 #[doc = r""]
273 #[doc = r" Additionally, other software such as HALs may rely on only one"]
274 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
275 #[doc = r" no stolen instances are passed to such software."]
276 pub unsafe fn steal() -> Self {
277 Self {
278 _marker: PhantomData,
279 }
280 }
281}
282impl Deref for Dac {
283 type Target = dac::RegisterBlock;
284 #[inline(always)]
285 fn deref(&self) -> &Self::Target {
286 unsafe { &*Self::PTR }
287 }
288}
289impl core::fmt::Debug for Dac {
290 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
291 f.debug_struct("Dac").finish()
292 }
293}
294#[doc = "Digital Analog Converter"]
295pub mod dac;
296#[doc = "Direct Memory Access Controller"]
297pub struct Dmac {
298 _marker: PhantomData<*const ()>,
299}
300unsafe impl Send for Dmac {}
301impl Dmac {
302 #[doc = r"Pointer to the register block"]
303 pub const PTR: *const dmac::RegisterBlock = 0x4100_4800 as *const _;
304 #[doc = r"Return the pointer to the register block"]
305 #[inline(always)]
306 pub const fn ptr() -> *const dmac::RegisterBlock {
307 Self::PTR
308 }
309 #[doc = r" Steal an instance of this peripheral"]
310 #[doc = r""]
311 #[doc = r" # Safety"]
312 #[doc = r""]
313 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
314 #[doc = r" that may race with any existing instances, for example by only"]
315 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
316 #[doc = r" original peripheral and using critical sections to coordinate"]
317 #[doc = r" access between multiple new instances."]
318 #[doc = r""]
319 #[doc = r" Additionally, other software such as HALs may rely on only one"]
320 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
321 #[doc = r" no stolen instances are passed to such software."]
322 pub unsafe fn steal() -> Self {
323 Self {
324 _marker: PhantomData,
325 }
326 }
327}
328impl Deref for Dmac {
329 type Target = dmac::RegisterBlock;
330 #[inline(always)]
331 fn deref(&self) -> &Self::Target {
332 unsafe { &*Self::PTR }
333 }
334}
335impl core::fmt::Debug for Dmac {
336 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
337 f.debug_struct("Dmac").finish()
338 }
339}
340#[doc = "Direct Memory Access Controller"]
341pub mod dmac;
342#[doc = "Device Service Unit"]
343pub struct Dsu {
344 _marker: PhantomData<*const ()>,
345}
346unsafe impl Send for Dsu {}
347impl Dsu {
348 #[doc = r"Pointer to the register block"]
349 pub const PTR: *const dsu::RegisterBlock = 0x4100_2000 as *const _;
350 #[doc = r"Return the pointer to the register block"]
351 #[inline(always)]
352 pub const fn ptr() -> *const dsu::RegisterBlock {
353 Self::PTR
354 }
355 #[doc = r" Steal an instance of this peripheral"]
356 #[doc = r""]
357 #[doc = r" # Safety"]
358 #[doc = r""]
359 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
360 #[doc = r" that may race with any existing instances, for example by only"]
361 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
362 #[doc = r" original peripheral and using critical sections to coordinate"]
363 #[doc = r" access between multiple new instances."]
364 #[doc = r""]
365 #[doc = r" Additionally, other software such as HALs may rely on only one"]
366 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
367 #[doc = r" no stolen instances are passed to such software."]
368 pub unsafe fn steal() -> Self {
369 Self {
370 _marker: PhantomData,
371 }
372 }
373}
374impl Deref for Dsu {
375 type Target = dsu::RegisterBlock;
376 #[inline(always)]
377 fn deref(&self) -> &Self::Target {
378 unsafe { &*Self::PTR }
379 }
380}
381impl core::fmt::Debug for Dsu {
382 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
383 f.debug_struct("Dsu").finish()
384 }
385}
386#[doc = "Device Service Unit"]
387pub mod dsu;
388#[doc = "External Interrupt Controller"]
389pub struct Eic {
390 _marker: PhantomData<*const ()>,
391}
392unsafe impl Send for Eic {}
393impl Eic {
394 #[doc = r"Pointer to the register block"]
395 pub const PTR: *const eic::RegisterBlock = 0x4000_1800 as *const _;
396 #[doc = r"Return the pointer to the register block"]
397 #[inline(always)]
398 pub const fn ptr() -> *const eic::RegisterBlock {
399 Self::PTR
400 }
401 #[doc = r" Steal an instance of this peripheral"]
402 #[doc = r""]
403 #[doc = r" # Safety"]
404 #[doc = r""]
405 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
406 #[doc = r" that may race with any existing instances, for example by only"]
407 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
408 #[doc = r" original peripheral and using critical sections to coordinate"]
409 #[doc = r" access between multiple new instances."]
410 #[doc = r""]
411 #[doc = r" Additionally, other software such as HALs may rely on only one"]
412 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
413 #[doc = r" no stolen instances are passed to such software."]
414 pub unsafe fn steal() -> Self {
415 Self {
416 _marker: PhantomData,
417 }
418 }
419}
420impl Deref for Eic {
421 type Target = eic::RegisterBlock;
422 #[inline(always)]
423 fn deref(&self) -> &Self::Target {
424 unsafe { &*Self::PTR }
425 }
426}
427impl core::fmt::Debug for Eic {
428 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
429 f.debug_struct("Eic").finish()
430 }
431}
432#[doc = "External Interrupt Controller"]
433pub mod eic;
434#[doc = "Event System Interface"]
435pub struct Evsys {
436 _marker: PhantomData<*const ()>,
437}
438unsafe impl Send for Evsys {}
439impl Evsys {
440 #[doc = r"Pointer to the register block"]
441 pub const PTR: *const evsys::RegisterBlock = 0x4200_0400 as *const _;
442 #[doc = r"Return the pointer to the register block"]
443 #[inline(always)]
444 pub const fn ptr() -> *const evsys::RegisterBlock {
445 Self::PTR
446 }
447 #[doc = r" Steal an instance of this peripheral"]
448 #[doc = r""]
449 #[doc = r" # Safety"]
450 #[doc = r""]
451 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
452 #[doc = r" that may race with any existing instances, for example by only"]
453 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
454 #[doc = r" original peripheral and using critical sections to coordinate"]
455 #[doc = r" access between multiple new instances."]
456 #[doc = r""]
457 #[doc = r" Additionally, other software such as HALs may rely on only one"]
458 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
459 #[doc = r" no stolen instances are passed to such software."]
460 pub unsafe fn steal() -> Self {
461 Self {
462 _marker: PhantomData,
463 }
464 }
465}
466impl Deref for Evsys {
467 type Target = evsys::RegisterBlock;
468 #[inline(always)]
469 fn deref(&self) -> &Self::Target {
470 unsafe { &*Self::PTR }
471 }
472}
473impl core::fmt::Debug for Evsys {
474 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
475 f.debug_struct("Evsys").finish()
476 }
477}
478#[doc = "Event System Interface"]
479pub mod evsys;
480#[doc = "Generic Clock Generator"]
481pub struct Gclk {
482 _marker: PhantomData<*const ()>,
483}
484unsafe impl Send for Gclk {}
485impl Gclk {
486 #[doc = r"Pointer to the register block"]
487 pub const PTR: *const gclk::RegisterBlock = 0x4000_0c00 as *const _;
488 #[doc = r"Return the pointer to the register block"]
489 #[inline(always)]
490 pub const fn ptr() -> *const gclk::RegisterBlock {
491 Self::PTR
492 }
493 #[doc = r" Steal an instance of this peripheral"]
494 #[doc = r""]
495 #[doc = r" # Safety"]
496 #[doc = r""]
497 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
498 #[doc = r" that may race with any existing instances, for example by only"]
499 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
500 #[doc = r" original peripheral and using critical sections to coordinate"]
501 #[doc = r" access between multiple new instances."]
502 #[doc = r""]
503 #[doc = r" Additionally, other software such as HALs may rely on only one"]
504 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
505 #[doc = r" no stolen instances are passed to such software."]
506 pub unsafe fn steal() -> Self {
507 Self {
508 _marker: PhantomData,
509 }
510 }
511}
512impl Deref for Gclk {
513 type Target = gclk::RegisterBlock;
514 #[inline(always)]
515 fn deref(&self) -> &Self::Target {
516 unsafe { &*Self::PTR }
517 }
518}
519impl core::fmt::Debug for Gclk {
520 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
521 f.debug_struct("Gclk").finish()
522 }
523}
524#[doc = "Generic Clock Generator"]
525pub mod gclk;
526#[doc = "HSB Matrix"]
527pub struct Hmatrix {
528 _marker: PhantomData<*const ()>,
529}
530unsafe impl Send for Hmatrix {}
531impl Hmatrix {
532 #[doc = r"Pointer to the register block"]
533 pub const PTR: *const hmatrix::RegisterBlock = 0x4100_7000 as *const _;
534 #[doc = r"Return the pointer to the register block"]
535 #[inline(always)]
536 pub const fn ptr() -> *const hmatrix::RegisterBlock {
537 Self::PTR
538 }
539 #[doc = r" Steal an instance of this peripheral"]
540 #[doc = r""]
541 #[doc = r" # Safety"]
542 #[doc = r""]
543 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
544 #[doc = r" that may race with any existing instances, for example by only"]
545 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
546 #[doc = r" original peripheral and using critical sections to coordinate"]
547 #[doc = r" access between multiple new instances."]
548 #[doc = r""]
549 #[doc = r" Additionally, other software such as HALs may rely on only one"]
550 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
551 #[doc = r" no stolen instances are passed to such software."]
552 pub unsafe fn steal() -> Self {
553 Self {
554 _marker: PhantomData,
555 }
556 }
557}
558impl Deref for Hmatrix {
559 type Target = hmatrix::RegisterBlock;
560 #[inline(always)]
561 fn deref(&self) -> &Self::Target {
562 unsafe { &*Self::PTR }
563 }
564}
565impl core::fmt::Debug for Hmatrix {
566 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
567 f.debug_struct("Hmatrix").finish()
568 }
569}
570#[doc = "HSB Matrix"]
571pub mod hmatrix;
572#[doc = "Inter-IC Sound Interface"]
573pub struct I2s {
574 _marker: PhantomData<*const ()>,
575}
576unsafe impl Send for I2s {}
577impl I2s {
578 #[doc = r"Pointer to the register block"]
579 pub const PTR: *const i2s::RegisterBlock = 0x4200_5000 as *const _;
580 #[doc = r"Return the pointer to the register block"]
581 #[inline(always)]
582 pub const fn ptr() -> *const i2s::RegisterBlock {
583 Self::PTR
584 }
585 #[doc = r" Steal an instance of this peripheral"]
586 #[doc = r""]
587 #[doc = r" # Safety"]
588 #[doc = r""]
589 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
590 #[doc = r" that may race with any existing instances, for example by only"]
591 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
592 #[doc = r" original peripheral and using critical sections to coordinate"]
593 #[doc = r" access between multiple new instances."]
594 #[doc = r""]
595 #[doc = r" Additionally, other software such as HALs may rely on only one"]
596 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
597 #[doc = r" no stolen instances are passed to such software."]
598 pub unsafe fn steal() -> Self {
599 Self {
600 _marker: PhantomData,
601 }
602 }
603}
604impl Deref for I2s {
605 type Target = i2s::RegisterBlock;
606 #[inline(always)]
607 fn deref(&self) -> &Self::Target {
608 unsafe { &*Self::PTR }
609 }
610}
611impl core::fmt::Debug for I2s {
612 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
613 f.debug_struct("I2s").finish()
614 }
615}
616#[doc = "Inter-IC Sound Interface"]
617pub mod i2s;
618#[doc = "Cortex-M0+ Micro-Trace Buffer"]
619pub struct Mtb {
620 _marker: PhantomData<*const ()>,
621}
622unsafe impl Send for Mtb {}
623impl Mtb {
624 #[doc = r"Pointer to the register block"]
625 pub const PTR: *const mtb::RegisterBlock = 0x4100_6000 as *const _;
626 #[doc = r"Return the pointer to the register block"]
627 #[inline(always)]
628 pub const fn ptr() -> *const mtb::RegisterBlock {
629 Self::PTR
630 }
631 #[doc = r" Steal an instance of this peripheral"]
632 #[doc = r""]
633 #[doc = r" # Safety"]
634 #[doc = r""]
635 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
636 #[doc = r" that may race with any existing instances, for example by only"]
637 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
638 #[doc = r" original peripheral and using critical sections to coordinate"]
639 #[doc = r" access between multiple new instances."]
640 #[doc = r""]
641 #[doc = r" Additionally, other software such as HALs may rely on only one"]
642 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
643 #[doc = r" no stolen instances are passed to such software."]
644 pub unsafe fn steal() -> Self {
645 Self {
646 _marker: PhantomData,
647 }
648 }
649}
650impl Deref for Mtb {
651 type Target = mtb::RegisterBlock;
652 #[inline(always)]
653 fn deref(&self) -> &Self::Target {
654 unsafe { &*Self::PTR }
655 }
656}
657impl core::fmt::Debug for Mtb {
658 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
659 f.debug_struct("Mtb").finish()
660 }
661}
662#[doc = "Cortex-M0+ Micro-Trace Buffer"]
663pub mod mtb;
664#[doc = "Non-Volatile Memory Controller"]
665pub struct Nvmctrl {
666 _marker: PhantomData<*const ()>,
667}
668unsafe impl Send for Nvmctrl {}
669impl Nvmctrl {
670 #[doc = r"Pointer to the register block"]
671 pub const PTR: *const nvmctrl::RegisterBlock = 0x4100_4000 as *const _;
672 #[doc = r"Return the pointer to the register block"]
673 #[inline(always)]
674 pub const fn ptr() -> *const nvmctrl::RegisterBlock {
675 Self::PTR
676 }
677 #[doc = r" Steal an instance of this peripheral"]
678 #[doc = r""]
679 #[doc = r" # Safety"]
680 #[doc = r""]
681 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
682 #[doc = r" that may race with any existing instances, for example by only"]
683 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
684 #[doc = r" original peripheral and using critical sections to coordinate"]
685 #[doc = r" access between multiple new instances."]
686 #[doc = r""]
687 #[doc = r" Additionally, other software such as HALs may rely on only one"]
688 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
689 #[doc = r" no stolen instances are passed to such software."]
690 pub unsafe fn steal() -> Self {
691 Self {
692 _marker: PhantomData,
693 }
694 }
695}
696impl Deref for Nvmctrl {
697 type Target = nvmctrl::RegisterBlock;
698 #[inline(always)]
699 fn deref(&self) -> &Self::Target {
700 unsafe { &*Self::PTR }
701 }
702}
703impl core::fmt::Debug for Nvmctrl {
704 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
705 f.debug_struct("Nvmctrl").finish()
706 }
707}
708#[doc = "Non-Volatile Memory Controller"]
709pub mod nvmctrl;
710#[doc = "Peripheral Access Controller 0"]
711pub struct Pac0 {
712 _marker: PhantomData<*const ()>,
713}
714unsafe impl Send for Pac0 {}
715impl Pac0 {
716 #[doc = r"Pointer to the register block"]
717 pub const PTR: *const pac0::RegisterBlock = 0x4000_0000 as *const _;
718 #[doc = r"Return the pointer to the register block"]
719 #[inline(always)]
720 pub const fn ptr() -> *const pac0::RegisterBlock {
721 Self::PTR
722 }
723 #[doc = r" Steal an instance of this peripheral"]
724 #[doc = r""]
725 #[doc = r" # Safety"]
726 #[doc = r""]
727 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
728 #[doc = r" that may race with any existing instances, for example by only"]
729 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
730 #[doc = r" original peripheral and using critical sections to coordinate"]
731 #[doc = r" access between multiple new instances."]
732 #[doc = r""]
733 #[doc = r" Additionally, other software such as HALs may rely on only one"]
734 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
735 #[doc = r" no stolen instances are passed to such software."]
736 pub unsafe fn steal() -> Self {
737 Self {
738 _marker: PhantomData,
739 }
740 }
741}
742impl Deref for Pac0 {
743 type Target = pac0::RegisterBlock;
744 #[inline(always)]
745 fn deref(&self) -> &Self::Target {
746 unsafe { &*Self::PTR }
747 }
748}
749impl core::fmt::Debug for Pac0 {
750 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
751 f.debug_struct("Pac0").finish()
752 }
753}
754#[doc = "Peripheral Access Controller 0"]
755pub mod pac0;
756#[doc = "Peripheral Access Controller 1"]
757pub struct Pac1 {
758 _marker: PhantomData<*const ()>,
759}
760unsafe impl Send for Pac1 {}
761impl Pac1 {
762 #[doc = r"Pointer to the register block"]
763 pub const PTR: *const pac0::RegisterBlock = 0x4100_0000 as *const _;
764 #[doc = r"Return the pointer to the register block"]
765 #[inline(always)]
766 pub const fn ptr() -> *const pac0::RegisterBlock {
767 Self::PTR
768 }
769 #[doc = r" Steal an instance of this peripheral"]
770 #[doc = r""]
771 #[doc = r" # Safety"]
772 #[doc = r""]
773 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
774 #[doc = r" that may race with any existing instances, for example by only"]
775 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
776 #[doc = r" original peripheral and using critical sections to coordinate"]
777 #[doc = r" access between multiple new instances."]
778 #[doc = r""]
779 #[doc = r" Additionally, other software such as HALs may rely on only one"]
780 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
781 #[doc = r" no stolen instances are passed to such software."]
782 pub unsafe fn steal() -> Self {
783 Self {
784 _marker: PhantomData,
785 }
786 }
787}
788impl Deref for Pac1 {
789 type Target = pac0::RegisterBlock;
790 #[inline(always)]
791 fn deref(&self) -> &Self::Target {
792 unsafe { &*Self::PTR }
793 }
794}
795impl core::fmt::Debug for Pac1 {
796 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
797 f.debug_struct("Pac1").finish()
798 }
799}
800#[doc = "Peripheral Access Controller 1"]
801pub use self::pac0 as pac1;
802#[doc = "Peripheral Access Controller 2"]
803pub struct Pac2 {
804 _marker: PhantomData<*const ()>,
805}
806unsafe impl Send for Pac2 {}
807impl Pac2 {
808 #[doc = r"Pointer to the register block"]
809 pub const PTR: *const pac0::RegisterBlock = 0x4200_0000 as *const _;
810 #[doc = r"Return the pointer to the register block"]
811 #[inline(always)]
812 pub const fn ptr() -> *const pac0::RegisterBlock {
813 Self::PTR
814 }
815 #[doc = r" Steal an instance of this peripheral"]
816 #[doc = r""]
817 #[doc = r" # Safety"]
818 #[doc = r""]
819 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
820 #[doc = r" that may race with any existing instances, for example by only"]
821 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
822 #[doc = r" original peripheral and using critical sections to coordinate"]
823 #[doc = r" access between multiple new instances."]
824 #[doc = r""]
825 #[doc = r" Additionally, other software such as HALs may rely on only one"]
826 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
827 #[doc = r" no stolen instances are passed to such software."]
828 pub unsafe fn steal() -> Self {
829 Self {
830 _marker: PhantomData,
831 }
832 }
833}
834impl Deref for Pac2 {
835 type Target = pac0::RegisterBlock;
836 #[inline(always)]
837 fn deref(&self) -> &Self::Target {
838 unsafe { &*Self::PTR }
839 }
840}
841impl core::fmt::Debug for Pac2 {
842 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
843 f.debug_struct("Pac2").finish()
844 }
845}
846#[doc = "Peripheral Access Controller 2"]
847pub use self::pac0 as pac2;
848#[doc = "Power Manager"]
849pub struct Pm {
850 _marker: PhantomData<*const ()>,
851}
852unsafe impl Send for Pm {}
853impl Pm {
854 #[doc = r"Pointer to the register block"]
855 pub const PTR: *const pm::RegisterBlock = 0x4000_0400 as *const _;
856 #[doc = r"Return the pointer to the register block"]
857 #[inline(always)]
858 pub const fn ptr() -> *const pm::RegisterBlock {
859 Self::PTR
860 }
861 #[doc = r" Steal an instance of this peripheral"]
862 #[doc = r""]
863 #[doc = r" # Safety"]
864 #[doc = r""]
865 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
866 #[doc = r" that may race with any existing instances, for example by only"]
867 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
868 #[doc = r" original peripheral and using critical sections to coordinate"]
869 #[doc = r" access between multiple new instances."]
870 #[doc = r""]
871 #[doc = r" Additionally, other software such as HALs may rely on only one"]
872 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
873 #[doc = r" no stolen instances are passed to such software."]
874 pub unsafe fn steal() -> Self {
875 Self {
876 _marker: PhantomData,
877 }
878 }
879}
880impl Deref for Pm {
881 type Target = pm::RegisterBlock;
882 #[inline(always)]
883 fn deref(&self) -> &Self::Target {
884 unsafe { &*Self::PTR }
885 }
886}
887impl core::fmt::Debug for Pm {
888 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
889 f.debug_struct("Pm").finish()
890 }
891}
892#[doc = "Power Manager"]
893pub mod pm;
894#[doc = "Port Module"]
895pub struct Port {
896 _marker: PhantomData<*const ()>,
897}
898unsafe impl Send for Port {}
899impl Port {
900 #[doc = r"Pointer to the register block"]
901 pub const PTR: *const port::RegisterBlock = 0x4100_4400 as *const _;
902 #[doc = r"Return the pointer to the register block"]
903 #[inline(always)]
904 pub const fn ptr() -> *const port::RegisterBlock {
905 Self::PTR
906 }
907 #[doc = r" Steal an instance of this peripheral"]
908 #[doc = r""]
909 #[doc = r" # Safety"]
910 #[doc = r""]
911 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
912 #[doc = r" that may race with any existing instances, for example by only"]
913 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
914 #[doc = r" original peripheral and using critical sections to coordinate"]
915 #[doc = r" access between multiple new instances."]
916 #[doc = r""]
917 #[doc = r" Additionally, other software such as HALs may rely on only one"]
918 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
919 #[doc = r" no stolen instances are passed to such software."]
920 pub unsafe fn steal() -> Self {
921 Self {
922 _marker: PhantomData,
923 }
924 }
925}
926impl Deref for Port {
927 type Target = port::RegisterBlock;
928 #[inline(always)]
929 fn deref(&self) -> &Self::Target {
930 unsafe { &*Self::PTR }
931 }
932}
933impl core::fmt::Debug for Port {
934 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
935 f.debug_struct("Port").finish()
936 }
937}
938#[doc = "Port Module"]
939pub mod port;
940#[doc = "Port Module (IOBUS)"]
941pub struct PortIobus {
942 _marker: PhantomData<*const ()>,
943}
944unsafe impl Send for PortIobus {}
945impl PortIobus {
946 #[doc = r"Pointer to the register block"]
947 pub const PTR: *const port::RegisterBlock = 0x6000_0000 as *const _;
948 #[doc = r"Return the pointer to the register block"]
949 #[inline(always)]
950 pub const fn ptr() -> *const port::RegisterBlock {
951 Self::PTR
952 }
953 #[doc = r" Steal an instance of this peripheral"]
954 #[doc = r""]
955 #[doc = r" # Safety"]
956 #[doc = r""]
957 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
958 #[doc = r" that may race with any existing instances, for example by only"]
959 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
960 #[doc = r" original peripheral and using critical sections to coordinate"]
961 #[doc = r" access between multiple new instances."]
962 #[doc = r""]
963 #[doc = r" Additionally, other software such as HALs may rely on only one"]
964 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
965 #[doc = r" no stolen instances are passed to such software."]
966 pub unsafe fn steal() -> Self {
967 Self {
968 _marker: PhantomData,
969 }
970 }
971}
972impl Deref for PortIobus {
973 type Target = port::RegisterBlock;
974 #[inline(always)]
975 fn deref(&self) -> &Self::Target {
976 unsafe { &*Self::PTR }
977 }
978}
979impl core::fmt::Debug for PortIobus {
980 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
981 f.debug_struct("PortIobus").finish()
982 }
983}
984#[doc = "Port Module (IOBUS)"]
985pub use self::port as port_iobus;
986#[doc = "Real-Time Counter"]
987pub struct Rtc {
988 _marker: PhantomData<*const ()>,
989}
990unsafe impl Send for Rtc {}
991impl Rtc {
992 #[doc = r"Pointer to the register block"]
993 pub const PTR: *const rtc::RegisterBlock = 0x4000_1400 as *const _;
994 #[doc = r"Return the pointer to the register block"]
995 #[inline(always)]
996 pub const fn ptr() -> *const rtc::RegisterBlock {
997 Self::PTR
998 }
999 #[doc = r" Steal an instance of this peripheral"]
1000 #[doc = r""]
1001 #[doc = r" # Safety"]
1002 #[doc = r""]
1003 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1004 #[doc = r" that may race with any existing instances, for example by only"]
1005 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1006 #[doc = r" original peripheral and using critical sections to coordinate"]
1007 #[doc = r" access between multiple new instances."]
1008 #[doc = r""]
1009 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1010 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1011 #[doc = r" no stolen instances are passed to such software."]
1012 pub unsafe fn steal() -> Self {
1013 Self {
1014 _marker: PhantomData,
1015 }
1016 }
1017}
1018impl Deref for Rtc {
1019 type Target = rtc::RegisterBlock;
1020 #[inline(always)]
1021 fn deref(&self) -> &Self::Target {
1022 unsafe { &*Self::PTR }
1023 }
1024}
1025impl core::fmt::Debug for Rtc {
1026 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1027 f.debug_struct("Rtc").finish()
1028 }
1029}
1030#[doc = "Real-Time Counter"]
1031pub mod rtc;
1032#[doc = "Serial Communication Interface 0"]
1033pub struct Sercom0 {
1034 _marker: PhantomData<*const ()>,
1035}
1036unsafe impl Send for Sercom0 {}
1037impl Sercom0 {
1038 #[doc = r"Pointer to the register block"]
1039 pub const PTR: *const sercom0::RegisterBlock = 0x4200_0800 as *const _;
1040 #[doc = r"Return the pointer to the register block"]
1041 #[inline(always)]
1042 pub const fn ptr() -> *const sercom0::RegisterBlock {
1043 Self::PTR
1044 }
1045 #[doc = r" Steal an instance of this peripheral"]
1046 #[doc = r""]
1047 #[doc = r" # Safety"]
1048 #[doc = r""]
1049 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1050 #[doc = r" that may race with any existing instances, for example by only"]
1051 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1052 #[doc = r" original peripheral and using critical sections to coordinate"]
1053 #[doc = r" access between multiple new instances."]
1054 #[doc = r""]
1055 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1056 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1057 #[doc = r" no stolen instances are passed to such software."]
1058 pub unsafe fn steal() -> Self {
1059 Self {
1060 _marker: PhantomData,
1061 }
1062 }
1063}
1064impl Deref for Sercom0 {
1065 type Target = sercom0::RegisterBlock;
1066 #[inline(always)]
1067 fn deref(&self) -> &Self::Target {
1068 unsafe { &*Self::PTR }
1069 }
1070}
1071impl core::fmt::Debug for Sercom0 {
1072 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1073 f.debug_struct("Sercom0").finish()
1074 }
1075}
1076#[doc = "Serial Communication Interface 0"]
1077pub mod sercom0;
1078#[doc = "Serial Communication Interface 1"]
1079pub struct Sercom1 {
1080 _marker: PhantomData<*const ()>,
1081}
1082unsafe impl Send for Sercom1 {}
1083impl Sercom1 {
1084 #[doc = r"Pointer to the register block"]
1085 pub const PTR: *const sercom0::RegisterBlock = 0x4200_0c00 as *const _;
1086 #[doc = r"Return the pointer to the register block"]
1087 #[inline(always)]
1088 pub const fn ptr() -> *const sercom0::RegisterBlock {
1089 Self::PTR
1090 }
1091 #[doc = r" Steal an instance of this peripheral"]
1092 #[doc = r""]
1093 #[doc = r" # Safety"]
1094 #[doc = r""]
1095 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1096 #[doc = r" that may race with any existing instances, for example by only"]
1097 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1098 #[doc = r" original peripheral and using critical sections to coordinate"]
1099 #[doc = r" access between multiple new instances."]
1100 #[doc = r""]
1101 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1102 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1103 #[doc = r" no stolen instances are passed to such software."]
1104 pub unsafe fn steal() -> Self {
1105 Self {
1106 _marker: PhantomData,
1107 }
1108 }
1109}
1110impl Deref for Sercom1 {
1111 type Target = sercom0::RegisterBlock;
1112 #[inline(always)]
1113 fn deref(&self) -> &Self::Target {
1114 unsafe { &*Self::PTR }
1115 }
1116}
1117impl core::fmt::Debug for Sercom1 {
1118 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1119 f.debug_struct("Sercom1").finish()
1120 }
1121}
1122#[doc = "Serial Communication Interface 1"]
1123pub use self::sercom0 as sercom1;
1124#[doc = "Serial Communication Interface 2"]
1125pub struct Sercom2 {
1126 _marker: PhantomData<*const ()>,
1127}
1128unsafe impl Send for Sercom2 {}
1129impl Sercom2 {
1130 #[doc = r"Pointer to the register block"]
1131 pub const PTR: *const sercom0::RegisterBlock = 0x4200_1000 as *const _;
1132 #[doc = r"Return the pointer to the register block"]
1133 #[inline(always)]
1134 pub const fn ptr() -> *const sercom0::RegisterBlock {
1135 Self::PTR
1136 }
1137 #[doc = r" Steal an instance of this peripheral"]
1138 #[doc = r""]
1139 #[doc = r" # Safety"]
1140 #[doc = r""]
1141 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1142 #[doc = r" that may race with any existing instances, for example by only"]
1143 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1144 #[doc = r" original peripheral and using critical sections to coordinate"]
1145 #[doc = r" access between multiple new instances."]
1146 #[doc = r""]
1147 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1148 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1149 #[doc = r" no stolen instances are passed to such software."]
1150 pub unsafe fn steal() -> Self {
1151 Self {
1152 _marker: PhantomData,
1153 }
1154 }
1155}
1156impl Deref for Sercom2 {
1157 type Target = sercom0::RegisterBlock;
1158 #[inline(always)]
1159 fn deref(&self) -> &Self::Target {
1160 unsafe { &*Self::PTR }
1161 }
1162}
1163impl core::fmt::Debug for Sercom2 {
1164 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1165 f.debug_struct("Sercom2").finish()
1166 }
1167}
1168#[doc = "Serial Communication Interface 2"]
1169pub use self::sercom0 as sercom2;
1170#[doc = "Serial Communication Interface 3"]
1171pub struct Sercom3 {
1172 _marker: PhantomData<*const ()>,
1173}
1174unsafe impl Send for Sercom3 {}
1175impl Sercom3 {
1176 #[doc = r"Pointer to the register block"]
1177 pub const PTR: *const sercom0::RegisterBlock = 0x4200_1400 as *const _;
1178 #[doc = r"Return the pointer to the register block"]
1179 #[inline(always)]
1180 pub const fn ptr() -> *const sercom0::RegisterBlock {
1181 Self::PTR
1182 }
1183 #[doc = r" Steal an instance of this peripheral"]
1184 #[doc = r""]
1185 #[doc = r" # Safety"]
1186 #[doc = r""]
1187 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1188 #[doc = r" that may race with any existing instances, for example by only"]
1189 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1190 #[doc = r" original peripheral and using critical sections to coordinate"]
1191 #[doc = r" access between multiple new instances."]
1192 #[doc = r""]
1193 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1194 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1195 #[doc = r" no stolen instances are passed to such software."]
1196 pub unsafe fn steal() -> Self {
1197 Self {
1198 _marker: PhantomData,
1199 }
1200 }
1201}
1202impl Deref for Sercom3 {
1203 type Target = sercom0::RegisterBlock;
1204 #[inline(always)]
1205 fn deref(&self) -> &Self::Target {
1206 unsafe { &*Self::PTR }
1207 }
1208}
1209impl core::fmt::Debug for Sercom3 {
1210 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1211 f.debug_struct("Sercom3").finish()
1212 }
1213}
1214#[doc = "Serial Communication Interface 3"]
1215pub use self::sercom0 as sercom3;
1216#[doc = "Serial Communication Interface 4"]
1217pub struct Sercom4 {
1218 _marker: PhantomData<*const ()>,
1219}
1220unsafe impl Send for Sercom4 {}
1221impl Sercom4 {
1222 #[doc = r"Pointer to the register block"]
1223 pub const PTR: *const sercom0::RegisterBlock = 0x4200_1800 as *const _;
1224 #[doc = r"Return the pointer to the register block"]
1225 #[inline(always)]
1226 pub const fn ptr() -> *const sercom0::RegisterBlock {
1227 Self::PTR
1228 }
1229 #[doc = r" Steal an instance of this peripheral"]
1230 #[doc = r""]
1231 #[doc = r" # Safety"]
1232 #[doc = r""]
1233 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1234 #[doc = r" that may race with any existing instances, for example by only"]
1235 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1236 #[doc = r" original peripheral and using critical sections to coordinate"]
1237 #[doc = r" access between multiple new instances."]
1238 #[doc = r""]
1239 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1240 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1241 #[doc = r" no stolen instances are passed to such software."]
1242 pub unsafe fn steal() -> Self {
1243 Self {
1244 _marker: PhantomData,
1245 }
1246 }
1247}
1248impl Deref for Sercom4 {
1249 type Target = sercom0::RegisterBlock;
1250 #[inline(always)]
1251 fn deref(&self) -> &Self::Target {
1252 unsafe { &*Self::PTR }
1253 }
1254}
1255impl core::fmt::Debug for Sercom4 {
1256 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1257 f.debug_struct("Sercom4").finish()
1258 }
1259}
1260#[doc = "Serial Communication Interface 4"]
1261pub use self::sercom0 as sercom4;
1262#[doc = "Serial Communication Interface 5"]
1263pub struct Sercom5 {
1264 _marker: PhantomData<*const ()>,
1265}
1266unsafe impl Send for Sercom5 {}
1267impl Sercom5 {
1268 #[doc = r"Pointer to the register block"]
1269 pub const PTR: *const sercom0::RegisterBlock = 0x4200_1c00 as *const _;
1270 #[doc = r"Return the pointer to the register block"]
1271 #[inline(always)]
1272 pub const fn ptr() -> *const sercom0::RegisterBlock {
1273 Self::PTR
1274 }
1275 #[doc = r" Steal an instance of this peripheral"]
1276 #[doc = r""]
1277 #[doc = r" # Safety"]
1278 #[doc = r""]
1279 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1280 #[doc = r" that may race with any existing instances, for example by only"]
1281 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1282 #[doc = r" original peripheral and using critical sections to coordinate"]
1283 #[doc = r" access between multiple new instances."]
1284 #[doc = r""]
1285 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1286 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1287 #[doc = r" no stolen instances are passed to such software."]
1288 pub unsafe fn steal() -> Self {
1289 Self {
1290 _marker: PhantomData,
1291 }
1292 }
1293}
1294impl Deref for Sercom5 {
1295 type Target = sercom0::RegisterBlock;
1296 #[inline(always)]
1297 fn deref(&self) -> &Self::Target {
1298 unsafe { &*Self::PTR }
1299 }
1300}
1301impl core::fmt::Debug for Sercom5 {
1302 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1303 f.debug_struct("Sercom5").finish()
1304 }
1305}
1306#[doc = "Serial Communication Interface 5"]
1307pub use self::sercom0 as sercom5;
1308#[doc = "System Control"]
1309pub struct Sysctrl {
1310 _marker: PhantomData<*const ()>,
1311}
1312unsafe impl Send for Sysctrl {}
1313impl Sysctrl {
1314 #[doc = r"Pointer to the register block"]
1315 pub const PTR: *const sysctrl::RegisterBlock = 0x4000_0800 as *const _;
1316 #[doc = r"Return the pointer to the register block"]
1317 #[inline(always)]
1318 pub const fn ptr() -> *const sysctrl::RegisterBlock {
1319 Self::PTR
1320 }
1321 #[doc = r" Steal an instance of this peripheral"]
1322 #[doc = r""]
1323 #[doc = r" # Safety"]
1324 #[doc = r""]
1325 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1326 #[doc = r" that may race with any existing instances, for example by only"]
1327 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1328 #[doc = r" original peripheral and using critical sections to coordinate"]
1329 #[doc = r" access between multiple new instances."]
1330 #[doc = r""]
1331 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1332 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1333 #[doc = r" no stolen instances are passed to such software."]
1334 pub unsafe fn steal() -> Self {
1335 Self {
1336 _marker: PhantomData,
1337 }
1338 }
1339}
1340impl Deref for Sysctrl {
1341 type Target = sysctrl::RegisterBlock;
1342 #[inline(always)]
1343 fn deref(&self) -> &Self::Target {
1344 unsafe { &*Self::PTR }
1345 }
1346}
1347impl core::fmt::Debug for Sysctrl {
1348 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1349 f.debug_struct("Sysctrl").finish()
1350 }
1351}
1352#[doc = "System Control"]
1353pub mod sysctrl;
1354#[doc = "Basic Timer Counter 3"]
1355pub struct Tc3 {
1356 _marker: PhantomData<*const ()>,
1357}
1358unsafe impl Send for Tc3 {}
1359impl Tc3 {
1360 #[doc = r"Pointer to the register block"]
1361 pub const PTR: *const tc3::RegisterBlock = 0x4200_2c00 as *const _;
1362 #[doc = r"Return the pointer to the register block"]
1363 #[inline(always)]
1364 pub const fn ptr() -> *const tc3::RegisterBlock {
1365 Self::PTR
1366 }
1367 #[doc = r" Steal an instance of this peripheral"]
1368 #[doc = r""]
1369 #[doc = r" # Safety"]
1370 #[doc = r""]
1371 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1372 #[doc = r" that may race with any existing instances, for example by only"]
1373 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1374 #[doc = r" original peripheral and using critical sections to coordinate"]
1375 #[doc = r" access between multiple new instances."]
1376 #[doc = r""]
1377 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1378 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1379 #[doc = r" no stolen instances are passed to such software."]
1380 pub unsafe fn steal() -> Self {
1381 Self {
1382 _marker: PhantomData,
1383 }
1384 }
1385}
1386impl Deref for Tc3 {
1387 type Target = tc3::RegisterBlock;
1388 #[inline(always)]
1389 fn deref(&self) -> &Self::Target {
1390 unsafe { &*Self::PTR }
1391 }
1392}
1393impl core::fmt::Debug for Tc3 {
1394 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1395 f.debug_struct("Tc3").finish()
1396 }
1397}
1398#[doc = "Basic Timer Counter 3"]
1399pub mod tc3;
1400#[doc = "Basic Timer Counter 4"]
1401pub struct Tc4 {
1402 _marker: PhantomData<*const ()>,
1403}
1404unsafe impl Send for Tc4 {}
1405impl Tc4 {
1406 #[doc = r"Pointer to the register block"]
1407 pub const PTR: *const tc3::RegisterBlock = 0x4200_3000 as *const _;
1408 #[doc = r"Return the pointer to the register block"]
1409 #[inline(always)]
1410 pub const fn ptr() -> *const tc3::RegisterBlock {
1411 Self::PTR
1412 }
1413 #[doc = r" Steal an instance of this peripheral"]
1414 #[doc = r""]
1415 #[doc = r" # Safety"]
1416 #[doc = r""]
1417 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1418 #[doc = r" that may race with any existing instances, for example by only"]
1419 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1420 #[doc = r" original peripheral and using critical sections to coordinate"]
1421 #[doc = r" access between multiple new instances."]
1422 #[doc = r""]
1423 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1424 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1425 #[doc = r" no stolen instances are passed to such software."]
1426 pub unsafe fn steal() -> Self {
1427 Self {
1428 _marker: PhantomData,
1429 }
1430 }
1431}
1432impl Deref for Tc4 {
1433 type Target = tc3::RegisterBlock;
1434 #[inline(always)]
1435 fn deref(&self) -> &Self::Target {
1436 unsafe { &*Self::PTR }
1437 }
1438}
1439impl core::fmt::Debug for Tc4 {
1440 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1441 f.debug_struct("Tc4").finish()
1442 }
1443}
1444#[doc = "Basic Timer Counter 4"]
1445pub use self::tc3 as tc4;
1446#[doc = "Basic Timer Counter 5"]
1447pub struct Tc5 {
1448 _marker: PhantomData<*const ()>,
1449}
1450unsafe impl Send for Tc5 {}
1451impl Tc5 {
1452 #[doc = r"Pointer to the register block"]
1453 pub const PTR: *const tc3::RegisterBlock = 0x4200_3400 as *const _;
1454 #[doc = r"Return the pointer to the register block"]
1455 #[inline(always)]
1456 pub const fn ptr() -> *const tc3::RegisterBlock {
1457 Self::PTR
1458 }
1459 #[doc = r" Steal an instance of this peripheral"]
1460 #[doc = r""]
1461 #[doc = r" # Safety"]
1462 #[doc = r""]
1463 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1464 #[doc = r" that may race with any existing instances, for example by only"]
1465 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1466 #[doc = r" original peripheral and using critical sections to coordinate"]
1467 #[doc = r" access between multiple new instances."]
1468 #[doc = r""]
1469 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1470 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1471 #[doc = r" no stolen instances are passed to such software."]
1472 pub unsafe fn steal() -> Self {
1473 Self {
1474 _marker: PhantomData,
1475 }
1476 }
1477}
1478impl Deref for Tc5 {
1479 type Target = tc3::RegisterBlock;
1480 #[inline(always)]
1481 fn deref(&self) -> &Self::Target {
1482 unsafe { &*Self::PTR }
1483 }
1484}
1485impl core::fmt::Debug for Tc5 {
1486 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1487 f.debug_struct("Tc5").finish()
1488 }
1489}
1490#[doc = "Basic Timer Counter 5"]
1491pub use self::tc3 as tc5;
1492#[doc = "Basic Timer Counter 6"]
1493pub struct Tc6 {
1494 _marker: PhantomData<*const ()>,
1495}
1496unsafe impl Send for Tc6 {}
1497impl Tc6 {
1498 #[doc = r"Pointer to the register block"]
1499 pub const PTR: *const tc3::RegisterBlock = 0x4200_3800 as *const _;
1500 #[doc = r"Return the pointer to the register block"]
1501 #[inline(always)]
1502 pub const fn ptr() -> *const tc3::RegisterBlock {
1503 Self::PTR
1504 }
1505 #[doc = r" Steal an instance of this peripheral"]
1506 #[doc = r""]
1507 #[doc = r" # Safety"]
1508 #[doc = r""]
1509 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1510 #[doc = r" that may race with any existing instances, for example by only"]
1511 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1512 #[doc = r" original peripheral and using critical sections to coordinate"]
1513 #[doc = r" access between multiple new instances."]
1514 #[doc = r""]
1515 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1516 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1517 #[doc = r" no stolen instances are passed to such software."]
1518 pub unsafe fn steal() -> Self {
1519 Self {
1520 _marker: PhantomData,
1521 }
1522 }
1523}
1524impl Deref for Tc6 {
1525 type Target = tc3::RegisterBlock;
1526 #[inline(always)]
1527 fn deref(&self) -> &Self::Target {
1528 unsafe { &*Self::PTR }
1529 }
1530}
1531impl core::fmt::Debug for Tc6 {
1532 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1533 f.debug_struct("Tc6").finish()
1534 }
1535}
1536#[doc = "Basic Timer Counter 6"]
1537pub use self::tc3 as tc6;
1538#[doc = "Basic Timer Counter 7"]
1539pub struct Tc7 {
1540 _marker: PhantomData<*const ()>,
1541}
1542unsafe impl Send for Tc7 {}
1543impl Tc7 {
1544 #[doc = r"Pointer to the register block"]
1545 pub const PTR: *const tc3::RegisterBlock = 0x4200_3c00 as *const _;
1546 #[doc = r"Return the pointer to the register block"]
1547 #[inline(always)]
1548 pub const fn ptr() -> *const tc3::RegisterBlock {
1549 Self::PTR
1550 }
1551 #[doc = r" Steal an instance of this peripheral"]
1552 #[doc = r""]
1553 #[doc = r" # Safety"]
1554 #[doc = r""]
1555 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1556 #[doc = r" that may race with any existing instances, for example by only"]
1557 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1558 #[doc = r" original peripheral and using critical sections to coordinate"]
1559 #[doc = r" access between multiple new instances."]
1560 #[doc = r""]
1561 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1562 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1563 #[doc = r" no stolen instances are passed to such software."]
1564 pub unsafe fn steal() -> Self {
1565 Self {
1566 _marker: PhantomData,
1567 }
1568 }
1569}
1570impl Deref for Tc7 {
1571 type Target = tc3::RegisterBlock;
1572 #[inline(always)]
1573 fn deref(&self) -> &Self::Target {
1574 unsafe { &*Self::PTR }
1575 }
1576}
1577impl core::fmt::Debug for Tc7 {
1578 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1579 f.debug_struct("Tc7").finish()
1580 }
1581}
1582#[doc = "Basic Timer Counter 7"]
1583pub use self::tc3 as tc7;
1584#[doc = "Timer Counter Control 0"]
1585pub struct Tcc0 {
1586 _marker: PhantomData<*const ()>,
1587}
1588unsafe impl Send for Tcc0 {}
1589impl Tcc0 {
1590 #[doc = r"Pointer to the register block"]
1591 pub const PTR: *const tcc0::RegisterBlock = 0x4200_2000 as *const _;
1592 #[doc = r"Return the pointer to the register block"]
1593 #[inline(always)]
1594 pub const fn ptr() -> *const tcc0::RegisterBlock {
1595 Self::PTR
1596 }
1597 #[doc = r" Steal an instance of this peripheral"]
1598 #[doc = r""]
1599 #[doc = r" # Safety"]
1600 #[doc = r""]
1601 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1602 #[doc = r" that may race with any existing instances, for example by only"]
1603 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1604 #[doc = r" original peripheral and using critical sections to coordinate"]
1605 #[doc = r" access between multiple new instances."]
1606 #[doc = r""]
1607 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1608 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1609 #[doc = r" no stolen instances are passed to such software."]
1610 pub unsafe fn steal() -> Self {
1611 Self {
1612 _marker: PhantomData,
1613 }
1614 }
1615}
1616impl Deref for Tcc0 {
1617 type Target = tcc0::RegisterBlock;
1618 #[inline(always)]
1619 fn deref(&self) -> &Self::Target {
1620 unsafe { &*Self::PTR }
1621 }
1622}
1623impl core::fmt::Debug for Tcc0 {
1624 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1625 f.debug_struct("Tcc0").finish()
1626 }
1627}
1628#[doc = "Timer Counter Control 0"]
1629pub mod tcc0;
1630#[doc = "Timer Counter Control 1"]
1631pub struct Tcc1 {
1632 _marker: PhantomData<*const ()>,
1633}
1634unsafe impl Send for Tcc1 {}
1635impl Tcc1 {
1636 #[doc = r"Pointer to the register block"]
1637 pub const PTR: *const tcc0::RegisterBlock = 0x4200_2400 as *const _;
1638 #[doc = r"Return the pointer to the register block"]
1639 #[inline(always)]
1640 pub const fn ptr() -> *const tcc0::RegisterBlock {
1641 Self::PTR
1642 }
1643 #[doc = r" Steal an instance of this peripheral"]
1644 #[doc = r""]
1645 #[doc = r" # Safety"]
1646 #[doc = r""]
1647 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1648 #[doc = r" that may race with any existing instances, for example by only"]
1649 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1650 #[doc = r" original peripheral and using critical sections to coordinate"]
1651 #[doc = r" access between multiple new instances."]
1652 #[doc = r""]
1653 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1654 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1655 #[doc = r" no stolen instances are passed to such software."]
1656 pub unsafe fn steal() -> Self {
1657 Self {
1658 _marker: PhantomData,
1659 }
1660 }
1661}
1662impl Deref for Tcc1 {
1663 type Target = tcc0::RegisterBlock;
1664 #[inline(always)]
1665 fn deref(&self) -> &Self::Target {
1666 unsafe { &*Self::PTR }
1667 }
1668}
1669impl core::fmt::Debug for Tcc1 {
1670 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1671 f.debug_struct("Tcc1").finish()
1672 }
1673}
1674#[doc = "Timer Counter Control 1"]
1675pub use self::tcc0 as tcc1;
1676#[doc = "Timer Counter Control 2"]
1677pub struct Tcc2 {
1678 _marker: PhantomData<*const ()>,
1679}
1680unsafe impl Send for Tcc2 {}
1681impl Tcc2 {
1682 #[doc = r"Pointer to the register block"]
1683 pub const PTR: *const tcc0::RegisterBlock = 0x4200_2800 as *const _;
1684 #[doc = r"Return the pointer to the register block"]
1685 #[inline(always)]
1686 pub const fn ptr() -> *const tcc0::RegisterBlock {
1687 Self::PTR
1688 }
1689 #[doc = r" Steal an instance of this peripheral"]
1690 #[doc = r""]
1691 #[doc = r" # Safety"]
1692 #[doc = r""]
1693 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1694 #[doc = r" that may race with any existing instances, for example by only"]
1695 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1696 #[doc = r" original peripheral and using critical sections to coordinate"]
1697 #[doc = r" access between multiple new instances."]
1698 #[doc = r""]
1699 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1700 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1701 #[doc = r" no stolen instances are passed to such software."]
1702 pub unsafe fn steal() -> Self {
1703 Self {
1704 _marker: PhantomData,
1705 }
1706 }
1707}
1708impl Deref for Tcc2 {
1709 type Target = tcc0::RegisterBlock;
1710 #[inline(always)]
1711 fn deref(&self) -> &Self::Target {
1712 unsafe { &*Self::PTR }
1713 }
1714}
1715impl core::fmt::Debug for Tcc2 {
1716 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1717 f.debug_struct("Tcc2").finish()
1718 }
1719}
1720#[doc = "Timer Counter Control 2"]
1721pub use self::tcc0 as tcc2;
1722#[doc = "Universal Serial Bus"]
1723pub struct Usb {
1724 _marker: PhantomData<*const ()>,
1725}
1726unsafe impl Send for Usb {}
1727impl Usb {
1728 #[doc = r"Pointer to the register block"]
1729 pub const PTR: *const usb::RegisterBlock = 0x4100_5000 as *const _;
1730 #[doc = r"Return the pointer to the register block"]
1731 #[inline(always)]
1732 pub const fn ptr() -> *const usb::RegisterBlock {
1733 Self::PTR
1734 }
1735 #[doc = r" Steal an instance of this peripheral"]
1736 #[doc = r""]
1737 #[doc = r" # Safety"]
1738 #[doc = r""]
1739 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1740 #[doc = r" that may race with any existing instances, for example by only"]
1741 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1742 #[doc = r" original peripheral and using critical sections to coordinate"]
1743 #[doc = r" access between multiple new instances."]
1744 #[doc = r""]
1745 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1746 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1747 #[doc = r" no stolen instances are passed to such software."]
1748 pub unsafe fn steal() -> Self {
1749 Self {
1750 _marker: PhantomData,
1751 }
1752 }
1753}
1754impl Deref for Usb {
1755 type Target = usb::RegisterBlock;
1756 #[inline(always)]
1757 fn deref(&self) -> &Self::Target {
1758 unsafe { &*Self::PTR }
1759 }
1760}
1761impl core::fmt::Debug for Usb {
1762 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1763 f.debug_struct("Usb").finish()
1764 }
1765}
1766#[doc = "Universal Serial Bus"]
1767pub mod usb;
1768#[doc = "Watchdog Timer"]
1769pub struct Wdt {
1770 _marker: PhantomData<*const ()>,
1771}
1772unsafe impl Send for Wdt {}
1773impl Wdt {
1774 #[doc = r"Pointer to the register block"]
1775 pub const PTR: *const wdt::RegisterBlock = 0x4000_1000 as *const _;
1776 #[doc = r"Return the pointer to the register block"]
1777 #[inline(always)]
1778 pub const fn ptr() -> *const wdt::RegisterBlock {
1779 Self::PTR
1780 }
1781 #[doc = r" Steal an instance of this peripheral"]
1782 #[doc = r""]
1783 #[doc = r" # Safety"]
1784 #[doc = r""]
1785 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1786 #[doc = r" that may race with any existing instances, for example by only"]
1787 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1788 #[doc = r" original peripheral and using critical sections to coordinate"]
1789 #[doc = r" access between multiple new instances."]
1790 #[doc = r""]
1791 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1792 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1793 #[doc = r" no stolen instances are passed to such software."]
1794 pub unsafe fn steal() -> Self {
1795 Self {
1796 _marker: PhantomData,
1797 }
1798 }
1799}
1800impl Deref for Wdt {
1801 type Target = wdt::RegisterBlock;
1802 #[inline(always)]
1803 fn deref(&self) -> &Self::Target {
1804 unsafe { &*Self::PTR }
1805 }
1806}
1807impl core::fmt::Debug for Wdt {
1808 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1809 f.debug_struct("Wdt").finish()
1810 }
1811}
1812#[doc = "Watchdog Timer"]
1813pub mod wdt;
1814#[no_mangle]
1815static mut DEVICE_PERIPHERALS: bool = false;
1816#[doc = r" All the peripherals."]
1817#[allow(non_snake_case)]
1818pub struct Peripherals {
1819 #[doc = "AC"]
1820 pub ac: Ac,
1821 #[doc = "ADC"]
1822 pub adc: Adc,
1823 #[doc = "DAC"]
1824 pub dac: Dac,
1825 #[doc = "DMAC"]
1826 pub dmac: Dmac,
1827 #[doc = "DSU"]
1828 pub dsu: Dsu,
1829 #[doc = "EIC"]
1830 pub eic: Eic,
1831 #[doc = "EVSYS"]
1832 pub evsys: Evsys,
1833 #[doc = "GCLK"]
1834 pub gclk: Gclk,
1835 #[doc = "HMATRIX"]
1836 pub hmatrix: Hmatrix,
1837 #[doc = "I2S"]
1838 pub i2s: I2s,
1839 #[doc = "MTB"]
1840 pub mtb: Mtb,
1841 #[doc = "NVMCTRL"]
1842 pub nvmctrl: Nvmctrl,
1843 #[doc = "PAC0"]
1844 pub pac0: Pac0,
1845 #[doc = "PAC1"]
1846 pub pac1: Pac1,
1847 #[doc = "PAC2"]
1848 pub pac2: Pac2,
1849 #[doc = "PM"]
1850 pub pm: Pm,
1851 #[doc = "PORT"]
1852 pub port: Port,
1853 #[doc = "PORT_IOBUS"]
1854 pub port_iobus: PortIobus,
1855 #[doc = "RTC"]
1856 pub rtc: Rtc,
1857 #[doc = "SERCOM0"]
1858 pub sercom0: Sercom0,
1859 #[doc = "SERCOM1"]
1860 pub sercom1: Sercom1,
1861 #[doc = "SERCOM2"]
1862 pub sercom2: Sercom2,
1863 #[doc = "SERCOM3"]
1864 pub sercom3: Sercom3,
1865 #[doc = "SERCOM4"]
1866 pub sercom4: Sercom4,
1867 #[doc = "SERCOM5"]
1868 pub sercom5: Sercom5,
1869 #[doc = "SYSCTRL"]
1870 pub sysctrl: Sysctrl,
1871 #[doc = "TC3"]
1872 pub tc3: Tc3,
1873 #[doc = "TC4"]
1874 pub tc4: Tc4,
1875 #[doc = "TC5"]
1876 pub tc5: Tc5,
1877 #[doc = "TC6"]
1878 pub tc6: Tc6,
1879 #[doc = "TC7"]
1880 pub tc7: Tc7,
1881 #[doc = "TCC0"]
1882 pub tcc0: Tcc0,
1883 #[doc = "TCC1"]
1884 pub tcc1: Tcc1,
1885 #[doc = "TCC2"]
1886 pub tcc2: Tcc2,
1887 #[doc = "USB"]
1888 pub usb: Usb,
1889 #[doc = "WDT"]
1890 pub wdt: Wdt,
1891}
1892impl Peripherals {
1893 #[doc = r" Returns all the peripherals *once*."]
1894 #[inline]
1895 pub fn take() -> Option<Self> {
1896 critical_section::with(|_| {
1897 if unsafe { DEVICE_PERIPHERALS } {
1898 return None;
1899 }
1900 Some(unsafe { Peripherals::steal() })
1901 })
1902 }
1903 #[doc = r" Unchecked version of `Peripherals::take`."]
1904 #[doc = r""]
1905 #[doc = r" # Safety"]
1906 #[doc = r""]
1907 #[doc = r" Each of the returned peripherals must be used at most once."]
1908 #[inline]
1909 pub unsafe fn steal() -> Self {
1910 DEVICE_PERIPHERALS = true;
1911 Peripherals {
1912 ac: Ac::steal(),
1913 adc: Adc::steal(),
1914 dac: Dac::steal(),
1915 dmac: Dmac::steal(),
1916 dsu: Dsu::steal(),
1917 eic: Eic::steal(),
1918 evsys: Evsys::steal(),
1919 gclk: Gclk::steal(),
1920 hmatrix: Hmatrix::steal(),
1921 i2s: I2s::steal(),
1922 mtb: Mtb::steal(),
1923 nvmctrl: Nvmctrl::steal(),
1924 pac0: Pac0::steal(),
1925 pac1: Pac1::steal(),
1926 pac2: Pac2::steal(),
1927 pm: Pm::steal(),
1928 port: Port::steal(),
1929 port_iobus: PortIobus::steal(),
1930 rtc: Rtc::steal(),
1931 sercom0: Sercom0::steal(),
1932 sercom1: Sercom1::steal(),
1933 sercom2: Sercom2::steal(),
1934 sercom3: Sercom3::steal(),
1935 sercom4: Sercom4::steal(),
1936 sercom5: Sercom5::steal(),
1937 sysctrl: Sysctrl::steal(),
1938 tc3: Tc3::steal(),
1939 tc4: Tc4::steal(),
1940 tc5: Tc5::steal(),
1941 tc6: Tc6::steal(),
1942 tc7: Tc7::steal(),
1943 tcc0: Tcc0::steal(),
1944 tcc1: Tcc1::steal(),
1945 tcc2: Tcc2::steal(),
1946 usb: Usb::steal(),
1947 wdt: Wdt::steal(),
1948 }
1949 }
1950}