nrf52805_pac/
lib.rs

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