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