nrf52810_pac/
lib.rs

1#![doc = "Peripheral access API for NRF52810 microcontrollers (generated using svd2rust v0.25.1 ( ))\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.25.1/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#![deny(const_err)]
4#![deny(dead_code)]
5#![deny(improper_ctypes)]
6#![deny(missing_docs)]
7#![deny(no_mangle_generic_items)]
8#![deny(non_shorthand_field_patterns)]
9#![deny(overflowing_literals)]
10#![deny(path_statements)]
11#![deny(patterns_in_fns_without_body)]
12#![deny(private_in_public)]
13#![deny(unconditional_recursion)]
14#![deny(unused_allocation)]
15#![deny(unused_comparisons)]
16#![deny(unused_parens)]
17#![deny(while_true)]
18#![allow(non_camel_case_types)]
19#![allow(non_snake_case)]
20#![no_std]
21use core::marker::PhantomData;
22use core::ops::Deref;
23#[doc = r"Number available in the NVIC for configuring priority"]
24pub const NVIC_PRIO_BITS: u8 = 3;
25#[cfg(feature = "rt")]
26pub use self::Interrupt as interrupt;
27pub use cortex_m::peripheral::Peripherals as CorePeripherals;
28pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, ITM, MPU, NVIC, SCB, SYST, TPIU};
29#[cfg(feature = "rt")]
30pub use cortex_m_rt::interrupt;
31#[allow(unused_imports)]
32use generic::*;
33#[doc = r"Common register and bit access and modify traits"]
34pub mod generic;
35#[cfg(feature = "rt")]
36extern "C" {
37    fn POWER_CLOCK();
38    fn RADIO();
39    fn UARTE0_UART0();
40    fn TWIM0_TWIS0_TWI0();
41    fn SPIM0_SPIS0_SPI0();
42    fn GPIOTE();
43    fn SAADC();
44    fn TIMER0();
45    fn TIMER1();
46    fn TIMER2();
47    fn RTC0();
48    fn TEMP();
49    fn RNG();
50    fn ECB();
51    fn CCM_AAR();
52    fn WDT();
53    fn RTC1();
54    fn QDEC();
55    fn COMP();
56    fn SWI0_EGU0();
57    fn SWI1_EGU1();
58    fn SWI2();
59    fn SWI3();
60    fn SWI4();
61    fn SWI5();
62    fn PWM0();
63    fn PDM();
64}
65#[doc(hidden)]
66pub union Vector {
67    _handler: unsafe extern "C" fn(),
68    _reserved: u32,
69}
70#[cfg(feature = "rt")]
71#[doc(hidden)]
72#[link_section = ".vector_table.interrupts"]
73#[no_mangle]
74pub static __INTERRUPTS: [Vector; 30] = [
75    Vector {
76        _handler: POWER_CLOCK,
77    },
78    Vector { _handler: RADIO },
79    Vector {
80        _handler: UARTE0_UART0,
81    },
82    Vector {
83        _handler: TWIM0_TWIS0_TWI0,
84    },
85    Vector {
86        _handler: SPIM0_SPIS0_SPI0,
87    },
88    Vector { _reserved: 0 },
89    Vector { _handler: GPIOTE },
90    Vector { _handler: SAADC },
91    Vector { _handler: TIMER0 },
92    Vector { _handler: TIMER1 },
93    Vector { _handler: TIMER2 },
94    Vector { _handler: RTC0 },
95    Vector { _handler: TEMP },
96    Vector { _handler: RNG },
97    Vector { _handler: ECB },
98    Vector { _handler: CCM_AAR },
99    Vector { _handler: WDT },
100    Vector { _handler: RTC1 },
101    Vector { _handler: QDEC },
102    Vector { _handler: COMP },
103    Vector {
104        _handler: SWI0_EGU0,
105    },
106    Vector {
107        _handler: SWI1_EGU1,
108    },
109    Vector { _handler: SWI2 },
110    Vector { _handler: SWI3 },
111    Vector { _handler: SWI4 },
112    Vector { _handler: SWI5 },
113    Vector { _reserved: 0 },
114    Vector { _reserved: 0 },
115    Vector { _handler: PWM0 },
116    Vector { _handler: PDM },
117];
118#[doc = r"Enumeration of all the interrupts."]
119#[derive(Copy, Clone, Debug, PartialEq, Eq)]
120#[repr(u16)]
121pub enum Interrupt {
122    #[doc = "0 - POWER_CLOCK"]
123    POWER_CLOCK = 0,
124    #[doc = "1 - RADIO"]
125    RADIO = 1,
126    #[doc = "2 - UARTE0_UART0"]
127    UARTE0_UART0 = 2,
128    #[doc = "3 - TWIM0_TWIS0_TWI0"]
129    TWIM0_TWIS0_TWI0 = 3,
130    #[doc = "4 - SPIM0_SPIS0_SPI0"]
131    SPIM0_SPIS0_SPI0 = 4,
132    #[doc = "6 - GPIOTE"]
133    GPIOTE = 6,
134    #[doc = "7 - SAADC"]
135    SAADC = 7,
136    #[doc = "8 - TIMER0"]
137    TIMER0 = 8,
138    #[doc = "9 - TIMER1"]
139    TIMER1 = 9,
140    #[doc = "10 - TIMER2"]
141    TIMER2 = 10,
142    #[doc = "11 - RTC0"]
143    RTC0 = 11,
144    #[doc = "12 - TEMP"]
145    TEMP = 12,
146    #[doc = "13 - RNG"]
147    RNG = 13,
148    #[doc = "14 - ECB"]
149    ECB = 14,
150    #[doc = "15 - CCM_AAR"]
151    CCM_AAR = 15,
152    #[doc = "16 - WDT"]
153    WDT = 16,
154    #[doc = "17 - RTC1"]
155    RTC1 = 17,
156    #[doc = "18 - QDEC"]
157    QDEC = 18,
158    #[doc = "19 - COMP"]
159    COMP = 19,
160    #[doc = "20 - SWI0_EGU0"]
161    SWI0_EGU0 = 20,
162    #[doc = "21 - SWI1_EGU1"]
163    SWI1_EGU1 = 21,
164    #[doc = "22 - SWI2"]
165    SWI2 = 22,
166    #[doc = "23 - SWI3"]
167    SWI3 = 23,
168    #[doc = "24 - SWI4"]
169    SWI4 = 24,
170    #[doc = "25 - SWI5"]
171    SWI5 = 25,
172    #[doc = "28 - PWM0"]
173    PWM0 = 28,
174    #[doc = "29 - PDM"]
175    PDM = 29,
176}
177unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
178    #[inline(always)]
179    fn number(self) -> u16 {
180        self as u16
181    }
182}
183#[doc = "Factory information configuration registers"]
184pub struct FICR {
185    _marker: PhantomData<*const ()>,
186}
187unsafe impl Send for FICR {}
188impl FICR {
189    #[doc = r"Pointer to the register block"]
190    pub const PTR: *const ficr::RegisterBlock = 0x1000_0000 as *const _;
191    #[doc = r"Return the pointer to the register block"]
192    #[inline(always)]
193    pub const fn ptr() -> *const ficr::RegisterBlock {
194        Self::PTR
195    }
196}
197impl Deref for FICR {
198    type Target = ficr::RegisterBlock;
199    #[inline(always)]
200    fn deref(&self) -> &Self::Target {
201        unsafe { &*Self::PTR }
202    }
203}
204impl core::fmt::Debug for FICR {
205    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
206        f.debug_struct("FICR").finish()
207    }
208}
209#[doc = "Factory information configuration registers"]
210pub mod ficr;
211#[doc = "User information configuration registers"]
212pub struct UICR {
213    _marker: PhantomData<*const ()>,
214}
215unsafe impl Send for UICR {}
216impl UICR {
217    #[doc = r"Pointer to the register block"]
218    pub const PTR: *const uicr::RegisterBlock = 0x1000_1000 as *const _;
219    #[doc = r"Return the pointer to the register block"]
220    #[inline(always)]
221    pub const fn ptr() -> *const uicr::RegisterBlock {
222        Self::PTR
223    }
224}
225impl Deref for UICR {
226    type Target = uicr::RegisterBlock;
227    #[inline(always)]
228    fn deref(&self) -> &Self::Target {
229        unsafe { &*Self::PTR }
230    }
231}
232impl core::fmt::Debug for UICR {
233    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
234        f.debug_struct("UICR").finish()
235    }
236}
237#[doc = "User information configuration registers"]
238pub mod uicr;
239#[doc = "Block Protect"]
240pub struct BPROT {
241    _marker: PhantomData<*const ()>,
242}
243unsafe impl Send for BPROT {}
244impl BPROT {
245    #[doc = r"Pointer to the register block"]
246    pub const PTR: *const bprot::RegisterBlock = 0x4000_0000 as *const _;
247    #[doc = r"Return the pointer to the register block"]
248    #[inline(always)]
249    pub const fn ptr() -> *const bprot::RegisterBlock {
250        Self::PTR
251    }
252}
253impl Deref for BPROT {
254    type Target = bprot::RegisterBlock;
255    #[inline(always)]
256    fn deref(&self) -> &Self::Target {
257        unsafe { &*Self::PTR }
258    }
259}
260impl core::fmt::Debug for BPROT {
261    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
262        f.debug_struct("BPROT").finish()
263    }
264}
265#[doc = "Block Protect"]
266pub mod bprot;
267#[doc = "Clock control"]
268pub struct CLOCK {
269    _marker: PhantomData<*const ()>,
270}
271unsafe impl Send for CLOCK {}
272impl CLOCK {
273    #[doc = r"Pointer to the register block"]
274    pub const PTR: *const clock::RegisterBlock = 0x4000_0000 as *const _;
275    #[doc = r"Return the pointer to the register block"]
276    #[inline(always)]
277    pub const fn ptr() -> *const clock::RegisterBlock {
278        Self::PTR
279    }
280}
281impl Deref for CLOCK {
282    type Target = clock::RegisterBlock;
283    #[inline(always)]
284    fn deref(&self) -> &Self::Target {
285        unsafe { &*Self::PTR }
286    }
287}
288impl core::fmt::Debug for CLOCK {
289    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
290        f.debug_struct("CLOCK").finish()
291    }
292}
293#[doc = "Clock control"]
294pub mod clock;
295#[doc = "Power control"]
296pub struct POWER {
297    _marker: PhantomData<*const ()>,
298}
299unsafe impl Send for POWER {}
300impl POWER {
301    #[doc = r"Pointer to the register block"]
302    pub const PTR: *const power::RegisterBlock = 0x4000_0000 as *const _;
303    #[doc = r"Return the pointer to the register block"]
304    #[inline(always)]
305    pub const fn ptr() -> *const power::RegisterBlock {
306        Self::PTR
307    }
308}
309impl Deref for POWER {
310    type Target = power::RegisterBlock;
311    #[inline(always)]
312    fn deref(&self) -> &Self::Target {
313        unsafe { &*Self::PTR }
314    }
315}
316impl core::fmt::Debug for POWER {
317    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
318        f.debug_struct("POWER").finish()
319    }
320}
321#[doc = "Power control"]
322pub mod power;
323#[doc = "GPIO Port"]
324pub struct P0 {
325    _marker: PhantomData<*const ()>,
326}
327unsafe impl Send for P0 {}
328impl P0 {
329    #[doc = r"Pointer to the register block"]
330    pub const PTR: *const p0::RegisterBlock = 0x5000_0000 as *const _;
331    #[doc = r"Return the pointer to the register block"]
332    #[inline(always)]
333    pub const fn ptr() -> *const p0::RegisterBlock {
334        Self::PTR
335    }
336}
337impl Deref for P0 {
338    type Target = p0::RegisterBlock;
339    #[inline(always)]
340    fn deref(&self) -> &Self::Target {
341        unsafe { &*Self::PTR }
342    }
343}
344impl core::fmt::Debug for P0 {
345    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
346        f.debug_struct("P0").finish()
347    }
348}
349#[doc = "GPIO Port"]
350pub mod p0;
351#[doc = "2.4 GHz Radio"]
352pub struct RADIO {
353    _marker: PhantomData<*const ()>,
354}
355unsafe impl Send for RADIO {}
356impl RADIO {
357    #[doc = r"Pointer to the register block"]
358    pub const PTR: *const radio::RegisterBlock = 0x4000_1000 as *const _;
359    #[doc = r"Return the pointer to the register block"]
360    #[inline(always)]
361    pub const fn ptr() -> *const radio::RegisterBlock {
362        Self::PTR
363    }
364}
365impl Deref for RADIO {
366    type Target = radio::RegisterBlock;
367    #[inline(always)]
368    fn deref(&self) -> &Self::Target {
369        unsafe { &*Self::PTR }
370    }
371}
372impl core::fmt::Debug for RADIO {
373    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
374        f.debug_struct("RADIO").finish()
375    }
376}
377#[doc = "2.4 GHz Radio"]
378pub mod radio;
379#[doc = "Universal Asynchronous Receiver/Transmitter"]
380pub struct UART0 {
381    _marker: PhantomData<*const ()>,
382}
383unsafe impl Send for UART0 {}
384impl UART0 {
385    #[doc = r"Pointer to the register block"]
386    pub const PTR: *const uart0::RegisterBlock = 0x4000_2000 as *const _;
387    #[doc = r"Return the pointer to the register block"]
388    #[inline(always)]
389    pub const fn ptr() -> *const uart0::RegisterBlock {
390        Self::PTR
391    }
392}
393impl Deref for UART0 {
394    type Target = uart0::RegisterBlock;
395    #[inline(always)]
396    fn deref(&self) -> &Self::Target {
397        unsafe { &*Self::PTR }
398    }
399}
400impl core::fmt::Debug for UART0 {
401    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
402        f.debug_struct("UART0").finish()
403    }
404}
405#[doc = "Universal Asynchronous Receiver/Transmitter"]
406pub mod uart0;
407#[doc = "UART with EasyDMA"]
408pub struct UARTE0 {
409    _marker: PhantomData<*const ()>,
410}
411unsafe impl Send for UARTE0 {}
412impl UARTE0 {
413    #[doc = r"Pointer to the register block"]
414    pub const PTR: *const uarte0::RegisterBlock = 0x4000_2000 as *const _;
415    #[doc = r"Return the pointer to the register block"]
416    #[inline(always)]
417    pub const fn ptr() -> *const uarte0::RegisterBlock {
418        Self::PTR
419    }
420}
421impl Deref for UARTE0 {
422    type Target = uarte0::RegisterBlock;
423    #[inline(always)]
424    fn deref(&self) -> &Self::Target {
425        unsafe { &*Self::PTR }
426    }
427}
428impl core::fmt::Debug for UARTE0 {
429    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
430        f.debug_struct("UARTE0").finish()
431    }
432}
433#[doc = "UART with EasyDMA"]
434pub mod uarte0;
435#[doc = "I2C compatible Two-Wire Interface"]
436pub struct TWI0 {
437    _marker: PhantomData<*const ()>,
438}
439unsafe impl Send for TWI0 {}
440impl TWI0 {
441    #[doc = r"Pointer to the register block"]
442    pub const PTR: *const twi0::RegisterBlock = 0x4000_3000 as *const _;
443    #[doc = r"Return the pointer to the register block"]
444    #[inline(always)]
445    pub const fn ptr() -> *const twi0::RegisterBlock {
446        Self::PTR
447    }
448}
449impl Deref for TWI0 {
450    type Target = twi0::RegisterBlock;
451    #[inline(always)]
452    fn deref(&self) -> &Self::Target {
453        unsafe { &*Self::PTR }
454    }
455}
456impl core::fmt::Debug for TWI0 {
457    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
458        f.debug_struct("TWI0").finish()
459    }
460}
461#[doc = "I2C compatible Two-Wire Interface"]
462pub mod twi0;
463#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA"]
464pub struct TWIM0 {
465    _marker: PhantomData<*const ()>,
466}
467unsafe impl Send for TWIM0 {}
468impl TWIM0 {
469    #[doc = r"Pointer to the register block"]
470    pub const PTR: *const twim0::RegisterBlock = 0x4000_3000 as *const _;
471    #[doc = r"Return the pointer to the register block"]
472    #[inline(always)]
473    pub const fn ptr() -> *const twim0::RegisterBlock {
474        Self::PTR
475    }
476}
477impl Deref for TWIM0 {
478    type Target = twim0::RegisterBlock;
479    #[inline(always)]
480    fn deref(&self) -> &Self::Target {
481        unsafe { &*Self::PTR }
482    }
483}
484impl core::fmt::Debug for TWIM0 {
485    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
486        f.debug_struct("TWIM0").finish()
487    }
488}
489#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA"]
490pub mod twim0;
491#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA"]
492pub struct TWIS0 {
493    _marker: PhantomData<*const ()>,
494}
495unsafe impl Send for TWIS0 {}
496impl TWIS0 {
497    #[doc = r"Pointer to the register block"]
498    pub const PTR: *const twis0::RegisterBlock = 0x4000_3000 as *const _;
499    #[doc = r"Return the pointer to the register block"]
500    #[inline(always)]
501    pub const fn ptr() -> *const twis0::RegisterBlock {
502        Self::PTR
503    }
504}
505impl Deref for TWIS0 {
506    type Target = twis0::RegisterBlock;
507    #[inline(always)]
508    fn deref(&self) -> &Self::Target {
509        unsafe { &*Self::PTR }
510    }
511}
512impl core::fmt::Debug for TWIS0 {
513    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
514        f.debug_struct("TWIS0").finish()
515    }
516}
517#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA"]
518pub mod twis0;
519#[doc = "Serial Peripheral Interface"]
520pub struct SPI0 {
521    _marker: PhantomData<*const ()>,
522}
523unsafe impl Send for SPI0 {}
524impl SPI0 {
525    #[doc = r"Pointer to the register block"]
526    pub const PTR: *const spi0::RegisterBlock = 0x4000_4000 as *const _;
527    #[doc = r"Return the pointer to the register block"]
528    #[inline(always)]
529    pub const fn ptr() -> *const spi0::RegisterBlock {
530        Self::PTR
531    }
532}
533impl Deref for SPI0 {
534    type Target = spi0::RegisterBlock;
535    #[inline(always)]
536    fn deref(&self) -> &Self::Target {
537        unsafe { &*Self::PTR }
538    }
539}
540impl core::fmt::Debug for SPI0 {
541    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
542        f.debug_struct("SPI0").finish()
543    }
544}
545#[doc = "Serial Peripheral Interface"]
546pub mod spi0;
547#[doc = "Serial Peripheral Interface Master with EasyDMA"]
548pub struct SPIM0 {
549    _marker: PhantomData<*const ()>,
550}
551unsafe impl Send for SPIM0 {}
552impl SPIM0 {
553    #[doc = r"Pointer to the register block"]
554    pub const PTR: *const spim0::RegisterBlock = 0x4000_4000 as *const _;
555    #[doc = r"Return the pointer to the register block"]
556    #[inline(always)]
557    pub const fn ptr() -> *const spim0::RegisterBlock {
558        Self::PTR
559    }
560}
561impl Deref for SPIM0 {
562    type Target = spim0::RegisterBlock;
563    #[inline(always)]
564    fn deref(&self) -> &Self::Target {
565        unsafe { &*Self::PTR }
566    }
567}
568impl core::fmt::Debug for SPIM0 {
569    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
570        f.debug_struct("SPIM0").finish()
571    }
572}
573#[doc = "Serial Peripheral Interface Master with EasyDMA"]
574pub mod spim0;
575#[doc = "SPI Slave"]
576pub struct SPIS0 {
577    _marker: PhantomData<*const ()>,
578}
579unsafe impl Send for SPIS0 {}
580impl SPIS0 {
581    #[doc = r"Pointer to the register block"]
582    pub const PTR: *const spis0::RegisterBlock = 0x4000_4000 as *const _;
583    #[doc = r"Return the pointer to the register block"]
584    #[inline(always)]
585    pub const fn ptr() -> *const spis0::RegisterBlock {
586        Self::PTR
587    }
588}
589impl Deref for SPIS0 {
590    type Target = spis0::RegisterBlock;
591    #[inline(always)]
592    fn deref(&self) -> &Self::Target {
593        unsafe { &*Self::PTR }
594    }
595}
596impl core::fmt::Debug for SPIS0 {
597    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
598        f.debug_struct("SPIS0").finish()
599    }
600}
601#[doc = "SPI Slave"]
602pub mod spis0;
603#[doc = "GPIO Tasks and Events"]
604pub struct GPIOTE {
605    _marker: PhantomData<*const ()>,
606}
607unsafe impl Send for GPIOTE {}
608impl GPIOTE {
609    #[doc = r"Pointer to the register block"]
610    pub const PTR: *const gpiote::RegisterBlock = 0x4000_6000 as *const _;
611    #[doc = r"Return the pointer to the register block"]
612    #[inline(always)]
613    pub const fn ptr() -> *const gpiote::RegisterBlock {
614        Self::PTR
615    }
616}
617impl Deref for GPIOTE {
618    type Target = gpiote::RegisterBlock;
619    #[inline(always)]
620    fn deref(&self) -> &Self::Target {
621        unsafe { &*Self::PTR }
622    }
623}
624impl core::fmt::Debug for GPIOTE {
625    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
626        f.debug_struct("GPIOTE").finish()
627    }
628}
629#[doc = "GPIO Tasks and Events"]
630pub mod gpiote;
631#[doc = "Analog to Digital Converter"]
632pub struct SAADC {
633    _marker: PhantomData<*const ()>,
634}
635unsafe impl Send for SAADC {}
636impl SAADC {
637    #[doc = r"Pointer to the register block"]
638    pub const PTR: *const saadc::RegisterBlock = 0x4000_7000 as *const _;
639    #[doc = r"Return the pointer to the register block"]
640    #[inline(always)]
641    pub const fn ptr() -> *const saadc::RegisterBlock {
642        Self::PTR
643    }
644}
645impl Deref for SAADC {
646    type Target = saadc::RegisterBlock;
647    #[inline(always)]
648    fn deref(&self) -> &Self::Target {
649        unsafe { &*Self::PTR }
650    }
651}
652impl core::fmt::Debug for SAADC {
653    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
654        f.debug_struct("SAADC").finish()
655    }
656}
657#[doc = "Analog to Digital Converter"]
658pub mod saadc;
659#[doc = "Timer/Counter 0"]
660pub struct TIMER0 {
661    _marker: PhantomData<*const ()>,
662}
663unsafe impl Send for TIMER0 {}
664impl TIMER0 {
665    #[doc = r"Pointer to the register block"]
666    pub const PTR: *const timer0::RegisterBlock = 0x4000_8000 as *const _;
667    #[doc = r"Return the pointer to the register block"]
668    #[inline(always)]
669    pub const fn ptr() -> *const timer0::RegisterBlock {
670        Self::PTR
671    }
672}
673impl Deref for TIMER0 {
674    type Target = timer0::RegisterBlock;
675    #[inline(always)]
676    fn deref(&self) -> &Self::Target {
677        unsafe { &*Self::PTR }
678    }
679}
680impl core::fmt::Debug for TIMER0 {
681    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
682        f.debug_struct("TIMER0").finish()
683    }
684}
685#[doc = "Timer/Counter 0"]
686pub mod timer0;
687#[doc = "Timer/Counter 1"]
688pub struct TIMER1 {
689    _marker: PhantomData<*const ()>,
690}
691unsafe impl Send for TIMER1 {}
692impl TIMER1 {
693    #[doc = r"Pointer to the register block"]
694    pub const PTR: *const timer0::RegisterBlock = 0x4000_9000 as *const _;
695    #[doc = r"Return the pointer to the register block"]
696    #[inline(always)]
697    pub const fn ptr() -> *const timer0::RegisterBlock {
698        Self::PTR
699    }
700}
701impl Deref for TIMER1 {
702    type Target = timer0::RegisterBlock;
703    #[inline(always)]
704    fn deref(&self) -> &Self::Target {
705        unsafe { &*Self::PTR }
706    }
707}
708impl core::fmt::Debug for TIMER1 {
709    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
710        f.debug_struct("TIMER1").finish()
711    }
712}
713#[doc = "Timer/Counter 1"]
714pub use timer0 as timer1;
715#[doc = "Timer/Counter 2"]
716pub struct TIMER2 {
717    _marker: PhantomData<*const ()>,
718}
719unsafe impl Send for TIMER2 {}
720impl TIMER2 {
721    #[doc = r"Pointer to the register block"]
722    pub const PTR: *const timer0::RegisterBlock = 0x4000_a000 as *const _;
723    #[doc = r"Return the pointer to the register block"]
724    #[inline(always)]
725    pub const fn ptr() -> *const timer0::RegisterBlock {
726        Self::PTR
727    }
728}
729impl Deref for TIMER2 {
730    type Target = timer0::RegisterBlock;
731    #[inline(always)]
732    fn deref(&self) -> &Self::Target {
733        unsafe { &*Self::PTR }
734    }
735}
736impl core::fmt::Debug for TIMER2 {
737    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
738        f.debug_struct("TIMER2").finish()
739    }
740}
741#[doc = "Timer/Counter 2"]
742pub use timer0 as timer2;
743#[doc = "Real time counter 0"]
744pub struct RTC0 {
745    _marker: PhantomData<*const ()>,
746}
747unsafe impl Send for RTC0 {}
748impl RTC0 {
749    #[doc = r"Pointer to the register block"]
750    pub const PTR: *const rtc0::RegisterBlock = 0x4000_b000 as *const _;
751    #[doc = r"Return the pointer to the register block"]
752    #[inline(always)]
753    pub const fn ptr() -> *const rtc0::RegisterBlock {
754        Self::PTR
755    }
756}
757impl Deref for RTC0 {
758    type Target = rtc0::RegisterBlock;
759    #[inline(always)]
760    fn deref(&self) -> &Self::Target {
761        unsafe { &*Self::PTR }
762    }
763}
764impl core::fmt::Debug for RTC0 {
765    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
766        f.debug_struct("RTC0").finish()
767    }
768}
769#[doc = "Real time counter 0"]
770pub mod rtc0;
771#[doc = "Temperature Sensor"]
772pub struct TEMP {
773    _marker: PhantomData<*const ()>,
774}
775unsafe impl Send for TEMP {}
776impl TEMP {
777    #[doc = r"Pointer to the register block"]
778    pub const PTR: *const temp::RegisterBlock = 0x4000_c000 as *const _;
779    #[doc = r"Return the pointer to the register block"]
780    #[inline(always)]
781    pub const fn ptr() -> *const temp::RegisterBlock {
782        Self::PTR
783    }
784}
785impl Deref for TEMP {
786    type Target = temp::RegisterBlock;
787    #[inline(always)]
788    fn deref(&self) -> &Self::Target {
789        unsafe { &*Self::PTR }
790    }
791}
792impl core::fmt::Debug for TEMP {
793    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
794        f.debug_struct("TEMP").finish()
795    }
796}
797#[doc = "Temperature Sensor"]
798pub mod temp;
799#[doc = "Random Number Generator"]
800pub struct RNG {
801    _marker: PhantomData<*const ()>,
802}
803unsafe impl Send for RNG {}
804impl RNG {
805    #[doc = r"Pointer to the register block"]
806    pub const PTR: *const rng::RegisterBlock = 0x4000_d000 as *const _;
807    #[doc = r"Return the pointer to the register block"]
808    #[inline(always)]
809    pub const fn ptr() -> *const rng::RegisterBlock {
810        Self::PTR
811    }
812}
813impl Deref for RNG {
814    type Target = rng::RegisterBlock;
815    #[inline(always)]
816    fn deref(&self) -> &Self::Target {
817        unsafe { &*Self::PTR }
818    }
819}
820impl core::fmt::Debug for RNG {
821    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
822        f.debug_struct("RNG").finish()
823    }
824}
825#[doc = "Random Number Generator"]
826pub mod rng;
827#[doc = "AES ECB Mode Encryption"]
828pub struct ECB {
829    _marker: PhantomData<*const ()>,
830}
831unsafe impl Send for ECB {}
832impl ECB {
833    #[doc = r"Pointer to the register block"]
834    pub const PTR: *const ecb::RegisterBlock = 0x4000_e000 as *const _;
835    #[doc = r"Return the pointer to the register block"]
836    #[inline(always)]
837    pub const fn ptr() -> *const ecb::RegisterBlock {
838        Self::PTR
839    }
840}
841impl Deref for ECB {
842    type Target = ecb::RegisterBlock;
843    #[inline(always)]
844    fn deref(&self) -> &Self::Target {
845        unsafe { &*Self::PTR }
846    }
847}
848impl core::fmt::Debug for ECB {
849    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
850        f.debug_struct("ECB").finish()
851    }
852}
853#[doc = "AES ECB Mode Encryption"]
854pub mod ecb;
855#[doc = "Accelerated Address Resolver"]
856pub struct AAR {
857    _marker: PhantomData<*const ()>,
858}
859unsafe impl Send for AAR {}
860impl AAR {
861    #[doc = r"Pointer to the register block"]
862    pub const PTR: *const aar::RegisterBlock = 0x4000_f000 as *const _;
863    #[doc = r"Return the pointer to the register block"]
864    #[inline(always)]
865    pub const fn ptr() -> *const aar::RegisterBlock {
866        Self::PTR
867    }
868}
869impl Deref for AAR {
870    type Target = aar::RegisterBlock;
871    #[inline(always)]
872    fn deref(&self) -> &Self::Target {
873        unsafe { &*Self::PTR }
874    }
875}
876impl core::fmt::Debug for AAR {
877    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
878        f.debug_struct("AAR").finish()
879    }
880}
881#[doc = "Accelerated Address Resolver"]
882pub mod aar;
883#[doc = "AES CCM Mode Encryption"]
884pub struct CCM {
885    _marker: PhantomData<*const ()>,
886}
887unsafe impl Send for CCM {}
888impl CCM {
889    #[doc = r"Pointer to the register block"]
890    pub const PTR: *const ccm::RegisterBlock = 0x4000_f000 as *const _;
891    #[doc = r"Return the pointer to the register block"]
892    #[inline(always)]
893    pub const fn ptr() -> *const ccm::RegisterBlock {
894        Self::PTR
895    }
896}
897impl Deref for CCM {
898    type Target = ccm::RegisterBlock;
899    #[inline(always)]
900    fn deref(&self) -> &Self::Target {
901        unsafe { &*Self::PTR }
902    }
903}
904impl core::fmt::Debug for CCM {
905    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
906        f.debug_struct("CCM").finish()
907    }
908}
909#[doc = "AES CCM Mode Encryption"]
910pub mod ccm;
911#[doc = "Watchdog Timer"]
912pub struct WDT {
913    _marker: PhantomData<*const ()>,
914}
915unsafe impl Send for WDT {}
916impl WDT {
917    #[doc = r"Pointer to the register block"]
918    pub const PTR: *const wdt::RegisterBlock = 0x4001_0000 as *const _;
919    #[doc = r"Return the pointer to the register block"]
920    #[inline(always)]
921    pub const fn ptr() -> *const wdt::RegisterBlock {
922        Self::PTR
923    }
924}
925impl Deref for WDT {
926    type Target = wdt::RegisterBlock;
927    #[inline(always)]
928    fn deref(&self) -> &Self::Target {
929        unsafe { &*Self::PTR }
930    }
931}
932impl core::fmt::Debug for WDT {
933    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
934        f.debug_struct("WDT").finish()
935    }
936}
937#[doc = "Watchdog Timer"]
938pub mod wdt;
939#[doc = "Real time counter 1"]
940pub struct RTC1 {
941    _marker: PhantomData<*const ()>,
942}
943unsafe impl Send for RTC1 {}
944impl RTC1 {
945    #[doc = r"Pointer to the register block"]
946    pub const PTR: *const rtc0::RegisterBlock = 0x4001_1000 as *const _;
947    #[doc = r"Return the pointer to the register block"]
948    #[inline(always)]
949    pub const fn ptr() -> *const rtc0::RegisterBlock {
950        Self::PTR
951    }
952}
953impl Deref for RTC1 {
954    type Target = rtc0::RegisterBlock;
955    #[inline(always)]
956    fn deref(&self) -> &Self::Target {
957        unsafe { &*Self::PTR }
958    }
959}
960impl core::fmt::Debug for RTC1 {
961    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
962        f.debug_struct("RTC1").finish()
963    }
964}
965#[doc = "Real time counter 1"]
966pub use rtc0 as rtc1;
967#[doc = "Quadrature Decoder"]
968pub struct QDEC {
969    _marker: PhantomData<*const ()>,
970}
971unsafe impl Send for QDEC {}
972impl QDEC {
973    #[doc = r"Pointer to the register block"]
974    pub const PTR: *const qdec::RegisterBlock = 0x4001_2000 as *const _;
975    #[doc = r"Return the pointer to the register block"]
976    #[inline(always)]
977    pub const fn ptr() -> *const qdec::RegisterBlock {
978        Self::PTR
979    }
980}
981impl Deref for QDEC {
982    type Target = qdec::RegisterBlock;
983    #[inline(always)]
984    fn deref(&self) -> &Self::Target {
985        unsafe { &*Self::PTR }
986    }
987}
988impl core::fmt::Debug for QDEC {
989    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
990        f.debug_struct("QDEC").finish()
991    }
992}
993#[doc = "Quadrature Decoder"]
994pub mod qdec;
995#[doc = "Comparator"]
996pub struct COMP {
997    _marker: PhantomData<*const ()>,
998}
999unsafe impl Send for COMP {}
1000impl COMP {
1001    #[doc = r"Pointer to the register block"]
1002    pub const PTR: *const comp::RegisterBlock = 0x4001_3000 as *const _;
1003    #[doc = r"Return the pointer to the register block"]
1004    #[inline(always)]
1005    pub const fn ptr() -> *const comp::RegisterBlock {
1006        Self::PTR
1007    }
1008}
1009impl Deref for COMP {
1010    type Target = comp::RegisterBlock;
1011    #[inline(always)]
1012    fn deref(&self) -> &Self::Target {
1013        unsafe { &*Self::PTR }
1014    }
1015}
1016impl core::fmt::Debug for COMP {
1017    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1018        f.debug_struct("COMP").finish()
1019    }
1020}
1021#[doc = "Comparator"]
1022pub mod comp;
1023#[doc = "Event Generator Unit 0"]
1024pub struct EGU0 {
1025    _marker: PhantomData<*const ()>,
1026}
1027unsafe impl Send for EGU0 {}
1028impl EGU0 {
1029    #[doc = r"Pointer to the register block"]
1030    pub const PTR: *const egu0::RegisterBlock = 0x4001_4000 as *const _;
1031    #[doc = r"Return the pointer to the register block"]
1032    #[inline(always)]
1033    pub const fn ptr() -> *const egu0::RegisterBlock {
1034        Self::PTR
1035    }
1036}
1037impl Deref for EGU0 {
1038    type Target = egu0::RegisterBlock;
1039    #[inline(always)]
1040    fn deref(&self) -> &Self::Target {
1041        unsafe { &*Self::PTR }
1042    }
1043}
1044impl core::fmt::Debug for EGU0 {
1045    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1046        f.debug_struct("EGU0").finish()
1047    }
1048}
1049#[doc = "Event Generator Unit 0"]
1050pub mod egu0;
1051#[doc = "Software interrupt 0"]
1052pub struct SWI0 {
1053    _marker: PhantomData<*const ()>,
1054}
1055unsafe impl Send for SWI0 {}
1056impl SWI0 {
1057    #[doc = r"Pointer to the register block"]
1058    pub const PTR: *const swi0::RegisterBlock = 0x4001_4000 as *const _;
1059    #[doc = r"Return the pointer to the register block"]
1060    #[inline(always)]
1061    pub const fn ptr() -> *const swi0::RegisterBlock {
1062        Self::PTR
1063    }
1064}
1065impl Deref for SWI0 {
1066    type Target = swi0::RegisterBlock;
1067    #[inline(always)]
1068    fn deref(&self) -> &Self::Target {
1069        unsafe { &*Self::PTR }
1070    }
1071}
1072impl core::fmt::Debug for SWI0 {
1073    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1074        f.debug_struct("SWI0").finish()
1075    }
1076}
1077#[doc = "Software interrupt 0"]
1078pub mod swi0;
1079#[doc = "Event Generator Unit 1"]
1080pub struct EGU1 {
1081    _marker: PhantomData<*const ()>,
1082}
1083unsafe impl Send for EGU1 {}
1084impl EGU1 {
1085    #[doc = r"Pointer to the register block"]
1086    pub const PTR: *const egu0::RegisterBlock = 0x4001_5000 as *const _;
1087    #[doc = r"Return the pointer to the register block"]
1088    #[inline(always)]
1089    pub const fn ptr() -> *const egu0::RegisterBlock {
1090        Self::PTR
1091    }
1092}
1093impl Deref for EGU1 {
1094    type Target = egu0::RegisterBlock;
1095    #[inline(always)]
1096    fn deref(&self) -> &Self::Target {
1097        unsafe { &*Self::PTR }
1098    }
1099}
1100impl core::fmt::Debug for EGU1 {
1101    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1102        f.debug_struct("EGU1").finish()
1103    }
1104}
1105#[doc = "Event Generator Unit 1"]
1106pub use egu0 as egu1;
1107#[doc = "Software interrupt 1"]
1108pub struct SWI1 {
1109    _marker: PhantomData<*const ()>,
1110}
1111unsafe impl Send for SWI1 {}
1112impl SWI1 {
1113    #[doc = r"Pointer to the register block"]
1114    pub const PTR: *const swi0::RegisterBlock = 0x4001_5000 as *const _;
1115    #[doc = r"Return the pointer to the register block"]
1116    #[inline(always)]
1117    pub const fn ptr() -> *const swi0::RegisterBlock {
1118        Self::PTR
1119    }
1120}
1121impl Deref for SWI1 {
1122    type Target = swi0::RegisterBlock;
1123    #[inline(always)]
1124    fn deref(&self) -> &Self::Target {
1125        unsafe { &*Self::PTR }
1126    }
1127}
1128impl core::fmt::Debug for SWI1 {
1129    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1130        f.debug_struct("SWI1").finish()
1131    }
1132}
1133#[doc = "Software interrupt 1"]
1134pub use swi0 as swi1;
1135#[doc = "Software interrupt 2"]
1136pub struct SWI2 {
1137    _marker: PhantomData<*const ()>,
1138}
1139unsafe impl Send for SWI2 {}
1140impl SWI2 {
1141    #[doc = r"Pointer to the register block"]
1142    pub const PTR: *const swi0::RegisterBlock = 0x4001_6000 as *const _;
1143    #[doc = r"Return the pointer to the register block"]
1144    #[inline(always)]
1145    pub const fn ptr() -> *const swi0::RegisterBlock {
1146        Self::PTR
1147    }
1148}
1149impl Deref for SWI2 {
1150    type Target = swi0::RegisterBlock;
1151    #[inline(always)]
1152    fn deref(&self) -> &Self::Target {
1153        unsafe { &*Self::PTR }
1154    }
1155}
1156impl core::fmt::Debug for SWI2 {
1157    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1158        f.debug_struct("SWI2").finish()
1159    }
1160}
1161#[doc = "Software interrupt 2"]
1162pub use swi0 as swi2;
1163#[doc = "Software interrupt 3"]
1164pub struct SWI3 {
1165    _marker: PhantomData<*const ()>,
1166}
1167unsafe impl Send for SWI3 {}
1168impl SWI3 {
1169    #[doc = r"Pointer to the register block"]
1170    pub const PTR: *const swi0::RegisterBlock = 0x4001_7000 as *const _;
1171    #[doc = r"Return the pointer to the register block"]
1172    #[inline(always)]
1173    pub const fn ptr() -> *const swi0::RegisterBlock {
1174        Self::PTR
1175    }
1176}
1177impl Deref for SWI3 {
1178    type Target = swi0::RegisterBlock;
1179    #[inline(always)]
1180    fn deref(&self) -> &Self::Target {
1181        unsafe { &*Self::PTR }
1182    }
1183}
1184impl core::fmt::Debug for SWI3 {
1185    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1186        f.debug_struct("SWI3").finish()
1187    }
1188}
1189#[doc = "Software interrupt 3"]
1190pub use swi0 as swi3;
1191#[doc = "Software interrupt 4"]
1192pub struct SWI4 {
1193    _marker: PhantomData<*const ()>,
1194}
1195unsafe impl Send for SWI4 {}
1196impl SWI4 {
1197    #[doc = r"Pointer to the register block"]
1198    pub const PTR: *const swi0::RegisterBlock = 0x4001_8000 as *const _;
1199    #[doc = r"Return the pointer to the register block"]
1200    #[inline(always)]
1201    pub const fn ptr() -> *const swi0::RegisterBlock {
1202        Self::PTR
1203    }
1204}
1205impl Deref for SWI4 {
1206    type Target = swi0::RegisterBlock;
1207    #[inline(always)]
1208    fn deref(&self) -> &Self::Target {
1209        unsafe { &*Self::PTR }
1210    }
1211}
1212impl core::fmt::Debug for SWI4 {
1213    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1214        f.debug_struct("SWI4").finish()
1215    }
1216}
1217#[doc = "Software interrupt 4"]
1218pub use swi0 as swi4;
1219#[doc = "Software interrupt 5"]
1220pub struct SWI5 {
1221    _marker: PhantomData<*const ()>,
1222}
1223unsafe impl Send for SWI5 {}
1224impl SWI5 {
1225    #[doc = r"Pointer to the register block"]
1226    pub const PTR: *const swi0::RegisterBlock = 0x4001_9000 as *const _;
1227    #[doc = r"Return the pointer to the register block"]
1228    #[inline(always)]
1229    pub const fn ptr() -> *const swi0::RegisterBlock {
1230        Self::PTR
1231    }
1232}
1233impl Deref for SWI5 {
1234    type Target = swi0::RegisterBlock;
1235    #[inline(always)]
1236    fn deref(&self) -> &Self::Target {
1237        unsafe { &*Self::PTR }
1238    }
1239}
1240impl core::fmt::Debug for SWI5 {
1241    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1242        f.debug_struct("SWI5").finish()
1243    }
1244}
1245#[doc = "Software interrupt 5"]
1246pub use swi0 as swi5;
1247#[doc = "Pulse width modulation unit"]
1248pub struct PWM0 {
1249    _marker: PhantomData<*const ()>,
1250}
1251unsafe impl Send for PWM0 {}
1252impl PWM0 {
1253    #[doc = r"Pointer to the register block"]
1254    pub const PTR: *const pwm0::RegisterBlock = 0x4001_c000 as *const _;
1255    #[doc = r"Return the pointer to the register block"]
1256    #[inline(always)]
1257    pub const fn ptr() -> *const pwm0::RegisterBlock {
1258        Self::PTR
1259    }
1260}
1261impl Deref for PWM0 {
1262    type Target = pwm0::RegisterBlock;
1263    #[inline(always)]
1264    fn deref(&self) -> &Self::Target {
1265        unsafe { &*Self::PTR }
1266    }
1267}
1268impl core::fmt::Debug for PWM0 {
1269    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1270        f.debug_struct("PWM0").finish()
1271    }
1272}
1273#[doc = "Pulse width modulation unit"]
1274pub mod pwm0;
1275#[doc = "Pulse Density Modulation (Digital Microphone) Interface"]
1276pub struct PDM {
1277    _marker: PhantomData<*const ()>,
1278}
1279unsafe impl Send for PDM {}
1280impl PDM {
1281    #[doc = r"Pointer to the register block"]
1282    pub const PTR: *const pdm::RegisterBlock = 0x4001_d000 as *const _;
1283    #[doc = r"Return the pointer to the register block"]
1284    #[inline(always)]
1285    pub const fn ptr() -> *const pdm::RegisterBlock {
1286        Self::PTR
1287    }
1288}
1289impl Deref for PDM {
1290    type Target = pdm::RegisterBlock;
1291    #[inline(always)]
1292    fn deref(&self) -> &Self::Target {
1293        unsafe { &*Self::PTR }
1294    }
1295}
1296impl core::fmt::Debug for PDM {
1297    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1298        f.debug_struct("PDM").finish()
1299    }
1300}
1301#[doc = "Pulse Density Modulation (Digital Microphone) Interface"]
1302pub mod pdm;
1303#[doc = "Non-volatile memory controller"]
1304pub struct NVMC {
1305    _marker: PhantomData<*const ()>,
1306}
1307unsafe impl Send for NVMC {}
1308impl NVMC {
1309    #[doc = r"Pointer to the register block"]
1310    pub const PTR: *const nvmc::RegisterBlock = 0x4001_e000 as *const _;
1311    #[doc = r"Return the pointer to the register block"]
1312    #[inline(always)]
1313    pub const fn ptr() -> *const nvmc::RegisterBlock {
1314        Self::PTR
1315    }
1316}
1317impl Deref for NVMC {
1318    type Target = nvmc::RegisterBlock;
1319    #[inline(always)]
1320    fn deref(&self) -> &Self::Target {
1321        unsafe { &*Self::PTR }
1322    }
1323}
1324impl core::fmt::Debug for NVMC {
1325    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1326        f.debug_struct("NVMC").finish()
1327    }
1328}
1329#[doc = "Non-volatile memory controller"]
1330pub mod nvmc;
1331#[doc = "Programmable Peripheral Interconnect"]
1332pub struct PPI {
1333    _marker: PhantomData<*const ()>,
1334}
1335unsafe impl Send for PPI {}
1336impl PPI {
1337    #[doc = r"Pointer to the register block"]
1338    pub const PTR: *const ppi::RegisterBlock = 0x4001_f000 as *const _;
1339    #[doc = r"Return the pointer to the register block"]
1340    #[inline(always)]
1341    pub const fn ptr() -> *const ppi::RegisterBlock {
1342        Self::PTR
1343    }
1344}
1345impl Deref for PPI {
1346    type Target = ppi::RegisterBlock;
1347    #[inline(always)]
1348    fn deref(&self) -> &Self::Target {
1349        unsafe { &*Self::PTR }
1350    }
1351}
1352impl core::fmt::Debug for PPI {
1353    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1354        f.debug_struct("PPI").finish()
1355    }
1356}
1357#[doc = "Programmable Peripheral Interconnect"]
1358pub mod ppi;
1359#[no_mangle]
1360static mut DEVICE_PERIPHERALS: bool = false;
1361#[doc = r"All the peripherals"]
1362#[allow(non_snake_case)]
1363pub struct Peripherals {
1364    #[doc = "FICR"]
1365    pub FICR: FICR,
1366    #[doc = "UICR"]
1367    pub UICR: UICR,
1368    #[doc = "BPROT"]
1369    pub BPROT: BPROT,
1370    #[doc = "CLOCK"]
1371    pub CLOCK: CLOCK,
1372    #[doc = "POWER"]
1373    pub POWER: POWER,
1374    #[doc = "P0"]
1375    pub P0: P0,
1376    #[doc = "RADIO"]
1377    pub RADIO: RADIO,
1378    #[doc = "UART0"]
1379    pub UART0: UART0,
1380    #[doc = "UARTE0"]
1381    pub UARTE0: UARTE0,
1382    #[doc = "TWI0"]
1383    pub TWI0: TWI0,
1384    #[doc = "TWIM0"]
1385    pub TWIM0: TWIM0,
1386    #[doc = "TWIS0"]
1387    pub TWIS0: TWIS0,
1388    #[doc = "SPI0"]
1389    pub SPI0: SPI0,
1390    #[doc = "SPIM0"]
1391    pub SPIM0: SPIM0,
1392    #[doc = "SPIS0"]
1393    pub SPIS0: SPIS0,
1394    #[doc = "GPIOTE"]
1395    pub GPIOTE: GPIOTE,
1396    #[doc = "SAADC"]
1397    pub SAADC: SAADC,
1398    #[doc = "TIMER0"]
1399    pub TIMER0: TIMER0,
1400    #[doc = "TIMER1"]
1401    pub TIMER1: TIMER1,
1402    #[doc = "TIMER2"]
1403    pub TIMER2: TIMER2,
1404    #[doc = "RTC0"]
1405    pub RTC0: RTC0,
1406    #[doc = "TEMP"]
1407    pub TEMP: TEMP,
1408    #[doc = "RNG"]
1409    pub RNG: RNG,
1410    #[doc = "ECB"]
1411    pub ECB: ECB,
1412    #[doc = "AAR"]
1413    pub AAR: AAR,
1414    #[doc = "CCM"]
1415    pub CCM: CCM,
1416    #[doc = "WDT"]
1417    pub WDT: WDT,
1418    #[doc = "RTC1"]
1419    pub RTC1: RTC1,
1420    #[doc = "QDEC"]
1421    pub QDEC: QDEC,
1422    #[doc = "COMP"]
1423    pub COMP: COMP,
1424    #[doc = "EGU0"]
1425    pub EGU0: EGU0,
1426    #[doc = "SWI0"]
1427    pub SWI0: SWI0,
1428    #[doc = "EGU1"]
1429    pub EGU1: EGU1,
1430    #[doc = "SWI1"]
1431    pub SWI1: SWI1,
1432    #[doc = "SWI2"]
1433    pub SWI2: SWI2,
1434    #[doc = "SWI3"]
1435    pub SWI3: SWI3,
1436    #[doc = "SWI4"]
1437    pub SWI4: SWI4,
1438    #[doc = "SWI5"]
1439    pub SWI5: SWI5,
1440    #[doc = "PWM0"]
1441    pub PWM0: PWM0,
1442    #[doc = "PDM"]
1443    pub PDM: PDM,
1444    #[doc = "NVMC"]
1445    pub NVMC: NVMC,
1446    #[doc = "PPI"]
1447    pub PPI: PPI,
1448}
1449impl Peripherals {
1450    #[doc = r"Returns all the peripherals *once*"]
1451    #[inline]
1452    pub fn take() -> Option<Self> {
1453        cortex_m::interrupt::free(|_| {
1454            if unsafe { DEVICE_PERIPHERALS } {
1455                None
1456            } else {
1457                Some(unsafe { Peripherals::steal() })
1458            }
1459        })
1460    }
1461    #[doc = r"Unchecked version of `Peripherals::take`"]
1462    #[inline]
1463    pub unsafe fn steal() -> Self {
1464        DEVICE_PERIPHERALS = true;
1465        Peripherals {
1466            FICR: FICR {
1467                _marker: PhantomData,
1468            },
1469            UICR: UICR {
1470                _marker: PhantomData,
1471            },
1472            BPROT: BPROT {
1473                _marker: PhantomData,
1474            },
1475            CLOCK: CLOCK {
1476                _marker: PhantomData,
1477            },
1478            POWER: POWER {
1479                _marker: PhantomData,
1480            },
1481            P0: P0 {
1482                _marker: PhantomData,
1483            },
1484            RADIO: RADIO {
1485                _marker: PhantomData,
1486            },
1487            UART0: UART0 {
1488                _marker: PhantomData,
1489            },
1490            UARTE0: UARTE0 {
1491                _marker: PhantomData,
1492            },
1493            TWI0: TWI0 {
1494                _marker: PhantomData,
1495            },
1496            TWIM0: TWIM0 {
1497                _marker: PhantomData,
1498            },
1499            TWIS0: TWIS0 {
1500                _marker: PhantomData,
1501            },
1502            SPI0: SPI0 {
1503                _marker: PhantomData,
1504            },
1505            SPIM0: SPIM0 {
1506                _marker: PhantomData,
1507            },
1508            SPIS0: SPIS0 {
1509                _marker: PhantomData,
1510            },
1511            GPIOTE: GPIOTE {
1512                _marker: PhantomData,
1513            },
1514            SAADC: SAADC {
1515                _marker: PhantomData,
1516            },
1517            TIMER0: TIMER0 {
1518                _marker: PhantomData,
1519            },
1520            TIMER1: TIMER1 {
1521                _marker: PhantomData,
1522            },
1523            TIMER2: TIMER2 {
1524                _marker: PhantomData,
1525            },
1526            RTC0: RTC0 {
1527                _marker: PhantomData,
1528            },
1529            TEMP: TEMP {
1530                _marker: PhantomData,
1531            },
1532            RNG: RNG {
1533                _marker: PhantomData,
1534            },
1535            ECB: ECB {
1536                _marker: PhantomData,
1537            },
1538            AAR: AAR {
1539                _marker: PhantomData,
1540            },
1541            CCM: CCM {
1542                _marker: PhantomData,
1543            },
1544            WDT: WDT {
1545                _marker: PhantomData,
1546            },
1547            RTC1: RTC1 {
1548                _marker: PhantomData,
1549            },
1550            QDEC: QDEC {
1551                _marker: PhantomData,
1552            },
1553            COMP: COMP {
1554                _marker: PhantomData,
1555            },
1556            EGU0: EGU0 {
1557                _marker: PhantomData,
1558            },
1559            SWI0: SWI0 {
1560                _marker: PhantomData,
1561            },
1562            EGU1: EGU1 {
1563                _marker: PhantomData,
1564            },
1565            SWI1: SWI1 {
1566                _marker: PhantomData,
1567            },
1568            SWI2: SWI2 {
1569                _marker: PhantomData,
1570            },
1571            SWI3: SWI3 {
1572                _marker: PhantomData,
1573            },
1574            SWI4: SWI4 {
1575                _marker: PhantomData,
1576            },
1577            SWI5: SWI5 {
1578                _marker: PhantomData,
1579            },
1580            PWM0: PWM0 {
1581                _marker: PhantomData,
1582            },
1583            PDM: PDM {
1584                _marker: PhantomData,
1585            },
1586            NVMC: NVMC {
1587                _marker: PhantomData,
1588            },
1589            PPI: PPI {
1590                _marker: PhantomData,
1591            },
1592        }
1593    }
1594}