1#![doc = "Peripheral access API for MAX78000 microcontrollers (generated using svd2rust v0.35.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
2svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.35.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
3#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5#![no_std]
6use core::marker::PhantomData;
7use core::ops::Deref;
8#[doc = r"Number available in the NVIC for configuring priority"]
9pub const NVIC_PRIO_BITS: u8 = 3;
10pub use cortex_m::peripheral::Peripherals as CorePeripherals;
11pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU};
12#[allow(unused_imports)]
13use generic::*;
14#[doc = r"Common register and bit access and modify traits"]
15pub mod generic;
16#[cfg(feature = "rt")]
17extern "C" {
18 fn WDT0();
19 fn RTC();
20 fn TRNG();
21 fn TMR0();
22 fn TMR1();
23 fn TMR2();
24 fn TMR3();
25 fn TMR4();
26 fn TMR5();
27 fn I2C0();
28 fn UART0();
29 fn UART1();
30 fn SPI1();
31 fn ADC();
32 fn FLC0();
33 fn GPIO0();
34 fn GPIO1();
35 fn GPIO2();
36 fn DMA0();
37 fn DMA1();
38 fn DMA2();
39 fn DMA3();
40 fn UART2();
41 fn I2C1();
42 fn WUT();
43 fn SPI0();
44 fn WDT1();
45 fn PT();
46 fn I2C2();
47 fn OWM();
48 fn DVS();
49 fn UART3();
50 fn PCIF();
51 fn AES();
52 fn I2S();
53 fn LPCMP();
54}
55#[doc(hidden)]
56#[repr(C)]
57pub union Vector {
58 _handler: unsafe extern "C" fn(),
59 _reserved: u32,
60}
61#[cfg(feature = "rt")]
62#[doc(hidden)]
63#[link_section = ".vector_table.interrupts"]
64#[no_mangle]
65pub static __INTERRUPTS: [Vector; 104] = [
66 Vector { _reserved: 0 },
67 Vector { _handler: WDT0 },
68 Vector { _reserved: 0 },
69 Vector { _handler: RTC },
70 Vector { _handler: TRNG },
71 Vector { _handler: TMR0 },
72 Vector { _handler: TMR1 },
73 Vector { _handler: TMR2 },
74 Vector { _handler: TMR3 },
75 Vector { _handler: TMR4 },
76 Vector { _handler: TMR5 },
77 Vector { _reserved: 0 },
78 Vector { _reserved: 0 },
79 Vector { _handler: I2C0 },
80 Vector { _handler: UART0 },
81 Vector { _handler: UART1 },
82 Vector { _handler: SPI1 },
83 Vector { _reserved: 0 },
84 Vector { _reserved: 0 },
85 Vector { _reserved: 0 },
86 Vector { _handler: ADC },
87 Vector { _reserved: 0 },
88 Vector { _reserved: 0 },
89 Vector { _handler: FLC0 },
90 Vector { _handler: GPIO0 },
91 Vector { _handler: GPIO1 },
92 Vector { _handler: GPIO2 },
93 Vector { _reserved: 0 },
94 Vector { _handler: DMA0 },
95 Vector { _handler: DMA1 },
96 Vector { _handler: DMA2 },
97 Vector { _handler: DMA3 },
98 Vector { _reserved: 0 },
99 Vector { _reserved: 0 },
100 Vector { _handler: UART2 },
101 Vector { _reserved: 0 },
102 Vector { _handler: I2C1 },
103 Vector { _reserved: 0 },
104 Vector { _reserved: 0 },
105 Vector { _reserved: 0 },
106 Vector { _reserved: 0 },
107 Vector { _reserved: 0 },
108 Vector { _reserved: 0 },
109 Vector { _reserved: 0 },
110 Vector { _reserved: 0 },
111 Vector { _reserved: 0 },
112 Vector { _reserved: 0 },
113 Vector { _reserved: 0 },
114 Vector { _reserved: 0 },
115 Vector { _reserved: 0 },
116 Vector { _reserved: 0 },
117 Vector { _reserved: 0 },
118 Vector { _reserved: 0 },
119 Vector { _handler: WUT },
120 Vector { _reserved: 0 },
121 Vector { _reserved: 0 },
122 Vector { _handler: SPI0 },
123 Vector { _handler: WDT1 },
124 Vector { _reserved: 0 },
125 Vector { _handler: PT },
126 Vector { _reserved: 0 },
127 Vector { _reserved: 0 },
128 Vector { _handler: I2C2 },
129 Vector { _reserved: 0 },
130 Vector { _reserved: 0 },
131 Vector { _reserved: 0 },
132 Vector { _reserved: 0 },
133 Vector { _handler: OWM },
134 Vector { _reserved: 0 },
135 Vector { _reserved: 0 },
136 Vector { _reserved: 0 },
137 Vector { _reserved: 0 },
138 Vector { _reserved: 0 },
139 Vector { _reserved: 0 },
140 Vector { _reserved: 0 },
141 Vector { _reserved: 0 },
142 Vector { _reserved: 0 },
143 Vector { _reserved: 0 },
144 Vector { _reserved: 0 },
145 Vector { _reserved: 0 },
146 Vector { _reserved: 0 },
147 Vector { _reserved: 0 },
148 Vector { _reserved: 0 },
149 Vector { _handler: DVS },
150 Vector { _reserved: 0 },
151 Vector { _reserved: 0 },
152 Vector { _reserved: 0 },
153 Vector { _reserved: 0 },
154 Vector { _handler: UART3 },
155 Vector { _reserved: 0 },
156 Vector { _reserved: 0 },
157 Vector { _handler: PCIF },
158 Vector { _reserved: 0 },
159 Vector { _reserved: 0 },
160 Vector { _reserved: 0 },
161 Vector { _reserved: 0 },
162 Vector { _reserved: 0 },
163 Vector { _handler: AES },
164 Vector { _reserved: 0 },
165 Vector { _handler: I2S },
166 Vector { _reserved: 0 },
167 Vector { _reserved: 0 },
168 Vector { _reserved: 0 },
169 Vector { _handler: LPCMP },
170];
171#[doc = r"Enumeration of all the interrupts."]
172#[derive(Copy, Clone, Debug, PartialEq, Eq)]
173#[repr(u16)]
174pub enum Interrupt {
175 #[doc = "1 - WDT0"]
176 WDT0 = 1,
177 #[doc = "3 - RTC interrupt."]
178 RTC = 3,
179 #[doc = "4 - TRNG interrupt."]
180 TRNG = 4,
181 #[doc = "5 - TMR0"]
182 TMR0 = 5,
183 #[doc = "6 - TMR1 IRQ"]
184 TMR1 = 6,
185 #[doc = "7 - TMR2 IRQ"]
186 TMR2 = 7,
187 #[doc = "8 - TMR3 IRQ"]
188 TMR3 = 8,
189 #[doc = "9 - TMR4 IRQ"]
190 TMR4 = 9,
191 #[doc = "10 - TMR5 IRQ"]
192 TMR5 = 10,
193 #[doc = "13 - I2C0 IRQ"]
194 I2C0 = 13,
195 #[doc = "14 - UART0"]
196 UART0 = 14,
197 #[doc = "15 - UART1"]
198 UART1 = 15,
199 #[doc = "16 - SPI1 IRQ"]
200 SPI1 = 16,
201 #[doc = "20 - ADC IRQ"]
202 ADC = 20,
203 #[doc = "23 - Flash Controller interrupt."]
204 FLC0 = 23,
205 #[doc = "24 - GPIO0 interrupt."]
206 GPIO0 = 24,
207 #[doc = "25 - GPIO1 IRQ"]
208 GPIO1 = 25,
209 #[doc = "26 - GPIO2 IRQ"]
210 GPIO2 = 26,
211 #[doc = "28 - DMA0"]
212 DMA0 = 28,
213 #[doc = "29 - DMA1"]
214 DMA1 = 29,
215 #[doc = "30 - DMA2"]
216 DMA2 = 30,
217 #[doc = "31 - DMA3"]
218 DMA3 = 31,
219 #[doc = "34 - UART2"]
220 UART2 = 34,
221 #[doc = "36 - I2C1 IRQ"]
222 I2C1 = 36,
223 #[doc = "53 - WUT IRQ"]
224 WUT = 53,
225 #[doc = "56 - SPI0"]
226 SPI0 = 56,
227 #[doc = "57 - WDT1 IRQ"]
228 WDT1 = 57,
229 #[doc = "59 - Pulse Train IRQ"]
230 PT = 59,
231 #[doc = "62 - I2C2 IRQ"]
232 I2C2 = 62,
233 #[doc = "67 - OWM"]
234 OWM = 67,
235 #[doc = "83 - Dynamic Voltage Scaling Interrupt"]
236 DVS = 83,
237 #[doc = "88 - UART3"]
238 UART3 = 88,
239 #[doc = "91 - PCIF"]
240 PCIF = 91,
241 #[doc = "97 - AES"]
242 AES = 97,
243 #[doc = "99 - I2S IRQ"]
244 I2S = 99,
245 #[doc = "103 - Low Power Comparato"]
246 LPCMP = 103,
247}
248unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
249 #[inline(always)]
250 fn number(self) -> u16 {
251 self as u16
252 }
253}
254#[doc = "10-bit Analog to Digital Converter"]
255pub struct Adc {
256 _marker: PhantomData<*const ()>,
257}
258unsafe impl Send for Adc {}
259impl Adc {
260 #[doc = r"Pointer to the register block"]
261 pub const PTR: *const adc::RegisterBlock = 0x4003_4000 as *const _;
262 #[doc = r"Return the pointer to the register block"]
263 #[inline(always)]
264 pub const fn ptr() -> *const adc::RegisterBlock {
265 Self::PTR
266 }
267 #[doc = r" Steal an instance of this peripheral"]
268 #[doc = r""]
269 #[doc = r" # Safety"]
270 #[doc = r""]
271 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
272 #[doc = r" that may race with any existing instances, for example by only"]
273 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
274 #[doc = r" original peripheral and using critical sections to coordinate"]
275 #[doc = r" access between multiple new instances."]
276 #[doc = r""]
277 #[doc = r" Additionally, other software such as HALs may rely on only one"]
278 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
279 #[doc = r" no stolen instances are passed to such software."]
280 pub unsafe fn steal() -> Self {
281 Self {
282 _marker: PhantomData,
283 }
284 }
285}
286impl Deref for Adc {
287 type Target = adc::RegisterBlock;
288 #[inline(always)]
289 fn deref(&self) -> &Self::Target {
290 unsafe { &*Self::PTR }
291 }
292}
293impl core::fmt::Debug for Adc {
294 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
295 f.debug_struct("Adc").finish()
296 }
297}
298#[doc = "10-bit Analog to Digital Converter"]
299pub mod adc;
300#[doc = "AES Keys."]
301pub struct Aes {
302 _marker: PhantomData<*const ()>,
303}
304unsafe impl Send for Aes {}
305impl Aes {
306 #[doc = r"Pointer to the register block"]
307 pub const PTR: *const aes::RegisterBlock = 0x4000_7400 as *const _;
308 #[doc = r"Return the pointer to the register block"]
309 #[inline(always)]
310 pub const fn ptr() -> *const aes::RegisterBlock {
311 Self::PTR
312 }
313 #[doc = r" Steal an instance of this peripheral"]
314 #[doc = r""]
315 #[doc = r" # Safety"]
316 #[doc = r""]
317 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
318 #[doc = r" that may race with any existing instances, for example by only"]
319 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
320 #[doc = r" original peripheral and using critical sections to coordinate"]
321 #[doc = r" access between multiple new instances."]
322 #[doc = r""]
323 #[doc = r" Additionally, other software such as HALs may rely on only one"]
324 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
325 #[doc = r" no stolen instances are passed to such software."]
326 pub unsafe fn steal() -> Self {
327 Self {
328 _marker: PhantomData,
329 }
330 }
331}
332impl Deref for Aes {
333 type Target = aes::RegisterBlock;
334 #[inline(always)]
335 fn deref(&self) -> &Self::Target {
336 unsafe { &*Self::PTR }
337 }
338}
339impl core::fmt::Debug for Aes {
340 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
341 f.debug_struct("Aes").finish()
342 }
343}
344#[doc = "AES Keys."]
345pub mod aes;
346#[doc = "AES Key Registers."]
347pub struct Aeskeys {
348 _marker: PhantomData<*const ()>,
349}
350unsafe impl Send for Aeskeys {}
351impl Aeskeys {
352 #[doc = r"Pointer to the register block"]
353 pub const PTR: *const aeskeys::RegisterBlock = 0x4000_7800 as *const _;
354 #[doc = r"Return the pointer to the register block"]
355 #[inline(always)]
356 pub const fn ptr() -> *const aeskeys::RegisterBlock {
357 Self::PTR
358 }
359 #[doc = r" Steal an instance of this peripheral"]
360 #[doc = r""]
361 #[doc = r" # Safety"]
362 #[doc = r""]
363 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
364 #[doc = r" that may race with any existing instances, for example by only"]
365 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
366 #[doc = r" original peripheral and using critical sections to coordinate"]
367 #[doc = r" access between multiple new instances."]
368 #[doc = r""]
369 #[doc = r" Additionally, other software such as HALs may rely on only one"]
370 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
371 #[doc = r" no stolen instances are passed to such software."]
372 pub unsafe fn steal() -> Self {
373 Self {
374 _marker: PhantomData,
375 }
376 }
377}
378impl Deref for Aeskeys {
379 type Target = aeskeys::RegisterBlock;
380 #[inline(always)]
381 fn deref(&self) -> &Self::Target {
382 unsafe { &*Self::PTR }
383 }
384}
385impl core::fmt::Debug for Aeskeys {
386 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
387 f.debug_struct("Aeskeys").finish()
388 }
389}
390#[doc = "AES Key Registers."]
391pub mod aeskeys;
392#[doc = "Parallel Camera Interface."]
393pub struct Cameraif {
394 _marker: PhantomData<*const ()>,
395}
396unsafe impl Send for Cameraif {}
397impl Cameraif {
398 #[doc = r"Pointer to the register block"]
399 pub const PTR: *const cameraif::RegisterBlock = 0x4000_e000 as *const _;
400 #[doc = r"Return the pointer to the register block"]
401 #[inline(always)]
402 pub const fn ptr() -> *const cameraif::RegisterBlock {
403 Self::PTR
404 }
405 #[doc = r" Steal an instance of this peripheral"]
406 #[doc = r""]
407 #[doc = r" # Safety"]
408 #[doc = r""]
409 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
410 #[doc = r" that may race with any existing instances, for example by only"]
411 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
412 #[doc = r" original peripheral and using critical sections to coordinate"]
413 #[doc = r" access between multiple new instances."]
414 #[doc = r""]
415 #[doc = r" Additionally, other software such as HALs may rely on only one"]
416 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
417 #[doc = r" no stolen instances are passed to such software."]
418 pub unsafe fn steal() -> Self {
419 Self {
420 _marker: PhantomData,
421 }
422 }
423}
424impl Deref for Cameraif {
425 type Target = cameraif::RegisterBlock;
426 #[inline(always)]
427 fn deref(&self) -> &Self::Target {
428 unsafe { &*Self::PTR }
429 }
430}
431impl core::fmt::Debug for Cameraif {
432 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
433 f.debug_struct("Cameraif").finish()
434 }
435}
436#[doc = "Parallel Camera Interface."]
437pub mod cameraif;
438#[doc = "CRC Registers."]
439pub struct Crc {
440 _marker: PhantomData<*const ()>,
441}
442unsafe impl Send for Crc {}
443impl Crc {
444 #[doc = r"Pointer to the register block"]
445 pub const PTR: *const crc::RegisterBlock = 0x4000_f000 as *const _;
446 #[doc = r"Return the pointer to the register block"]
447 #[inline(always)]
448 pub const fn ptr() -> *const crc::RegisterBlock {
449 Self::PTR
450 }
451 #[doc = r" Steal an instance of this peripheral"]
452 #[doc = r""]
453 #[doc = r" # Safety"]
454 #[doc = r""]
455 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
456 #[doc = r" that may race with any existing instances, for example by only"]
457 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
458 #[doc = r" original peripheral and using critical sections to coordinate"]
459 #[doc = r" access between multiple new instances."]
460 #[doc = r""]
461 #[doc = r" Additionally, other software such as HALs may rely on only one"]
462 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
463 #[doc = r" no stolen instances are passed to such software."]
464 pub unsafe fn steal() -> Self {
465 Self {
466 _marker: PhantomData,
467 }
468 }
469}
470impl Deref for Crc {
471 type Target = crc::RegisterBlock;
472 #[inline(always)]
473 fn deref(&self) -> &Self::Target {
474 unsafe { &*Self::PTR }
475 }
476}
477impl core::fmt::Debug for Crc {
478 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
479 f.debug_struct("Crc").finish()
480 }
481}
482#[doc = "CRC Registers."]
483pub mod crc;
484#[doc = "DMA Controller Fully programmable, chaining capable DMA channels."]
485pub struct Dma {
486 _marker: PhantomData<*const ()>,
487}
488unsafe impl Send for Dma {}
489impl Dma {
490 #[doc = r"Pointer to the register block"]
491 pub const PTR: *const dma::RegisterBlock = 0x4002_8000 as *const _;
492 #[doc = r"Return the pointer to the register block"]
493 #[inline(always)]
494 pub const fn ptr() -> *const dma::RegisterBlock {
495 Self::PTR
496 }
497 #[doc = r" Steal an instance of this peripheral"]
498 #[doc = r""]
499 #[doc = r" # Safety"]
500 #[doc = r""]
501 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
502 #[doc = r" that may race with any existing instances, for example by only"]
503 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
504 #[doc = r" original peripheral and using critical sections to coordinate"]
505 #[doc = r" access between multiple new instances."]
506 #[doc = r""]
507 #[doc = r" Additionally, other software such as HALs may rely on only one"]
508 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
509 #[doc = r" no stolen instances are passed to such software."]
510 pub unsafe fn steal() -> Self {
511 Self {
512 _marker: PhantomData,
513 }
514 }
515}
516impl Deref for Dma {
517 type Target = dma::RegisterBlock;
518 #[inline(always)]
519 fn deref(&self) -> &Self::Target {
520 unsafe { &*Self::PTR }
521 }
522}
523impl core::fmt::Debug for Dma {
524 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
525 f.debug_struct("Dma").finish()
526 }
527}
528#[doc = "DMA Controller Fully programmable, chaining capable DMA channels."]
529pub mod dma;
530#[doc = "Dynamic Voltage Scaling"]
531pub struct Dvs {
532 _marker: PhantomData<*const ()>,
533}
534unsafe impl Send for Dvs {}
535impl Dvs {
536 #[doc = r"Pointer to the register block"]
537 pub const PTR: *const dvs::RegisterBlock = 0x4000_3c00 as *const _;
538 #[doc = r"Return the pointer to the register block"]
539 #[inline(always)]
540 pub const fn ptr() -> *const dvs::RegisterBlock {
541 Self::PTR
542 }
543 #[doc = r" Steal an instance of this peripheral"]
544 #[doc = r""]
545 #[doc = r" # Safety"]
546 #[doc = r""]
547 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
548 #[doc = r" that may race with any existing instances, for example by only"]
549 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
550 #[doc = r" original peripheral and using critical sections to coordinate"]
551 #[doc = r" access between multiple new instances."]
552 #[doc = r""]
553 #[doc = r" Additionally, other software such as HALs may rely on only one"]
554 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
555 #[doc = r" no stolen instances are passed to such software."]
556 pub unsafe fn steal() -> Self {
557 Self {
558 _marker: PhantomData,
559 }
560 }
561}
562impl Deref for Dvs {
563 type Target = dvs::RegisterBlock;
564 #[inline(always)]
565 fn deref(&self) -> &Self::Target {
566 unsafe { &*Self::PTR }
567 }
568}
569impl core::fmt::Debug for Dvs {
570 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
571 f.debug_struct("Dvs").finish()
572 }
573}
574#[doc = "Dynamic Voltage Scaling"]
575pub mod dvs;
576#[doc = "Function Control Register."]
577pub struct Fcr {
578 _marker: PhantomData<*const ()>,
579}
580unsafe impl Send for Fcr {}
581impl Fcr {
582 #[doc = r"Pointer to the register block"]
583 pub const PTR: *const fcr::RegisterBlock = 0x4000_0800 as *const _;
584 #[doc = r"Return the pointer to the register block"]
585 #[inline(always)]
586 pub const fn ptr() -> *const fcr::RegisterBlock {
587 Self::PTR
588 }
589 #[doc = r" Steal an instance of this peripheral"]
590 #[doc = r""]
591 #[doc = r" # Safety"]
592 #[doc = r""]
593 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
594 #[doc = r" that may race with any existing instances, for example by only"]
595 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
596 #[doc = r" original peripheral and using critical sections to coordinate"]
597 #[doc = r" access between multiple new instances."]
598 #[doc = r""]
599 #[doc = r" Additionally, other software such as HALs may rely on only one"]
600 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
601 #[doc = r" no stolen instances are passed to such software."]
602 pub unsafe fn steal() -> Self {
603 Self {
604 _marker: PhantomData,
605 }
606 }
607}
608impl Deref for Fcr {
609 type Target = fcr::RegisterBlock;
610 #[inline(always)]
611 fn deref(&self) -> &Self::Target {
612 unsafe { &*Self::PTR }
613 }
614}
615impl core::fmt::Debug for Fcr {
616 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
617 f.debug_struct("Fcr").finish()
618 }
619}
620#[doc = "Function Control Register."]
621pub mod fcr;
622#[doc = "Flash Memory Control."]
623pub struct Flc {
624 _marker: PhantomData<*const ()>,
625}
626unsafe impl Send for Flc {}
627impl Flc {
628 #[doc = r"Pointer to the register block"]
629 pub const PTR: *const flc::RegisterBlock = 0x4002_9000 as *const _;
630 #[doc = r"Return the pointer to the register block"]
631 #[inline(always)]
632 pub const fn ptr() -> *const flc::RegisterBlock {
633 Self::PTR
634 }
635 #[doc = r" Steal an instance of this peripheral"]
636 #[doc = r""]
637 #[doc = r" # Safety"]
638 #[doc = r""]
639 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
640 #[doc = r" that may race with any existing instances, for example by only"]
641 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
642 #[doc = r" original peripheral and using critical sections to coordinate"]
643 #[doc = r" access between multiple new instances."]
644 #[doc = r""]
645 #[doc = r" Additionally, other software such as HALs may rely on only one"]
646 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
647 #[doc = r" no stolen instances are passed to such software."]
648 pub unsafe fn steal() -> Self {
649 Self {
650 _marker: PhantomData,
651 }
652 }
653}
654impl Deref for Flc {
655 type Target = flc::RegisterBlock;
656 #[inline(always)]
657 fn deref(&self) -> &Self::Target {
658 unsafe { &*Self::PTR }
659 }
660}
661impl core::fmt::Debug for Flc {
662 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
663 f.debug_struct("Flc").finish()
664 }
665}
666#[doc = "Flash Memory Control."]
667pub mod flc;
668#[doc = "Global Control Registers."]
669pub struct Gcr {
670 _marker: PhantomData<*const ()>,
671}
672unsafe impl Send for Gcr {}
673impl Gcr {
674 #[doc = r"Pointer to the register block"]
675 pub const PTR: *const gcr::RegisterBlock = 0x4000_0000 as *const _;
676 #[doc = r"Return the pointer to the register block"]
677 #[inline(always)]
678 pub const fn ptr() -> *const gcr::RegisterBlock {
679 Self::PTR
680 }
681 #[doc = r" Steal an instance of this peripheral"]
682 #[doc = r""]
683 #[doc = r" # Safety"]
684 #[doc = r""]
685 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
686 #[doc = r" that may race with any existing instances, for example by only"]
687 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
688 #[doc = r" original peripheral and using critical sections to coordinate"]
689 #[doc = r" access between multiple new instances."]
690 #[doc = r""]
691 #[doc = r" Additionally, other software such as HALs may rely on only one"]
692 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
693 #[doc = r" no stolen instances are passed to such software."]
694 pub unsafe fn steal() -> Self {
695 Self {
696 _marker: PhantomData,
697 }
698 }
699}
700impl Deref for Gcr {
701 type Target = gcr::RegisterBlock;
702 #[inline(always)]
703 fn deref(&self) -> &Self::Target {
704 unsafe { &*Self::PTR }
705 }
706}
707impl core::fmt::Debug for Gcr {
708 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
709 f.debug_struct("Gcr").finish()
710 }
711}
712#[doc = "Global Control Registers."]
713pub mod gcr;
714#[doc = "Global Control Function Register."]
715pub struct Gcfr {
716 _marker: PhantomData<*const ()>,
717}
718unsafe impl Send for Gcfr {}
719impl Gcfr {
720 #[doc = r"Pointer to the register block"]
721 pub const PTR: *const gcfr::RegisterBlock = 0x4000_5800 as *const _;
722 #[doc = r"Return the pointer to the register block"]
723 #[inline(always)]
724 pub const fn ptr() -> *const gcfr::RegisterBlock {
725 Self::PTR
726 }
727 #[doc = r" Steal an instance of this peripheral"]
728 #[doc = r""]
729 #[doc = r" # Safety"]
730 #[doc = r""]
731 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
732 #[doc = r" that may race with any existing instances, for example by only"]
733 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
734 #[doc = r" original peripheral and using critical sections to coordinate"]
735 #[doc = r" access between multiple new instances."]
736 #[doc = r""]
737 #[doc = r" Additionally, other software such as HALs may rely on only one"]
738 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
739 #[doc = r" no stolen instances are passed to such software."]
740 pub unsafe fn steal() -> Self {
741 Self {
742 _marker: PhantomData,
743 }
744 }
745}
746impl Deref for Gcfr {
747 type Target = gcfr::RegisterBlock;
748 #[inline(always)]
749 fn deref(&self) -> &Self::Target {
750 unsafe { &*Self::PTR }
751 }
752}
753impl core::fmt::Debug for Gcfr {
754 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
755 f.debug_struct("Gcfr").finish()
756 }
757}
758#[doc = "Global Control Function Register."]
759pub mod gcfr;
760#[doc = "Individual I/O for each GPIO"]
761pub struct Gpio0 {
762 _marker: PhantomData<*const ()>,
763}
764unsafe impl Send for Gpio0 {}
765impl Gpio0 {
766 #[doc = r"Pointer to the register block"]
767 pub const PTR: *const gpio0::RegisterBlock = 0x4000_8000 as *const _;
768 #[doc = r"Return the pointer to the register block"]
769 #[inline(always)]
770 pub const fn ptr() -> *const gpio0::RegisterBlock {
771 Self::PTR
772 }
773 #[doc = r" Steal an instance of this peripheral"]
774 #[doc = r""]
775 #[doc = r" # Safety"]
776 #[doc = r""]
777 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
778 #[doc = r" that may race with any existing instances, for example by only"]
779 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
780 #[doc = r" original peripheral and using critical sections to coordinate"]
781 #[doc = r" access between multiple new instances."]
782 #[doc = r""]
783 #[doc = r" Additionally, other software such as HALs may rely on only one"]
784 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
785 #[doc = r" no stolen instances are passed to such software."]
786 pub unsafe fn steal() -> Self {
787 Self {
788 _marker: PhantomData,
789 }
790 }
791}
792impl Deref for Gpio0 {
793 type Target = gpio0::RegisterBlock;
794 #[inline(always)]
795 fn deref(&self) -> &Self::Target {
796 unsafe { &*Self::PTR }
797 }
798}
799impl core::fmt::Debug for Gpio0 {
800 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
801 f.debug_struct("Gpio0").finish()
802 }
803}
804#[doc = "Individual I/O for each GPIO"]
805pub mod gpio0;
806#[doc = "Individual I/O for each GPIO 1"]
807pub struct Gpio1 {
808 _marker: PhantomData<*const ()>,
809}
810unsafe impl Send for Gpio1 {}
811impl Gpio1 {
812 #[doc = r"Pointer to the register block"]
813 pub const PTR: *const gpio0::RegisterBlock = 0x4000_9000 as *const _;
814 #[doc = r"Return the pointer to the register block"]
815 #[inline(always)]
816 pub const fn ptr() -> *const gpio0::RegisterBlock {
817 Self::PTR
818 }
819 #[doc = r" Steal an instance of this peripheral"]
820 #[doc = r""]
821 #[doc = r" # Safety"]
822 #[doc = r""]
823 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
824 #[doc = r" that may race with any existing instances, for example by only"]
825 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
826 #[doc = r" original peripheral and using critical sections to coordinate"]
827 #[doc = r" access between multiple new instances."]
828 #[doc = r""]
829 #[doc = r" Additionally, other software such as HALs may rely on only one"]
830 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
831 #[doc = r" no stolen instances are passed to such software."]
832 pub unsafe fn steal() -> Self {
833 Self {
834 _marker: PhantomData,
835 }
836 }
837}
838impl Deref for Gpio1 {
839 type Target = gpio0::RegisterBlock;
840 #[inline(always)]
841 fn deref(&self) -> &Self::Target {
842 unsafe { &*Self::PTR }
843 }
844}
845impl core::fmt::Debug for Gpio1 {
846 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
847 f.debug_struct("Gpio1").finish()
848 }
849}
850#[doc = "Individual I/O for each GPIO 1"]
851pub use self::gpio0 as gpio1;
852#[doc = "Individual I/O for each GPIO 2"]
853pub struct Gpio2 {
854 _marker: PhantomData<*const ()>,
855}
856unsafe impl Send for Gpio2 {}
857impl Gpio2 {
858 #[doc = r"Pointer to the register block"]
859 pub const PTR: *const gpio0::RegisterBlock = 0x4008_0400 as *const _;
860 #[doc = r"Return the pointer to the register block"]
861 #[inline(always)]
862 pub const fn ptr() -> *const gpio0::RegisterBlock {
863 Self::PTR
864 }
865 #[doc = r" Steal an instance of this peripheral"]
866 #[doc = r""]
867 #[doc = r" # Safety"]
868 #[doc = r""]
869 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
870 #[doc = r" that may race with any existing instances, for example by only"]
871 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
872 #[doc = r" original peripheral and using critical sections to coordinate"]
873 #[doc = r" access between multiple new instances."]
874 #[doc = r""]
875 #[doc = r" Additionally, other software such as HALs may rely on only one"]
876 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
877 #[doc = r" no stolen instances are passed to such software."]
878 pub unsafe fn steal() -> Self {
879 Self {
880 _marker: PhantomData,
881 }
882 }
883}
884impl Deref for Gpio2 {
885 type Target = gpio0::RegisterBlock;
886 #[inline(always)]
887 fn deref(&self) -> &Self::Target {
888 unsafe { &*Self::PTR }
889 }
890}
891impl core::fmt::Debug for Gpio2 {
892 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
893 f.debug_struct("Gpio2").finish()
894 }
895}
896#[doc = "Individual I/O for each GPIO 2"]
897pub use self::gpio0 as gpio2;
898#[doc = "Inter-Integrated Circuit."]
899pub struct I2c0 {
900 _marker: PhantomData<*const ()>,
901}
902unsafe impl Send for I2c0 {}
903impl I2c0 {
904 #[doc = r"Pointer to the register block"]
905 pub const PTR: *const i2c0::RegisterBlock = 0x4001_d000 as *const _;
906 #[doc = r"Return the pointer to the register block"]
907 #[inline(always)]
908 pub const fn ptr() -> *const i2c0::RegisterBlock {
909 Self::PTR
910 }
911 #[doc = r" Steal an instance of this peripheral"]
912 #[doc = r""]
913 #[doc = r" # Safety"]
914 #[doc = r""]
915 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
916 #[doc = r" that may race with any existing instances, for example by only"]
917 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
918 #[doc = r" original peripheral and using critical sections to coordinate"]
919 #[doc = r" access between multiple new instances."]
920 #[doc = r""]
921 #[doc = r" Additionally, other software such as HALs may rely on only one"]
922 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
923 #[doc = r" no stolen instances are passed to such software."]
924 pub unsafe fn steal() -> Self {
925 Self {
926 _marker: PhantomData,
927 }
928 }
929}
930impl Deref for I2c0 {
931 type Target = i2c0::RegisterBlock;
932 #[inline(always)]
933 fn deref(&self) -> &Self::Target {
934 unsafe { &*Self::PTR }
935 }
936}
937impl core::fmt::Debug for I2c0 {
938 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
939 f.debug_struct("I2c0").finish()
940 }
941}
942#[doc = "Inter-Integrated Circuit."]
943pub mod i2c0;
944#[doc = "Inter-Integrated Circuit. 1"]
945pub struct I2c1 {
946 _marker: PhantomData<*const ()>,
947}
948unsafe impl Send for I2c1 {}
949impl I2c1 {
950 #[doc = r"Pointer to the register block"]
951 pub const PTR: *const i2c0::RegisterBlock = 0x4001_e000 as *const _;
952 #[doc = r"Return the pointer to the register block"]
953 #[inline(always)]
954 pub const fn ptr() -> *const i2c0::RegisterBlock {
955 Self::PTR
956 }
957 #[doc = r" Steal an instance of this peripheral"]
958 #[doc = r""]
959 #[doc = r" # Safety"]
960 #[doc = r""]
961 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
962 #[doc = r" that may race with any existing instances, for example by only"]
963 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
964 #[doc = r" original peripheral and using critical sections to coordinate"]
965 #[doc = r" access between multiple new instances."]
966 #[doc = r""]
967 #[doc = r" Additionally, other software such as HALs may rely on only one"]
968 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
969 #[doc = r" no stolen instances are passed to such software."]
970 pub unsafe fn steal() -> Self {
971 Self {
972 _marker: PhantomData,
973 }
974 }
975}
976impl Deref for I2c1 {
977 type Target = i2c0::RegisterBlock;
978 #[inline(always)]
979 fn deref(&self) -> &Self::Target {
980 unsafe { &*Self::PTR }
981 }
982}
983impl core::fmt::Debug for I2c1 {
984 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
985 f.debug_struct("I2c1").finish()
986 }
987}
988#[doc = "Inter-Integrated Circuit. 1"]
989pub use self::i2c0 as i2c1;
990#[doc = "Inter-Integrated Circuit. 2"]
991pub struct I2c2 {
992 _marker: PhantomData<*const ()>,
993}
994unsafe impl Send for I2c2 {}
995impl I2c2 {
996 #[doc = r"Pointer to the register block"]
997 pub const PTR: *const i2c0::RegisterBlock = 0x4001_f000 as *const _;
998 #[doc = r"Return the pointer to the register block"]
999 #[inline(always)]
1000 pub const fn ptr() -> *const i2c0::RegisterBlock {
1001 Self::PTR
1002 }
1003 #[doc = r" Steal an instance of this peripheral"]
1004 #[doc = r""]
1005 #[doc = r" # Safety"]
1006 #[doc = r""]
1007 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1008 #[doc = r" that may race with any existing instances, for example by only"]
1009 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1010 #[doc = r" original peripheral and using critical sections to coordinate"]
1011 #[doc = r" access between multiple new instances."]
1012 #[doc = r""]
1013 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1014 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1015 #[doc = r" no stolen instances are passed to such software."]
1016 pub unsafe fn steal() -> Self {
1017 Self {
1018 _marker: PhantomData,
1019 }
1020 }
1021}
1022impl Deref for I2c2 {
1023 type Target = i2c0::RegisterBlock;
1024 #[inline(always)]
1025 fn deref(&self) -> &Self::Target {
1026 unsafe { &*Self::PTR }
1027 }
1028}
1029impl core::fmt::Debug for I2c2 {
1030 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1031 f.debug_struct("I2c2").finish()
1032 }
1033}
1034#[doc = "Inter-Integrated Circuit. 2"]
1035pub use self::i2c0 as i2c2;
1036#[doc = "Inter-IC Sound Interface."]
1037pub struct I2s {
1038 _marker: PhantomData<*const ()>,
1039}
1040unsafe impl Send for I2s {}
1041impl I2s {
1042 #[doc = r"Pointer to the register block"]
1043 pub const PTR: *const i2s::RegisterBlock = 0x4006_0000 as *const _;
1044 #[doc = r"Return the pointer to the register block"]
1045 #[inline(always)]
1046 pub const fn ptr() -> *const i2s::RegisterBlock {
1047 Self::PTR
1048 }
1049 #[doc = r" Steal an instance of this peripheral"]
1050 #[doc = r""]
1051 #[doc = r" # Safety"]
1052 #[doc = r""]
1053 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1054 #[doc = r" that may race with any existing instances, for example by only"]
1055 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1056 #[doc = r" original peripheral and using critical sections to coordinate"]
1057 #[doc = r" access between multiple new instances."]
1058 #[doc = r""]
1059 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1060 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1061 #[doc = r" no stolen instances are passed to such software."]
1062 pub unsafe fn steal() -> Self {
1063 Self {
1064 _marker: PhantomData,
1065 }
1066 }
1067}
1068impl Deref for I2s {
1069 type Target = i2s::RegisterBlock;
1070 #[inline(always)]
1071 fn deref(&self) -> &Self::Target {
1072 unsafe { &*Self::PTR }
1073 }
1074}
1075impl core::fmt::Debug for I2s {
1076 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1077 f.debug_struct("I2s").finish()
1078 }
1079}
1080#[doc = "Inter-IC Sound Interface."]
1081pub mod i2s;
1082#[doc = "Instruction Cache Controller Registers"]
1083pub struct Icc0 {
1084 _marker: PhantomData<*const ()>,
1085}
1086unsafe impl Send for Icc0 {}
1087impl Icc0 {
1088 #[doc = r"Pointer to the register block"]
1089 pub const PTR: *const icc0::RegisterBlock = 0x4002_a000 as *const _;
1090 #[doc = r"Return the pointer to the register block"]
1091 #[inline(always)]
1092 pub const fn ptr() -> *const icc0::RegisterBlock {
1093 Self::PTR
1094 }
1095 #[doc = r" Steal an instance of this peripheral"]
1096 #[doc = r""]
1097 #[doc = r" # Safety"]
1098 #[doc = r""]
1099 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1100 #[doc = r" that may race with any existing instances, for example by only"]
1101 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1102 #[doc = r" original peripheral and using critical sections to coordinate"]
1103 #[doc = r" access between multiple new instances."]
1104 #[doc = r""]
1105 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1106 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1107 #[doc = r" no stolen instances are passed to such software."]
1108 pub unsafe fn steal() -> Self {
1109 Self {
1110 _marker: PhantomData,
1111 }
1112 }
1113}
1114impl Deref for Icc0 {
1115 type Target = icc0::RegisterBlock;
1116 #[inline(always)]
1117 fn deref(&self) -> &Self::Target {
1118 unsafe { &*Self::PTR }
1119 }
1120}
1121impl core::fmt::Debug for Icc0 {
1122 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1123 f.debug_struct("Icc0").finish()
1124 }
1125}
1126#[doc = "Instruction Cache Controller Registers"]
1127pub mod icc0;
1128#[doc = "Low Power Comparator"]
1129pub struct Lpcmp {
1130 _marker: PhantomData<*const ()>,
1131}
1132unsafe impl Send for Lpcmp {}
1133impl Lpcmp {
1134 #[doc = r"Pointer to the register block"]
1135 pub const PTR: *const lpcmp::RegisterBlock = 0x4008_8000 as *const _;
1136 #[doc = r"Return the pointer to the register block"]
1137 #[inline(always)]
1138 pub const fn ptr() -> *const lpcmp::RegisterBlock {
1139 Self::PTR
1140 }
1141 #[doc = r" Steal an instance of this peripheral"]
1142 #[doc = r""]
1143 #[doc = r" # Safety"]
1144 #[doc = r""]
1145 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1146 #[doc = r" that may race with any existing instances, for example by only"]
1147 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1148 #[doc = r" original peripheral and using critical sections to coordinate"]
1149 #[doc = r" access between multiple new instances."]
1150 #[doc = r""]
1151 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1152 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1153 #[doc = r" no stolen instances are passed to such software."]
1154 pub unsafe fn steal() -> Self {
1155 Self {
1156 _marker: PhantomData,
1157 }
1158 }
1159}
1160impl Deref for Lpcmp {
1161 type Target = lpcmp::RegisterBlock;
1162 #[inline(always)]
1163 fn deref(&self) -> &Self::Target {
1164 unsafe { &*Self::PTR }
1165 }
1166}
1167impl core::fmt::Debug for Lpcmp {
1168 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1169 f.debug_struct("Lpcmp").finish()
1170 }
1171}
1172#[doc = "Low Power Comparator"]
1173pub mod lpcmp;
1174#[doc = "Low Power Global Control."]
1175pub struct Lpgcr {
1176 _marker: PhantomData<*const ()>,
1177}
1178unsafe impl Send for Lpgcr {}
1179impl Lpgcr {
1180 #[doc = r"Pointer to the register block"]
1181 pub const PTR: *const lpgcr::RegisterBlock = 0x4008_0000 as *const _;
1182 #[doc = r"Return the pointer to the register block"]
1183 #[inline(always)]
1184 pub const fn ptr() -> *const lpgcr::RegisterBlock {
1185 Self::PTR
1186 }
1187 #[doc = r" Steal an instance of this peripheral"]
1188 #[doc = r""]
1189 #[doc = r" # Safety"]
1190 #[doc = r""]
1191 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1192 #[doc = r" that may race with any existing instances, for example by only"]
1193 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1194 #[doc = r" original peripheral and using critical sections to coordinate"]
1195 #[doc = r" access between multiple new instances."]
1196 #[doc = r""]
1197 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1198 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1199 #[doc = r" no stolen instances are passed to such software."]
1200 pub unsafe fn steal() -> Self {
1201 Self {
1202 _marker: PhantomData,
1203 }
1204 }
1205}
1206impl Deref for Lpgcr {
1207 type Target = lpgcr::RegisterBlock;
1208 #[inline(always)]
1209 fn deref(&self) -> &Self::Target {
1210 unsafe { &*Self::PTR }
1211 }
1212}
1213impl core::fmt::Debug for Lpgcr {
1214 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1215 f.debug_struct("Lpgcr").finish()
1216 }
1217}
1218#[doc = "Low Power Global Control."]
1219pub mod lpgcr;
1220#[doc = "Misc Control."]
1221pub struct Mcr {
1222 _marker: PhantomData<*const ()>,
1223}
1224unsafe impl Send for Mcr {}
1225impl Mcr {
1226 #[doc = r"Pointer to the register block"]
1227 pub const PTR: *const mcr::RegisterBlock = 0x4000_6c00 as *const _;
1228 #[doc = r"Return the pointer to the register block"]
1229 #[inline(always)]
1230 pub const fn ptr() -> *const mcr::RegisterBlock {
1231 Self::PTR
1232 }
1233 #[doc = r" Steal an instance of this peripheral"]
1234 #[doc = r""]
1235 #[doc = r" # Safety"]
1236 #[doc = r""]
1237 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1238 #[doc = r" that may race with any existing instances, for example by only"]
1239 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1240 #[doc = r" original peripheral and using critical sections to coordinate"]
1241 #[doc = r" access between multiple new instances."]
1242 #[doc = r""]
1243 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1244 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1245 #[doc = r" no stolen instances are passed to such software."]
1246 pub unsafe fn steal() -> Self {
1247 Self {
1248 _marker: PhantomData,
1249 }
1250 }
1251}
1252impl Deref for Mcr {
1253 type Target = mcr::RegisterBlock;
1254 #[inline(always)]
1255 fn deref(&self) -> &Self::Target {
1256 unsafe { &*Self::PTR }
1257 }
1258}
1259impl core::fmt::Debug for Mcr {
1260 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1261 f.debug_struct("Mcr").finish()
1262 }
1263}
1264#[doc = "Misc Control."]
1265pub mod mcr;
1266#[doc = "1-Wire Master Interface."]
1267pub struct Owm {
1268 _marker: PhantomData<*const ()>,
1269}
1270unsafe impl Send for Owm {}
1271impl Owm {
1272 #[doc = r"Pointer to the register block"]
1273 pub const PTR: *const owm::RegisterBlock = 0x4003_d000 as *const _;
1274 #[doc = r"Return the pointer to the register block"]
1275 #[inline(always)]
1276 pub const fn ptr() -> *const owm::RegisterBlock {
1277 Self::PTR
1278 }
1279 #[doc = r" Steal an instance of this peripheral"]
1280 #[doc = r""]
1281 #[doc = r" # Safety"]
1282 #[doc = r""]
1283 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1284 #[doc = r" that may race with any existing instances, for example by only"]
1285 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1286 #[doc = r" original peripheral and using critical sections to coordinate"]
1287 #[doc = r" access between multiple new instances."]
1288 #[doc = r""]
1289 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1290 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1291 #[doc = r" no stolen instances are passed to such software."]
1292 pub unsafe fn steal() -> Self {
1293 Self {
1294 _marker: PhantomData,
1295 }
1296 }
1297}
1298impl Deref for Owm {
1299 type Target = owm::RegisterBlock;
1300 #[inline(always)]
1301 fn deref(&self) -> &Self::Target {
1302 unsafe { &*Self::PTR }
1303 }
1304}
1305impl core::fmt::Debug for Owm {
1306 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1307 f.debug_struct("Owm").finish()
1308 }
1309}
1310#[doc = "1-Wire Master Interface."]
1311pub mod owm;
1312#[doc = "Pulse Train"]
1313pub struct Pt0 {
1314 _marker: PhantomData<*const ()>,
1315}
1316unsafe impl Send for Pt0 {}
1317impl Pt0 {
1318 #[doc = r"Pointer to the register block"]
1319 pub const PTR: *const pt0::RegisterBlock = 0x4003_c020 as *const _;
1320 #[doc = r"Return the pointer to the register block"]
1321 #[inline(always)]
1322 pub const fn ptr() -> *const pt0::RegisterBlock {
1323 Self::PTR
1324 }
1325 #[doc = r" Steal an instance of this peripheral"]
1326 #[doc = r""]
1327 #[doc = r" # Safety"]
1328 #[doc = r""]
1329 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1330 #[doc = r" that may race with any existing instances, for example by only"]
1331 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1332 #[doc = r" original peripheral and using critical sections to coordinate"]
1333 #[doc = r" access between multiple new instances."]
1334 #[doc = r""]
1335 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1336 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1337 #[doc = r" no stolen instances are passed to such software."]
1338 pub unsafe fn steal() -> Self {
1339 Self {
1340 _marker: PhantomData,
1341 }
1342 }
1343}
1344impl Deref for Pt0 {
1345 type Target = pt0::RegisterBlock;
1346 #[inline(always)]
1347 fn deref(&self) -> &Self::Target {
1348 unsafe { &*Self::PTR }
1349 }
1350}
1351impl core::fmt::Debug for Pt0 {
1352 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1353 f.debug_struct("Pt0").finish()
1354 }
1355}
1356#[doc = "Pulse Train"]
1357pub mod pt0;
1358#[doc = "Pulse Train 1"]
1359pub struct Pt1 {
1360 _marker: PhantomData<*const ()>,
1361}
1362unsafe impl Send for Pt1 {}
1363impl Pt1 {
1364 #[doc = r"Pointer to the register block"]
1365 pub const PTR: *const pt0::RegisterBlock = 0x4003_c030 as *const _;
1366 #[doc = r"Return the pointer to the register block"]
1367 #[inline(always)]
1368 pub const fn ptr() -> *const pt0::RegisterBlock {
1369 Self::PTR
1370 }
1371 #[doc = r" Steal an instance of this peripheral"]
1372 #[doc = r""]
1373 #[doc = r" # Safety"]
1374 #[doc = r""]
1375 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1376 #[doc = r" that may race with any existing instances, for example by only"]
1377 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1378 #[doc = r" original peripheral and using critical sections to coordinate"]
1379 #[doc = r" access between multiple new instances."]
1380 #[doc = r""]
1381 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1382 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1383 #[doc = r" no stolen instances are passed to such software."]
1384 pub unsafe fn steal() -> Self {
1385 Self {
1386 _marker: PhantomData,
1387 }
1388 }
1389}
1390impl Deref for Pt1 {
1391 type Target = pt0::RegisterBlock;
1392 #[inline(always)]
1393 fn deref(&self) -> &Self::Target {
1394 unsafe { &*Self::PTR }
1395 }
1396}
1397impl core::fmt::Debug for Pt1 {
1398 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1399 f.debug_struct("Pt1").finish()
1400 }
1401}
1402#[doc = "Pulse Train 1"]
1403pub use self::pt0 as pt1;
1404#[doc = "Pulse Train 2"]
1405pub struct Pt2 {
1406 _marker: PhantomData<*const ()>,
1407}
1408unsafe impl Send for Pt2 {}
1409impl Pt2 {
1410 #[doc = r"Pointer to the register block"]
1411 pub const PTR: *const pt0::RegisterBlock = 0x4003_c040 as *const _;
1412 #[doc = r"Return the pointer to the register block"]
1413 #[inline(always)]
1414 pub const fn ptr() -> *const pt0::RegisterBlock {
1415 Self::PTR
1416 }
1417 #[doc = r" Steal an instance of this peripheral"]
1418 #[doc = r""]
1419 #[doc = r" # Safety"]
1420 #[doc = r""]
1421 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1422 #[doc = r" that may race with any existing instances, for example by only"]
1423 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1424 #[doc = r" original peripheral and using critical sections to coordinate"]
1425 #[doc = r" access between multiple new instances."]
1426 #[doc = r""]
1427 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1428 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1429 #[doc = r" no stolen instances are passed to such software."]
1430 pub unsafe fn steal() -> Self {
1431 Self {
1432 _marker: PhantomData,
1433 }
1434 }
1435}
1436impl Deref for Pt2 {
1437 type Target = pt0::RegisterBlock;
1438 #[inline(always)]
1439 fn deref(&self) -> &Self::Target {
1440 unsafe { &*Self::PTR }
1441 }
1442}
1443impl core::fmt::Debug for Pt2 {
1444 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1445 f.debug_struct("Pt2").finish()
1446 }
1447}
1448#[doc = "Pulse Train 2"]
1449pub use self::pt0 as pt2;
1450#[doc = "Pulse Train 3"]
1451pub struct Pt3 {
1452 _marker: PhantomData<*const ()>,
1453}
1454unsafe impl Send for Pt3 {}
1455impl Pt3 {
1456 #[doc = r"Pointer to the register block"]
1457 pub const PTR: *const pt0::RegisterBlock = 0x4003_c050 as *const _;
1458 #[doc = r"Return the pointer to the register block"]
1459 #[inline(always)]
1460 pub const fn ptr() -> *const pt0::RegisterBlock {
1461 Self::PTR
1462 }
1463 #[doc = r" Steal an instance of this peripheral"]
1464 #[doc = r""]
1465 #[doc = r" # Safety"]
1466 #[doc = r""]
1467 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1468 #[doc = r" that may race with any existing instances, for example by only"]
1469 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1470 #[doc = r" original peripheral and using critical sections to coordinate"]
1471 #[doc = r" access between multiple new instances."]
1472 #[doc = r""]
1473 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1474 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1475 #[doc = r" no stolen instances are passed to such software."]
1476 pub unsafe fn steal() -> Self {
1477 Self {
1478 _marker: PhantomData,
1479 }
1480 }
1481}
1482impl Deref for Pt3 {
1483 type Target = pt0::RegisterBlock;
1484 #[inline(always)]
1485 fn deref(&self) -> &Self::Target {
1486 unsafe { &*Self::PTR }
1487 }
1488}
1489impl core::fmt::Debug for Pt3 {
1490 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1491 f.debug_struct("Pt3").finish()
1492 }
1493}
1494#[doc = "Pulse Train 3"]
1495pub use self::pt0 as pt3;
1496#[doc = "Pulse Train Generation"]
1497pub struct Ptg {
1498 _marker: PhantomData<*const ()>,
1499}
1500unsafe impl Send for Ptg {}
1501impl Ptg {
1502 #[doc = r"Pointer to the register block"]
1503 pub const PTR: *const ptg::RegisterBlock = 0x4003_c000 as *const _;
1504 #[doc = r"Return the pointer to the register block"]
1505 #[inline(always)]
1506 pub const fn ptr() -> *const ptg::RegisterBlock {
1507 Self::PTR
1508 }
1509 #[doc = r" Steal an instance of this peripheral"]
1510 #[doc = r""]
1511 #[doc = r" # Safety"]
1512 #[doc = r""]
1513 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1514 #[doc = r" that may race with any existing instances, for example by only"]
1515 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1516 #[doc = r" original peripheral and using critical sections to coordinate"]
1517 #[doc = r" access between multiple new instances."]
1518 #[doc = r""]
1519 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1520 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1521 #[doc = r" no stolen instances are passed to such software."]
1522 pub unsafe fn steal() -> Self {
1523 Self {
1524 _marker: PhantomData,
1525 }
1526 }
1527}
1528impl Deref for Ptg {
1529 type Target = ptg::RegisterBlock;
1530 #[inline(always)]
1531 fn deref(&self) -> &Self::Target {
1532 unsafe { &*Self::PTR }
1533 }
1534}
1535impl core::fmt::Debug for Ptg {
1536 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1537 f.debug_struct("Ptg").finish()
1538 }
1539}
1540#[doc = "Pulse Train Generation"]
1541pub mod ptg;
1542#[doc = "Power Sequencer / Low Power Control Register."]
1543pub struct Pwrseq {
1544 _marker: PhantomData<*const ()>,
1545}
1546unsafe impl Send for Pwrseq {}
1547impl Pwrseq {
1548 #[doc = r"Pointer to the register block"]
1549 pub const PTR: *const pwrseq::RegisterBlock = 0x4000_6800 as *const _;
1550 #[doc = r"Return the pointer to the register block"]
1551 #[inline(always)]
1552 pub const fn ptr() -> *const pwrseq::RegisterBlock {
1553 Self::PTR
1554 }
1555 #[doc = r" Steal an instance of this peripheral"]
1556 #[doc = r""]
1557 #[doc = r" # Safety"]
1558 #[doc = r""]
1559 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1560 #[doc = r" that may race with any existing instances, for example by only"]
1561 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1562 #[doc = r" original peripheral and using critical sections to coordinate"]
1563 #[doc = r" access between multiple new instances."]
1564 #[doc = r""]
1565 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1566 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1567 #[doc = r" no stolen instances are passed to such software."]
1568 pub unsafe fn steal() -> Self {
1569 Self {
1570 _marker: PhantomData,
1571 }
1572 }
1573}
1574impl Deref for Pwrseq {
1575 type Target = pwrseq::RegisterBlock;
1576 #[inline(always)]
1577 fn deref(&self) -> &Self::Target {
1578 unsafe { &*Self::PTR }
1579 }
1580}
1581impl core::fmt::Debug for Pwrseq {
1582 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1583 f.debug_struct("Pwrseq").finish()
1584 }
1585}
1586#[doc = "Power Sequencer / Low Power Control Register."]
1587pub mod pwrseq;
1588#[doc = "Real Time Clock and Alarm."]
1589pub struct Rtc {
1590 _marker: PhantomData<*const ()>,
1591}
1592unsafe impl Send for Rtc {}
1593impl Rtc {
1594 #[doc = r"Pointer to the register block"]
1595 pub const PTR: *const rtc::RegisterBlock = 0x4000_6000 as *const _;
1596 #[doc = r"Return the pointer to the register block"]
1597 #[inline(always)]
1598 pub const fn ptr() -> *const rtc::RegisterBlock {
1599 Self::PTR
1600 }
1601 #[doc = r" Steal an instance of this peripheral"]
1602 #[doc = r""]
1603 #[doc = r" # Safety"]
1604 #[doc = r""]
1605 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1606 #[doc = r" that may race with any existing instances, for example by only"]
1607 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1608 #[doc = r" original peripheral and using critical sections to coordinate"]
1609 #[doc = r" access between multiple new instances."]
1610 #[doc = r""]
1611 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1612 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1613 #[doc = r" no stolen instances are passed to such software."]
1614 pub unsafe fn steal() -> Self {
1615 Self {
1616 _marker: PhantomData,
1617 }
1618 }
1619}
1620impl Deref for Rtc {
1621 type Target = rtc::RegisterBlock;
1622 #[inline(always)]
1623 fn deref(&self) -> &Self::Target {
1624 unsafe { &*Self::PTR }
1625 }
1626}
1627impl core::fmt::Debug for Rtc {
1628 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1629 f.debug_struct("Rtc").finish()
1630 }
1631}
1632#[doc = "Real Time Clock and Alarm."]
1633pub mod rtc;
1634#[doc = "The Semaphore peripheral allows multiple cores in a system to cooperate when accessing shred resources. The peripheral contains eight semaphores that can be atomically set and cleared. It is left to the discretion of the software architect to decide how and when the semaphores are used and how they are allocated. Existing hardware does not have to be modified for this type of cooperative sharing, and the use of semaphores is exclusively within the software domain."]
1635pub struct Sema {
1636 _marker: PhantomData<*const ()>,
1637}
1638unsafe impl Send for Sema {}
1639impl Sema {
1640 #[doc = r"Pointer to the register block"]
1641 pub const PTR: *const sema::RegisterBlock = 0x4003_e000 as *const _;
1642 #[doc = r"Return the pointer to the register block"]
1643 #[inline(always)]
1644 pub const fn ptr() -> *const sema::RegisterBlock {
1645 Self::PTR
1646 }
1647 #[doc = r" Steal an instance of this peripheral"]
1648 #[doc = r""]
1649 #[doc = r" # Safety"]
1650 #[doc = r""]
1651 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1652 #[doc = r" that may race with any existing instances, for example by only"]
1653 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1654 #[doc = r" original peripheral and using critical sections to coordinate"]
1655 #[doc = r" access between multiple new instances."]
1656 #[doc = r""]
1657 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1658 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1659 #[doc = r" no stolen instances are passed to such software."]
1660 pub unsafe fn steal() -> Self {
1661 Self {
1662 _marker: PhantomData,
1663 }
1664 }
1665}
1666impl Deref for Sema {
1667 type Target = sema::RegisterBlock;
1668 #[inline(always)]
1669 fn deref(&self) -> &Self::Target {
1670 unsafe { &*Self::PTR }
1671 }
1672}
1673impl core::fmt::Debug for Sema {
1674 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1675 f.debug_struct("Sema").finish()
1676 }
1677}
1678#[doc = "The Semaphore peripheral allows multiple cores in a system to cooperate when accessing shred resources. The peripheral contains eight semaphores that can be atomically set and cleared. It is left to the discretion of the software architect to decide how and when the semaphores are used and how they are allocated. Existing hardware does not have to be modified for this type of cooperative sharing, and the use of semaphores is exclusively within the software domain."]
1679pub mod sema;
1680#[doc = "Single Inductor Multiple Output Switching Converter"]
1681pub struct Simo {
1682 _marker: PhantomData<*const ()>,
1683}
1684unsafe impl Send for Simo {}
1685impl Simo {
1686 #[doc = r"Pointer to the register block"]
1687 pub const PTR: *const simo::RegisterBlock = 0x4000_4400 as *const _;
1688 #[doc = r"Return the pointer to the register block"]
1689 #[inline(always)]
1690 pub const fn ptr() -> *const simo::RegisterBlock {
1691 Self::PTR
1692 }
1693 #[doc = r" Steal an instance of this peripheral"]
1694 #[doc = r""]
1695 #[doc = r" # Safety"]
1696 #[doc = r""]
1697 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1698 #[doc = r" that may race with any existing instances, for example by only"]
1699 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1700 #[doc = r" original peripheral and using critical sections to coordinate"]
1701 #[doc = r" access between multiple new instances."]
1702 #[doc = r""]
1703 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1704 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1705 #[doc = r" no stolen instances are passed to such software."]
1706 pub unsafe fn steal() -> Self {
1707 Self {
1708 _marker: PhantomData,
1709 }
1710 }
1711}
1712impl Deref for Simo {
1713 type Target = simo::RegisterBlock;
1714 #[inline(always)]
1715 fn deref(&self) -> &Self::Target {
1716 unsafe { &*Self::PTR }
1717 }
1718}
1719impl core::fmt::Debug for Simo {
1720 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1721 f.debug_struct("Simo").finish()
1722 }
1723}
1724#[doc = "Single Inductor Multiple Output Switching Converter"]
1725pub mod simo;
1726#[doc = "System Initialization Registers."]
1727pub struct Sir {
1728 _marker: PhantomData<*const ()>,
1729}
1730unsafe impl Send for Sir {}
1731impl Sir {
1732 #[doc = r"Pointer to the register block"]
1733 pub const PTR: *const sir::RegisterBlock = 0x4000_0400 as *const _;
1734 #[doc = r"Return the pointer to the register block"]
1735 #[inline(always)]
1736 pub const fn ptr() -> *const sir::RegisterBlock {
1737 Self::PTR
1738 }
1739 #[doc = r" Steal an instance of this peripheral"]
1740 #[doc = r""]
1741 #[doc = r" # Safety"]
1742 #[doc = r""]
1743 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1744 #[doc = r" that may race with any existing instances, for example by only"]
1745 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1746 #[doc = r" original peripheral and using critical sections to coordinate"]
1747 #[doc = r" access between multiple new instances."]
1748 #[doc = r""]
1749 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1750 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1751 #[doc = r" no stolen instances are passed to such software."]
1752 pub unsafe fn steal() -> Self {
1753 Self {
1754 _marker: PhantomData,
1755 }
1756 }
1757}
1758impl Deref for Sir {
1759 type Target = sir::RegisterBlock;
1760 #[inline(always)]
1761 fn deref(&self) -> &Self::Target {
1762 unsafe { &*Self::PTR }
1763 }
1764}
1765impl core::fmt::Debug for Sir {
1766 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1767 f.debug_struct("Sir").finish()
1768 }
1769}
1770#[doc = "System Initialization Registers."]
1771pub mod sir;
1772#[doc = "SPI peripheral."]
1773pub struct Spi0 {
1774 _marker: PhantomData<*const ()>,
1775}
1776unsafe impl Send for Spi0 {}
1777impl Spi0 {
1778 #[doc = r"Pointer to the register block"]
1779 pub const PTR: *const spi0::RegisterBlock = 0x400b_e000 as *const _;
1780 #[doc = r"Return the pointer to the register block"]
1781 #[inline(always)]
1782 pub const fn ptr() -> *const spi0::RegisterBlock {
1783 Self::PTR
1784 }
1785 #[doc = r" Steal an instance of this peripheral"]
1786 #[doc = r""]
1787 #[doc = r" # Safety"]
1788 #[doc = r""]
1789 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1790 #[doc = r" that may race with any existing instances, for example by only"]
1791 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1792 #[doc = r" original peripheral and using critical sections to coordinate"]
1793 #[doc = r" access between multiple new instances."]
1794 #[doc = r""]
1795 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1796 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1797 #[doc = r" no stolen instances are passed to such software."]
1798 pub unsafe fn steal() -> Self {
1799 Self {
1800 _marker: PhantomData,
1801 }
1802 }
1803}
1804impl Deref for Spi0 {
1805 type Target = spi0::RegisterBlock;
1806 #[inline(always)]
1807 fn deref(&self) -> &Self::Target {
1808 unsafe { &*Self::PTR }
1809 }
1810}
1811impl core::fmt::Debug for Spi0 {
1812 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1813 f.debug_struct("Spi0").finish()
1814 }
1815}
1816#[doc = "SPI peripheral."]
1817pub mod spi0;
1818#[doc = "SPI peripheral. 1"]
1819pub struct Spi1 {
1820 _marker: PhantomData<*const ()>,
1821}
1822unsafe impl Send for Spi1 {}
1823impl Spi1 {
1824 #[doc = r"Pointer to the register block"]
1825 pub const PTR: *const spi0::RegisterBlock = 0x4004_6000 as *const _;
1826 #[doc = r"Return the pointer to the register block"]
1827 #[inline(always)]
1828 pub const fn ptr() -> *const spi0::RegisterBlock {
1829 Self::PTR
1830 }
1831 #[doc = r" Steal an instance of this peripheral"]
1832 #[doc = r""]
1833 #[doc = r" # Safety"]
1834 #[doc = r""]
1835 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1836 #[doc = r" that may race with any existing instances, for example by only"]
1837 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1838 #[doc = r" original peripheral and using critical sections to coordinate"]
1839 #[doc = r" access between multiple new instances."]
1840 #[doc = r""]
1841 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1842 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1843 #[doc = r" no stolen instances are passed to such software."]
1844 pub unsafe fn steal() -> Self {
1845 Self {
1846 _marker: PhantomData,
1847 }
1848 }
1849}
1850impl Deref for Spi1 {
1851 type Target = spi0::RegisterBlock;
1852 #[inline(always)]
1853 fn deref(&self) -> &Self::Target {
1854 unsafe { &*Self::PTR }
1855 }
1856}
1857impl core::fmt::Debug for Spi1 {
1858 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1859 f.debug_struct("Spi1").finish()
1860 }
1861}
1862#[doc = "SPI peripheral. 1"]
1863pub use self::spi0 as spi1;
1864#[doc = "Low-Power Configurable Timer"]
1865pub struct Tmr0 {
1866 _marker: PhantomData<*const ()>,
1867}
1868unsafe impl Send for Tmr0 {}
1869impl Tmr0 {
1870 #[doc = r"Pointer to the register block"]
1871 pub const PTR: *const tmr0::RegisterBlock = 0x4001_0000 as *const _;
1872 #[doc = r"Return the pointer to the register block"]
1873 #[inline(always)]
1874 pub const fn ptr() -> *const tmr0::RegisterBlock {
1875 Self::PTR
1876 }
1877 #[doc = r" Steal an instance of this peripheral"]
1878 #[doc = r""]
1879 #[doc = r" # Safety"]
1880 #[doc = r""]
1881 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1882 #[doc = r" that may race with any existing instances, for example by only"]
1883 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1884 #[doc = r" original peripheral and using critical sections to coordinate"]
1885 #[doc = r" access between multiple new instances."]
1886 #[doc = r""]
1887 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1888 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1889 #[doc = r" no stolen instances are passed to such software."]
1890 pub unsafe fn steal() -> Self {
1891 Self {
1892 _marker: PhantomData,
1893 }
1894 }
1895}
1896impl Deref for Tmr0 {
1897 type Target = tmr0::RegisterBlock;
1898 #[inline(always)]
1899 fn deref(&self) -> &Self::Target {
1900 unsafe { &*Self::PTR }
1901 }
1902}
1903impl core::fmt::Debug for Tmr0 {
1904 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1905 f.debug_struct("Tmr0").finish()
1906 }
1907}
1908#[doc = "Low-Power Configurable Timer"]
1909pub mod tmr0;
1910#[doc = "Low-Power Configurable Timer 1"]
1911pub struct Tmr1 {
1912 _marker: PhantomData<*const ()>,
1913}
1914unsafe impl Send for Tmr1 {}
1915impl Tmr1 {
1916 #[doc = r"Pointer to the register block"]
1917 pub const PTR: *const tmr0::RegisterBlock = 0x4001_1000 as *const _;
1918 #[doc = r"Return the pointer to the register block"]
1919 #[inline(always)]
1920 pub const fn ptr() -> *const tmr0::RegisterBlock {
1921 Self::PTR
1922 }
1923 #[doc = r" Steal an instance of this peripheral"]
1924 #[doc = r""]
1925 #[doc = r" # Safety"]
1926 #[doc = r""]
1927 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1928 #[doc = r" that may race with any existing instances, for example by only"]
1929 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1930 #[doc = r" original peripheral and using critical sections to coordinate"]
1931 #[doc = r" access between multiple new instances."]
1932 #[doc = r""]
1933 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1934 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1935 #[doc = r" no stolen instances are passed to such software."]
1936 pub unsafe fn steal() -> Self {
1937 Self {
1938 _marker: PhantomData,
1939 }
1940 }
1941}
1942impl Deref for Tmr1 {
1943 type Target = tmr0::RegisterBlock;
1944 #[inline(always)]
1945 fn deref(&self) -> &Self::Target {
1946 unsafe { &*Self::PTR }
1947 }
1948}
1949impl core::fmt::Debug for Tmr1 {
1950 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1951 f.debug_struct("Tmr1").finish()
1952 }
1953}
1954#[doc = "Low-Power Configurable Timer 1"]
1955pub use self::tmr0 as tmr1;
1956#[doc = "Low-Power Configurable Timer 2"]
1957pub struct Tmr2 {
1958 _marker: PhantomData<*const ()>,
1959}
1960unsafe impl Send for Tmr2 {}
1961impl Tmr2 {
1962 #[doc = r"Pointer to the register block"]
1963 pub const PTR: *const tmr0::RegisterBlock = 0x4001_2000 as *const _;
1964 #[doc = r"Return the pointer to the register block"]
1965 #[inline(always)]
1966 pub const fn ptr() -> *const tmr0::RegisterBlock {
1967 Self::PTR
1968 }
1969 #[doc = r" Steal an instance of this peripheral"]
1970 #[doc = r""]
1971 #[doc = r" # Safety"]
1972 #[doc = r""]
1973 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1974 #[doc = r" that may race with any existing instances, for example by only"]
1975 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1976 #[doc = r" original peripheral and using critical sections to coordinate"]
1977 #[doc = r" access between multiple new instances."]
1978 #[doc = r""]
1979 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1980 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1981 #[doc = r" no stolen instances are passed to such software."]
1982 pub unsafe fn steal() -> Self {
1983 Self {
1984 _marker: PhantomData,
1985 }
1986 }
1987}
1988impl Deref for Tmr2 {
1989 type Target = tmr0::RegisterBlock;
1990 #[inline(always)]
1991 fn deref(&self) -> &Self::Target {
1992 unsafe { &*Self::PTR }
1993 }
1994}
1995impl core::fmt::Debug for Tmr2 {
1996 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1997 f.debug_struct("Tmr2").finish()
1998 }
1999}
2000#[doc = "Low-Power Configurable Timer 2"]
2001pub use self::tmr0 as tmr2;
2002#[doc = "Low-Power Configurable Timer 3"]
2003pub struct Tmr3 {
2004 _marker: PhantomData<*const ()>,
2005}
2006unsafe impl Send for Tmr3 {}
2007impl Tmr3 {
2008 #[doc = r"Pointer to the register block"]
2009 pub const PTR: *const tmr0::RegisterBlock = 0x4001_3000 as *const _;
2010 #[doc = r"Return the pointer to the register block"]
2011 #[inline(always)]
2012 pub const fn ptr() -> *const tmr0::RegisterBlock {
2013 Self::PTR
2014 }
2015 #[doc = r" Steal an instance of this peripheral"]
2016 #[doc = r""]
2017 #[doc = r" # Safety"]
2018 #[doc = r""]
2019 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2020 #[doc = r" that may race with any existing instances, for example by only"]
2021 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2022 #[doc = r" original peripheral and using critical sections to coordinate"]
2023 #[doc = r" access between multiple new instances."]
2024 #[doc = r""]
2025 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2026 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2027 #[doc = r" no stolen instances are passed to such software."]
2028 pub unsafe fn steal() -> Self {
2029 Self {
2030 _marker: PhantomData,
2031 }
2032 }
2033}
2034impl Deref for Tmr3 {
2035 type Target = tmr0::RegisterBlock;
2036 #[inline(always)]
2037 fn deref(&self) -> &Self::Target {
2038 unsafe { &*Self::PTR }
2039 }
2040}
2041impl core::fmt::Debug for Tmr3 {
2042 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2043 f.debug_struct("Tmr3").finish()
2044 }
2045}
2046#[doc = "Low-Power Configurable Timer 3"]
2047pub use self::tmr0 as tmr3;
2048#[doc = "Low-Power Configurable Timer 4"]
2049pub struct Tmr4 {
2050 _marker: PhantomData<*const ()>,
2051}
2052unsafe impl Send for Tmr4 {}
2053impl Tmr4 {
2054 #[doc = r"Pointer to the register block"]
2055 pub const PTR: *const tmr0::RegisterBlock = 0x4008_0c00 as *const _;
2056 #[doc = r"Return the pointer to the register block"]
2057 #[inline(always)]
2058 pub const fn ptr() -> *const tmr0::RegisterBlock {
2059 Self::PTR
2060 }
2061 #[doc = r" Steal an instance of this peripheral"]
2062 #[doc = r""]
2063 #[doc = r" # Safety"]
2064 #[doc = r""]
2065 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2066 #[doc = r" that may race with any existing instances, for example by only"]
2067 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2068 #[doc = r" original peripheral and using critical sections to coordinate"]
2069 #[doc = r" access between multiple new instances."]
2070 #[doc = r""]
2071 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2072 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2073 #[doc = r" no stolen instances are passed to such software."]
2074 pub unsafe fn steal() -> Self {
2075 Self {
2076 _marker: PhantomData,
2077 }
2078 }
2079}
2080impl Deref for Tmr4 {
2081 type Target = tmr0::RegisterBlock;
2082 #[inline(always)]
2083 fn deref(&self) -> &Self::Target {
2084 unsafe { &*Self::PTR }
2085 }
2086}
2087impl core::fmt::Debug for Tmr4 {
2088 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2089 f.debug_struct("Tmr4").finish()
2090 }
2091}
2092#[doc = "Low-Power Configurable Timer 4"]
2093pub use self::tmr0 as tmr4;
2094#[doc = "Low-Power Configurable Timer 5"]
2095pub struct Tmr5 {
2096 _marker: PhantomData<*const ()>,
2097}
2098unsafe impl Send for Tmr5 {}
2099impl Tmr5 {
2100 #[doc = r"Pointer to the register block"]
2101 pub const PTR: *const tmr0::RegisterBlock = 0x4008_1000 as *const _;
2102 #[doc = r"Return the pointer to the register block"]
2103 #[inline(always)]
2104 pub const fn ptr() -> *const tmr0::RegisterBlock {
2105 Self::PTR
2106 }
2107 #[doc = r" Steal an instance of this peripheral"]
2108 #[doc = r""]
2109 #[doc = r" # Safety"]
2110 #[doc = r""]
2111 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2112 #[doc = r" that may race with any existing instances, for example by only"]
2113 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2114 #[doc = r" original peripheral and using critical sections to coordinate"]
2115 #[doc = r" access between multiple new instances."]
2116 #[doc = r""]
2117 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2118 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2119 #[doc = r" no stolen instances are passed to such software."]
2120 pub unsafe fn steal() -> Self {
2121 Self {
2122 _marker: PhantomData,
2123 }
2124 }
2125}
2126impl Deref for Tmr5 {
2127 type Target = tmr0::RegisterBlock;
2128 #[inline(always)]
2129 fn deref(&self) -> &Self::Target {
2130 unsafe { &*Self::PTR }
2131 }
2132}
2133impl core::fmt::Debug for Tmr5 {
2134 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2135 f.debug_struct("Tmr5").finish()
2136 }
2137}
2138#[doc = "Low-Power Configurable Timer 5"]
2139pub use self::tmr0 as tmr5;
2140#[doc = "Trim System Initilazation Registers"]
2141pub struct Trimsir {
2142 _marker: PhantomData<*const ()>,
2143}
2144unsafe impl Send for Trimsir {}
2145impl Trimsir {
2146 #[doc = r"Pointer to the register block"]
2147 pub const PTR: *const trimsir::RegisterBlock = 0x4000_5400 as *const _;
2148 #[doc = r"Return the pointer to the register block"]
2149 #[inline(always)]
2150 pub const fn ptr() -> *const trimsir::RegisterBlock {
2151 Self::PTR
2152 }
2153 #[doc = r" Steal an instance of this peripheral"]
2154 #[doc = r""]
2155 #[doc = r" # Safety"]
2156 #[doc = r""]
2157 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2158 #[doc = r" that may race with any existing instances, for example by only"]
2159 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2160 #[doc = r" original peripheral and using critical sections to coordinate"]
2161 #[doc = r" access between multiple new instances."]
2162 #[doc = r""]
2163 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2164 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2165 #[doc = r" no stolen instances are passed to such software."]
2166 pub unsafe fn steal() -> Self {
2167 Self {
2168 _marker: PhantomData,
2169 }
2170 }
2171}
2172impl Deref for Trimsir {
2173 type Target = trimsir::RegisterBlock;
2174 #[inline(always)]
2175 fn deref(&self) -> &Self::Target {
2176 unsafe { &*Self::PTR }
2177 }
2178}
2179impl core::fmt::Debug for Trimsir {
2180 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2181 f.debug_struct("Trimsir").finish()
2182 }
2183}
2184#[doc = "Trim System Initilazation Registers"]
2185pub mod trimsir;
2186#[doc = "Random Number Generator."]
2187pub struct Trng {
2188 _marker: PhantomData<*const ()>,
2189}
2190unsafe impl Send for Trng {}
2191impl Trng {
2192 #[doc = r"Pointer to the register block"]
2193 pub const PTR: *const trng::RegisterBlock = 0x4004_d000 as *const _;
2194 #[doc = r"Return the pointer to the register block"]
2195 #[inline(always)]
2196 pub const fn ptr() -> *const trng::RegisterBlock {
2197 Self::PTR
2198 }
2199 #[doc = r" Steal an instance of this peripheral"]
2200 #[doc = r""]
2201 #[doc = r" # Safety"]
2202 #[doc = r""]
2203 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2204 #[doc = r" that may race with any existing instances, for example by only"]
2205 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2206 #[doc = r" original peripheral and using critical sections to coordinate"]
2207 #[doc = r" access between multiple new instances."]
2208 #[doc = r""]
2209 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2210 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2211 #[doc = r" no stolen instances are passed to such software."]
2212 pub unsafe fn steal() -> Self {
2213 Self {
2214 _marker: PhantomData,
2215 }
2216 }
2217}
2218impl Deref for Trng {
2219 type Target = trng::RegisterBlock;
2220 #[inline(always)]
2221 fn deref(&self) -> &Self::Target {
2222 unsafe { &*Self::PTR }
2223 }
2224}
2225impl core::fmt::Debug for Trng {
2226 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2227 f.debug_struct("Trng").finish()
2228 }
2229}
2230#[doc = "Random Number Generator."]
2231pub mod trng;
2232#[doc = "UART Low Power Registers"]
2233pub struct Uart0 {
2234 _marker: PhantomData<*const ()>,
2235}
2236unsafe impl Send for Uart0 {}
2237impl Uart0 {
2238 #[doc = r"Pointer to the register block"]
2239 pub const PTR: *const uart0::RegisterBlock = 0x4004_2000 as *const _;
2240 #[doc = r"Return the pointer to the register block"]
2241 #[inline(always)]
2242 pub const fn ptr() -> *const uart0::RegisterBlock {
2243 Self::PTR
2244 }
2245 #[doc = r" Steal an instance of this peripheral"]
2246 #[doc = r""]
2247 #[doc = r" # Safety"]
2248 #[doc = r""]
2249 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2250 #[doc = r" that may race with any existing instances, for example by only"]
2251 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2252 #[doc = r" original peripheral and using critical sections to coordinate"]
2253 #[doc = r" access between multiple new instances."]
2254 #[doc = r""]
2255 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2256 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2257 #[doc = r" no stolen instances are passed to such software."]
2258 pub unsafe fn steal() -> Self {
2259 Self {
2260 _marker: PhantomData,
2261 }
2262 }
2263}
2264impl Deref for Uart0 {
2265 type Target = uart0::RegisterBlock;
2266 #[inline(always)]
2267 fn deref(&self) -> &Self::Target {
2268 unsafe { &*Self::PTR }
2269 }
2270}
2271impl core::fmt::Debug for Uart0 {
2272 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2273 f.debug_struct("Uart0").finish()
2274 }
2275}
2276#[doc = "UART Low Power Registers"]
2277pub mod uart0;
2278#[doc = "UART Low Power Registers 1"]
2279pub struct Uart1 {
2280 _marker: PhantomData<*const ()>,
2281}
2282unsafe impl Send for Uart1 {}
2283impl Uart1 {
2284 #[doc = r"Pointer to the register block"]
2285 pub const PTR: *const uart0::RegisterBlock = 0x4004_3000 as *const _;
2286 #[doc = r"Return the pointer to the register block"]
2287 #[inline(always)]
2288 pub const fn ptr() -> *const uart0::RegisterBlock {
2289 Self::PTR
2290 }
2291 #[doc = r" Steal an instance of this peripheral"]
2292 #[doc = r""]
2293 #[doc = r" # Safety"]
2294 #[doc = r""]
2295 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2296 #[doc = r" that may race with any existing instances, for example by only"]
2297 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2298 #[doc = r" original peripheral and using critical sections to coordinate"]
2299 #[doc = r" access between multiple new instances."]
2300 #[doc = r""]
2301 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2302 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2303 #[doc = r" no stolen instances are passed to such software."]
2304 pub unsafe fn steal() -> Self {
2305 Self {
2306 _marker: PhantomData,
2307 }
2308 }
2309}
2310impl Deref for Uart1 {
2311 type Target = uart0::RegisterBlock;
2312 #[inline(always)]
2313 fn deref(&self) -> &Self::Target {
2314 unsafe { &*Self::PTR }
2315 }
2316}
2317impl core::fmt::Debug for Uart1 {
2318 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2319 f.debug_struct("Uart1").finish()
2320 }
2321}
2322#[doc = "UART Low Power Registers 1"]
2323pub use self::uart0 as uart1;
2324#[doc = "UART Low Power Registers 2"]
2325pub struct Uart2 {
2326 _marker: PhantomData<*const ()>,
2327}
2328unsafe impl Send for Uart2 {}
2329impl Uart2 {
2330 #[doc = r"Pointer to the register block"]
2331 pub const PTR: *const uart0::RegisterBlock = 0x4004_4000 as *const _;
2332 #[doc = r"Return the pointer to the register block"]
2333 #[inline(always)]
2334 pub const fn ptr() -> *const uart0::RegisterBlock {
2335 Self::PTR
2336 }
2337 #[doc = r" Steal an instance of this peripheral"]
2338 #[doc = r""]
2339 #[doc = r" # Safety"]
2340 #[doc = r""]
2341 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2342 #[doc = r" that may race with any existing instances, for example by only"]
2343 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2344 #[doc = r" original peripheral and using critical sections to coordinate"]
2345 #[doc = r" access between multiple new instances."]
2346 #[doc = r""]
2347 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2348 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2349 #[doc = r" no stolen instances are passed to such software."]
2350 pub unsafe fn steal() -> Self {
2351 Self {
2352 _marker: PhantomData,
2353 }
2354 }
2355}
2356impl Deref for Uart2 {
2357 type Target = uart0::RegisterBlock;
2358 #[inline(always)]
2359 fn deref(&self) -> &Self::Target {
2360 unsafe { &*Self::PTR }
2361 }
2362}
2363impl core::fmt::Debug for Uart2 {
2364 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2365 f.debug_struct("Uart2").finish()
2366 }
2367}
2368#[doc = "UART Low Power Registers 2"]
2369pub use self::uart0 as uart2;
2370#[doc = "UART Low Power Registers 3"]
2371pub struct Uart3 {
2372 _marker: PhantomData<*const ()>,
2373}
2374unsafe impl Send for Uart3 {}
2375impl Uart3 {
2376 #[doc = r"Pointer to the register block"]
2377 pub const PTR: *const uart0::RegisterBlock = 0x4008_1400 as *const _;
2378 #[doc = r"Return the pointer to the register block"]
2379 #[inline(always)]
2380 pub const fn ptr() -> *const uart0::RegisterBlock {
2381 Self::PTR
2382 }
2383 #[doc = r" Steal an instance of this peripheral"]
2384 #[doc = r""]
2385 #[doc = r" # Safety"]
2386 #[doc = r""]
2387 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2388 #[doc = r" that may race with any existing instances, for example by only"]
2389 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2390 #[doc = r" original peripheral and using critical sections to coordinate"]
2391 #[doc = r" access between multiple new instances."]
2392 #[doc = r""]
2393 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2394 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2395 #[doc = r" no stolen instances are passed to such software."]
2396 pub unsafe fn steal() -> Self {
2397 Self {
2398 _marker: PhantomData,
2399 }
2400 }
2401}
2402impl Deref for Uart3 {
2403 type Target = uart0::RegisterBlock;
2404 #[inline(always)]
2405 fn deref(&self) -> &Self::Target {
2406 unsafe { &*Self::PTR }
2407 }
2408}
2409impl core::fmt::Debug for Uart3 {
2410 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2411 f.debug_struct("Uart3").finish()
2412 }
2413}
2414#[doc = "UART Low Power Registers 3"]
2415pub use self::uart0 as uart3;
2416#[doc = "Windowed Watchdog Timer"]
2417pub struct Wdt0 {
2418 _marker: PhantomData<*const ()>,
2419}
2420unsafe impl Send for Wdt0 {}
2421impl Wdt0 {
2422 #[doc = r"Pointer to the register block"]
2423 pub const PTR: *const wdt0::RegisterBlock = 0x4000_3000 as *const _;
2424 #[doc = r"Return the pointer to the register block"]
2425 #[inline(always)]
2426 pub const fn ptr() -> *const wdt0::RegisterBlock {
2427 Self::PTR
2428 }
2429 #[doc = r" Steal an instance of this peripheral"]
2430 #[doc = r""]
2431 #[doc = r" # Safety"]
2432 #[doc = r""]
2433 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2434 #[doc = r" that may race with any existing instances, for example by only"]
2435 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2436 #[doc = r" original peripheral and using critical sections to coordinate"]
2437 #[doc = r" access between multiple new instances."]
2438 #[doc = r""]
2439 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2440 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2441 #[doc = r" no stolen instances are passed to such software."]
2442 pub unsafe fn steal() -> Self {
2443 Self {
2444 _marker: PhantomData,
2445 }
2446 }
2447}
2448impl Deref for Wdt0 {
2449 type Target = wdt0::RegisterBlock;
2450 #[inline(always)]
2451 fn deref(&self) -> &Self::Target {
2452 unsafe { &*Self::PTR }
2453 }
2454}
2455impl core::fmt::Debug for Wdt0 {
2456 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2457 f.debug_struct("Wdt0").finish()
2458 }
2459}
2460#[doc = "Windowed Watchdog Timer"]
2461pub mod wdt0;
2462#[doc = "Windowed Watchdog Timer 1"]
2463pub struct Wdt1 {
2464 _marker: PhantomData<*const ()>,
2465}
2466unsafe impl Send for Wdt1 {}
2467impl Wdt1 {
2468 #[doc = r"Pointer to the register block"]
2469 pub const PTR: *const wdt0::RegisterBlock = 0x4008_0800 as *const _;
2470 #[doc = r"Return the pointer to the register block"]
2471 #[inline(always)]
2472 pub const fn ptr() -> *const wdt0::RegisterBlock {
2473 Self::PTR
2474 }
2475 #[doc = r" Steal an instance of this peripheral"]
2476 #[doc = r""]
2477 #[doc = r" # Safety"]
2478 #[doc = r""]
2479 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2480 #[doc = r" that may race with any existing instances, for example by only"]
2481 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2482 #[doc = r" original peripheral and using critical sections to coordinate"]
2483 #[doc = r" access between multiple new instances."]
2484 #[doc = r""]
2485 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2486 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2487 #[doc = r" no stolen instances are passed to such software."]
2488 pub unsafe fn steal() -> Self {
2489 Self {
2490 _marker: PhantomData,
2491 }
2492 }
2493}
2494impl Deref for Wdt1 {
2495 type Target = wdt0::RegisterBlock;
2496 #[inline(always)]
2497 fn deref(&self) -> &Self::Target {
2498 unsafe { &*Self::PTR }
2499 }
2500}
2501impl core::fmt::Debug for Wdt1 {
2502 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2503 f.debug_struct("Wdt1").finish()
2504 }
2505}
2506#[doc = "Windowed Watchdog Timer 1"]
2507pub use self::wdt0 as wdt1;
2508#[doc = "32-bit reloadable timer that can be used for timing and wakeup."]
2509pub struct Wut {
2510 _marker: PhantomData<*const ()>,
2511}
2512unsafe impl Send for Wut {}
2513impl Wut {
2514 #[doc = r"Pointer to the register block"]
2515 pub const PTR: *const wut::RegisterBlock = 0x4000_6400 as *const _;
2516 #[doc = r"Return the pointer to the register block"]
2517 #[inline(always)]
2518 pub const fn ptr() -> *const wut::RegisterBlock {
2519 Self::PTR
2520 }
2521 #[doc = r" Steal an instance of this peripheral"]
2522 #[doc = r""]
2523 #[doc = r" # Safety"]
2524 #[doc = r""]
2525 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
2526 #[doc = r" that may race with any existing instances, for example by only"]
2527 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
2528 #[doc = r" original peripheral and using critical sections to coordinate"]
2529 #[doc = r" access between multiple new instances."]
2530 #[doc = r""]
2531 #[doc = r" Additionally, other software such as HALs may rely on only one"]
2532 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
2533 #[doc = r" no stolen instances are passed to such software."]
2534 pub unsafe fn steal() -> Self {
2535 Self {
2536 _marker: PhantomData,
2537 }
2538 }
2539}
2540impl Deref for Wut {
2541 type Target = wut::RegisterBlock;
2542 #[inline(always)]
2543 fn deref(&self) -> &Self::Target {
2544 unsafe { &*Self::PTR }
2545 }
2546}
2547impl core::fmt::Debug for Wut {
2548 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2549 f.debug_struct("Wut").finish()
2550 }
2551}
2552#[doc = "32-bit reloadable timer that can be used for timing and wakeup."]
2553pub mod wut;
2554#[no_mangle]
2555static mut DEVICE_PERIPHERALS: bool = false;
2556#[doc = r" All the peripherals."]
2557#[allow(non_snake_case)]
2558pub struct Peripherals {
2559 #[doc = "ADC"]
2560 pub adc: Adc,
2561 #[doc = "AES"]
2562 pub aes: Aes,
2563 #[doc = "AESKEYS"]
2564 pub aeskeys: Aeskeys,
2565 #[doc = "CAMERAIF"]
2566 pub cameraif: Cameraif,
2567 #[doc = "CRC"]
2568 pub crc: Crc,
2569 #[doc = "DMA"]
2570 pub dma: Dma,
2571 #[doc = "DVS"]
2572 pub dvs: Dvs,
2573 #[doc = "FCR"]
2574 pub fcr: Fcr,
2575 #[doc = "FLC"]
2576 pub flc: Flc,
2577 #[doc = "GCR"]
2578 pub gcr: Gcr,
2579 #[doc = "GCFR"]
2580 pub gcfr: Gcfr,
2581 #[doc = "GPIO0"]
2582 pub gpio0: Gpio0,
2583 #[doc = "GPIO1"]
2584 pub gpio1: Gpio1,
2585 #[doc = "GPIO2"]
2586 pub gpio2: Gpio2,
2587 #[doc = "I2C0"]
2588 pub i2c0: I2c0,
2589 #[doc = "I2C1"]
2590 pub i2c1: I2c1,
2591 #[doc = "I2C2"]
2592 pub i2c2: I2c2,
2593 #[doc = "I2S"]
2594 pub i2s: I2s,
2595 #[doc = "ICC0"]
2596 pub icc0: Icc0,
2597 #[doc = "LPCMP"]
2598 pub lpcmp: Lpcmp,
2599 #[doc = "LPGCR"]
2600 pub lpgcr: Lpgcr,
2601 #[doc = "MCR"]
2602 pub mcr: Mcr,
2603 #[doc = "OWM"]
2604 pub owm: Owm,
2605 #[doc = "PT0"]
2606 pub pt0: Pt0,
2607 #[doc = "PT1"]
2608 pub pt1: Pt1,
2609 #[doc = "PT2"]
2610 pub pt2: Pt2,
2611 #[doc = "PT3"]
2612 pub pt3: Pt3,
2613 #[doc = "PTG"]
2614 pub ptg: Ptg,
2615 #[doc = "PWRSEQ"]
2616 pub pwrseq: Pwrseq,
2617 #[doc = "RTC"]
2618 pub rtc: Rtc,
2619 #[doc = "SEMA"]
2620 pub sema: Sema,
2621 #[doc = "SIMO"]
2622 pub simo: Simo,
2623 #[doc = "SIR"]
2624 pub sir: Sir,
2625 #[doc = "SPI0"]
2626 pub spi0: Spi0,
2627 #[doc = "SPI1"]
2628 pub spi1: Spi1,
2629 #[doc = "TMR0"]
2630 pub tmr0: Tmr0,
2631 #[doc = "TMR1"]
2632 pub tmr1: Tmr1,
2633 #[doc = "TMR2"]
2634 pub tmr2: Tmr2,
2635 #[doc = "TMR3"]
2636 pub tmr3: Tmr3,
2637 #[doc = "TMR4"]
2638 pub tmr4: Tmr4,
2639 #[doc = "TMR5"]
2640 pub tmr5: Tmr5,
2641 #[doc = "TRIMSIR"]
2642 pub trimsir: Trimsir,
2643 #[doc = "TRNG"]
2644 pub trng: Trng,
2645 #[doc = "UART0"]
2646 pub uart0: Uart0,
2647 #[doc = "UART1"]
2648 pub uart1: Uart1,
2649 #[doc = "UART2"]
2650 pub uart2: Uart2,
2651 #[doc = "UART3"]
2652 pub uart3: Uart3,
2653 #[doc = "WDT0"]
2654 pub wdt0: Wdt0,
2655 #[doc = "WDT1"]
2656 pub wdt1: Wdt1,
2657 #[doc = "WUT"]
2658 pub wut: Wut,
2659}
2660impl Peripherals {
2661 #[doc = r" Returns all the peripherals *once*."]
2662 #[cfg(feature = "critical-section")]
2663 #[inline]
2664 pub fn take() -> Option<Self> {
2665 critical_section::with(|_| {
2666 if unsafe { DEVICE_PERIPHERALS } {
2667 return None;
2668 }
2669 Some(unsafe { Peripherals::steal() })
2670 })
2671 }
2672 #[doc = r" Unchecked version of `Peripherals::take`."]
2673 #[doc = r""]
2674 #[doc = r" # Safety"]
2675 #[doc = r""]
2676 #[doc = r" Each of the returned peripherals must be used at most once."]
2677 #[inline]
2678 pub unsafe fn steal() -> Self {
2679 DEVICE_PERIPHERALS = true;
2680 Peripherals {
2681 adc: Adc::steal(),
2682 aes: Aes::steal(),
2683 aeskeys: Aeskeys::steal(),
2684 cameraif: Cameraif::steal(),
2685 crc: Crc::steal(),
2686 dma: Dma::steal(),
2687 dvs: Dvs::steal(),
2688 fcr: Fcr::steal(),
2689 flc: Flc::steal(),
2690 gcr: Gcr::steal(),
2691 gcfr: Gcfr::steal(),
2692 gpio0: Gpio0::steal(),
2693 gpio1: Gpio1::steal(),
2694 gpio2: Gpio2::steal(),
2695 i2c0: I2c0::steal(),
2696 i2c1: I2c1::steal(),
2697 i2c2: I2c2::steal(),
2698 i2s: I2s::steal(),
2699 icc0: Icc0::steal(),
2700 lpcmp: Lpcmp::steal(),
2701 lpgcr: Lpgcr::steal(),
2702 mcr: Mcr::steal(),
2703 owm: Owm::steal(),
2704 pt0: Pt0::steal(),
2705 pt1: Pt1::steal(),
2706 pt2: Pt2::steal(),
2707 pt3: Pt3::steal(),
2708 ptg: Ptg::steal(),
2709 pwrseq: Pwrseq::steal(),
2710 rtc: Rtc::steal(),
2711 sema: Sema::steal(),
2712 simo: Simo::steal(),
2713 sir: Sir::steal(),
2714 spi0: Spi0::steal(),
2715 spi1: Spi1::steal(),
2716 tmr0: Tmr0::steal(),
2717 tmr1: Tmr1::steal(),
2718 tmr2: Tmr2::steal(),
2719 tmr3: Tmr3::steal(),
2720 tmr4: Tmr4::steal(),
2721 tmr5: Tmr5::steal(),
2722 trimsir: Trimsir::steal(),
2723 trng: Trng::steal(),
2724 uart0: Uart0::steal(),
2725 uart1: Uart1::steal(),
2726 uart2: Uart2::steal(),
2727 uart3: Uart3::steal(),
2728 wdt0: Wdt0::steal(),
2729 wdt1: Wdt1::steal(),
2730 wut: Wut::steal(),
2731 }
2732 }
2733}