1#![doc = "Peripheral access API for NRF52811 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_SPIM0_SPIS0_SPI0();
41 fn SPIM1_SPIS1_SPI1();
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_SPIM0_SPIS0_SPI0,
84 },
85 Vector {
86 _handler: SPIM1_SPIS1_SPI1,
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_SPIM0_SPIS0_SPI0"]
129 TWIM0_TWIS0_TWI0_SPIM0_SPIS0_SPI0 = 3,
130 #[doc = "4 - SPIM1_SPIS1_SPI1"]
131 SPIM1_SPIS1_SPI1 = 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 = "Serial Peripheral Interface 0"]
436pub struct SPI0 {
437 _marker: PhantomData<*const ()>,
438}
439unsafe impl Send for SPI0 {}
440impl SPI0 {
441 #[doc = r"Pointer to the register block"]
442 pub const PTR: *const spi0::RegisterBlock = 0x4000_3000 as *const _;
443 #[doc = r"Return the pointer to the register block"]
444 #[inline(always)]
445 pub const fn ptr() -> *const spi0::RegisterBlock {
446 Self::PTR
447 }
448}
449impl Deref for SPI0 {
450 type Target = spi0::RegisterBlock;
451 #[inline(always)]
452 fn deref(&self) -> &Self::Target {
453 unsafe { &*Self::PTR }
454 }
455}
456impl core::fmt::Debug for SPI0 {
457 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
458 f.debug_struct("SPI0").finish()
459 }
460}
461#[doc = "Serial Peripheral Interface 0"]
462pub mod spi0;
463#[doc = "Serial Peripheral Interface Master with EasyDMA 0"]
464pub struct SPIM0 {
465 _marker: PhantomData<*const ()>,
466}
467unsafe impl Send for SPIM0 {}
468impl SPIM0 {
469 #[doc = r"Pointer to the register block"]
470 pub const PTR: *const spim0::RegisterBlock = 0x4000_3000 as *const _;
471 #[doc = r"Return the pointer to the register block"]
472 #[inline(always)]
473 pub const fn ptr() -> *const spim0::RegisterBlock {
474 Self::PTR
475 }
476}
477impl Deref for SPIM0 {
478 type Target = spim0::RegisterBlock;
479 #[inline(always)]
480 fn deref(&self) -> &Self::Target {
481 unsafe { &*Self::PTR }
482 }
483}
484impl core::fmt::Debug for SPIM0 {
485 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
486 f.debug_struct("SPIM0").finish()
487 }
488}
489#[doc = "Serial Peripheral Interface Master with EasyDMA 0"]
490pub mod spim0;
491#[doc = "SPI Slave 0"]
492pub struct SPIS0 {
493 _marker: PhantomData<*const ()>,
494}
495unsafe impl Send for SPIS0 {}
496impl SPIS0 {
497 #[doc = r"Pointer to the register block"]
498 pub const PTR: *const spis0::RegisterBlock = 0x4000_3000 as *const _;
499 #[doc = r"Return the pointer to the register block"]
500 #[inline(always)]
501 pub const fn ptr() -> *const spis0::RegisterBlock {
502 Self::PTR
503 }
504}
505impl Deref for SPIS0 {
506 type Target = spis0::RegisterBlock;
507 #[inline(always)]
508 fn deref(&self) -> &Self::Target {
509 unsafe { &*Self::PTR }
510 }
511}
512impl core::fmt::Debug for SPIS0 {
513 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
514 f.debug_struct("SPIS0").finish()
515 }
516}
517#[doc = "SPI Slave 0"]
518pub mod spis0;
519#[doc = "I2C compatible Two-Wire Interface"]
520pub struct TWI0 {
521 _marker: PhantomData<*const ()>,
522}
523unsafe impl Send for TWI0 {}
524impl TWI0 {
525 #[doc = r"Pointer to the register block"]
526 pub const PTR: *const twi0::RegisterBlock = 0x4000_3000 as *const _;
527 #[doc = r"Return the pointer to the register block"]
528 #[inline(always)]
529 pub const fn ptr() -> *const twi0::RegisterBlock {
530 Self::PTR
531 }
532}
533impl Deref for TWI0 {
534 type Target = twi0::RegisterBlock;
535 #[inline(always)]
536 fn deref(&self) -> &Self::Target {
537 unsafe { &*Self::PTR }
538 }
539}
540impl core::fmt::Debug for TWI0 {
541 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
542 f.debug_struct("TWI0").finish()
543 }
544}
545#[doc = "I2C compatible Two-Wire Interface"]
546pub mod twi0;
547#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA"]
548pub struct TWIM0 {
549 _marker: PhantomData<*const ()>,
550}
551unsafe impl Send for TWIM0 {}
552impl TWIM0 {
553 #[doc = r"Pointer to the register block"]
554 pub const PTR: *const twim0::RegisterBlock = 0x4000_3000 as *const _;
555 #[doc = r"Return the pointer to the register block"]
556 #[inline(always)]
557 pub const fn ptr() -> *const twim0::RegisterBlock {
558 Self::PTR
559 }
560}
561impl Deref for TWIM0 {
562 type Target = twim0::RegisterBlock;
563 #[inline(always)]
564 fn deref(&self) -> &Self::Target {
565 unsafe { &*Self::PTR }
566 }
567}
568impl core::fmt::Debug for TWIM0 {
569 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
570 f.debug_struct("TWIM0").finish()
571 }
572}
573#[doc = "I2C compatible Two-Wire Master Interface with EasyDMA"]
574pub mod twim0;
575#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA"]
576pub struct TWIS0 {
577 _marker: PhantomData<*const ()>,
578}
579unsafe impl Send for TWIS0 {}
580impl TWIS0 {
581 #[doc = r"Pointer to the register block"]
582 pub const PTR: *const twis0::RegisterBlock = 0x4000_3000 as *const _;
583 #[doc = r"Return the pointer to the register block"]
584 #[inline(always)]
585 pub const fn ptr() -> *const twis0::RegisterBlock {
586 Self::PTR
587 }
588}
589impl Deref for TWIS0 {
590 type Target = twis0::RegisterBlock;
591 #[inline(always)]
592 fn deref(&self) -> &Self::Target {
593 unsafe { &*Self::PTR }
594 }
595}
596impl core::fmt::Debug for TWIS0 {
597 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
598 f.debug_struct("TWIS0").finish()
599 }
600}
601#[doc = "I2C compatible Two-Wire Slave Interface with EasyDMA"]
602pub mod twis0;
603#[doc = "Serial Peripheral Interface 1"]
604pub struct SPI1 {
605 _marker: PhantomData<*const ()>,
606}
607unsafe impl Send for SPI1 {}
608impl SPI1 {
609 #[doc = r"Pointer to the register block"]
610 pub const PTR: *const spi0::RegisterBlock = 0x4000_4000 as *const _;
611 #[doc = r"Return the pointer to the register block"]
612 #[inline(always)]
613 pub const fn ptr() -> *const spi0::RegisterBlock {
614 Self::PTR
615 }
616}
617impl Deref for SPI1 {
618 type Target = spi0::RegisterBlock;
619 #[inline(always)]
620 fn deref(&self) -> &Self::Target {
621 unsafe { &*Self::PTR }
622 }
623}
624impl core::fmt::Debug for SPI1 {
625 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
626 f.debug_struct("SPI1").finish()
627 }
628}
629#[doc = "Serial Peripheral Interface 1"]
630pub use spi0 as spi1;
631#[doc = "Serial Peripheral Interface Master with EasyDMA 1"]
632pub struct SPIM1 {
633 _marker: PhantomData<*const ()>,
634}
635unsafe impl Send for SPIM1 {}
636impl SPIM1 {
637 #[doc = r"Pointer to the register block"]
638 pub const PTR: *const spim0::RegisterBlock = 0x4000_4000 as *const _;
639 #[doc = r"Return the pointer to the register block"]
640 #[inline(always)]
641 pub const fn ptr() -> *const spim0::RegisterBlock {
642 Self::PTR
643 }
644}
645impl Deref for SPIM1 {
646 type Target = spim0::RegisterBlock;
647 #[inline(always)]
648 fn deref(&self) -> &Self::Target {
649 unsafe { &*Self::PTR }
650 }
651}
652impl core::fmt::Debug for SPIM1 {
653 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
654 f.debug_struct("SPIM1").finish()
655 }
656}
657#[doc = "Serial Peripheral Interface Master with EasyDMA 1"]
658pub use spim0 as spim1;
659#[doc = "SPI Slave 1"]
660pub struct SPIS1 {
661 _marker: PhantomData<*const ()>,
662}
663unsafe impl Send for SPIS1 {}
664impl SPIS1 {
665 #[doc = r"Pointer to the register block"]
666 pub const PTR: *const spis0::RegisterBlock = 0x4000_4000 as *const _;
667 #[doc = r"Return the pointer to the register block"]
668 #[inline(always)]
669 pub const fn ptr() -> *const spis0::RegisterBlock {
670 Self::PTR
671 }
672}
673impl Deref for SPIS1 {
674 type Target = spis0::RegisterBlock;
675 #[inline(always)]
676 fn deref(&self) -> &Self::Target {
677 unsafe { &*Self::PTR }
678 }
679}
680impl core::fmt::Debug for SPIS1 {
681 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
682 f.debug_struct("SPIS1").finish()
683 }
684}
685#[doc = "SPI Slave 1"]
686pub use spis0 as spis1;
687#[doc = "GPIO Tasks and Events"]
688pub struct GPIOTE {
689 _marker: PhantomData<*const ()>,
690}
691unsafe impl Send for GPIOTE {}
692impl GPIOTE {
693 #[doc = r"Pointer to the register block"]
694 pub const PTR: *const gpiote::RegisterBlock = 0x4000_6000 as *const _;
695 #[doc = r"Return the pointer to the register block"]
696 #[inline(always)]
697 pub const fn ptr() -> *const gpiote::RegisterBlock {
698 Self::PTR
699 }
700}
701impl Deref for GPIOTE {
702 type Target = gpiote::RegisterBlock;
703 #[inline(always)]
704 fn deref(&self) -> &Self::Target {
705 unsafe { &*Self::PTR }
706 }
707}
708impl core::fmt::Debug for GPIOTE {
709 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
710 f.debug_struct("GPIOTE").finish()
711 }
712}
713#[doc = "GPIO Tasks and Events"]
714pub mod gpiote;
715#[doc = "Analog to Digital Converter"]
716pub struct SAADC {
717 _marker: PhantomData<*const ()>,
718}
719unsafe impl Send for SAADC {}
720impl SAADC {
721 #[doc = r"Pointer to the register block"]
722 pub const PTR: *const saadc::RegisterBlock = 0x4000_7000 as *const _;
723 #[doc = r"Return the pointer to the register block"]
724 #[inline(always)]
725 pub const fn ptr() -> *const saadc::RegisterBlock {
726 Self::PTR
727 }
728}
729impl Deref for SAADC {
730 type Target = saadc::RegisterBlock;
731 #[inline(always)]
732 fn deref(&self) -> &Self::Target {
733 unsafe { &*Self::PTR }
734 }
735}
736impl core::fmt::Debug for SAADC {
737 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
738 f.debug_struct("SAADC").finish()
739 }
740}
741#[doc = "Analog to Digital Converter"]
742pub mod saadc;
743#[doc = "Timer/Counter 0"]
744pub struct TIMER0 {
745 _marker: PhantomData<*const ()>,
746}
747unsafe impl Send for TIMER0 {}
748impl TIMER0 {
749 #[doc = r"Pointer to the register block"]
750 pub const PTR: *const timer0::RegisterBlock = 0x4000_8000 as *const _;
751 #[doc = r"Return the pointer to the register block"]
752 #[inline(always)]
753 pub const fn ptr() -> *const timer0::RegisterBlock {
754 Self::PTR
755 }
756}
757impl Deref for TIMER0 {
758 type Target = timer0::RegisterBlock;
759 #[inline(always)]
760 fn deref(&self) -> &Self::Target {
761 unsafe { &*Self::PTR }
762 }
763}
764impl core::fmt::Debug for TIMER0 {
765 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
766 f.debug_struct("TIMER0").finish()
767 }
768}
769#[doc = "Timer/Counter 0"]
770pub mod timer0;
771#[doc = "Timer/Counter 1"]
772pub struct TIMER1 {
773 _marker: PhantomData<*const ()>,
774}
775unsafe impl Send for TIMER1 {}
776impl TIMER1 {
777 #[doc = r"Pointer to the register block"]
778 pub const PTR: *const timer0::RegisterBlock = 0x4000_9000 as *const _;
779 #[doc = r"Return the pointer to the register block"]
780 #[inline(always)]
781 pub const fn ptr() -> *const timer0::RegisterBlock {
782 Self::PTR
783 }
784}
785impl Deref for TIMER1 {
786 type Target = timer0::RegisterBlock;
787 #[inline(always)]
788 fn deref(&self) -> &Self::Target {
789 unsafe { &*Self::PTR }
790 }
791}
792impl core::fmt::Debug for TIMER1 {
793 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
794 f.debug_struct("TIMER1").finish()
795 }
796}
797#[doc = "Timer/Counter 1"]
798pub use timer0 as timer1;
799#[doc = "Timer/Counter 2"]
800pub struct TIMER2 {
801 _marker: PhantomData<*const ()>,
802}
803unsafe impl Send for TIMER2 {}
804impl TIMER2 {
805 #[doc = r"Pointer to the register block"]
806 pub const PTR: *const timer0::RegisterBlock = 0x4000_a000 as *const _;
807 #[doc = r"Return the pointer to the register block"]
808 #[inline(always)]
809 pub const fn ptr() -> *const timer0::RegisterBlock {
810 Self::PTR
811 }
812}
813impl Deref for TIMER2 {
814 type Target = timer0::RegisterBlock;
815 #[inline(always)]
816 fn deref(&self) -> &Self::Target {
817 unsafe { &*Self::PTR }
818 }
819}
820impl core::fmt::Debug for TIMER2 {
821 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
822 f.debug_struct("TIMER2").finish()
823 }
824}
825#[doc = "Timer/Counter 2"]
826pub use timer0 as timer2;
827#[doc = "Real time counter 0"]
828pub struct RTC0 {
829 _marker: PhantomData<*const ()>,
830}
831unsafe impl Send for RTC0 {}
832impl RTC0 {
833 #[doc = r"Pointer to the register block"]
834 pub const PTR: *const rtc0::RegisterBlock = 0x4000_b000 as *const _;
835 #[doc = r"Return the pointer to the register block"]
836 #[inline(always)]
837 pub const fn ptr() -> *const rtc0::RegisterBlock {
838 Self::PTR
839 }
840}
841impl Deref for RTC0 {
842 type Target = rtc0::RegisterBlock;
843 #[inline(always)]
844 fn deref(&self) -> &Self::Target {
845 unsafe { &*Self::PTR }
846 }
847}
848impl core::fmt::Debug for RTC0 {
849 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
850 f.debug_struct("RTC0").finish()
851 }
852}
853#[doc = "Real time counter 0"]
854pub mod rtc0;
855#[doc = "Temperature Sensor"]
856pub struct TEMP {
857 _marker: PhantomData<*const ()>,
858}
859unsafe impl Send for TEMP {}
860impl TEMP {
861 #[doc = r"Pointer to the register block"]
862 pub const PTR: *const temp::RegisterBlock = 0x4000_c000 as *const _;
863 #[doc = r"Return the pointer to the register block"]
864 #[inline(always)]
865 pub const fn ptr() -> *const temp::RegisterBlock {
866 Self::PTR
867 }
868}
869impl Deref for TEMP {
870 type Target = temp::RegisterBlock;
871 #[inline(always)]
872 fn deref(&self) -> &Self::Target {
873 unsafe { &*Self::PTR }
874 }
875}
876impl core::fmt::Debug for TEMP {
877 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
878 f.debug_struct("TEMP").finish()
879 }
880}
881#[doc = "Temperature Sensor"]
882pub mod temp;
883#[doc = "Random Number Generator"]
884pub struct RNG {
885 _marker: PhantomData<*const ()>,
886}
887unsafe impl Send for RNG {}
888impl RNG {
889 #[doc = r"Pointer to the register block"]
890 pub const PTR: *const rng::RegisterBlock = 0x4000_d000 as *const _;
891 #[doc = r"Return the pointer to the register block"]
892 #[inline(always)]
893 pub const fn ptr() -> *const rng::RegisterBlock {
894 Self::PTR
895 }
896}
897impl Deref for RNG {
898 type Target = rng::RegisterBlock;
899 #[inline(always)]
900 fn deref(&self) -> &Self::Target {
901 unsafe { &*Self::PTR }
902 }
903}
904impl core::fmt::Debug for RNG {
905 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
906 f.debug_struct("RNG").finish()
907 }
908}
909#[doc = "Random Number Generator"]
910pub mod rng;
911#[doc = "AES ECB Mode Encryption"]
912pub struct ECB {
913 _marker: PhantomData<*const ()>,
914}
915unsafe impl Send for ECB {}
916impl ECB {
917 #[doc = r"Pointer to the register block"]
918 pub const PTR: *const ecb::RegisterBlock = 0x4000_e000 as *const _;
919 #[doc = r"Return the pointer to the register block"]
920 #[inline(always)]
921 pub const fn ptr() -> *const ecb::RegisterBlock {
922 Self::PTR
923 }
924}
925impl Deref for ECB {
926 type Target = ecb::RegisterBlock;
927 #[inline(always)]
928 fn deref(&self) -> &Self::Target {
929 unsafe { &*Self::PTR }
930 }
931}
932impl core::fmt::Debug for ECB {
933 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
934 f.debug_struct("ECB").finish()
935 }
936}
937#[doc = "AES ECB Mode Encryption"]
938pub mod ecb;
939#[doc = "Accelerated Address Resolver"]
940pub struct AAR {
941 _marker: PhantomData<*const ()>,
942}
943unsafe impl Send for AAR {}
944impl AAR {
945 #[doc = r"Pointer to the register block"]
946 pub const PTR: *const aar::RegisterBlock = 0x4000_f000 as *const _;
947 #[doc = r"Return the pointer to the register block"]
948 #[inline(always)]
949 pub const fn ptr() -> *const aar::RegisterBlock {
950 Self::PTR
951 }
952}
953impl Deref for AAR {
954 type Target = aar::RegisterBlock;
955 #[inline(always)]
956 fn deref(&self) -> &Self::Target {
957 unsafe { &*Self::PTR }
958 }
959}
960impl core::fmt::Debug for AAR {
961 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
962 f.debug_struct("AAR").finish()
963 }
964}
965#[doc = "Accelerated Address Resolver"]
966pub mod aar;
967#[doc = "AES CCM Mode Encryption"]
968pub struct CCM {
969 _marker: PhantomData<*const ()>,
970}
971unsafe impl Send for CCM {}
972impl CCM {
973 #[doc = r"Pointer to the register block"]
974 pub const PTR: *const ccm::RegisterBlock = 0x4000_f000 as *const _;
975 #[doc = r"Return the pointer to the register block"]
976 #[inline(always)]
977 pub const fn ptr() -> *const ccm::RegisterBlock {
978 Self::PTR
979 }
980}
981impl Deref for CCM {
982 type Target = ccm::RegisterBlock;
983 #[inline(always)]
984 fn deref(&self) -> &Self::Target {
985 unsafe { &*Self::PTR }
986 }
987}
988impl core::fmt::Debug for CCM {
989 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
990 f.debug_struct("CCM").finish()
991 }
992}
993#[doc = "AES CCM Mode Encryption"]
994pub mod ccm;
995#[doc = "Watchdog Timer"]
996pub struct WDT {
997 _marker: PhantomData<*const ()>,
998}
999unsafe impl Send for WDT {}
1000impl WDT {
1001 #[doc = r"Pointer to the register block"]
1002 pub const PTR: *const wdt::RegisterBlock = 0x4001_0000 as *const _;
1003 #[doc = r"Return the pointer to the register block"]
1004 #[inline(always)]
1005 pub const fn ptr() -> *const wdt::RegisterBlock {
1006 Self::PTR
1007 }
1008}
1009impl Deref for WDT {
1010 type Target = wdt::RegisterBlock;
1011 #[inline(always)]
1012 fn deref(&self) -> &Self::Target {
1013 unsafe { &*Self::PTR }
1014 }
1015}
1016impl core::fmt::Debug for WDT {
1017 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1018 f.debug_struct("WDT").finish()
1019 }
1020}
1021#[doc = "Watchdog Timer"]
1022pub mod wdt;
1023#[doc = "Real time counter 1"]
1024pub struct RTC1 {
1025 _marker: PhantomData<*const ()>,
1026}
1027unsafe impl Send for RTC1 {}
1028impl RTC1 {
1029 #[doc = r"Pointer to the register block"]
1030 pub const PTR: *const rtc0::RegisterBlock = 0x4001_1000 as *const _;
1031 #[doc = r"Return the pointer to the register block"]
1032 #[inline(always)]
1033 pub const fn ptr() -> *const rtc0::RegisterBlock {
1034 Self::PTR
1035 }
1036}
1037impl Deref for RTC1 {
1038 type Target = rtc0::RegisterBlock;
1039 #[inline(always)]
1040 fn deref(&self) -> &Self::Target {
1041 unsafe { &*Self::PTR }
1042 }
1043}
1044impl core::fmt::Debug for RTC1 {
1045 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1046 f.debug_struct("RTC1").finish()
1047 }
1048}
1049#[doc = "Real time counter 1"]
1050pub use rtc0 as rtc1;
1051#[doc = "Quadrature Decoder"]
1052pub struct QDEC {
1053 _marker: PhantomData<*const ()>,
1054}
1055unsafe impl Send for QDEC {}
1056impl QDEC {
1057 #[doc = r"Pointer to the register block"]
1058 pub const PTR: *const qdec::RegisterBlock = 0x4001_2000 as *const _;
1059 #[doc = r"Return the pointer to the register block"]
1060 #[inline(always)]
1061 pub const fn ptr() -> *const qdec::RegisterBlock {
1062 Self::PTR
1063 }
1064}
1065impl Deref for QDEC {
1066 type Target = qdec::RegisterBlock;
1067 #[inline(always)]
1068 fn deref(&self) -> &Self::Target {
1069 unsafe { &*Self::PTR }
1070 }
1071}
1072impl core::fmt::Debug for QDEC {
1073 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1074 f.debug_struct("QDEC").finish()
1075 }
1076}
1077#[doc = "Quadrature Decoder"]
1078pub mod qdec;
1079#[doc = "Comparator"]
1080pub struct COMP {
1081 _marker: PhantomData<*const ()>,
1082}
1083unsafe impl Send for COMP {}
1084impl COMP {
1085 #[doc = r"Pointer to the register block"]
1086 pub const PTR: *const comp::RegisterBlock = 0x4001_3000 as *const _;
1087 #[doc = r"Return the pointer to the register block"]
1088 #[inline(always)]
1089 pub const fn ptr() -> *const comp::RegisterBlock {
1090 Self::PTR
1091 }
1092}
1093impl Deref for COMP {
1094 type Target = comp::RegisterBlock;
1095 #[inline(always)]
1096 fn deref(&self) -> &Self::Target {
1097 unsafe { &*Self::PTR }
1098 }
1099}
1100impl core::fmt::Debug for COMP {
1101 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1102 f.debug_struct("COMP").finish()
1103 }
1104}
1105#[doc = "Comparator"]
1106pub mod comp;
1107#[doc = "Event Generator Unit 0"]
1108pub struct EGU0 {
1109 _marker: PhantomData<*const ()>,
1110}
1111unsafe impl Send for EGU0 {}
1112impl EGU0 {
1113 #[doc = r"Pointer to the register block"]
1114 pub const PTR: *const egu0::RegisterBlock = 0x4001_4000 as *const _;
1115 #[doc = r"Return the pointer to the register block"]
1116 #[inline(always)]
1117 pub const fn ptr() -> *const egu0::RegisterBlock {
1118 Self::PTR
1119 }
1120}
1121impl Deref for EGU0 {
1122 type Target = egu0::RegisterBlock;
1123 #[inline(always)]
1124 fn deref(&self) -> &Self::Target {
1125 unsafe { &*Self::PTR }
1126 }
1127}
1128impl core::fmt::Debug for EGU0 {
1129 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1130 f.debug_struct("EGU0").finish()
1131 }
1132}
1133#[doc = "Event Generator Unit 0"]
1134pub mod egu0;
1135#[doc = "Software interrupt 0"]
1136pub struct SWI0 {
1137 _marker: PhantomData<*const ()>,
1138}
1139unsafe impl Send for SWI0 {}
1140impl SWI0 {
1141 #[doc = r"Pointer to the register block"]
1142 pub const PTR: *const swi0::RegisterBlock = 0x4001_4000 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 SWI0 {
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 SWI0 {
1157 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1158 f.debug_struct("SWI0").finish()
1159 }
1160}
1161#[doc = "Software interrupt 0"]
1162pub mod swi0;
1163#[doc = "Event Generator Unit 1"]
1164pub struct EGU1 {
1165 _marker: PhantomData<*const ()>,
1166}
1167unsafe impl Send for EGU1 {}
1168impl EGU1 {
1169 #[doc = r"Pointer to the register block"]
1170 pub const PTR: *const egu0::RegisterBlock = 0x4001_5000 as *const _;
1171 #[doc = r"Return the pointer to the register block"]
1172 #[inline(always)]
1173 pub const fn ptr() -> *const egu0::RegisterBlock {
1174 Self::PTR
1175 }
1176}
1177impl Deref for EGU1 {
1178 type Target = egu0::RegisterBlock;
1179 #[inline(always)]
1180 fn deref(&self) -> &Self::Target {
1181 unsafe { &*Self::PTR }
1182 }
1183}
1184impl core::fmt::Debug for EGU1 {
1185 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1186 f.debug_struct("EGU1").finish()
1187 }
1188}
1189#[doc = "Event Generator Unit 1"]
1190pub use egu0 as egu1;
1191#[doc = "Software interrupt 1"]
1192pub struct SWI1 {
1193 _marker: PhantomData<*const ()>,
1194}
1195unsafe impl Send for SWI1 {}
1196impl SWI1 {
1197 #[doc = r"Pointer to the register block"]
1198 pub const PTR: *const swi0::RegisterBlock = 0x4001_5000 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 SWI1 {
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 SWI1 {
1213 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1214 f.debug_struct("SWI1").finish()
1215 }
1216}
1217#[doc = "Software interrupt 1"]
1218pub use swi0 as swi1;
1219#[doc = "Software interrupt 2"]
1220pub struct SWI2 {
1221 _marker: PhantomData<*const ()>,
1222}
1223unsafe impl Send for SWI2 {}
1224impl SWI2 {
1225 #[doc = r"Pointer to the register block"]
1226 pub const PTR: *const swi0::RegisterBlock = 0x4001_6000 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 SWI2 {
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 SWI2 {
1241 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1242 f.debug_struct("SWI2").finish()
1243 }
1244}
1245#[doc = "Software interrupt 2"]
1246pub use swi0 as swi2;
1247#[doc = "Software interrupt 3"]
1248pub struct SWI3 {
1249 _marker: PhantomData<*const ()>,
1250}
1251unsafe impl Send for SWI3 {}
1252impl SWI3 {
1253 #[doc = r"Pointer to the register block"]
1254 pub const PTR: *const swi0::RegisterBlock = 0x4001_7000 as *const _;
1255 #[doc = r"Return the pointer to the register block"]
1256 #[inline(always)]
1257 pub const fn ptr() -> *const swi0::RegisterBlock {
1258 Self::PTR
1259 }
1260}
1261impl Deref for SWI3 {
1262 type Target = swi0::RegisterBlock;
1263 #[inline(always)]
1264 fn deref(&self) -> &Self::Target {
1265 unsafe { &*Self::PTR }
1266 }
1267}
1268impl core::fmt::Debug for SWI3 {
1269 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1270 f.debug_struct("SWI3").finish()
1271 }
1272}
1273#[doc = "Software interrupt 3"]
1274pub use swi0 as swi3;
1275#[doc = "Software interrupt 4"]
1276pub struct SWI4 {
1277 _marker: PhantomData<*const ()>,
1278}
1279unsafe impl Send for SWI4 {}
1280impl SWI4 {
1281 #[doc = r"Pointer to the register block"]
1282 pub const PTR: *const swi0::RegisterBlock = 0x4001_8000 as *const _;
1283 #[doc = r"Return the pointer to the register block"]
1284 #[inline(always)]
1285 pub const fn ptr() -> *const swi0::RegisterBlock {
1286 Self::PTR
1287 }
1288}
1289impl Deref for SWI4 {
1290 type Target = swi0::RegisterBlock;
1291 #[inline(always)]
1292 fn deref(&self) -> &Self::Target {
1293 unsafe { &*Self::PTR }
1294 }
1295}
1296impl core::fmt::Debug for SWI4 {
1297 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1298 f.debug_struct("SWI4").finish()
1299 }
1300}
1301#[doc = "Software interrupt 4"]
1302pub use swi0 as swi4;
1303#[doc = "Software interrupt 5"]
1304pub struct SWI5 {
1305 _marker: PhantomData<*const ()>,
1306}
1307unsafe impl Send for SWI5 {}
1308impl SWI5 {
1309 #[doc = r"Pointer to the register block"]
1310 pub const PTR: *const swi0::RegisterBlock = 0x4001_9000 as *const _;
1311 #[doc = r"Return the pointer to the register block"]
1312 #[inline(always)]
1313 pub const fn ptr() -> *const swi0::RegisterBlock {
1314 Self::PTR
1315 }
1316}
1317impl Deref for SWI5 {
1318 type Target = swi0::RegisterBlock;
1319 #[inline(always)]
1320 fn deref(&self) -> &Self::Target {
1321 unsafe { &*Self::PTR }
1322 }
1323}
1324impl core::fmt::Debug for SWI5 {
1325 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1326 f.debug_struct("SWI5").finish()
1327 }
1328}
1329#[doc = "Software interrupt 5"]
1330pub use swi0 as swi5;
1331#[doc = "Pulse width modulation unit"]
1332pub struct PWM0 {
1333 _marker: PhantomData<*const ()>,
1334}
1335unsafe impl Send for PWM0 {}
1336impl PWM0 {
1337 #[doc = r"Pointer to the register block"]
1338 pub const PTR: *const pwm0::RegisterBlock = 0x4001_c000 as *const _;
1339 #[doc = r"Return the pointer to the register block"]
1340 #[inline(always)]
1341 pub const fn ptr() -> *const pwm0::RegisterBlock {
1342 Self::PTR
1343 }
1344}
1345impl Deref for PWM0 {
1346 type Target = pwm0::RegisterBlock;
1347 #[inline(always)]
1348 fn deref(&self) -> &Self::Target {
1349 unsafe { &*Self::PTR }
1350 }
1351}
1352impl core::fmt::Debug for PWM0 {
1353 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1354 f.debug_struct("PWM0").finish()
1355 }
1356}
1357#[doc = "Pulse width modulation unit"]
1358pub mod pwm0;
1359#[doc = "Pulse Density Modulation (Digital Microphone) Interface"]
1360pub struct PDM {
1361 _marker: PhantomData<*const ()>,
1362}
1363unsafe impl Send for PDM {}
1364impl PDM {
1365 #[doc = r"Pointer to the register block"]
1366 pub const PTR: *const pdm::RegisterBlock = 0x4001_d000 as *const _;
1367 #[doc = r"Return the pointer to the register block"]
1368 #[inline(always)]
1369 pub const fn ptr() -> *const pdm::RegisterBlock {
1370 Self::PTR
1371 }
1372}
1373impl Deref for PDM {
1374 type Target = pdm::RegisterBlock;
1375 #[inline(always)]
1376 fn deref(&self) -> &Self::Target {
1377 unsafe { &*Self::PTR }
1378 }
1379}
1380impl core::fmt::Debug for PDM {
1381 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1382 f.debug_struct("PDM").finish()
1383 }
1384}
1385#[doc = "Pulse Density Modulation (Digital Microphone) Interface"]
1386pub mod pdm;
1387#[doc = "Non-volatile memory controller"]
1388pub struct NVMC {
1389 _marker: PhantomData<*const ()>,
1390}
1391unsafe impl Send for NVMC {}
1392impl NVMC {
1393 #[doc = r"Pointer to the register block"]
1394 pub const PTR: *const nvmc::RegisterBlock = 0x4001_e000 as *const _;
1395 #[doc = r"Return the pointer to the register block"]
1396 #[inline(always)]
1397 pub const fn ptr() -> *const nvmc::RegisterBlock {
1398 Self::PTR
1399 }
1400}
1401impl Deref for NVMC {
1402 type Target = nvmc::RegisterBlock;
1403 #[inline(always)]
1404 fn deref(&self) -> &Self::Target {
1405 unsafe { &*Self::PTR }
1406 }
1407}
1408impl core::fmt::Debug for NVMC {
1409 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1410 f.debug_struct("NVMC").finish()
1411 }
1412}
1413#[doc = "Non-volatile memory controller"]
1414pub mod nvmc;
1415#[doc = "Programmable Peripheral Interconnect"]
1416pub struct PPI {
1417 _marker: PhantomData<*const ()>,
1418}
1419unsafe impl Send for PPI {}
1420impl PPI {
1421 #[doc = r"Pointer to the register block"]
1422 pub const PTR: *const ppi::RegisterBlock = 0x4001_f000 as *const _;
1423 #[doc = r"Return the pointer to the register block"]
1424 #[inline(always)]
1425 pub const fn ptr() -> *const ppi::RegisterBlock {
1426 Self::PTR
1427 }
1428}
1429impl Deref for PPI {
1430 type Target = ppi::RegisterBlock;
1431 #[inline(always)]
1432 fn deref(&self) -> &Self::Target {
1433 unsafe { &*Self::PTR }
1434 }
1435}
1436impl core::fmt::Debug for PPI {
1437 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1438 f.debug_struct("PPI").finish()
1439 }
1440}
1441#[doc = "Programmable Peripheral Interconnect"]
1442pub mod ppi;
1443#[no_mangle]
1444static mut DEVICE_PERIPHERALS: bool = false;
1445#[doc = r"All the peripherals"]
1446#[allow(non_snake_case)]
1447pub struct Peripherals {
1448 #[doc = "FICR"]
1449 pub FICR: FICR,
1450 #[doc = "UICR"]
1451 pub UICR: UICR,
1452 #[doc = "BPROT"]
1453 pub BPROT: BPROT,
1454 #[doc = "CLOCK"]
1455 pub CLOCK: CLOCK,
1456 #[doc = "POWER"]
1457 pub POWER: POWER,
1458 #[doc = "P0"]
1459 pub P0: P0,
1460 #[doc = "RADIO"]
1461 pub RADIO: RADIO,
1462 #[doc = "UART0"]
1463 pub UART0: UART0,
1464 #[doc = "UARTE0"]
1465 pub UARTE0: UARTE0,
1466 #[doc = "SPI0"]
1467 pub SPI0: SPI0,
1468 #[doc = "SPIM0"]
1469 pub SPIM0: SPIM0,
1470 #[doc = "SPIS0"]
1471 pub SPIS0: SPIS0,
1472 #[doc = "TWI0"]
1473 pub TWI0: TWI0,
1474 #[doc = "TWIM0"]
1475 pub TWIM0: TWIM0,
1476 #[doc = "TWIS0"]
1477 pub TWIS0: TWIS0,
1478 #[doc = "SPI1"]
1479 pub SPI1: SPI1,
1480 #[doc = "SPIM1"]
1481 pub SPIM1: SPIM1,
1482 #[doc = "SPIS1"]
1483 pub SPIS1: SPIS1,
1484 #[doc = "GPIOTE"]
1485 pub GPIOTE: GPIOTE,
1486 #[doc = "SAADC"]
1487 pub SAADC: SAADC,
1488 #[doc = "TIMER0"]
1489 pub TIMER0: TIMER0,
1490 #[doc = "TIMER1"]
1491 pub TIMER1: TIMER1,
1492 #[doc = "TIMER2"]
1493 pub TIMER2: TIMER2,
1494 #[doc = "RTC0"]
1495 pub RTC0: RTC0,
1496 #[doc = "TEMP"]
1497 pub TEMP: TEMP,
1498 #[doc = "RNG"]
1499 pub RNG: RNG,
1500 #[doc = "ECB"]
1501 pub ECB: ECB,
1502 #[doc = "AAR"]
1503 pub AAR: AAR,
1504 #[doc = "CCM"]
1505 pub CCM: CCM,
1506 #[doc = "WDT"]
1507 pub WDT: WDT,
1508 #[doc = "RTC1"]
1509 pub RTC1: RTC1,
1510 #[doc = "QDEC"]
1511 pub QDEC: QDEC,
1512 #[doc = "COMP"]
1513 pub COMP: COMP,
1514 #[doc = "EGU0"]
1515 pub EGU0: EGU0,
1516 #[doc = "SWI0"]
1517 pub SWI0: SWI0,
1518 #[doc = "EGU1"]
1519 pub EGU1: EGU1,
1520 #[doc = "SWI1"]
1521 pub SWI1: SWI1,
1522 #[doc = "SWI2"]
1523 pub SWI2: SWI2,
1524 #[doc = "SWI3"]
1525 pub SWI3: SWI3,
1526 #[doc = "SWI4"]
1527 pub SWI4: SWI4,
1528 #[doc = "SWI5"]
1529 pub SWI5: SWI5,
1530 #[doc = "PWM0"]
1531 pub PWM0: PWM0,
1532 #[doc = "PDM"]
1533 pub PDM: PDM,
1534 #[doc = "NVMC"]
1535 pub NVMC: NVMC,
1536 #[doc = "PPI"]
1537 pub PPI: PPI,
1538}
1539impl Peripherals {
1540 #[doc = r"Returns all the peripherals *once*"]
1541 #[inline]
1542 pub fn take() -> Option<Self> {
1543 cortex_m::interrupt::free(|_| {
1544 if unsafe { DEVICE_PERIPHERALS } {
1545 None
1546 } else {
1547 Some(unsafe { Peripherals::steal() })
1548 }
1549 })
1550 }
1551 #[doc = r"Unchecked version of `Peripherals::take`"]
1552 #[inline]
1553 pub unsafe fn steal() -> Self {
1554 DEVICE_PERIPHERALS = true;
1555 Peripherals {
1556 FICR: FICR {
1557 _marker: PhantomData,
1558 },
1559 UICR: UICR {
1560 _marker: PhantomData,
1561 },
1562 BPROT: BPROT {
1563 _marker: PhantomData,
1564 },
1565 CLOCK: CLOCK {
1566 _marker: PhantomData,
1567 },
1568 POWER: POWER {
1569 _marker: PhantomData,
1570 },
1571 P0: P0 {
1572 _marker: PhantomData,
1573 },
1574 RADIO: RADIO {
1575 _marker: PhantomData,
1576 },
1577 UART0: UART0 {
1578 _marker: PhantomData,
1579 },
1580 UARTE0: UARTE0 {
1581 _marker: PhantomData,
1582 },
1583 SPI0: SPI0 {
1584 _marker: PhantomData,
1585 },
1586 SPIM0: SPIM0 {
1587 _marker: PhantomData,
1588 },
1589 SPIS0: SPIS0 {
1590 _marker: PhantomData,
1591 },
1592 TWI0: TWI0 {
1593 _marker: PhantomData,
1594 },
1595 TWIM0: TWIM0 {
1596 _marker: PhantomData,
1597 },
1598 TWIS0: TWIS0 {
1599 _marker: PhantomData,
1600 },
1601 SPI1: SPI1 {
1602 _marker: PhantomData,
1603 },
1604 SPIM1: SPIM1 {
1605 _marker: PhantomData,
1606 },
1607 SPIS1: SPIS1 {
1608 _marker: PhantomData,
1609 },
1610 GPIOTE: GPIOTE {
1611 _marker: PhantomData,
1612 },
1613 SAADC: SAADC {
1614 _marker: PhantomData,
1615 },
1616 TIMER0: TIMER0 {
1617 _marker: PhantomData,
1618 },
1619 TIMER1: TIMER1 {
1620 _marker: PhantomData,
1621 },
1622 TIMER2: TIMER2 {
1623 _marker: PhantomData,
1624 },
1625 RTC0: RTC0 {
1626 _marker: PhantomData,
1627 },
1628 TEMP: TEMP {
1629 _marker: PhantomData,
1630 },
1631 RNG: RNG {
1632 _marker: PhantomData,
1633 },
1634 ECB: ECB {
1635 _marker: PhantomData,
1636 },
1637 AAR: AAR {
1638 _marker: PhantomData,
1639 },
1640 CCM: CCM {
1641 _marker: PhantomData,
1642 },
1643 WDT: WDT {
1644 _marker: PhantomData,
1645 },
1646 RTC1: RTC1 {
1647 _marker: PhantomData,
1648 },
1649 QDEC: QDEC {
1650 _marker: PhantomData,
1651 },
1652 COMP: COMP {
1653 _marker: PhantomData,
1654 },
1655 EGU0: EGU0 {
1656 _marker: PhantomData,
1657 },
1658 SWI0: SWI0 {
1659 _marker: PhantomData,
1660 },
1661 EGU1: EGU1 {
1662 _marker: PhantomData,
1663 },
1664 SWI1: SWI1 {
1665 _marker: PhantomData,
1666 },
1667 SWI2: SWI2 {
1668 _marker: PhantomData,
1669 },
1670 SWI3: SWI3 {
1671 _marker: PhantomData,
1672 },
1673 SWI4: SWI4 {
1674 _marker: PhantomData,
1675 },
1676 SWI5: SWI5 {
1677 _marker: PhantomData,
1678 },
1679 PWM0: PWM0 {
1680 _marker: PhantomData,
1681 },
1682 PDM: PDM {
1683 _marker: PhantomData,
1684 },
1685 NVMC: NVMC {
1686 _marker: PhantomData,
1687 },
1688 PPI: PPI {
1689 _marker: PhantomData,
1690 },
1691 }
1692 }
1693}