avr_device/devices/atmega4809/
mod.rs

1#![doc = "Peripheral access API for ATMEGA4809 microcontrollers (generated using svd2rust v0.28.0 ( ))\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.28.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
3use core::marker::PhantomData;
4use core::ops::Deref;
5#[doc = r"Number available in the NVIC for configuring priority"]
6pub const NVIC_PRIO_BITS: u8 = 4;
7#[doc(hidden)]
8pub mod interrupt;
9pub use self::interrupt::Interrupt;
10#[doc = "Analog Comparator"]
11pub struct AC0 {
12    _marker: PhantomData<*const ()>,
13}
14unsafe impl Send for AC0 {}
15impl AC0 {
16    #[doc = r"Pointer to the register block"]
17    pub const PTR: *const ac0::RegisterBlock = 0x0680 as *const _;
18    #[doc = r"Return the pointer to the register block"]
19    #[inline(always)]
20    pub const fn ptr() -> *const ac0::RegisterBlock {
21        Self::PTR
22    }
23}
24impl Deref for AC0 {
25    type Target = ac0::RegisterBlock;
26    #[inline(always)]
27    fn deref(&self) -> &Self::Target {
28        unsafe { &*Self::PTR }
29    }
30}
31impl core::fmt::Debug for AC0 {
32    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
33        f.debug_struct("AC0").finish()
34    }
35}
36#[doc = "Analog Comparator"]
37pub mod ac0;
38#[doc = "Analog to Digital Converter"]
39pub struct ADC0 {
40    _marker: PhantomData<*const ()>,
41}
42unsafe impl Send for ADC0 {}
43impl ADC0 {
44    #[doc = r"Pointer to the register block"]
45    pub const PTR: *const adc0::RegisterBlock = 0x0600 as *const _;
46    #[doc = r"Return the pointer to the register block"]
47    #[inline(always)]
48    pub const fn ptr() -> *const adc0::RegisterBlock {
49        Self::PTR
50    }
51}
52impl Deref for ADC0 {
53    type Target = adc0::RegisterBlock;
54    #[inline(always)]
55    fn deref(&self) -> &Self::Target {
56        unsafe { &*Self::PTR }
57    }
58}
59impl core::fmt::Debug for ADC0 {
60    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
61        f.debug_struct("ADC0").finish()
62    }
63}
64#[doc = "Analog to Digital Converter"]
65pub mod adc0;
66#[doc = "Bod interface"]
67pub struct BOD {
68    _marker: PhantomData<*const ()>,
69}
70unsafe impl Send for BOD {}
71impl BOD {
72    #[doc = r"Pointer to the register block"]
73    pub const PTR: *const bod::RegisterBlock = 0x80 as *const _;
74    #[doc = r"Return the pointer to the register block"]
75    #[inline(always)]
76    pub const fn ptr() -> *const bod::RegisterBlock {
77        Self::PTR
78    }
79}
80impl Deref for BOD {
81    type Target = bod::RegisterBlock;
82    #[inline(always)]
83    fn deref(&self) -> &Self::Target {
84        unsafe { &*Self::PTR }
85    }
86}
87impl core::fmt::Debug for BOD {
88    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
89        f.debug_struct("BOD").finish()
90    }
91}
92#[doc = "Bod interface"]
93pub mod bod;
94#[doc = "Configurable Custom Logic"]
95pub struct CCL {
96    _marker: PhantomData<*const ()>,
97}
98unsafe impl Send for CCL {}
99impl CCL {
100    #[doc = r"Pointer to the register block"]
101    pub const PTR: *const ccl::RegisterBlock = 0x01c0 as *const _;
102    #[doc = r"Return the pointer to the register block"]
103    #[inline(always)]
104    pub const fn ptr() -> *const ccl::RegisterBlock {
105        Self::PTR
106    }
107}
108impl Deref for CCL {
109    type Target = ccl::RegisterBlock;
110    #[inline(always)]
111    fn deref(&self) -> &Self::Target {
112        unsafe { &*Self::PTR }
113    }
114}
115impl core::fmt::Debug for CCL {
116    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
117        f.debug_struct("CCL").finish()
118    }
119}
120#[doc = "Configurable Custom Logic"]
121pub mod ccl;
122#[doc = "Clock controller"]
123pub struct CLKCTRL {
124    _marker: PhantomData<*const ()>,
125}
126unsafe impl Send for CLKCTRL {}
127impl CLKCTRL {
128    #[doc = r"Pointer to the register block"]
129    pub const PTR: *const clkctrl::RegisterBlock = 0x60 as *const _;
130    #[doc = r"Return the pointer to the register block"]
131    #[inline(always)]
132    pub const fn ptr() -> *const clkctrl::RegisterBlock {
133        Self::PTR
134    }
135}
136impl Deref for CLKCTRL {
137    type Target = clkctrl::RegisterBlock;
138    #[inline(always)]
139    fn deref(&self) -> &Self::Target {
140        unsafe { &*Self::PTR }
141    }
142}
143impl core::fmt::Debug for CLKCTRL {
144    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
145        f.debug_struct("CLKCTRL").finish()
146    }
147}
148#[doc = "Clock controller"]
149pub mod clkctrl;
150#[doc = "CPU"]
151pub struct CPU {
152    _marker: PhantomData<*const ()>,
153}
154unsafe impl Send for CPU {}
155impl CPU {
156    #[doc = r"Pointer to the register block"]
157    pub const PTR: *const cpu::RegisterBlock = 0x34 as *const _;
158    #[doc = r"Return the pointer to the register block"]
159    #[inline(always)]
160    pub const fn ptr() -> *const cpu::RegisterBlock {
161        Self::PTR
162    }
163}
164impl Deref for CPU {
165    type Target = cpu::RegisterBlock;
166    #[inline(always)]
167    fn deref(&self) -> &Self::Target {
168        unsafe { &*Self::PTR }
169    }
170}
171impl core::fmt::Debug for CPU {
172    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
173        f.debug_struct("CPU").finish()
174    }
175}
176#[doc = "CPU"]
177pub mod cpu;
178#[doc = "Interrupt Controller"]
179pub struct CPUINT {
180    _marker: PhantomData<*const ()>,
181}
182unsafe impl Send for CPUINT {}
183impl CPUINT {
184    #[doc = r"Pointer to the register block"]
185    pub const PTR: *const cpuint::RegisterBlock = 0x0110 as *const _;
186    #[doc = r"Return the pointer to the register block"]
187    #[inline(always)]
188    pub const fn ptr() -> *const cpuint::RegisterBlock {
189        Self::PTR
190    }
191}
192impl Deref for CPUINT {
193    type Target = cpuint::RegisterBlock;
194    #[inline(always)]
195    fn deref(&self) -> &Self::Target {
196        unsafe { &*Self::PTR }
197    }
198}
199impl core::fmt::Debug for CPUINT {
200    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
201        f.debug_struct("CPUINT").finish()
202    }
203}
204#[doc = "Interrupt Controller"]
205pub mod cpuint;
206#[doc = "CRCSCAN"]
207pub struct CRCSCAN {
208    _marker: PhantomData<*const ()>,
209}
210unsafe impl Send for CRCSCAN {}
211impl CRCSCAN {
212    #[doc = r"Pointer to the register block"]
213    pub const PTR: *const crcscan::RegisterBlock = 0x0120 as *const _;
214    #[doc = r"Return the pointer to the register block"]
215    #[inline(always)]
216    pub const fn ptr() -> *const crcscan::RegisterBlock {
217        Self::PTR
218    }
219}
220impl Deref for CRCSCAN {
221    type Target = crcscan::RegisterBlock;
222    #[inline(always)]
223    fn deref(&self) -> &Self::Target {
224        unsafe { &*Self::PTR }
225    }
226}
227impl core::fmt::Debug for CRCSCAN {
228    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
229        f.debug_struct("CRCSCAN").finish()
230    }
231}
232#[doc = "CRCSCAN"]
233pub mod crcscan;
234#[doc = "Event System"]
235pub struct EVSYS {
236    _marker: PhantomData<*const ()>,
237}
238unsafe impl Send for EVSYS {}
239impl EVSYS {
240    #[doc = r"Pointer to the register block"]
241    pub const PTR: *const evsys::RegisterBlock = 0x0180 as *const _;
242    #[doc = r"Return the pointer to the register block"]
243    #[inline(always)]
244    pub const fn ptr() -> *const evsys::RegisterBlock {
245        Self::PTR
246    }
247}
248impl Deref for EVSYS {
249    type Target = evsys::RegisterBlock;
250    #[inline(always)]
251    fn deref(&self) -> &Self::Target {
252        unsafe { &*Self::PTR }
253    }
254}
255impl core::fmt::Debug for EVSYS {
256    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
257        f.debug_struct("EVSYS").finish()
258    }
259}
260#[doc = "Event System"]
261pub mod evsys;
262#[doc = "Fuses"]
263pub struct FUSE {
264    _marker: PhantomData<*const ()>,
265}
266unsafe impl Send for FUSE {}
267impl FUSE {
268    #[doc = r"Pointer to the register block"]
269    pub const PTR: *const fuse::RegisterBlock = 0x1280 as *const _;
270    #[doc = r"Return the pointer to the register block"]
271    #[inline(always)]
272    pub const fn ptr() -> *const fuse::RegisterBlock {
273        Self::PTR
274    }
275}
276impl Deref for FUSE {
277    type Target = fuse::RegisterBlock;
278    #[inline(always)]
279    fn deref(&self) -> &Self::Target {
280        unsafe { &*Self::PTR }
281    }
282}
283impl core::fmt::Debug for FUSE {
284    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
285        f.debug_struct("FUSE").finish()
286    }
287}
288#[doc = "Fuses"]
289pub mod fuse;
290#[doc = "General Purpose IO"]
291pub struct GPIO {
292    _marker: PhantomData<*const ()>,
293}
294unsafe impl Send for GPIO {}
295impl GPIO {
296    #[doc = r"Pointer to the register block"]
297    pub const PTR: *const gpio::RegisterBlock = 0x1c as *const _;
298    #[doc = r"Return the pointer to the register block"]
299    #[inline(always)]
300    pub const fn ptr() -> *const gpio::RegisterBlock {
301        Self::PTR
302    }
303}
304impl Deref for GPIO {
305    type Target = gpio::RegisterBlock;
306    #[inline(always)]
307    fn deref(&self) -> &Self::Target {
308        unsafe { &*Self::PTR }
309    }
310}
311impl core::fmt::Debug for GPIO {
312    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
313        f.debug_struct("GPIO").finish()
314    }
315}
316#[doc = "General Purpose IO"]
317pub mod gpio;
318#[doc = "Lockbit"]
319pub struct LOCKBIT {
320    _marker: PhantomData<*const ()>,
321}
322unsafe impl Send for LOCKBIT {}
323impl LOCKBIT {
324    #[doc = r"Pointer to the register block"]
325    pub const PTR: *const lockbit::RegisterBlock = 0x128a as *const _;
326    #[doc = r"Return the pointer to the register block"]
327    #[inline(always)]
328    pub const fn ptr() -> *const lockbit::RegisterBlock {
329        Self::PTR
330    }
331}
332impl Deref for LOCKBIT {
333    type Target = lockbit::RegisterBlock;
334    #[inline(always)]
335    fn deref(&self) -> &Self::Target {
336        unsafe { &*Self::PTR }
337    }
338}
339impl core::fmt::Debug for LOCKBIT {
340    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
341        f.debug_struct("LOCKBIT").finish()
342    }
343}
344#[doc = "Lockbit"]
345pub mod lockbit;
346#[doc = "Non-volatile Memory Controller"]
347pub struct NVMCTRL {
348    _marker: PhantomData<*const ()>,
349}
350unsafe impl Send for NVMCTRL {}
351impl NVMCTRL {
352    #[doc = r"Pointer to the register block"]
353    pub const PTR: *const nvmctrl::RegisterBlock = 0x1000 as *const _;
354    #[doc = r"Return the pointer to the register block"]
355    #[inline(always)]
356    pub const fn ptr() -> *const nvmctrl::RegisterBlock {
357        Self::PTR
358    }
359}
360impl Deref for NVMCTRL {
361    type Target = nvmctrl::RegisterBlock;
362    #[inline(always)]
363    fn deref(&self) -> &Self::Target {
364        unsafe { &*Self::PTR }
365    }
366}
367impl core::fmt::Debug for NVMCTRL {
368    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
369        f.debug_struct("NVMCTRL").finish()
370    }
371}
372#[doc = "Non-volatile Memory Controller"]
373pub mod nvmctrl;
374#[doc = "I/O Ports"]
375pub struct PORTA {
376    _marker: PhantomData<*const ()>,
377}
378unsafe impl Send for PORTA {}
379impl PORTA {
380    #[doc = r"Pointer to the register block"]
381    pub const PTR: *const porta::RegisterBlock = 0x0400 as *const _;
382    #[doc = r"Return the pointer to the register block"]
383    #[inline(always)]
384    pub const fn ptr() -> *const porta::RegisterBlock {
385        Self::PTR
386    }
387}
388impl Deref for PORTA {
389    type Target = porta::RegisterBlock;
390    #[inline(always)]
391    fn deref(&self) -> &Self::Target {
392        unsafe { &*Self::PTR }
393    }
394}
395impl core::fmt::Debug for PORTA {
396    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
397        f.debug_struct("PORTA").finish()
398    }
399}
400#[doc = "I/O Ports"]
401pub mod porta;
402#[doc = "I/O Ports"]
403pub struct PORTB {
404    _marker: PhantomData<*const ()>,
405}
406unsafe impl Send for PORTB {}
407impl PORTB {
408    #[doc = r"Pointer to the register block"]
409    pub const PTR: *const portb::RegisterBlock = 0x0420 as *const _;
410    #[doc = r"Return the pointer to the register block"]
411    #[inline(always)]
412    pub const fn ptr() -> *const portb::RegisterBlock {
413        Self::PTR
414    }
415}
416impl Deref for PORTB {
417    type Target = portb::RegisterBlock;
418    #[inline(always)]
419    fn deref(&self) -> &Self::Target {
420        unsafe { &*Self::PTR }
421    }
422}
423impl core::fmt::Debug for PORTB {
424    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
425        f.debug_struct("PORTB").finish()
426    }
427}
428#[doc = "I/O Ports"]
429pub mod portb;
430#[doc = "I/O Ports"]
431pub struct PORTC {
432    _marker: PhantomData<*const ()>,
433}
434unsafe impl Send for PORTC {}
435impl PORTC {
436    #[doc = r"Pointer to the register block"]
437    pub const PTR: *const portc::RegisterBlock = 0x0440 as *const _;
438    #[doc = r"Return the pointer to the register block"]
439    #[inline(always)]
440    pub const fn ptr() -> *const portc::RegisterBlock {
441        Self::PTR
442    }
443}
444impl Deref for PORTC {
445    type Target = portc::RegisterBlock;
446    #[inline(always)]
447    fn deref(&self) -> &Self::Target {
448        unsafe { &*Self::PTR }
449    }
450}
451impl core::fmt::Debug for PORTC {
452    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
453        f.debug_struct("PORTC").finish()
454    }
455}
456#[doc = "I/O Ports"]
457pub mod portc;
458#[doc = "I/O Ports"]
459pub struct PORTD {
460    _marker: PhantomData<*const ()>,
461}
462unsafe impl Send for PORTD {}
463impl PORTD {
464    #[doc = r"Pointer to the register block"]
465    pub const PTR: *const portd::RegisterBlock = 0x0460 as *const _;
466    #[doc = r"Return the pointer to the register block"]
467    #[inline(always)]
468    pub const fn ptr() -> *const portd::RegisterBlock {
469        Self::PTR
470    }
471}
472impl Deref for PORTD {
473    type Target = portd::RegisterBlock;
474    #[inline(always)]
475    fn deref(&self) -> &Self::Target {
476        unsafe { &*Self::PTR }
477    }
478}
479impl core::fmt::Debug for PORTD {
480    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
481        f.debug_struct("PORTD").finish()
482    }
483}
484#[doc = "I/O Ports"]
485pub mod portd;
486#[doc = "I/O Ports"]
487pub struct PORTE {
488    _marker: PhantomData<*const ()>,
489}
490unsafe impl Send for PORTE {}
491impl PORTE {
492    #[doc = r"Pointer to the register block"]
493    pub const PTR: *const porte::RegisterBlock = 0x0480 as *const _;
494    #[doc = r"Return the pointer to the register block"]
495    #[inline(always)]
496    pub const fn ptr() -> *const porte::RegisterBlock {
497        Self::PTR
498    }
499}
500impl Deref for PORTE {
501    type Target = porte::RegisterBlock;
502    #[inline(always)]
503    fn deref(&self) -> &Self::Target {
504        unsafe { &*Self::PTR }
505    }
506}
507impl core::fmt::Debug for PORTE {
508    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
509        f.debug_struct("PORTE").finish()
510    }
511}
512#[doc = "I/O Ports"]
513pub mod porte;
514#[doc = "I/O Ports"]
515pub struct PORTF {
516    _marker: PhantomData<*const ()>,
517}
518unsafe impl Send for PORTF {}
519impl PORTF {
520    #[doc = r"Pointer to the register block"]
521    pub const PTR: *const portf::RegisterBlock = 0x04a0 as *const _;
522    #[doc = r"Return the pointer to the register block"]
523    #[inline(always)]
524    pub const fn ptr() -> *const portf::RegisterBlock {
525        Self::PTR
526    }
527}
528impl Deref for PORTF {
529    type Target = portf::RegisterBlock;
530    #[inline(always)]
531    fn deref(&self) -> &Self::Target {
532        unsafe { &*Self::PTR }
533    }
534}
535impl core::fmt::Debug for PORTF {
536    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
537        f.debug_struct("PORTF").finish()
538    }
539}
540#[doc = "I/O Ports"]
541pub mod portf;
542#[doc = "Port Multiplexer"]
543pub struct PORTMUX {
544    _marker: PhantomData<*const ()>,
545}
546unsafe impl Send for PORTMUX {}
547impl PORTMUX {
548    #[doc = r"Pointer to the register block"]
549    pub const PTR: *const portmux::RegisterBlock = 0x05e0 as *const _;
550    #[doc = r"Return the pointer to the register block"]
551    #[inline(always)]
552    pub const fn ptr() -> *const portmux::RegisterBlock {
553        Self::PTR
554    }
555}
556impl Deref for PORTMUX {
557    type Target = portmux::RegisterBlock;
558    #[inline(always)]
559    fn deref(&self) -> &Self::Target {
560        unsafe { &*Self::PTR }
561    }
562}
563impl core::fmt::Debug for PORTMUX {
564    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
565        f.debug_struct("PORTMUX").finish()
566    }
567}
568#[doc = "Port Multiplexer"]
569pub mod portmux;
570#[doc = "Reset controller"]
571pub struct RSTCTRL {
572    _marker: PhantomData<*const ()>,
573}
574unsafe impl Send for RSTCTRL {}
575impl RSTCTRL {
576    #[doc = r"Pointer to the register block"]
577    pub const PTR: *const rstctrl::RegisterBlock = 0x40 as *const _;
578    #[doc = r"Return the pointer to the register block"]
579    #[inline(always)]
580    pub const fn ptr() -> *const rstctrl::RegisterBlock {
581        Self::PTR
582    }
583}
584impl Deref for RSTCTRL {
585    type Target = rstctrl::RegisterBlock;
586    #[inline(always)]
587    fn deref(&self) -> &Self::Target {
588        unsafe { &*Self::PTR }
589    }
590}
591impl core::fmt::Debug for RSTCTRL {
592    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
593        f.debug_struct("RSTCTRL").finish()
594    }
595}
596#[doc = "Reset controller"]
597pub mod rstctrl;
598#[doc = "Real-Time Counter"]
599pub struct RTC {
600    _marker: PhantomData<*const ()>,
601}
602unsafe impl Send for RTC {}
603impl RTC {
604    #[doc = r"Pointer to the register block"]
605    pub const PTR: *const rtc::RegisterBlock = 0x0140 as *const _;
606    #[doc = r"Return the pointer to the register block"]
607    #[inline(always)]
608    pub const fn ptr() -> *const rtc::RegisterBlock {
609        Self::PTR
610    }
611}
612impl Deref for RTC {
613    type Target = rtc::RegisterBlock;
614    #[inline(always)]
615    fn deref(&self) -> &Self::Target {
616        unsafe { &*Self::PTR }
617    }
618}
619impl core::fmt::Debug for RTC {
620    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
621        f.debug_struct("RTC").finish()
622    }
623}
624#[doc = "Real-Time Counter"]
625pub mod rtc;
626#[doc = "Signature row"]
627pub struct SIGROW {
628    _marker: PhantomData<*const ()>,
629}
630unsafe impl Send for SIGROW {}
631impl SIGROW {
632    #[doc = r"Pointer to the register block"]
633    pub const PTR: *const sigrow::RegisterBlock = 0x1100 as *const _;
634    #[doc = r"Return the pointer to the register block"]
635    #[inline(always)]
636    pub const fn ptr() -> *const sigrow::RegisterBlock {
637        Self::PTR
638    }
639}
640impl Deref for SIGROW {
641    type Target = sigrow::RegisterBlock;
642    #[inline(always)]
643    fn deref(&self) -> &Self::Target {
644        unsafe { &*Self::PTR }
645    }
646}
647impl core::fmt::Debug for SIGROW {
648    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
649        f.debug_struct("SIGROW").finish()
650    }
651}
652#[doc = "Signature row"]
653pub mod sigrow;
654#[doc = "Sleep Controller"]
655pub struct SLPCTRL {
656    _marker: PhantomData<*const ()>,
657}
658unsafe impl Send for SLPCTRL {}
659impl SLPCTRL {
660    #[doc = r"Pointer to the register block"]
661    pub const PTR: *const slpctrl::RegisterBlock = 0x50 as *const _;
662    #[doc = r"Return the pointer to the register block"]
663    #[inline(always)]
664    pub const fn ptr() -> *const slpctrl::RegisterBlock {
665        Self::PTR
666    }
667}
668impl Deref for SLPCTRL {
669    type Target = slpctrl::RegisterBlock;
670    #[inline(always)]
671    fn deref(&self) -> &Self::Target {
672        unsafe { &*Self::PTR }
673    }
674}
675impl core::fmt::Debug for SLPCTRL {
676    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
677        f.debug_struct("SLPCTRL").finish()
678    }
679}
680#[doc = "Sleep Controller"]
681pub mod slpctrl;
682#[doc = "Serial Peripheral Interface"]
683pub struct SPI0 {
684    _marker: PhantomData<*const ()>,
685}
686unsafe impl Send for SPI0 {}
687impl SPI0 {
688    #[doc = r"Pointer to the register block"]
689    pub const PTR: *const spi0::RegisterBlock = 0x08c0 as *const _;
690    #[doc = r"Return the pointer to the register block"]
691    #[inline(always)]
692    pub const fn ptr() -> *const spi0::RegisterBlock {
693        Self::PTR
694    }
695}
696impl Deref for SPI0 {
697    type Target = spi0::RegisterBlock;
698    #[inline(always)]
699    fn deref(&self) -> &Self::Target {
700        unsafe { &*Self::PTR }
701    }
702}
703impl core::fmt::Debug for SPI0 {
704    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
705        f.debug_struct("SPI0").finish()
706    }
707}
708#[doc = "Serial Peripheral Interface"]
709pub mod spi0;
710#[doc = "System Configuration Registers"]
711pub struct SYSCFG {
712    _marker: PhantomData<*const ()>,
713}
714unsafe impl Send for SYSCFG {}
715impl SYSCFG {
716    #[doc = r"Pointer to the register block"]
717    pub const PTR: *const syscfg::RegisterBlock = 0x0f01 as *const _;
718    #[doc = r"Return the pointer to the register block"]
719    #[inline(always)]
720    pub const fn ptr() -> *const syscfg::RegisterBlock {
721        Self::PTR
722    }
723}
724impl Deref for SYSCFG {
725    type Target = syscfg::RegisterBlock;
726    #[inline(always)]
727    fn deref(&self) -> &Self::Target {
728        unsafe { &*Self::PTR }
729    }
730}
731impl core::fmt::Debug for SYSCFG {
732    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
733        f.debug_struct("SYSCFG").finish()
734    }
735}
736#[doc = "System Configuration Registers"]
737pub mod syscfg;
738#[doc = "16-bit Timer Type B"]
739pub struct TCB0 {
740    _marker: PhantomData<*const ()>,
741}
742unsafe impl Send for TCB0 {}
743impl TCB0 {
744    #[doc = r"Pointer to the register block"]
745    pub const PTR: *const tcb0::RegisterBlock = 0x0a80 as *const _;
746    #[doc = r"Return the pointer to the register block"]
747    #[inline(always)]
748    pub const fn ptr() -> *const tcb0::RegisterBlock {
749        Self::PTR
750    }
751}
752impl Deref for TCB0 {
753    type Target = tcb0::RegisterBlock;
754    #[inline(always)]
755    fn deref(&self) -> &Self::Target {
756        unsafe { &*Self::PTR }
757    }
758}
759impl core::fmt::Debug for TCB0 {
760    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
761        f.debug_struct("TCB0").finish()
762    }
763}
764#[doc = "16-bit Timer Type B"]
765pub mod tcb0;
766#[doc = "16-bit Timer Type B"]
767pub struct TCB1 {
768    _marker: PhantomData<*const ()>,
769}
770unsafe impl Send for TCB1 {}
771impl TCB1 {
772    #[doc = r"Pointer to the register block"]
773    pub const PTR: *const tcb1::RegisterBlock = 0x0a90 as *const _;
774    #[doc = r"Return the pointer to the register block"]
775    #[inline(always)]
776    pub const fn ptr() -> *const tcb1::RegisterBlock {
777        Self::PTR
778    }
779}
780impl Deref for TCB1 {
781    type Target = tcb1::RegisterBlock;
782    #[inline(always)]
783    fn deref(&self) -> &Self::Target {
784        unsafe { &*Self::PTR }
785    }
786}
787impl core::fmt::Debug for TCB1 {
788    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
789        f.debug_struct("TCB1").finish()
790    }
791}
792#[doc = "16-bit Timer Type B"]
793pub mod tcb1;
794#[doc = "16-bit Timer Type B"]
795pub struct TCB2 {
796    _marker: PhantomData<*const ()>,
797}
798unsafe impl Send for TCB2 {}
799impl TCB2 {
800    #[doc = r"Pointer to the register block"]
801    pub const PTR: *const tcb2::RegisterBlock = 0x0aa0 as *const _;
802    #[doc = r"Return the pointer to the register block"]
803    #[inline(always)]
804    pub const fn ptr() -> *const tcb2::RegisterBlock {
805        Self::PTR
806    }
807}
808impl Deref for TCB2 {
809    type Target = tcb2::RegisterBlock;
810    #[inline(always)]
811    fn deref(&self) -> &Self::Target {
812        unsafe { &*Self::PTR }
813    }
814}
815impl core::fmt::Debug for TCB2 {
816    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
817        f.debug_struct("TCB2").finish()
818    }
819}
820#[doc = "16-bit Timer Type B"]
821pub mod tcb2;
822#[doc = "16-bit Timer Type B"]
823pub struct TCB3 {
824    _marker: PhantomData<*const ()>,
825}
826unsafe impl Send for TCB3 {}
827impl TCB3 {
828    #[doc = r"Pointer to the register block"]
829    pub const PTR: *const tcb3::RegisterBlock = 0x0ab0 as *const _;
830    #[doc = r"Return the pointer to the register block"]
831    #[inline(always)]
832    pub const fn ptr() -> *const tcb3::RegisterBlock {
833        Self::PTR
834    }
835}
836impl Deref for TCB3 {
837    type Target = tcb3::RegisterBlock;
838    #[inline(always)]
839    fn deref(&self) -> &Self::Target {
840        unsafe { &*Self::PTR }
841    }
842}
843impl core::fmt::Debug for TCB3 {
844    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
845        f.debug_struct("TCB3").finish()
846    }
847}
848#[doc = "16-bit Timer Type B"]
849pub mod tcb3;
850#[doc = "Two-Wire Interface"]
851pub struct TWI0 {
852    _marker: PhantomData<*const ()>,
853}
854unsafe impl Send for TWI0 {}
855impl TWI0 {
856    #[doc = r"Pointer to the register block"]
857    pub const PTR: *const twi0::RegisterBlock = 0x08a0 as *const _;
858    #[doc = r"Return the pointer to the register block"]
859    #[inline(always)]
860    pub const fn ptr() -> *const twi0::RegisterBlock {
861        Self::PTR
862    }
863}
864impl Deref for TWI0 {
865    type Target = twi0::RegisterBlock;
866    #[inline(always)]
867    fn deref(&self) -> &Self::Target {
868        unsafe { &*Self::PTR }
869    }
870}
871impl core::fmt::Debug for TWI0 {
872    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
873        f.debug_struct("TWI0").finish()
874    }
875}
876#[doc = "Two-Wire Interface"]
877pub mod twi0;
878#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
879pub struct USART0 {
880    _marker: PhantomData<*const ()>,
881}
882unsafe impl Send for USART0 {}
883impl USART0 {
884    #[doc = r"Pointer to the register block"]
885    pub const PTR: *const usart0::RegisterBlock = 0x0800 as *const _;
886    #[doc = r"Return the pointer to the register block"]
887    #[inline(always)]
888    pub const fn ptr() -> *const usart0::RegisterBlock {
889        Self::PTR
890    }
891}
892impl Deref for USART0 {
893    type Target = usart0::RegisterBlock;
894    #[inline(always)]
895    fn deref(&self) -> &Self::Target {
896        unsafe { &*Self::PTR }
897    }
898}
899impl core::fmt::Debug for USART0 {
900    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
901        f.debug_struct("USART0").finish()
902    }
903}
904#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
905pub mod usart0;
906#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
907pub struct USART1 {
908    _marker: PhantomData<*const ()>,
909}
910unsafe impl Send for USART1 {}
911impl USART1 {
912    #[doc = r"Pointer to the register block"]
913    pub const PTR: *const usart1::RegisterBlock = 0x0820 as *const _;
914    #[doc = r"Return the pointer to the register block"]
915    #[inline(always)]
916    pub const fn ptr() -> *const usart1::RegisterBlock {
917        Self::PTR
918    }
919}
920impl Deref for USART1 {
921    type Target = usart1::RegisterBlock;
922    #[inline(always)]
923    fn deref(&self) -> &Self::Target {
924        unsafe { &*Self::PTR }
925    }
926}
927impl core::fmt::Debug for USART1 {
928    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
929        f.debug_struct("USART1").finish()
930    }
931}
932#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
933pub mod usart1;
934#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
935pub struct USART2 {
936    _marker: PhantomData<*const ()>,
937}
938unsafe impl Send for USART2 {}
939impl USART2 {
940    #[doc = r"Pointer to the register block"]
941    pub const PTR: *const usart2::RegisterBlock = 0x0840 as *const _;
942    #[doc = r"Return the pointer to the register block"]
943    #[inline(always)]
944    pub const fn ptr() -> *const usart2::RegisterBlock {
945        Self::PTR
946    }
947}
948impl Deref for USART2 {
949    type Target = usart2::RegisterBlock;
950    #[inline(always)]
951    fn deref(&self) -> &Self::Target {
952        unsafe { &*Self::PTR }
953    }
954}
955impl core::fmt::Debug for USART2 {
956    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
957        f.debug_struct("USART2").finish()
958    }
959}
960#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
961pub mod usart2;
962#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
963pub struct USART3 {
964    _marker: PhantomData<*const ()>,
965}
966unsafe impl Send for USART3 {}
967impl USART3 {
968    #[doc = r"Pointer to the register block"]
969    pub const PTR: *const usart3::RegisterBlock = 0x0860 as *const _;
970    #[doc = r"Return the pointer to the register block"]
971    #[inline(always)]
972    pub const fn ptr() -> *const usart3::RegisterBlock {
973        Self::PTR
974    }
975}
976impl Deref for USART3 {
977    type Target = usart3::RegisterBlock;
978    #[inline(always)]
979    fn deref(&self) -> &Self::Target {
980        unsafe { &*Self::PTR }
981    }
982}
983impl core::fmt::Debug for USART3 {
984    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
985        f.debug_struct("USART3").finish()
986    }
987}
988#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
989pub mod usart3;
990#[doc = "User Row"]
991pub struct USERROW {
992    _marker: PhantomData<*const ()>,
993}
994unsafe impl Send for USERROW {}
995impl USERROW {
996    #[doc = r"Pointer to the register block"]
997    pub const PTR: *const userrow::RegisterBlock = 0x1300 as *const _;
998    #[doc = r"Return the pointer to the register block"]
999    #[inline(always)]
1000    pub const fn ptr() -> *const userrow::RegisterBlock {
1001        Self::PTR
1002    }
1003}
1004impl Deref for USERROW {
1005    type Target = userrow::RegisterBlock;
1006    #[inline(always)]
1007    fn deref(&self) -> &Self::Target {
1008        unsafe { &*Self::PTR }
1009    }
1010}
1011impl core::fmt::Debug for USERROW {
1012    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1013        f.debug_struct("USERROW").finish()
1014    }
1015}
1016#[doc = "User Row"]
1017pub mod userrow;
1018#[doc = "Virtual Ports"]
1019pub struct VPORTA {
1020    _marker: PhantomData<*const ()>,
1021}
1022unsafe impl Send for VPORTA {}
1023impl VPORTA {
1024    #[doc = r"Pointer to the register block"]
1025    pub const PTR: *const vporta::RegisterBlock = 0 as *const _;
1026    #[doc = r"Return the pointer to the register block"]
1027    #[inline(always)]
1028    pub const fn ptr() -> *const vporta::RegisterBlock {
1029        Self::PTR
1030    }
1031}
1032impl Deref for VPORTA {
1033    type Target = vporta::RegisterBlock;
1034    #[inline(always)]
1035    fn deref(&self) -> &Self::Target {
1036        unsafe { &*Self::PTR }
1037    }
1038}
1039impl core::fmt::Debug for VPORTA {
1040    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1041        f.debug_struct("VPORTA").finish()
1042    }
1043}
1044#[doc = "Virtual Ports"]
1045pub mod vporta;
1046#[doc = "Virtual Ports"]
1047pub struct VPORTB {
1048    _marker: PhantomData<*const ()>,
1049}
1050unsafe impl Send for VPORTB {}
1051impl VPORTB {
1052    #[doc = r"Pointer to the register block"]
1053    pub const PTR: *const vportb::RegisterBlock = 0x04 as *const _;
1054    #[doc = r"Return the pointer to the register block"]
1055    #[inline(always)]
1056    pub const fn ptr() -> *const vportb::RegisterBlock {
1057        Self::PTR
1058    }
1059}
1060impl Deref for VPORTB {
1061    type Target = vportb::RegisterBlock;
1062    #[inline(always)]
1063    fn deref(&self) -> &Self::Target {
1064        unsafe { &*Self::PTR }
1065    }
1066}
1067impl core::fmt::Debug for VPORTB {
1068    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1069        f.debug_struct("VPORTB").finish()
1070    }
1071}
1072#[doc = "Virtual Ports"]
1073pub mod vportb;
1074#[doc = "Virtual Ports"]
1075pub struct VPORTC {
1076    _marker: PhantomData<*const ()>,
1077}
1078unsafe impl Send for VPORTC {}
1079impl VPORTC {
1080    #[doc = r"Pointer to the register block"]
1081    pub const PTR: *const vportc::RegisterBlock = 0x08 as *const _;
1082    #[doc = r"Return the pointer to the register block"]
1083    #[inline(always)]
1084    pub const fn ptr() -> *const vportc::RegisterBlock {
1085        Self::PTR
1086    }
1087}
1088impl Deref for VPORTC {
1089    type Target = vportc::RegisterBlock;
1090    #[inline(always)]
1091    fn deref(&self) -> &Self::Target {
1092        unsafe { &*Self::PTR }
1093    }
1094}
1095impl core::fmt::Debug for VPORTC {
1096    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1097        f.debug_struct("VPORTC").finish()
1098    }
1099}
1100#[doc = "Virtual Ports"]
1101pub mod vportc;
1102#[doc = "Virtual Ports"]
1103pub struct VPORTD {
1104    _marker: PhantomData<*const ()>,
1105}
1106unsafe impl Send for VPORTD {}
1107impl VPORTD {
1108    #[doc = r"Pointer to the register block"]
1109    pub const PTR: *const vportd::RegisterBlock = 0x0c as *const _;
1110    #[doc = r"Return the pointer to the register block"]
1111    #[inline(always)]
1112    pub const fn ptr() -> *const vportd::RegisterBlock {
1113        Self::PTR
1114    }
1115}
1116impl Deref for VPORTD {
1117    type Target = vportd::RegisterBlock;
1118    #[inline(always)]
1119    fn deref(&self) -> &Self::Target {
1120        unsafe { &*Self::PTR }
1121    }
1122}
1123impl core::fmt::Debug for VPORTD {
1124    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1125        f.debug_struct("VPORTD").finish()
1126    }
1127}
1128#[doc = "Virtual Ports"]
1129pub mod vportd;
1130#[doc = "Virtual Ports"]
1131pub struct VPORTE {
1132    _marker: PhantomData<*const ()>,
1133}
1134unsafe impl Send for VPORTE {}
1135impl VPORTE {
1136    #[doc = r"Pointer to the register block"]
1137    pub const PTR: *const vporte::RegisterBlock = 0x10 as *const _;
1138    #[doc = r"Return the pointer to the register block"]
1139    #[inline(always)]
1140    pub const fn ptr() -> *const vporte::RegisterBlock {
1141        Self::PTR
1142    }
1143}
1144impl Deref for VPORTE {
1145    type Target = vporte::RegisterBlock;
1146    #[inline(always)]
1147    fn deref(&self) -> &Self::Target {
1148        unsafe { &*Self::PTR }
1149    }
1150}
1151impl core::fmt::Debug for VPORTE {
1152    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1153        f.debug_struct("VPORTE").finish()
1154    }
1155}
1156#[doc = "Virtual Ports"]
1157pub mod vporte;
1158#[doc = "Virtual Ports"]
1159pub struct VPORTF {
1160    _marker: PhantomData<*const ()>,
1161}
1162unsafe impl Send for VPORTF {}
1163impl VPORTF {
1164    #[doc = r"Pointer to the register block"]
1165    pub const PTR: *const vportf::RegisterBlock = 0x14 as *const _;
1166    #[doc = r"Return the pointer to the register block"]
1167    #[inline(always)]
1168    pub const fn ptr() -> *const vportf::RegisterBlock {
1169        Self::PTR
1170    }
1171}
1172impl Deref for VPORTF {
1173    type Target = vportf::RegisterBlock;
1174    #[inline(always)]
1175    fn deref(&self) -> &Self::Target {
1176        unsafe { &*Self::PTR }
1177    }
1178}
1179impl core::fmt::Debug for VPORTF {
1180    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1181        f.debug_struct("VPORTF").finish()
1182    }
1183}
1184#[doc = "Virtual Ports"]
1185pub mod vportf;
1186#[doc = "Voltage reference"]
1187pub struct VREF {
1188    _marker: PhantomData<*const ()>,
1189}
1190unsafe impl Send for VREF {}
1191impl VREF {
1192    #[doc = r"Pointer to the register block"]
1193    pub const PTR: *const vref::RegisterBlock = 0xa0 as *const _;
1194    #[doc = r"Return the pointer to the register block"]
1195    #[inline(always)]
1196    pub const fn ptr() -> *const vref::RegisterBlock {
1197        Self::PTR
1198    }
1199}
1200impl Deref for VREF {
1201    type Target = vref::RegisterBlock;
1202    #[inline(always)]
1203    fn deref(&self) -> &Self::Target {
1204        unsafe { &*Self::PTR }
1205    }
1206}
1207impl core::fmt::Debug for VREF {
1208    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1209        f.debug_struct("VREF").finish()
1210    }
1211}
1212#[doc = "Voltage reference"]
1213pub mod vref;
1214#[doc = "Watch-Dog Timer"]
1215pub struct WDT {
1216    _marker: PhantomData<*const ()>,
1217}
1218unsafe impl Send for WDT {}
1219impl WDT {
1220    #[doc = r"Pointer to the register block"]
1221    pub const PTR: *const wdt::RegisterBlock = 0x0100 as *const _;
1222    #[doc = r"Return the pointer to the register block"]
1223    #[inline(always)]
1224    pub const fn ptr() -> *const wdt::RegisterBlock {
1225        Self::PTR
1226    }
1227}
1228impl Deref for WDT {
1229    type Target = wdt::RegisterBlock;
1230    #[inline(always)]
1231    fn deref(&self) -> &Self::Target {
1232        unsafe { &*Self::PTR }
1233    }
1234}
1235impl core::fmt::Debug for WDT {
1236    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1237        f.debug_struct("WDT").finish()
1238    }
1239}
1240#[doc = "Watch-Dog Timer"]
1241pub mod wdt;
1242use crate::devices::DEVICE_PERIPHERALS;
1243#[doc = r" All the peripherals."]
1244#[allow(non_snake_case)]
1245pub struct Peripherals {
1246    #[doc = "AC0"]
1247    pub AC0: AC0,
1248    #[doc = "ADC0"]
1249    pub ADC0: ADC0,
1250    #[doc = "BOD"]
1251    pub BOD: BOD,
1252    #[doc = "CCL"]
1253    pub CCL: CCL,
1254    #[doc = "CLKCTRL"]
1255    pub CLKCTRL: CLKCTRL,
1256    #[doc = "CPU"]
1257    pub CPU: CPU,
1258    #[doc = "CPUINT"]
1259    pub CPUINT: CPUINT,
1260    #[doc = "CRCSCAN"]
1261    pub CRCSCAN: CRCSCAN,
1262    #[doc = "EVSYS"]
1263    pub EVSYS: EVSYS,
1264    #[doc = "FUSE"]
1265    pub FUSE: FUSE,
1266    #[doc = "GPIO"]
1267    pub GPIO: GPIO,
1268    #[doc = "LOCKBIT"]
1269    pub LOCKBIT: LOCKBIT,
1270    #[doc = "NVMCTRL"]
1271    pub NVMCTRL: NVMCTRL,
1272    #[doc = "PORTA"]
1273    pub PORTA: PORTA,
1274    #[doc = "PORTB"]
1275    pub PORTB: PORTB,
1276    #[doc = "PORTC"]
1277    pub PORTC: PORTC,
1278    #[doc = "PORTD"]
1279    pub PORTD: PORTD,
1280    #[doc = "PORTE"]
1281    pub PORTE: PORTE,
1282    #[doc = "PORTF"]
1283    pub PORTF: PORTF,
1284    #[doc = "PORTMUX"]
1285    pub PORTMUX: PORTMUX,
1286    #[doc = "RSTCTRL"]
1287    pub RSTCTRL: RSTCTRL,
1288    #[doc = "RTC"]
1289    pub RTC: RTC,
1290    #[doc = "SIGROW"]
1291    pub SIGROW: SIGROW,
1292    #[doc = "SLPCTRL"]
1293    pub SLPCTRL: SLPCTRL,
1294    #[doc = "SPI0"]
1295    pub SPI0: SPI0,
1296    #[doc = "SYSCFG"]
1297    pub SYSCFG: SYSCFG,
1298    #[doc = "TCB0"]
1299    pub TCB0: TCB0,
1300    #[doc = "TCB1"]
1301    pub TCB1: TCB1,
1302    #[doc = "TCB2"]
1303    pub TCB2: TCB2,
1304    #[doc = "TCB3"]
1305    pub TCB3: TCB3,
1306    #[doc = "TWI0"]
1307    pub TWI0: TWI0,
1308    #[doc = "USART0"]
1309    pub USART0: USART0,
1310    #[doc = "USART1"]
1311    pub USART1: USART1,
1312    #[doc = "USART2"]
1313    pub USART2: USART2,
1314    #[doc = "USART3"]
1315    pub USART3: USART3,
1316    #[doc = "USERROW"]
1317    pub USERROW: USERROW,
1318    #[doc = "VPORTA"]
1319    pub VPORTA: VPORTA,
1320    #[doc = "VPORTB"]
1321    pub VPORTB: VPORTB,
1322    #[doc = "VPORTC"]
1323    pub VPORTC: VPORTC,
1324    #[doc = "VPORTD"]
1325    pub VPORTD: VPORTD,
1326    #[doc = "VPORTE"]
1327    pub VPORTE: VPORTE,
1328    #[doc = "VPORTF"]
1329    pub VPORTF: VPORTF,
1330    #[doc = "VREF"]
1331    pub VREF: VREF,
1332    #[doc = "WDT"]
1333    pub WDT: WDT,
1334}
1335impl Peripherals {
1336    #[doc = r" Returns all the peripherals *once*."]
1337    #[inline]
1338    pub fn take() -> Option<Self> {
1339        crate::interrupt::free(|_| {
1340            if unsafe { DEVICE_PERIPHERALS } {
1341                return None;
1342            }
1343            Some(unsafe { Peripherals::steal() })
1344        })
1345    }
1346    #[doc = r" Unchecked version of `Peripherals::take`."]
1347    #[doc = r""]
1348    #[doc = r" # Safety"]
1349    #[doc = r""]
1350    #[doc = r" Each of the returned peripherals must be used at most once."]
1351    #[inline]
1352    pub unsafe fn steal() -> Self {
1353        DEVICE_PERIPHERALS = true;
1354        Peripherals {
1355            AC0: AC0 {
1356                _marker: PhantomData,
1357            },
1358            ADC0: ADC0 {
1359                _marker: PhantomData,
1360            },
1361            BOD: BOD {
1362                _marker: PhantomData,
1363            },
1364            CCL: CCL {
1365                _marker: PhantomData,
1366            },
1367            CLKCTRL: CLKCTRL {
1368                _marker: PhantomData,
1369            },
1370            CPU: CPU {
1371                _marker: PhantomData,
1372            },
1373            CPUINT: CPUINT {
1374                _marker: PhantomData,
1375            },
1376            CRCSCAN: CRCSCAN {
1377                _marker: PhantomData,
1378            },
1379            EVSYS: EVSYS {
1380                _marker: PhantomData,
1381            },
1382            FUSE: FUSE {
1383                _marker: PhantomData,
1384            },
1385            GPIO: GPIO {
1386                _marker: PhantomData,
1387            },
1388            LOCKBIT: LOCKBIT {
1389                _marker: PhantomData,
1390            },
1391            NVMCTRL: NVMCTRL {
1392                _marker: PhantomData,
1393            },
1394            PORTA: PORTA {
1395                _marker: PhantomData,
1396            },
1397            PORTB: PORTB {
1398                _marker: PhantomData,
1399            },
1400            PORTC: PORTC {
1401                _marker: PhantomData,
1402            },
1403            PORTD: PORTD {
1404                _marker: PhantomData,
1405            },
1406            PORTE: PORTE {
1407                _marker: PhantomData,
1408            },
1409            PORTF: PORTF {
1410                _marker: PhantomData,
1411            },
1412            PORTMUX: PORTMUX {
1413                _marker: PhantomData,
1414            },
1415            RSTCTRL: RSTCTRL {
1416                _marker: PhantomData,
1417            },
1418            RTC: RTC {
1419                _marker: PhantomData,
1420            },
1421            SIGROW: SIGROW {
1422                _marker: PhantomData,
1423            },
1424            SLPCTRL: SLPCTRL {
1425                _marker: PhantomData,
1426            },
1427            SPI0: SPI0 {
1428                _marker: PhantomData,
1429            },
1430            SYSCFG: SYSCFG {
1431                _marker: PhantomData,
1432            },
1433            TCB0: TCB0 {
1434                _marker: PhantomData,
1435            },
1436            TCB1: TCB1 {
1437                _marker: PhantomData,
1438            },
1439            TCB2: TCB2 {
1440                _marker: PhantomData,
1441            },
1442            TCB3: TCB3 {
1443                _marker: PhantomData,
1444            },
1445            TWI0: TWI0 {
1446                _marker: PhantomData,
1447            },
1448            USART0: USART0 {
1449                _marker: PhantomData,
1450            },
1451            USART1: USART1 {
1452                _marker: PhantomData,
1453            },
1454            USART2: USART2 {
1455                _marker: PhantomData,
1456            },
1457            USART3: USART3 {
1458                _marker: PhantomData,
1459            },
1460            USERROW: USERROW {
1461                _marker: PhantomData,
1462            },
1463            VPORTA: VPORTA {
1464                _marker: PhantomData,
1465            },
1466            VPORTB: VPORTB {
1467                _marker: PhantomData,
1468            },
1469            VPORTC: VPORTC {
1470                _marker: PhantomData,
1471            },
1472            VPORTD: VPORTD {
1473                _marker: PhantomData,
1474            },
1475            VPORTE: VPORTE {
1476                _marker: PhantomData,
1477            },
1478            VPORTF: VPORTF {
1479                _marker: PhantomData,
1480            },
1481            VREF: VREF {
1482                _marker: PhantomData,
1483            },
1484            WDT: WDT {
1485                _marker: PhantomData,
1486            },
1487        }
1488    }
1489}