atsamd11c/
lib.rs

1#![doc = "Peripheral access API for ATSAMD11C 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 TCC0();
37    fn TC1();
38    fn TC2();
39    fn ADC();
40    fn AC();
41    fn DAC();
42}
43#[doc(hidden)]
44#[repr(C)]
45pub union Vector {
46    _handler: unsafe extern "C" fn(),
47    _reserved: u32,
48}
49#[cfg(feature = "rt")]
50#[doc(hidden)]
51#[link_section = ".vector_table.interrupts"]
52#[no_mangle]
53pub static __INTERRUPTS: [Vector; 18] = [
54    Vector { _handler: PM },
55    Vector { _handler: SYSCTRL },
56    Vector { _handler: WDT },
57    Vector { _handler: RTC },
58    Vector { _handler: EIC },
59    Vector { _handler: NVMCTRL },
60    Vector { _handler: DMAC },
61    Vector { _handler: USB },
62    Vector { _handler: EVSYS },
63    Vector { _handler: SERCOM0 },
64    Vector { _handler: SERCOM1 },
65    Vector { _reserved: 0 },
66    Vector { _handler: TCC0 },
67    Vector { _handler: TC1 },
68    Vector { _handler: TC2 },
69    Vector { _handler: ADC },
70    Vector { _handler: AC },
71    Vector { _handler: DAC },
72];
73#[doc = r"Enumeration of all the interrupts."]
74#[derive(Copy, Clone, Debug, PartialEq, Eq)]
75#[repr(u16)]
76pub enum Interrupt {
77    #[doc = "0 - PM"]
78    PM = 0,
79    #[doc = "1 - SYSCTRL"]
80    SYSCTRL = 1,
81    #[doc = "2 - WDT"]
82    WDT = 2,
83    #[doc = "3 - RTC"]
84    RTC = 3,
85    #[doc = "4 - EIC"]
86    EIC = 4,
87    #[doc = "5 - NVMCTRL"]
88    NVMCTRL = 5,
89    #[doc = "6 - DMAC"]
90    DMAC = 6,
91    #[doc = "7 - USB"]
92    USB = 7,
93    #[doc = "8 - EVSYS"]
94    EVSYS = 8,
95    #[doc = "9 - SERCOM0"]
96    SERCOM0 = 9,
97    #[doc = "10 - SERCOM1"]
98    SERCOM1 = 10,
99    #[doc = "12 - TCC0"]
100    TCC0 = 12,
101    #[doc = "13 - TC1"]
102    TC1 = 13,
103    #[doc = "14 - TC2"]
104    TC2 = 14,
105    #[doc = "15 - ADC"]
106    ADC = 15,
107    #[doc = "16 - AC"]
108    AC = 16,
109    #[doc = "17 - DAC"]
110    DAC = 17,
111}
112unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
113    #[inline(always)]
114    fn number(self) -> u16 {
115        self as u16
116    }
117}
118#[doc = "Analog Comparators"]
119pub struct Ac {
120    _marker: PhantomData<*const ()>,
121}
122unsafe impl Send for Ac {}
123impl Ac {
124    #[doc = r"Pointer to the register block"]
125    pub const PTR: *const ac::RegisterBlock = 0x4200_2400 as *const _;
126    #[doc = r"Return the pointer to the register block"]
127    #[inline(always)]
128    pub const fn ptr() -> *const ac::RegisterBlock {
129        Self::PTR
130    }
131    #[doc = r" Steal an instance of this peripheral"]
132    #[doc = r""]
133    #[doc = r" # Safety"]
134    #[doc = r""]
135    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
136    #[doc = r" that may race with any existing instances, for example by only"]
137    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
138    #[doc = r" original peripheral and using critical sections to coordinate"]
139    #[doc = r" access between multiple new instances."]
140    #[doc = r""]
141    #[doc = r" Additionally, other software such as HALs may rely on only one"]
142    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
143    #[doc = r" no stolen instances are passed to such software."]
144    pub unsafe fn steal() -> Self {
145        Self {
146            _marker: PhantomData,
147        }
148    }
149}
150impl Deref for Ac {
151    type Target = ac::RegisterBlock;
152    #[inline(always)]
153    fn deref(&self) -> &Self::Target {
154        unsafe { &*Self::PTR }
155    }
156}
157impl core::fmt::Debug for Ac {
158    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
159        f.debug_struct("Ac").finish()
160    }
161}
162#[doc = "Analog Comparators"]
163pub mod ac;
164#[doc = "Analog Digital Converter"]
165pub struct Adc {
166    _marker: PhantomData<*const ()>,
167}
168unsafe impl Send for Adc {}
169impl Adc {
170    #[doc = r"Pointer to the register block"]
171    pub const PTR: *const adc::RegisterBlock = 0x4200_2000 as *const _;
172    #[doc = r"Return the pointer to the register block"]
173    #[inline(always)]
174    pub const fn ptr() -> *const adc::RegisterBlock {
175        Self::PTR
176    }
177    #[doc = r" Steal an instance of this peripheral"]
178    #[doc = r""]
179    #[doc = r" # Safety"]
180    #[doc = r""]
181    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
182    #[doc = r" that may race with any existing instances, for example by only"]
183    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
184    #[doc = r" original peripheral and using critical sections to coordinate"]
185    #[doc = r" access between multiple new instances."]
186    #[doc = r""]
187    #[doc = r" Additionally, other software such as HALs may rely on only one"]
188    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
189    #[doc = r" no stolen instances are passed to such software."]
190    pub unsafe fn steal() -> Self {
191        Self {
192            _marker: PhantomData,
193        }
194    }
195}
196impl Deref for Adc {
197    type Target = adc::RegisterBlock;
198    #[inline(always)]
199    fn deref(&self) -> &Self::Target {
200        unsafe { &*Self::PTR }
201    }
202}
203impl core::fmt::Debug for Adc {
204    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
205        f.debug_struct("Adc").finish()
206    }
207}
208#[doc = "Analog Digital Converter"]
209pub mod adc;
210#[doc = "Digital Analog Converter"]
211pub struct Dac {
212    _marker: PhantomData<*const ()>,
213}
214unsafe impl Send for Dac {}
215impl Dac {
216    #[doc = r"Pointer to the register block"]
217    pub const PTR: *const dac::RegisterBlock = 0x4200_2800 as *const _;
218    #[doc = r"Return the pointer to the register block"]
219    #[inline(always)]
220    pub const fn ptr() -> *const dac::RegisterBlock {
221        Self::PTR
222    }
223    #[doc = r" Steal an instance of this peripheral"]
224    #[doc = r""]
225    #[doc = r" # Safety"]
226    #[doc = r""]
227    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
228    #[doc = r" that may race with any existing instances, for example by only"]
229    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
230    #[doc = r" original peripheral and using critical sections to coordinate"]
231    #[doc = r" access between multiple new instances."]
232    #[doc = r""]
233    #[doc = r" Additionally, other software such as HALs may rely on only one"]
234    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
235    #[doc = r" no stolen instances are passed to such software."]
236    pub unsafe fn steal() -> Self {
237        Self {
238            _marker: PhantomData,
239        }
240    }
241}
242impl Deref for Dac {
243    type Target = dac::RegisterBlock;
244    #[inline(always)]
245    fn deref(&self) -> &Self::Target {
246        unsafe { &*Self::PTR }
247    }
248}
249impl core::fmt::Debug for Dac {
250    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
251        f.debug_struct("Dac").finish()
252    }
253}
254#[doc = "Digital Analog Converter"]
255pub mod dac;
256#[doc = "Direct Memory Access Controller"]
257pub struct Dmac {
258    _marker: PhantomData<*const ()>,
259}
260unsafe impl Send for Dmac {}
261impl Dmac {
262    #[doc = r"Pointer to the register block"]
263    pub const PTR: *const dmac::RegisterBlock = 0x4100_4800 as *const _;
264    #[doc = r"Return the pointer to the register block"]
265    #[inline(always)]
266    pub const fn ptr() -> *const dmac::RegisterBlock {
267        Self::PTR
268    }
269    #[doc = r" Steal an instance of this peripheral"]
270    #[doc = r""]
271    #[doc = r" # Safety"]
272    #[doc = r""]
273    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
274    #[doc = r" that may race with any existing instances, for example by only"]
275    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
276    #[doc = r" original peripheral and using critical sections to coordinate"]
277    #[doc = r" access between multiple new instances."]
278    #[doc = r""]
279    #[doc = r" Additionally, other software such as HALs may rely on only one"]
280    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
281    #[doc = r" no stolen instances are passed to such software."]
282    pub unsafe fn steal() -> Self {
283        Self {
284            _marker: PhantomData,
285        }
286    }
287}
288impl Deref for Dmac {
289    type Target = dmac::RegisterBlock;
290    #[inline(always)]
291    fn deref(&self) -> &Self::Target {
292        unsafe { &*Self::PTR }
293    }
294}
295impl core::fmt::Debug for Dmac {
296    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
297        f.debug_struct("Dmac").finish()
298    }
299}
300#[doc = "Direct Memory Access Controller"]
301pub mod dmac;
302#[doc = "Device Service Unit"]
303pub struct Dsu {
304    _marker: PhantomData<*const ()>,
305}
306unsafe impl Send for Dsu {}
307impl Dsu {
308    #[doc = r"Pointer to the register block"]
309    pub const PTR: *const dsu::RegisterBlock = 0x4100_2000 as *const _;
310    #[doc = r"Return the pointer to the register block"]
311    #[inline(always)]
312    pub const fn ptr() -> *const dsu::RegisterBlock {
313        Self::PTR
314    }
315    #[doc = r" Steal an instance of this peripheral"]
316    #[doc = r""]
317    #[doc = r" # Safety"]
318    #[doc = r""]
319    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
320    #[doc = r" that may race with any existing instances, for example by only"]
321    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
322    #[doc = r" original peripheral and using critical sections to coordinate"]
323    #[doc = r" access between multiple new instances."]
324    #[doc = r""]
325    #[doc = r" Additionally, other software such as HALs may rely on only one"]
326    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
327    #[doc = r" no stolen instances are passed to such software."]
328    pub unsafe fn steal() -> Self {
329        Self {
330            _marker: PhantomData,
331        }
332    }
333}
334impl Deref for Dsu {
335    type Target = dsu::RegisterBlock;
336    #[inline(always)]
337    fn deref(&self) -> &Self::Target {
338        unsafe { &*Self::PTR }
339    }
340}
341impl core::fmt::Debug for Dsu {
342    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
343        f.debug_struct("Dsu").finish()
344    }
345}
346#[doc = "Device Service Unit"]
347pub mod dsu;
348#[doc = "External Interrupt Controller"]
349pub struct Eic {
350    _marker: PhantomData<*const ()>,
351}
352unsafe impl Send for Eic {}
353impl Eic {
354    #[doc = r"Pointer to the register block"]
355    pub const PTR: *const eic::RegisterBlock = 0x4000_1800 as *const _;
356    #[doc = r"Return the pointer to the register block"]
357    #[inline(always)]
358    pub const fn ptr() -> *const eic::RegisterBlock {
359        Self::PTR
360    }
361    #[doc = r" Steal an instance of this peripheral"]
362    #[doc = r""]
363    #[doc = r" # Safety"]
364    #[doc = r""]
365    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
366    #[doc = r" that may race with any existing instances, for example by only"]
367    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
368    #[doc = r" original peripheral and using critical sections to coordinate"]
369    #[doc = r" access between multiple new instances."]
370    #[doc = r""]
371    #[doc = r" Additionally, other software such as HALs may rely on only one"]
372    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
373    #[doc = r" no stolen instances are passed to such software."]
374    pub unsafe fn steal() -> Self {
375        Self {
376            _marker: PhantomData,
377        }
378    }
379}
380impl Deref for Eic {
381    type Target = eic::RegisterBlock;
382    #[inline(always)]
383    fn deref(&self) -> &Self::Target {
384        unsafe { &*Self::PTR }
385    }
386}
387impl core::fmt::Debug for Eic {
388    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
389        f.debug_struct("Eic").finish()
390    }
391}
392#[doc = "External Interrupt Controller"]
393pub mod eic;
394#[doc = "Event System Interface"]
395pub struct Evsys {
396    _marker: PhantomData<*const ()>,
397}
398unsafe impl Send for Evsys {}
399impl Evsys {
400    #[doc = r"Pointer to the register block"]
401    pub const PTR: *const evsys::RegisterBlock = 0x4200_0400 as *const _;
402    #[doc = r"Return the pointer to the register block"]
403    #[inline(always)]
404    pub const fn ptr() -> *const evsys::RegisterBlock {
405        Self::PTR
406    }
407    #[doc = r" Steal an instance of this peripheral"]
408    #[doc = r""]
409    #[doc = r" # Safety"]
410    #[doc = r""]
411    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
412    #[doc = r" that may race with any existing instances, for example by only"]
413    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
414    #[doc = r" original peripheral and using critical sections to coordinate"]
415    #[doc = r" access between multiple new instances."]
416    #[doc = r""]
417    #[doc = r" Additionally, other software such as HALs may rely on only one"]
418    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
419    #[doc = r" no stolen instances are passed to such software."]
420    pub unsafe fn steal() -> Self {
421        Self {
422            _marker: PhantomData,
423        }
424    }
425}
426impl Deref for Evsys {
427    type Target = evsys::RegisterBlock;
428    #[inline(always)]
429    fn deref(&self) -> &Self::Target {
430        unsafe { &*Self::PTR }
431    }
432}
433impl core::fmt::Debug for Evsys {
434    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
435        f.debug_struct("Evsys").finish()
436    }
437}
438#[doc = "Event System Interface"]
439pub mod evsys;
440#[doc = "Generic Clock Generator"]
441pub struct Gclk {
442    _marker: PhantomData<*const ()>,
443}
444unsafe impl Send for Gclk {}
445impl Gclk {
446    #[doc = r"Pointer to the register block"]
447    pub const PTR: *const gclk::RegisterBlock = 0x4000_0c00 as *const _;
448    #[doc = r"Return the pointer to the register block"]
449    #[inline(always)]
450    pub const fn ptr() -> *const gclk::RegisterBlock {
451        Self::PTR
452    }
453    #[doc = r" Steal an instance of this peripheral"]
454    #[doc = r""]
455    #[doc = r" # Safety"]
456    #[doc = r""]
457    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
458    #[doc = r" that may race with any existing instances, for example by only"]
459    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
460    #[doc = r" original peripheral and using critical sections to coordinate"]
461    #[doc = r" access between multiple new instances."]
462    #[doc = r""]
463    #[doc = r" Additionally, other software such as HALs may rely on only one"]
464    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
465    #[doc = r" no stolen instances are passed to such software."]
466    pub unsafe fn steal() -> Self {
467        Self {
468            _marker: PhantomData,
469        }
470    }
471}
472impl Deref for Gclk {
473    type Target = gclk::RegisterBlock;
474    #[inline(always)]
475    fn deref(&self) -> &Self::Target {
476        unsafe { &*Self::PTR }
477    }
478}
479impl core::fmt::Debug for Gclk {
480    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
481        f.debug_struct("Gclk").finish()
482    }
483}
484#[doc = "Generic Clock Generator"]
485pub mod gclk;
486#[doc = "HSB Matrix"]
487pub struct Hmatrix {
488    _marker: PhantomData<*const ()>,
489}
490unsafe impl Send for Hmatrix {}
491impl Hmatrix {
492    #[doc = r"Pointer to the register block"]
493    pub const PTR: *const hmatrix::RegisterBlock = 0x4100_7000 as *const _;
494    #[doc = r"Return the pointer to the register block"]
495    #[inline(always)]
496    pub const fn ptr() -> *const hmatrix::RegisterBlock {
497        Self::PTR
498    }
499    #[doc = r" Steal an instance of this peripheral"]
500    #[doc = r""]
501    #[doc = r" # Safety"]
502    #[doc = r""]
503    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
504    #[doc = r" that may race with any existing instances, for example by only"]
505    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
506    #[doc = r" original peripheral and using critical sections to coordinate"]
507    #[doc = r" access between multiple new instances."]
508    #[doc = r""]
509    #[doc = r" Additionally, other software such as HALs may rely on only one"]
510    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
511    #[doc = r" no stolen instances are passed to such software."]
512    pub unsafe fn steal() -> Self {
513        Self {
514            _marker: PhantomData,
515        }
516    }
517}
518impl Deref for Hmatrix {
519    type Target = hmatrix::RegisterBlock;
520    #[inline(always)]
521    fn deref(&self) -> &Self::Target {
522        unsafe { &*Self::PTR }
523    }
524}
525impl core::fmt::Debug for Hmatrix {
526    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
527        f.debug_struct("Hmatrix").finish()
528    }
529}
530#[doc = "HSB Matrix"]
531pub mod hmatrix;
532#[doc = "Cortex-M0+ Micro-Trace Buffer"]
533pub struct Mtb {
534    _marker: PhantomData<*const ()>,
535}
536unsafe impl Send for Mtb {}
537impl Mtb {
538    #[doc = r"Pointer to the register block"]
539    pub const PTR: *const mtb::RegisterBlock = 0x4100_6000 as *const _;
540    #[doc = r"Return the pointer to the register block"]
541    #[inline(always)]
542    pub const fn ptr() -> *const mtb::RegisterBlock {
543        Self::PTR
544    }
545    #[doc = r" Steal an instance of this peripheral"]
546    #[doc = r""]
547    #[doc = r" # Safety"]
548    #[doc = r""]
549    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
550    #[doc = r" that may race with any existing instances, for example by only"]
551    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
552    #[doc = r" original peripheral and using critical sections to coordinate"]
553    #[doc = r" access between multiple new instances."]
554    #[doc = r""]
555    #[doc = r" Additionally, other software such as HALs may rely on only one"]
556    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
557    #[doc = r" no stolen instances are passed to such software."]
558    pub unsafe fn steal() -> Self {
559        Self {
560            _marker: PhantomData,
561        }
562    }
563}
564impl Deref for Mtb {
565    type Target = mtb::RegisterBlock;
566    #[inline(always)]
567    fn deref(&self) -> &Self::Target {
568        unsafe { &*Self::PTR }
569    }
570}
571impl core::fmt::Debug for Mtb {
572    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
573        f.debug_struct("Mtb").finish()
574    }
575}
576#[doc = "Cortex-M0+ Micro-Trace Buffer"]
577pub mod mtb;
578#[doc = "Non-Volatile Memory Controller"]
579pub struct Nvmctrl {
580    _marker: PhantomData<*const ()>,
581}
582unsafe impl Send for Nvmctrl {}
583impl Nvmctrl {
584    #[doc = r"Pointer to the register block"]
585    pub const PTR: *const nvmctrl::RegisterBlock = 0x4100_4000 as *const _;
586    #[doc = r"Return the pointer to the register block"]
587    #[inline(always)]
588    pub const fn ptr() -> *const nvmctrl::RegisterBlock {
589        Self::PTR
590    }
591    #[doc = r" Steal an instance of this peripheral"]
592    #[doc = r""]
593    #[doc = r" # Safety"]
594    #[doc = r""]
595    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
596    #[doc = r" that may race with any existing instances, for example by only"]
597    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
598    #[doc = r" original peripheral and using critical sections to coordinate"]
599    #[doc = r" access between multiple new instances."]
600    #[doc = r""]
601    #[doc = r" Additionally, other software such as HALs may rely on only one"]
602    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
603    #[doc = r" no stolen instances are passed to such software."]
604    pub unsafe fn steal() -> Self {
605        Self {
606            _marker: PhantomData,
607        }
608    }
609}
610impl Deref for Nvmctrl {
611    type Target = nvmctrl::RegisterBlock;
612    #[inline(always)]
613    fn deref(&self) -> &Self::Target {
614        unsafe { &*Self::PTR }
615    }
616}
617impl core::fmt::Debug for Nvmctrl {
618    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
619        f.debug_struct("Nvmctrl").finish()
620    }
621}
622#[doc = "Non-Volatile Memory Controller"]
623pub mod nvmctrl;
624#[doc = "Peripheral Access Controller 0"]
625pub struct Pac0 {
626    _marker: PhantomData<*const ()>,
627}
628unsafe impl Send for Pac0 {}
629impl Pac0 {
630    #[doc = r"Pointer to the register block"]
631    pub const PTR: *const pac0::RegisterBlock = 0x4000_0000 as *const _;
632    #[doc = r"Return the pointer to the register block"]
633    #[inline(always)]
634    pub const fn ptr() -> *const pac0::RegisterBlock {
635        Self::PTR
636    }
637    #[doc = r" Steal an instance of this peripheral"]
638    #[doc = r""]
639    #[doc = r" # Safety"]
640    #[doc = r""]
641    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
642    #[doc = r" that may race with any existing instances, for example by only"]
643    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
644    #[doc = r" original peripheral and using critical sections to coordinate"]
645    #[doc = r" access between multiple new instances."]
646    #[doc = r""]
647    #[doc = r" Additionally, other software such as HALs may rely on only one"]
648    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
649    #[doc = r" no stolen instances are passed to such software."]
650    pub unsafe fn steal() -> Self {
651        Self {
652            _marker: PhantomData,
653        }
654    }
655}
656impl Deref for Pac0 {
657    type Target = pac0::RegisterBlock;
658    #[inline(always)]
659    fn deref(&self) -> &Self::Target {
660        unsafe { &*Self::PTR }
661    }
662}
663impl core::fmt::Debug for Pac0 {
664    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
665        f.debug_struct("Pac0").finish()
666    }
667}
668#[doc = "Peripheral Access Controller 0"]
669pub mod pac0;
670#[doc = "Peripheral Access Controller 1"]
671pub struct Pac1 {
672    _marker: PhantomData<*const ()>,
673}
674unsafe impl Send for Pac1 {}
675impl Pac1 {
676    #[doc = r"Pointer to the register block"]
677    pub const PTR: *const pac0::RegisterBlock = 0x4100_0000 as *const _;
678    #[doc = r"Return the pointer to the register block"]
679    #[inline(always)]
680    pub const fn ptr() -> *const pac0::RegisterBlock {
681        Self::PTR
682    }
683    #[doc = r" Steal an instance of this peripheral"]
684    #[doc = r""]
685    #[doc = r" # Safety"]
686    #[doc = r""]
687    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
688    #[doc = r" that may race with any existing instances, for example by only"]
689    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
690    #[doc = r" original peripheral and using critical sections to coordinate"]
691    #[doc = r" access between multiple new instances."]
692    #[doc = r""]
693    #[doc = r" Additionally, other software such as HALs may rely on only one"]
694    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
695    #[doc = r" no stolen instances are passed to such software."]
696    pub unsafe fn steal() -> Self {
697        Self {
698            _marker: PhantomData,
699        }
700    }
701}
702impl Deref for Pac1 {
703    type Target = pac0::RegisterBlock;
704    #[inline(always)]
705    fn deref(&self) -> &Self::Target {
706        unsafe { &*Self::PTR }
707    }
708}
709impl core::fmt::Debug for Pac1 {
710    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
711        f.debug_struct("Pac1").finish()
712    }
713}
714#[doc = "Peripheral Access Controller 1"]
715pub use self::pac0 as pac1;
716#[doc = "Peripheral Access Controller 2"]
717pub struct Pac2 {
718    _marker: PhantomData<*const ()>,
719}
720unsafe impl Send for Pac2 {}
721impl Pac2 {
722    #[doc = r"Pointer to the register block"]
723    pub const PTR: *const pac0::RegisterBlock = 0x4200_0000 as *const _;
724    #[doc = r"Return the pointer to the register block"]
725    #[inline(always)]
726    pub const fn ptr() -> *const pac0::RegisterBlock {
727        Self::PTR
728    }
729    #[doc = r" Steal an instance of this peripheral"]
730    #[doc = r""]
731    #[doc = r" # Safety"]
732    #[doc = r""]
733    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
734    #[doc = r" that may race with any existing instances, for example by only"]
735    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
736    #[doc = r" original peripheral and using critical sections to coordinate"]
737    #[doc = r" access between multiple new instances."]
738    #[doc = r""]
739    #[doc = r" Additionally, other software such as HALs may rely on only one"]
740    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
741    #[doc = r" no stolen instances are passed to such software."]
742    pub unsafe fn steal() -> Self {
743        Self {
744            _marker: PhantomData,
745        }
746    }
747}
748impl Deref for Pac2 {
749    type Target = pac0::RegisterBlock;
750    #[inline(always)]
751    fn deref(&self) -> &Self::Target {
752        unsafe { &*Self::PTR }
753    }
754}
755impl core::fmt::Debug for Pac2 {
756    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
757        f.debug_struct("Pac2").finish()
758    }
759}
760#[doc = "Peripheral Access Controller 2"]
761pub use self::pac0 as pac2;
762#[doc = "Power Manager"]
763pub struct Pm {
764    _marker: PhantomData<*const ()>,
765}
766unsafe impl Send for Pm {}
767impl Pm {
768    #[doc = r"Pointer to the register block"]
769    pub const PTR: *const pm::RegisterBlock = 0x4000_0400 as *const _;
770    #[doc = r"Return the pointer to the register block"]
771    #[inline(always)]
772    pub const fn ptr() -> *const pm::RegisterBlock {
773        Self::PTR
774    }
775    #[doc = r" Steal an instance of this peripheral"]
776    #[doc = r""]
777    #[doc = r" # Safety"]
778    #[doc = r""]
779    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
780    #[doc = r" that may race with any existing instances, for example by only"]
781    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
782    #[doc = r" original peripheral and using critical sections to coordinate"]
783    #[doc = r" access between multiple new instances."]
784    #[doc = r""]
785    #[doc = r" Additionally, other software such as HALs may rely on only one"]
786    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
787    #[doc = r" no stolen instances are passed to such software."]
788    pub unsafe fn steal() -> Self {
789        Self {
790            _marker: PhantomData,
791        }
792    }
793}
794impl Deref for Pm {
795    type Target = pm::RegisterBlock;
796    #[inline(always)]
797    fn deref(&self) -> &Self::Target {
798        unsafe { &*Self::PTR }
799    }
800}
801impl core::fmt::Debug for Pm {
802    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
803        f.debug_struct("Pm").finish()
804    }
805}
806#[doc = "Power Manager"]
807pub mod pm;
808#[doc = "Port Module"]
809pub struct Port {
810    _marker: PhantomData<*const ()>,
811}
812unsafe impl Send for Port {}
813impl Port {
814    #[doc = r"Pointer to the register block"]
815    pub const PTR: *const port::RegisterBlock = 0x4100_4400 as *const _;
816    #[doc = r"Return the pointer to the register block"]
817    #[inline(always)]
818    pub const fn ptr() -> *const port::RegisterBlock {
819        Self::PTR
820    }
821    #[doc = r" Steal an instance of this peripheral"]
822    #[doc = r""]
823    #[doc = r" # Safety"]
824    #[doc = r""]
825    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
826    #[doc = r" that may race with any existing instances, for example by only"]
827    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
828    #[doc = r" original peripheral and using critical sections to coordinate"]
829    #[doc = r" access between multiple new instances."]
830    #[doc = r""]
831    #[doc = r" Additionally, other software such as HALs may rely on only one"]
832    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
833    #[doc = r" no stolen instances are passed to such software."]
834    pub unsafe fn steal() -> Self {
835        Self {
836            _marker: PhantomData,
837        }
838    }
839}
840impl Deref for Port {
841    type Target = port::RegisterBlock;
842    #[inline(always)]
843    fn deref(&self) -> &Self::Target {
844        unsafe { &*Self::PTR }
845    }
846}
847impl core::fmt::Debug for Port {
848    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
849        f.debug_struct("Port").finish()
850    }
851}
852#[doc = "Port Module"]
853pub mod port;
854#[doc = "Port Module (IOBUS)"]
855pub struct PortIobus {
856    _marker: PhantomData<*const ()>,
857}
858unsafe impl Send for PortIobus {}
859impl PortIobus {
860    #[doc = r"Pointer to the register block"]
861    pub const PTR: *const port::RegisterBlock = 0x6000_0000 as *const _;
862    #[doc = r"Return the pointer to the register block"]
863    #[inline(always)]
864    pub const fn ptr() -> *const port::RegisterBlock {
865        Self::PTR
866    }
867    #[doc = r" Steal an instance of this peripheral"]
868    #[doc = r""]
869    #[doc = r" # Safety"]
870    #[doc = r""]
871    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
872    #[doc = r" that may race with any existing instances, for example by only"]
873    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
874    #[doc = r" original peripheral and using critical sections to coordinate"]
875    #[doc = r" access between multiple new instances."]
876    #[doc = r""]
877    #[doc = r" Additionally, other software such as HALs may rely on only one"]
878    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
879    #[doc = r" no stolen instances are passed to such software."]
880    pub unsafe fn steal() -> Self {
881        Self {
882            _marker: PhantomData,
883        }
884    }
885}
886impl Deref for PortIobus {
887    type Target = port::RegisterBlock;
888    #[inline(always)]
889    fn deref(&self) -> &Self::Target {
890        unsafe { &*Self::PTR }
891    }
892}
893impl core::fmt::Debug for PortIobus {
894    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
895        f.debug_struct("PortIobus").finish()
896    }
897}
898#[doc = "Port Module (IOBUS)"]
899pub use self::port as port_iobus;
900#[doc = "Real-Time Counter"]
901pub struct Rtc {
902    _marker: PhantomData<*const ()>,
903}
904unsafe impl Send for Rtc {}
905impl Rtc {
906    #[doc = r"Pointer to the register block"]
907    pub const PTR: *const rtc::RegisterBlock = 0x4000_1400 as *const _;
908    #[doc = r"Return the pointer to the register block"]
909    #[inline(always)]
910    pub const fn ptr() -> *const rtc::RegisterBlock {
911        Self::PTR
912    }
913    #[doc = r" Steal an instance of this peripheral"]
914    #[doc = r""]
915    #[doc = r" # Safety"]
916    #[doc = r""]
917    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
918    #[doc = r" that may race with any existing instances, for example by only"]
919    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
920    #[doc = r" original peripheral and using critical sections to coordinate"]
921    #[doc = r" access between multiple new instances."]
922    #[doc = r""]
923    #[doc = r" Additionally, other software such as HALs may rely on only one"]
924    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
925    #[doc = r" no stolen instances are passed to such software."]
926    pub unsafe fn steal() -> Self {
927        Self {
928            _marker: PhantomData,
929        }
930    }
931}
932impl Deref for Rtc {
933    type Target = rtc::RegisterBlock;
934    #[inline(always)]
935    fn deref(&self) -> &Self::Target {
936        unsafe { &*Self::PTR }
937    }
938}
939impl core::fmt::Debug for Rtc {
940    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
941        f.debug_struct("Rtc").finish()
942    }
943}
944#[doc = "Real-Time Counter"]
945pub mod rtc;
946#[doc = "Serial Communication Interface 0"]
947pub struct Sercom0 {
948    _marker: PhantomData<*const ()>,
949}
950unsafe impl Send for Sercom0 {}
951impl Sercom0 {
952    #[doc = r"Pointer to the register block"]
953    pub const PTR: *const sercom0::RegisterBlock = 0x4200_0800 as *const _;
954    #[doc = r"Return the pointer to the register block"]
955    #[inline(always)]
956    pub const fn ptr() -> *const sercom0::RegisterBlock {
957        Self::PTR
958    }
959    #[doc = r" Steal an instance of this peripheral"]
960    #[doc = r""]
961    #[doc = r" # Safety"]
962    #[doc = r""]
963    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
964    #[doc = r" that may race with any existing instances, for example by only"]
965    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
966    #[doc = r" original peripheral and using critical sections to coordinate"]
967    #[doc = r" access between multiple new instances."]
968    #[doc = r""]
969    #[doc = r" Additionally, other software such as HALs may rely on only one"]
970    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
971    #[doc = r" no stolen instances are passed to such software."]
972    pub unsafe fn steal() -> Self {
973        Self {
974            _marker: PhantomData,
975        }
976    }
977}
978impl Deref for Sercom0 {
979    type Target = sercom0::RegisterBlock;
980    #[inline(always)]
981    fn deref(&self) -> &Self::Target {
982        unsafe { &*Self::PTR }
983    }
984}
985impl core::fmt::Debug for Sercom0 {
986    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
987        f.debug_struct("Sercom0").finish()
988    }
989}
990#[doc = "Serial Communication Interface 0"]
991pub mod sercom0;
992#[doc = "Serial Communication Interface 1"]
993pub struct Sercom1 {
994    _marker: PhantomData<*const ()>,
995}
996unsafe impl Send for Sercom1 {}
997impl Sercom1 {
998    #[doc = r"Pointer to the register block"]
999    pub const PTR: *const sercom0::RegisterBlock = 0x4200_0c00 as *const _;
1000    #[doc = r"Return the pointer to the register block"]
1001    #[inline(always)]
1002    pub const fn ptr() -> *const sercom0::RegisterBlock {
1003        Self::PTR
1004    }
1005    #[doc = r" Steal an instance of this peripheral"]
1006    #[doc = r""]
1007    #[doc = r" # Safety"]
1008    #[doc = r""]
1009    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1010    #[doc = r" that may race with any existing instances, for example by only"]
1011    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1012    #[doc = r" original peripheral and using critical sections to coordinate"]
1013    #[doc = r" access between multiple new instances."]
1014    #[doc = r""]
1015    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1016    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1017    #[doc = r" no stolen instances are passed to such software."]
1018    pub unsafe fn steal() -> Self {
1019        Self {
1020            _marker: PhantomData,
1021        }
1022    }
1023}
1024impl Deref for Sercom1 {
1025    type Target = sercom0::RegisterBlock;
1026    #[inline(always)]
1027    fn deref(&self) -> &Self::Target {
1028        unsafe { &*Self::PTR }
1029    }
1030}
1031impl core::fmt::Debug for Sercom1 {
1032    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1033        f.debug_struct("Sercom1").finish()
1034    }
1035}
1036#[doc = "Serial Communication Interface 1"]
1037pub use self::sercom0 as sercom1;
1038#[doc = "System Control"]
1039pub struct Sysctrl {
1040    _marker: PhantomData<*const ()>,
1041}
1042unsafe impl Send for Sysctrl {}
1043impl Sysctrl {
1044    #[doc = r"Pointer to the register block"]
1045    pub const PTR: *const sysctrl::RegisterBlock = 0x4000_0800 as *const _;
1046    #[doc = r"Return the pointer to the register block"]
1047    #[inline(always)]
1048    pub const fn ptr() -> *const sysctrl::RegisterBlock {
1049        Self::PTR
1050    }
1051    #[doc = r" Steal an instance of this peripheral"]
1052    #[doc = r""]
1053    #[doc = r" # Safety"]
1054    #[doc = r""]
1055    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1056    #[doc = r" that may race with any existing instances, for example by only"]
1057    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1058    #[doc = r" original peripheral and using critical sections to coordinate"]
1059    #[doc = r" access between multiple new instances."]
1060    #[doc = r""]
1061    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1062    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1063    #[doc = r" no stolen instances are passed to such software."]
1064    pub unsafe fn steal() -> Self {
1065        Self {
1066            _marker: PhantomData,
1067        }
1068    }
1069}
1070impl Deref for Sysctrl {
1071    type Target = sysctrl::RegisterBlock;
1072    #[inline(always)]
1073    fn deref(&self) -> &Self::Target {
1074        unsafe { &*Self::PTR }
1075    }
1076}
1077impl core::fmt::Debug for Sysctrl {
1078    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1079        f.debug_struct("Sysctrl").finish()
1080    }
1081}
1082#[doc = "System Control"]
1083pub mod sysctrl;
1084#[doc = "Basic Timer Counter 1"]
1085pub struct Tc1 {
1086    _marker: PhantomData<*const ()>,
1087}
1088unsafe impl Send for Tc1 {}
1089impl Tc1 {
1090    #[doc = r"Pointer to the register block"]
1091    pub const PTR: *const tc1::RegisterBlock = 0x4200_1800 as *const _;
1092    #[doc = r"Return the pointer to the register block"]
1093    #[inline(always)]
1094    pub const fn ptr() -> *const tc1::RegisterBlock {
1095        Self::PTR
1096    }
1097    #[doc = r" Steal an instance of this peripheral"]
1098    #[doc = r""]
1099    #[doc = r" # Safety"]
1100    #[doc = r""]
1101    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1102    #[doc = r" that may race with any existing instances, for example by only"]
1103    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1104    #[doc = r" original peripheral and using critical sections to coordinate"]
1105    #[doc = r" access between multiple new instances."]
1106    #[doc = r""]
1107    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1108    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1109    #[doc = r" no stolen instances are passed to such software."]
1110    pub unsafe fn steal() -> Self {
1111        Self {
1112            _marker: PhantomData,
1113        }
1114    }
1115}
1116impl Deref for Tc1 {
1117    type Target = tc1::RegisterBlock;
1118    #[inline(always)]
1119    fn deref(&self) -> &Self::Target {
1120        unsafe { &*Self::PTR }
1121    }
1122}
1123impl core::fmt::Debug for Tc1 {
1124    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1125        f.debug_struct("Tc1").finish()
1126    }
1127}
1128#[doc = "Basic Timer Counter 1"]
1129pub mod tc1;
1130#[doc = "Basic Timer Counter 2"]
1131pub struct Tc2 {
1132    _marker: PhantomData<*const ()>,
1133}
1134unsafe impl Send for Tc2 {}
1135impl Tc2 {
1136    #[doc = r"Pointer to the register block"]
1137    pub const PTR: *const tc1::RegisterBlock = 0x4200_1c00 as *const _;
1138    #[doc = r"Return the pointer to the register block"]
1139    #[inline(always)]
1140    pub const fn ptr() -> *const tc1::RegisterBlock {
1141        Self::PTR
1142    }
1143    #[doc = r" Steal an instance of this peripheral"]
1144    #[doc = r""]
1145    #[doc = r" # Safety"]
1146    #[doc = r""]
1147    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1148    #[doc = r" that may race with any existing instances, for example by only"]
1149    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1150    #[doc = r" original peripheral and using critical sections to coordinate"]
1151    #[doc = r" access between multiple new instances."]
1152    #[doc = r""]
1153    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1154    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1155    #[doc = r" no stolen instances are passed to such software."]
1156    pub unsafe fn steal() -> Self {
1157        Self {
1158            _marker: PhantomData,
1159        }
1160    }
1161}
1162impl Deref for Tc2 {
1163    type Target = tc1::RegisterBlock;
1164    #[inline(always)]
1165    fn deref(&self) -> &Self::Target {
1166        unsafe { &*Self::PTR }
1167    }
1168}
1169impl core::fmt::Debug for Tc2 {
1170    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1171        f.debug_struct("Tc2").finish()
1172    }
1173}
1174#[doc = "Basic Timer Counter 2"]
1175pub use self::tc1 as tc2;
1176#[doc = "Timer Counter Control"]
1177pub struct Tcc0 {
1178    _marker: PhantomData<*const ()>,
1179}
1180unsafe impl Send for Tcc0 {}
1181impl Tcc0 {
1182    #[doc = r"Pointer to the register block"]
1183    pub const PTR: *const tcc0::RegisterBlock = 0x4200_1400 as *const _;
1184    #[doc = r"Return the pointer to the register block"]
1185    #[inline(always)]
1186    pub const fn ptr() -> *const tcc0::RegisterBlock {
1187        Self::PTR
1188    }
1189    #[doc = r" Steal an instance of this peripheral"]
1190    #[doc = r""]
1191    #[doc = r" # Safety"]
1192    #[doc = r""]
1193    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1194    #[doc = r" that may race with any existing instances, for example by only"]
1195    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1196    #[doc = r" original peripheral and using critical sections to coordinate"]
1197    #[doc = r" access between multiple new instances."]
1198    #[doc = r""]
1199    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1200    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1201    #[doc = r" no stolen instances are passed to such software."]
1202    pub unsafe fn steal() -> Self {
1203        Self {
1204            _marker: PhantomData,
1205        }
1206    }
1207}
1208impl Deref for Tcc0 {
1209    type Target = tcc0::RegisterBlock;
1210    #[inline(always)]
1211    fn deref(&self) -> &Self::Target {
1212        unsafe { &*Self::PTR }
1213    }
1214}
1215impl core::fmt::Debug for Tcc0 {
1216    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1217        f.debug_struct("Tcc0").finish()
1218    }
1219}
1220#[doc = "Timer Counter Control"]
1221pub mod tcc0;
1222#[doc = "Universal Serial Bus"]
1223pub struct Usb {
1224    _marker: PhantomData<*const ()>,
1225}
1226unsafe impl Send for Usb {}
1227impl Usb {
1228    #[doc = r"Pointer to the register block"]
1229    pub const PTR: *const usb::RegisterBlock = 0x4100_5000 as *const _;
1230    #[doc = r"Return the pointer to the register block"]
1231    #[inline(always)]
1232    pub const fn ptr() -> *const usb::RegisterBlock {
1233        Self::PTR
1234    }
1235    #[doc = r" Steal an instance of this peripheral"]
1236    #[doc = r""]
1237    #[doc = r" # Safety"]
1238    #[doc = r""]
1239    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1240    #[doc = r" that may race with any existing instances, for example by only"]
1241    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1242    #[doc = r" original peripheral and using critical sections to coordinate"]
1243    #[doc = r" access between multiple new instances."]
1244    #[doc = r""]
1245    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1246    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1247    #[doc = r" no stolen instances are passed to such software."]
1248    pub unsafe fn steal() -> Self {
1249        Self {
1250            _marker: PhantomData,
1251        }
1252    }
1253}
1254impl Deref for Usb {
1255    type Target = usb::RegisterBlock;
1256    #[inline(always)]
1257    fn deref(&self) -> &Self::Target {
1258        unsafe { &*Self::PTR }
1259    }
1260}
1261impl core::fmt::Debug for Usb {
1262    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1263        f.debug_struct("Usb").finish()
1264    }
1265}
1266#[doc = "Universal Serial Bus"]
1267pub mod usb;
1268#[doc = "Watchdog Timer"]
1269pub struct Wdt {
1270    _marker: PhantomData<*const ()>,
1271}
1272unsafe impl Send for Wdt {}
1273impl Wdt {
1274    #[doc = r"Pointer to the register block"]
1275    pub const PTR: *const wdt::RegisterBlock = 0x4000_1000 as *const _;
1276    #[doc = r"Return the pointer to the register block"]
1277    #[inline(always)]
1278    pub const fn ptr() -> *const wdt::RegisterBlock {
1279        Self::PTR
1280    }
1281    #[doc = r" Steal an instance of this peripheral"]
1282    #[doc = r""]
1283    #[doc = r" # Safety"]
1284    #[doc = r""]
1285    #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1286    #[doc = r" that may race with any existing instances, for example by only"]
1287    #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1288    #[doc = r" original peripheral and using critical sections to coordinate"]
1289    #[doc = r" access between multiple new instances."]
1290    #[doc = r""]
1291    #[doc = r" Additionally, other software such as HALs may rely on only one"]
1292    #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1293    #[doc = r" no stolen instances are passed to such software."]
1294    pub unsafe fn steal() -> Self {
1295        Self {
1296            _marker: PhantomData,
1297        }
1298    }
1299}
1300impl Deref for Wdt {
1301    type Target = wdt::RegisterBlock;
1302    #[inline(always)]
1303    fn deref(&self) -> &Self::Target {
1304        unsafe { &*Self::PTR }
1305    }
1306}
1307impl core::fmt::Debug for Wdt {
1308    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1309        f.debug_struct("Wdt").finish()
1310    }
1311}
1312#[doc = "Watchdog Timer"]
1313pub mod wdt;
1314#[no_mangle]
1315static mut DEVICE_PERIPHERALS: bool = false;
1316#[doc = r" All the peripherals."]
1317#[allow(non_snake_case)]
1318pub struct Peripherals {
1319    #[doc = "AC"]
1320    pub ac: Ac,
1321    #[doc = "ADC"]
1322    pub adc: Adc,
1323    #[doc = "DAC"]
1324    pub dac: Dac,
1325    #[doc = "DMAC"]
1326    pub dmac: Dmac,
1327    #[doc = "DSU"]
1328    pub dsu: Dsu,
1329    #[doc = "EIC"]
1330    pub eic: Eic,
1331    #[doc = "EVSYS"]
1332    pub evsys: Evsys,
1333    #[doc = "GCLK"]
1334    pub gclk: Gclk,
1335    #[doc = "HMATRIX"]
1336    pub hmatrix: Hmatrix,
1337    #[doc = "MTB"]
1338    pub mtb: Mtb,
1339    #[doc = "NVMCTRL"]
1340    pub nvmctrl: Nvmctrl,
1341    #[doc = "PAC0"]
1342    pub pac0: Pac0,
1343    #[doc = "PAC1"]
1344    pub pac1: Pac1,
1345    #[doc = "PAC2"]
1346    pub pac2: Pac2,
1347    #[doc = "PM"]
1348    pub pm: Pm,
1349    #[doc = "PORT"]
1350    pub port: Port,
1351    #[doc = "PORT_IOBUS"]
1352    pub port_iobus: PortIobus,
1353    #[doc = "RTC"]
1354    pub rtc: Rtc,
1355    #[doc = "SERCOM0"]
1356    pub sercom0: Sercom0,
1357    #[doc = "SERCOM1"]
1358    pub sercom1: Sercom1,
1359    #[doc = "SYSCTRL"]
1360    pub sysctrl: Sysctrl,
1361    #[doc = "TC1"]
1362    pub tc1: Tc1,
1363    #[doc = "TC2"]
1364    pub tc2: Tc2,
1365    #[doc = "TCC0"]
1366    pub tcc0: Tcc0,
1367    #[doc = "USB"]
1368    pub usb: Usb,
1369    #[doc = "WDT"]
1370    pub wdt: Wdt,
1371}
1372impl Peripherals {
1373    #[doc = r" Returns all the peripherals *once*."]
1374    #[inline]
1375    pub fn take() -> Option<Self> {
1376        critical_section::with(|_| {
1377            if unsafe { DEVICE_PERIPHERALS } {
1378                return None;
1379            }
1380            Some(unsafe { Peripherals::steal() })
1381        })
1382    }
1383    #[doc = r" Unchecked version of `Peripherals::take`."]
1384    #[doc = r""]
1385    #[doc = r" # Safety"]
1386    #[doc = r""]
1387    #[doc = r" Each of the returned peripherals must be used at most once."]
1388    #[inline]
1389    pub unsafe fn steal() -> Self {
1390        DEVICE_PERIPHERALS = true;
1391        Peripherals {
1392            ac: Ac::steal(),
1393            adc: Adc::steal(),
1394            dac: Dac::steal(),
1395            dmac: Dmac::steal(),
1396            dsu: Dsu::steal(),
1397            eic: Eic::steal(),
1398            evsys: Evsys::steal(),
1399            gclk: Gclk::steal(),
1400            hmatrix: Hmatrix::steal(),
1401            mtb: Mtb::steal(),
1402            nvmctrl: Nvmctrl::steal(),
1403            pac0: Pac0::steal(),
1404            pac1: Pac1::steal(),
1405            pac2: Pac2::steal(),
1406            pm: Pm::steal(),
1407            port: Port::steal(),
1408            port_iobus: PortIobus::steal(),
1409            rtc: Rtc::steal(),
1410            sercom0: Sercom0::steal(),
1411            sercom1: Sercom1::steal(),
1412            sysctrl: Sysctrl::steal(),
1413            tc1: Tc1::steal(),
1414            tc2: Tc2::steal(),
1415            tcc0: Tcc0::steal(),
1416            usb: Usb::steal(),
1417            wdt: Wdt::steal(),
1418        }
1419    }
1420}