1#![doc = "Peripheral access API for CYT4BB microcontrollers (generated using svd2rust v0.28.0 (54a7f49 2023-02-14))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
2svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.28.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
3#![deny(dead_code)]
4#![deny(improper_ctypes)]
5#![deny(missing_docs)]
6#![deny(no_mangle_generic_items)]
7#![deny(non_shorthand_field_patterns)]
8#![deny(overflowing_literals)]
9#![deny(path_statements)]
10#![deny(patterns_in_fns_without_body)]
11#![deny(private_in_public)]
12#![deny(unconditional_recursion)]
13#![deny(unused_allocation)]
14#![deny(unused_comparisons)]
15#![deny(unused_parens)]
16#![deny(while_true)]
17#![allow(non_camel_case_types)]
18#![allow(non_snake_case)]
19use core::marker::PhantomData;
20use core::ops::Deref;
21#[doc = r"Number available in the NVIC for configuring priority"]
22pub const NVIC_PRIO_BITS: u8 = 2;
23#[cfg(feature = "rt")]
24pub use self::Interrupt as interrupt;
25#[allow(unused_imports)]
26use crate::generic::*;
27pub use cortex_m::peripheral::Peripherals as CorePeripherals;
28pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, ITM, MPU, NVIC, SCB, SYST, TPIU};
29#[cfg(feature = "rt")]
30pub use cortex_m_rt::interrupt;
31#[cfg(feature = "rt")]
32extern "C" {
33 fn CPUINT_IDX0();
34 fn CPUINT_IDX1();
35 fn CPUINT_IDX2();
36 fn CPUINT_IDX3();
37 fn CPUINT_IDX4();
38 fn CPUINT_IDX5();
39 fn CPUINT_IDX6();
40 fn CPUINT_IDX7();
41 fn INTERNAL0();
42 fn INTERNAL1();
43 fn INTERNAL2();
44 fn INTERNAL3();
45 fn INTERNAL4();
46 fn INTERNAL5();
47 fn INTERNAL6();
48 fn INTERNAL7();
49}
50#[doc(hidden)]
51pub union Vector {
52 _handler: unsafe extern "C" fn(),
53 _reserved: u32,
54}
55#[cfg(feature = "rt")]
56#[doc(hidden)]
57#[link_section = ".vector_table.interrupts"]
58#[no_mangle]
59pub static __INTERRUPTS: [Vector; 16] = [
60 Vector {
61 _handler: CPUINT_IDX0,
62 },
63 Vector {
64 _handler: CPUINT_IDX1,
65 },
66 Vector {
67 _handler: CPUINT_IDX2,
68 },
69 Vector {
70 _handler: CPUINT_IDX3,
71 },
72 Vector {
73 _handler: CPUINT_IDX4,
74 },
75 Vector {
76 _handler: CPUINT_IDX5,
77 },
78 Vector {
79 _handler: CPUINT_IDX6,
80 },
81 Vector {
82 _handler: CPUINT_IDX7,
83 },
84 Vector {
85 _handler: INTERNAL0,
86 },
87 Vector {
88 _handler: INTERNAL1,
89 },
90 Vector {
91 _handler: INTERNAL2,
92 },
93 Vector {
94 _handler: INTERNAL3,
95 },
96 Vector {
97 _handler: INTERNAL4,
98 },
99 Vector {
100 _handler: INTERNAL5,
101 },
102 Vector {
103 _handler: INTERNAL6,
104 },
105 Vector {
106 _handler: INTERNAL7,
107 },
108];
109#[doc = r"Enumeration of all the interrupts."]
110#[derive(Copy, Clone, Debug, PartialEq, Eq)]
111#[repr(u16)]
112pub enum Interrupt {
113 #[doc = "0 - CPU User Interrupt #0"]
114 CPUINT_IDX0 = 0,
115 #[doc = "1 - CPU User Interrupt #1"]
116 CPUINT_IDX1 = 1,
117 #[doc = "2 - CPU User Interrupt #2"]
118 CPUINT_IDX2 = 2,
119 #[doc = "3 - CPU User Interrupt #3"]
120 CPUINT_IDX3 = 3,
121 #[doc = "4 - CPU User Interrupt #4"]
122 CPUINT_IDX4 = 4,
123 #[doc = "5 - CPU User Interrupt #5"]
124 CPUINT_IDX5 = 5,
125 #[doc = "6 - CPU User Interrupt #6"]
126 CPUINT_IDX6 = 6,
127 #[doc = "7 - CPU User Interrupt #7"]
128 CPUINT_IDX7 = 7,
129 #[doc = "8 - Internal SW Interrupt #0"]
130 INTERNAL0 = 8,
131 #[doc = "9 - Internal SW Interrupt #1"]
132 INTERNAL1 = 9,
133 #[doc = "10 - Internal SW Interrupt #2"]
134 INTERNAL2 = 10,
135 #[doc = "11 - Internal SW Interrupt #3"]
136 INTERNAL3 = 11,
137 #[doc = "12 - Internal SW Interrupt #4"]
138 INTERNAL4 = 12,
139 #[doc = "13 - Internal SW Interrupt #5"]
140 INTERNAL5 = 13,
141 #[doc = "14 - Internal SW Interrupt #6"]
142 INTERNAL6 = 14,
143 #[doc = "15 - Internal SW Interrupt #7"]
144 INTERNAL7 = 15,
145}
146unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
147 #[inline(always)]
148 fn number(self) -> u16 {
149 self as u16
150 }
151}
152#[doc = "Peripheral interconnect"]
153pub struct PERI {
154 _marker: PhantomData<*const ()>,
155}
156unsafe impl Send for PERI {}
157impl PERI {
158 #[doc = r"Pointer to the register block"]
159 pub const PTR: *const peri::RegisterBlock = 0x4000_0000 as *const _;
160 #[doc = r"Return the pointer to the register block"]
161 #[inline(always)]
162 pub const fn ptr() -> *const peri::RegisterBlock {
163 Self::PTR
164 }
165}
166impl Deref for PERI {
167 type Target = peri::RegisterBlock;
168 #[inline(always)]
169 fn deref(&self) -> &Self::Target {
170 unsafe { &*Self::PTR }
171 }
172}
173impl core::fmt::Debug for PERI {
174 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
175 f.debug_struct("PERI").finish()
176 }
177}
178#[doc = "Peripheral interconnect"]
179pub mod peri;
180#[doc = "Peripheral interconnect, master interface"]
181pub struct PERI_MS {
182 _marker: PhantomData<*const ()>,
183}
184unsafe impl Send for PERI_MS {}
185impl PERI_MS {
186 #[doc = r"Pointer to the register block"]
187 pub const PTR: *const peri_ms::RegisterBlock = 0x4002_0000 as *const _;
188 #[doc = r"Return the pointer to the register block"]
189 #[inline(always)]
190 pub const fn ptr() -> *const peri_ms::RegisterBlock {
191 Self::PTR
192 }
193}
194impl Deref for PERI_MS {
195 type Target = peri_ms::RegisterBlock;
196 #[inline(always)]
197 fn deref(&self) -> &Self::Target {
198 unsafe { &*Self::PTR }
199 }
200}
201impl core::fmt::Debug for PERI_MS {
202 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
203 f.debug_struct("PERI_MS").finish()
204 }
205}
206#[doc = "Peripheral interconnect, master interface"]
207pub mod peri_ms;
208#[doc = "Peripheral PCLK groups"]
209pub struct PERI_PCLK {
210 _marker: PhantomData<*const ()>,
211}
212unsafe impl Send for PERI_PCLK {}
213impl PERI_PCLK {
214 #[doc = r"Pointer to the register block"]
215 pub const PTR: *const peri_pclk::RegisterBlock = 0x4004_0000 as *const _;
216 #[doc = r"Return the pointer to the register block"]
217 #[inline(always)]
218 pub const fn ptr() -> *const peri_pclk::RegisterBlock {
219 Self::PTR
220 }
221}
222impl Deref for PERI_PCLK {
223 type Target = peri_pclk::RegisterBlock;
224 #[inline(always)]
225 fn deref(&self) -> &Self::Target {
226 unsafe { &*Self::PTR }
227 }
228}
229impl core::fmt::Debug for PERI_PCLK {
230 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
231 f.debug_struct("PERI_PCLK").finish()
232 }
233}
234#[doc = "Peripheral PCLK groups"]
235pub mod peri_pclk;
236#[doc = "Cryptography component"]
237pub struct CRYPTO {
238 _marker: PhantomData<*const ()>,
239}
240unsafe impl Send for CRYPTO {}
241impl CRYPTO {
242 #[doc = r"Pointer to the register block"]
243 pub const PTR: *const crypto::RegisterBlock = 0x4010_0000 as *const _;
244 #[doc = r"Return the pointer to the register block"]
245 #[inline(always)]
246 pub const fn ptr() -> *const crypto::RegisterBlock {
247 Self::PTR
248 }
249}
250impl Deref for CRYPTO {
251 type Target = crypto::RegisterBlock;
252 #[inline(always)]
253 fn deref(&self) -> &Self::Target {
254 unsafe { &*Self::PTR }
255 }
256}
257impl core::fmt::Debug for CRYPTO {
258 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
259 f.debug_struct("CRYPTO").finish()
260 }
261}
262#[doc = "Cryptography component"]
263pub mod crypto;
264#[doc = "CPU subsystem (CPUSS)"]
265pub struct CPUSS {
266 _marker: PhantomData<*const ()>,
267}
268unsafe impl Send for CPUSS {}
269impl CPUSS {
270 #[doc = r"Pointer to the register block"]
271 pub const PTR: *const cpuss::RegisterBlock = 0x4020_0000 as *const _;
272 #[doc = r"Return the pointer to the register block"]
273 #[inline(always)]
274 pub const fn ptr() -> *const cpuss::RegisterBlock {
275 Self::PTR
276 }
277}
278impl Deref for CPUSS {
279 type Target = cpuss::RegisterBlock;
280 #[inline(always)]
281 fn deref(&self) -> &Self::Target {
282 unsafe { &*Self::PTR }
283 }
284}
285impl core::fmt::Debug for CPUSS {
286 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
287 f.debug_struct("CPUSS").finish()
288 }
289}
290#[doc = "CPU subsystem (CPUSS)"]
291pub mod cpuss;
292#[doc = "Fault structures"]
293pub struct FAULT {
294 _marker: PhantomData<*const ()>,
295}
296unsafe impl Send for FAULT {}
297impl FAULT {
298 #[doc = r"Pointer to the register block"]
299 pub const PTR: *const fault::RegisterBlock = 0x4021_0000 as *const _;
300 #[doc = r"Return the pointer to the register block"]
301 #[inline(always)]
302 pub const fn ptr() -> *const fault::RegisterBlock {
303 Self::PTR
304 }
305}
306impl Deref for FAULT {
307 type Target = fault::RegisterBlock;
308 #[inline(always)]
309 fn deref(&self) -> &Self::Target {
310 unsafe { &*Self::PTR }
311 }
312}
313impl core::fmt::Debug for FAULT {
314 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
315 f.debug_struct("FAULT").finish()
316 }
317}
318#[doc = "Fault structures"]
319pub mod fault;
320#[doc = "IPC"]
321pub struct IPC {
322 _marker: PhantomData<*const ()>,
323}
324unsafe impl Send for IPC {}
325impl IPC {
326 #[doc = r"Pointer to the register block"]
327 pub const PTR: *const ipc::RegisterBlock = 0x4022_0000 as *const _;
328 #[doc = r"Return the pointer to the register block"]
329 #[inline(always)]
330 pub const fn ptr() -> *const ipc::RegisterBlock {
331 Self::PTR
332 }
333}
334impl Deref for IPC {
335 type Target = ipc::RegisterBlock;
336 #[inline(always)]
337 fn deref(&self) -> &Self::Target {
338 unsafe { &*Self::PTR }
339 }
340}
341impl core::fmt::Debug for IPC {
342 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
343 f.debug_struct("IPC").finish()
344 }
345}
346#[doc = "IPC"]
347pub mod ipc;
348#[doc = "Protection"]
349pub struct PROT {
350 _marker: PhantomData<*const ()>,
351}
352unsafe impl Send for PROT {}
353impl PROT {
354 #[doc = r"Pointer to the register block"]
355 pub const PTR: *const prot::RegisterBlock = 0x4023_0000 as *const _;
356 #[doc = r"Return the pointer to the register block"]
357 #[inline(always)]
358 pub const fn ptr() -> *const prot::RegisterBlock {
359 Self::PTR
360 }
361}
362impl Deref for PROT {
363 type Target = prot::RegisterBlock;
364 #[inline(always)]
365 fn deref(&self) -> &Self::Target {
366 unsafe { &*Self::PTR }
367 }
368}
369impl core::fmt::Debug for PROT {
370 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
371 f.debug_struct("PROT").finish()
372 }
373}
374#[doc = "Protection"]
375pub mod prot;
376#[doc = "Flash controller"]
377pub struct FLASHC {
378 _marker: PhantomData<*const ()>,
379}
380unsafe impl Send for FLASHC {}
381impl FLASHC {
382 #[doc = r"Pointer to the register block"]
383 pub const PTR: *const flashc::RegisterBlock = 0x4024_0000 as *const _;
384 #[doc = r"Return the pointer to the register block"]
385 #[inline(always)]
386 pub const fn ptr() -> *const flashc::RegisterBlock {
387 Self::PTR
388 }
389}
390impl Deref for FLASHC {
391 type Target = flashc::RegisterBlock;
392 #[inline(always)]
393 fn deref(&self) -> &Self::Target {
394 unsafe { &*Self::PTR }
395 }
396}
397impl core::fmt::Debug for FLASHC {
398 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
399 f.debug_struct("FLASHC").finish()
400 }
401}
402#[doc = "Flash controller"]
403pub mod flashc;
404#[doc = "SRSS Core Registers (ver3)"]
405pub struct SRSS {
406 _marker: PhantomData<*const ()>,
407}
408unsafe impl Send for SRSS {}
409impl SRSS {
410 #[doc = r"Pointer to the register block"]
411 pub const PTR: *const srss::RegisterBlock = 0x4026_0000 as *const _;
412 #[doc = r"Return the pointer to the register block"]
413 #[inline(always)]
414 pub const fn ptr() -> *const srss::RegisterBlock {
415 Self::PTR
416 }
417}
418impl Deref for SRSS {
419 type Target = srss::RegisterBlock;
420 #[inline(always)]
421 fn deref(&self) -> &Self::Target {
422 unsafe { &*Self::PTR }
423 }
424}
425impl core::fmt::Debug for SRSS {
426 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
427 f.debug_struct("SRSS").finish()
428 }
429}
430#[doc = "SRSS Core Registers (ver3)"]
431pub mod srss;
432#[doc = "SRSS Backup Domain (ver3)"]
433pub struct BACKUP {
434 _marker: PhantomData<*const ()>,
435}
436unsafe impl Send for BACKUP {}
437impl BACKUP {
438 #[doc = r"Pointer to the register block"]
439 pub const PTR: *const backup::RegisterBlock = 0x4027_0000 as *const _;
440 #[doc = r"Return the pointer to the register block"]
441 #[inline(always)]
442 pub const fn ptr() -> *const backup::RegisterBlock {
443 Self::PTR
444 }
445}
446impl Deref for BACKUP {
447 type Target = backup::RegisterBlock;
448 #[inline(always)]
449 fn deref(&self) -> &Self::Target {
450 unsafe { &*Self::PTR }
451 }
452}
453impl core::fmt::Debug for BACKUP {
454 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
455 f.debug_struct("BACKUP").finish()
456 }
457}
458#[doc = "SRSS Backup Domain (ver3)"]
459pub mod backup;
460#[doc = "Datawire Controller"]
461pub struct DW0 {
462 _marker: PhantomData<*const ()>,
463}
464unsafe impl Send for DW0 {}
465impl DW0 {
466 #[doc = r"Pointer to the register block"]
467 pub const PTR: *const dw0::RegisterBlock = 0x4028_0000 as *const _;
468 #[doc = r"Return the pointer to the register block"]
469 #[inline(always)]
470 pub const fn ptr() -> *const dw0::RegisterBlock {
471 Self::PTR
472 }
473}
474impl Deref for DW0 {
475 type Target = dw0::RegisterBlock;
476 #[inline(always)]
477 fn deref(&self) -> &Self::Target {
478 unsafe { &*Self::PTR }
479 }
480}
481impl core::fmt::Debug for DW0 {
482 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
483 f.debug_struct("DW0").finish()
484 }
485}
486#[doc = "Datawire Controller"]
487pub mod dw0;
488#[doc = "Datawire Controller"]
489pub struct DW1 {
490 _marker: PhantomData<*const ()>,
491}
492unsafe impl Send for DW1 {}
493impl DW1 {
494 #[doc = r"Pointer to the register block"]
495 pub const PTR: *const dw0::RegisterBlock = 0x4029_0000 as *const _;
496 #[doc = r"Return the pointer to the register block"]
497 #[inline(always)]
498 pub const fn ptr() -> *const dw0::RegisterBlock {
499 Self::PTR
500 }
501}
502impl Deref for DW1 {
503 type Target = dw0::RegisterBlock;
504 #[inline(always)]
505 fn deref(&self) -> &Self::Target {
506 unsafe { &*Self::PTR }
507 }
508}
509impl core::fmt::Debug for DW1 {
510 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
511 f.debug_struct("DW1").finish()
512 }
513}
514#[doc = "Datawire Controller"]
515pub use self::dw0 as dw1;
516#[doc = "DMAC"]
517pub struct DMAC {
518 _marker: PhantomData<*const ()>,
519}
520unsafe impl Send for DMAC {}
521impl DMAC {
522 #[doc = r"Pointer to the register block"]
523 pub const PTR: *const dmac::RegisterBlock = 0x402a_0000 as *const _;
524 #[doc = r"Return the pointer to the register block"]
525 #[inline(always)]
526 pub const fn ptr() -> *const dmac::RegisterBlock {
527 Self::PTR
528 }
529}
530impl Deref for DMAC {
531 type Target = dmac::RegisterBlock;
532 #[inline(always)]
533 fn deref(&self) -> &Self::Target {
534 unsafe { &*Self::PTR }
535 }
536}
537impl core::fmt::Debug for DMAC {
538 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
539 f.debug_struct("DMAC").finish()
540 }
541}
542#[doc = "DMAC"]
543pub mod dmac;
544#[doc = "EFUSE MXS40 registers"]
545pub struct EFUSE {
546 _marker: PhantomData<*const ()>,
547}
548unsafe impl Send for EFUSE {}
549impl EFUSE {
550 #[doc = r"Pointer to the register block"]
551 pub const PTR: *const efuse::RegisterBlock = 0x402c_0000 as *const _;
552 #[doc = r"Return the pointer to the register block"]
553 #[inline(always)]
554 pub const fn ptr() -> *const efuse::RegisterBlock {
555 Self::PTR
556 }
557}
558impl Deref for EFUSE {
559 type Target = efuse::RegisterBlock;
560 #[inline(always)]
561 fn deref(&self) -> &Self::Target {
562 unsafe { &*Self::PTR }
563 }
564}
565impl core::fmt::Debug for EFUSE {
566 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
567 f.debug_struct("EFUSE").finish()
568 }
569}
570#[doc = "EFUSE MXS40 registers"]
571pub mod efuse;
572#[doc = "eFUSE memory"]
573pub struct EFUSE_DATA {
574 _marker: PhantomData<*const ()>,
575}
576unsafe impl Send for EFUSE_DATA {}
577impl EFUSE_DATA {
578 #[doc = r"Pointer to the register block"]
579 pub const PTR: *const efuse_data::RegisterBlock = 0x402c_0800 as *const _;
580 #[doc = r"Return the pointer to the register block"]
581 #[inline(always)]
582 pub const fn ptr() -> *const efuse_data::RegisterBlock {
583 Self::PTR
584 }
585}
586impl Deref for EFUSE_DATA {
587 type Target = efuse_data::RegisterBlock;
588 #[inline(always)]
589 fn deref(&self) -> &Self::Target {
590 unsafe { &*Self::PTR }
591 }
592}
593impl core::fmt::Debug for EFUSE_DATA {
594 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
595 f.debug_struct("EFUSE_DATA").finish()
596 }
597}
598#[doc = "eFUSE memory"]
599pub mod efuse_data;
600#[doc = "High Speed IO Matrix (HSIOM)"]
601pub struct HSIOM {
602 _marker: PhantomData<*const ()>,
603}
604unsafe impl Send for HSIOM {}
605impl HSIOM {
606 #[doc = r"Pointer to the register block"]
607 pub const PTR: *const hsiom::RegisterBlock = 0x4030_0000 as *const _;
608 #[doc = r"Return the pointer to the register block"]
609 #[inline(always)]
610 pub const fn ptr() -> *const hsiom::RegisterBlock {
611 Self::PTR
612 }
613}
614impl Deref for HSIOM {
615 type Target = hsiom::RegisterBlock;
616 #[inline(always)]
617 fn deref(&self) -> &Self::Target {
618 unsafe { &*Self::PTR }
619 }
620}
621impl core::fmt::Debug for HSIOM {
622 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
623 f.debug_struct("HSIOM").finish()
624 }
625}
626#[doc = "High Speed IO Matrix (HSIOM)"]
627pub mod hsiom;
628#[doc = "GPIO port control/configuration"]
629pub struct GPIO {
630 _marker: PhantomData<*const ()>,
631}
632unsafe impl Send for GPIO {}
633impl GPIO {
634 #[doc = r"Pointer to the register block"]
635 pub const PTR: *const gpio::RegisterBlock = 0x4031_0000 as *const _;
636 #[doc = r"Return the pointer to the register block"]
637 #[inline(always)]
638 pub const fn ptr() -> *const gpio::RegisterBlock {
639 Self::PTR
640 }
641}
642impl Deref for GPIO {
643 type Target = gpio::RegisterBlock;
644 #[inline(always)]
645 fn deref(&self) -> &Self::Target {
646 unsafe { &*Self::PTR }
647 }
648}
649impl core::fmt::Debug for GPIO {
650 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
651 f.debug_struct("GPIO").finish()
652 }
653}
654#[doc = "GPIO port control/configuration"]
655pub mod gpio;
656#[doc = "Programmable IO configuration"]
657pub struct SMARTIO {
658 _marker: PhantomData<*const ()>,
659}
660unsafe impl Send for SMARTIO {}
661impl SMARTIO {
662 #[doc = r"Pointer to the register block"]
663 pub const PTR: *const smartio::RegisterBlock = 0x4032_0000 as *const _;
664 #[doc = r"Return the pointer to the register block"]
665 #[inline(always)]
666 pub const fn ptr() -> *const smartio::RegisterBlock {
667 Self::PTR
668 }
669}
670impl Deref for SMARTIO {
671 type Target = smartio::RegisterBlock;
672 #[inline(always)]
673 fn deref(&self) -> &Self::Target {
674 unsafe { &*Self::PTR }
675 }
676}
677impl core::fmt::Debug for SMARTIO {
678 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
679 f.debug_struct("SMARTIO").finish()
680 }
681}
682#[doc = "Programmable IO configuration"]
683pub mod smartio;
684#[doc = "Event generator"]
685pub struct EVTGEN0 {
686 _marker: PhantomData<*const ()>,
687}
688unsafe impl Send for EVTGEN0 {}
689impl EVTGEN0 {
690 #[doc = r"Pointer to the register block"]
691 pub const PTR: *const evtgen0::RegisterBlock = 0x403f_0000 as *const _;
692 #[doc = r"Return the pointer to the register block"]
693 #[inline(always)]
694 pub const fn ptr() -> *const evtgen0::RegisterBlock {
695 Self::PTR
696 }
697}
698impl Deref for EVTGEN0 {
699 type Target = evtgen0::RegisterBlock;
700 #[inline(always)]
701 fn deref(&self) -> &Self::Target {
702 unsafe { &*Self::PTR }
703 }
704}
705impl core::fmt::Debug for EVTGEN0 {
706 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
707 f.debug_struct("EVTGEN0").finish()
708 }
709}
710#[doc = "Event generator"]
711pub mod evtgen0;
712#[doc = "Serial Memory Interface"]
713pub struct SMIF0 {
714 _marker: PhantomData<*const ()>,
715}
716unsafe impl Send for SMIF0 {}
717impl SMIF0 {
718 #[doc = r"Pointer to the register block"]
719 pub const PTR: *const smif0::RegisterBlock = 0x4042_0000 as *const _;
720 #[doc = r"Return the pointer to the register block"]
721 #[inline(always)]
722 pub const fn ptr() -> *const smif0::RegisterBlock {
723 Self::PTR
724 }
725}
726impl Deref for SMIF0 {
727 type Target = smif0::RegisterBlock;
728 #[inline(always)]
729 fn deref(&self) -> &Self::Target {
730 unsafe { &*Self::PTR }
731 }
732}
733impl core::fmt::Debug for SMIF0 {
734 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
735 f.debug_struct("SMIF0").finish()
736 }
737}
738#[doc = "Serial Memory Interface"]
739pub mod smif0;
740#[doc = "SD/eMMC Host Controller"]
741pub struct SDHC0 {
742 _marker: PhantomData<*const ()>,
743}
744unsafe impl Send for SDHC0 {}
745impl SDHC0 {
746 #[doc = r"Pointer to the register block"]
747 pub const PTR: *const sdhc0::RegisterBlock = 0x4046_0000 as *const _;
748 #[doc = r"Return the pointer to the register block"]
749 #[inline(always)]
750 pub const fn ptr() -> *const sdhc0::RegisterBlock {
751 Self::PTR
752 }
753}
754impl Deref for SDHC0 {
755 type Target = sdhc0::RegisterBlock;
756 #[inline(always)]
757 fn deref(&self) -> &Self::Target {
758 unsafe { &*Self::PTR }
759 }
760}
761impl core::fmt::Debug for SDHC0 {
762 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
763 f.debug_struct("SDHC0").finish()
764 }
765}
766#[doc = "SD/eMMC Host Controller"]
767pub mod sdhc0;
768#[doc = "Ethernet Interface"]
769pub struct ETH0 {
770 _marker: PhantomData<*const ()>,
771}
772unsafe impl Send for ETH0 {}
773impl ETH0 {
774 #[doc = r"Pointer to the register block"]
775 pub const PTR: *const eth0::RegisterBlock = 0x4048_0000 as *const _;
776 #[doc = r"Return the pointer to the register block"]
777 #[inline(always)]
778 pub const fn ptr() -> *const eth0::RegisterBlock {
779 Self::PTR
780 }
781}
782impl Deref for ETH0 {
783 type Target = eth0::RegisterBlock;
784 #[inline(always)]
785 fn deref(&self) -> &Self::Target {
786 unsafe { &*Self::PTR }
787 }
788}
789impl core::fmt::Debug for ETH0 {
790 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
791 f.debug_struct("ETH0").finish()
792 }
793}
794#[doc = "Ethernet Interface"]
795pub mod eth0;
796#[doc = "LIN"]
797pub struct LIN0 {
798 _marker: PhantomData<*const ()>,
799}
800unsafe impl Send for LIN0 {}
801impl LIN0 {
802 #[doc = r"Pointer to the register block"]
803 pub const PTR: *const lin0::RegisterBlock = 0x4050_0000 as *const _;
804 #[doc = r"Return the pointer to the register block"]
805 #[inline(always)]
806 pub const fn ptr() -> *const lin0::RegisterBlock {
807 Self::PTR
808 }
809}
810impl Deref for LIN0 {
811 type Target = lin0::RegisterBlock;
812 #[inline(always)]
813 fn deref(&self) -> &Self::Target {
814 unsafe { &*Self::PTR }
815 }
816}
817impl core::fmt::Debug for LIN0 {
818 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
819 f.debug_struct("LIN0").finish()
820 }
821}
822#[doc = "LIN"]
823pub mod lin0;
824#[doc = "CAN Controller"]
825pub struct CANFD0 {
826 _marker: PhantomData<*const ()>,
827}
828unsafe impl Send for CANFD0 {}
829impl CANFD0 {
830 #[doc = r"Pointer to the register block"]
831 pub const PTR: *const canfd0::RegisterBlock = 0x4052_0000 as *const _;
832 #[doc = r"Return the pointer to the register block"]
833 #[inline(always)]
834 pub const fn ptr() -> *const canfd0::RegisterBlock {
835 Self::PTR
836 }
837}
838impl Deref for CANFD0 {
839 type Target = canfd0::RegisterBlock;
840 #[inline(always)]
841 fn deref(&self) -> &Self::Target {
842 unsafe { &*Self::PTR }
843 }
844}
845impl core::fmt::Debug for CANFD0 {
846 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
847 f.debug_struct("CANFD0").finish()
848 }
849}
850#[doc = "CAN Controller"]
851pub mod canfd0;
852#[doc = "CAN Controller"]
853pub struct CANFD1 {
854 _marker: PhantomData<*const ()>,
855}
856unsafe impl Send for CANFD1 {}
857impl CANFD1 {
858 #[doc = r"Pointer to the register block"]
859 pub const PTR: *const canfd0::RegisterBlock = 0x4054_0000 as *const _;
860 #[doc = r"Return the pointer to the register block"]
861 #[inline(always)]
862 pub const fn ptr() -> *const canfd0::RegisterBlock {
863 Self::PTR
864 }
865}
866impl Deref for CANFD1 {
867 type Target = canfd0::RegisterBlock;
868 #[inline(always)]
869 fn deref(&self) -> &Self::Target {
870 unsafe { &*Self::PTR }
871 }
872}
873impl core::fmt::Debug for CANFD1 {
874 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
875 f.debug_struct("CANFD1").finish()
876 }
877}
878#[doc = "CAN Controller"]
879pub use self::canfd0 as canfd1;
880#[doc = "Timer/Counter/PWM"]
881pub struct TCPWM0 {
882 _marker: PhantomData<*const ()>,
883}
884unsafe impl Send for TCPWM0 {}
885impl TCPWM0 {
886 #[doc = r"Pointer to the register block"]
887 pub const PTR: *const tcpwm0::RegisterBlock = 0x4058_0000 as *const _;
888 #[doc = r"Return the pointer to the register block"]
889 #[inline(always)]
890 pub const fn ptr() -> *const tcpwm0::RegisterBlock {
891 Self::PTR
892 }
893}
894impl Deref for TCPWM0 {
895 type Target = tcpwm0::RegisterBlock;
896 #[inline(always)]
897 fn deref(&self) -> &Self::Target {
898 unsafe { &*Self::PTR }
899 }
900}
901impl core::fmt::Debug for TCPWM0 {
902 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
903 f.debug_struct("TCPWM0").finish()
904 }
905}
906#[doc = "Timer/Counter/PWM"]
907pub mod tcpwm0;
908#[doc = "Serial Communications Block (SPI/UART/I2C)"]
909pub struct SCB0 {
910 _marker: PhantomData<*const ()>,
911}
912unsafe impl Send for SCB0 {}
913impl SCB0 {
914 #[doc = r"Pointer to the register block"]
915 pub const PTR: *const scb0::RegisterBlock = 0x4060_0000 as *const _;
916 #[doc = r"Return the pointer to the register block"]
917 #[inline(always)]
918 pub const fn ptr() -> *const scb0::RegisterBlock {
919 Self::PTR
920 }
921}
922impl Deref for SCB0 {
923 type Target = scb0::RegisterBlock;
924 #[inline(always)]
925 fn deref(&self) -> &Self::Target {
926 unsafe { &*Self::PTR }
927 }
928}
929impl core::fmt::Debug for SCB0 {
930 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
931 f.debug_struct("SCB0").finish()
932 }
933}
934#[doc = "Serial Communications Block (SPI/UART/I2C)"]
935pub mod scb0;
936#[doc = "Serial Communications Block (SPI/UART/I2C)"]
937pub struct SCB1 {
938 _marker: PhantomData<*const ()>,
939}
940unsafe impl Send for SCB1 {}
941impl SCB1 {
942 #[doc = r"Pointer to the register block"]
943 pub const PTR: *const scb0::RegisterBlock = 0x4061_0000 as *const _;
944 #[doc = r"Return the pointer to the register block"]
945 #[inline(always)]
946 pub const fn ptr() -> *const scb0::RegisterBlock {
947 Self::PTR
948 }
949}
950impl Deref for SCB1 {
951 type Target = scb0::RegisterBlock;
952 #[inline(always)]
953 fn deref(&self) -> &Self::Target {
954 unsafe { &*Self::PTR }
955 }
956}
957impl core::fmt::Debug for SCB1 {
958 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
959 f.debug_struct("SCB1").finish()
960 }
961}
962#[doc = "Serial Communications Block (SPI/UART/I2C)"]
963pub use self::scb0 as scb1;
964#[doc = "Serial Communications Block (SPI/UART/I2C)"]
965pub struct SCB2 {
966 _marker: PhantomData<*const ()>,
967}
968unsafe impl Send for SCB2 {}
969impl SCB2 {
970 #[doc = r"Pointer to the register block"]
971 pub const PTR: *const scb0::RegisterBlock = 0x4062_0000 as *const _;
972 #[doc = r"Return the pointer to the register block"]
973 #[inline(always)]
974 pub const fn ptr() -> *const scb0::RegisterBlock {
975 Self::PTR
976 }
977}
978impl Deref for SCB2 {
979 type Target = scb0::RegisterBlock;
980 #[inline(always)]
981 fn deref(&self) -> &Self::Target {
982 unsafe { &*Self::PTR }
983 }
984}
985impl core::fmt::Debug for SCB2 {
986 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
987 f.debug_struct("SCB2").finish()
988 }
989}
990#[doc = "Serial Communications Block (SPI/UART/I2C)"]
991pub use self::scb0 as scb2;
992#[doc = "Serial Communications Block (SPI/UART/I2C)"]
993pub struct SCB3 {
994 _marker: PhantomData<*const ()>,
995}
996unsafe impl Send for SCB3 {}
997impl SCB3 {
998 #[doc = r"Pointer to the register block"]
999 pub const PTR: *const scb0::RegisterBlock = 0x4063_0000 as *const _;
1000 #[doc = r"Return the pointer to the register block"]
1001 #[inline(always)]
1002 pub const fn ptr() -> *const scb0::RegisterBlock {
1003 Self::PTR
1004 }
1005}
1006impl Deref for SCB3 {
1007 type Target = scb0::RegisterBlock;
1008 #[inline(always)]
1009 fn deref(&self) -> &Self::Target {
1010 unsafe { &*Self::PTR }
1011 }
1012}
1013impl core::fmt::Debug for SCB3 {
1014 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1015 f.debug_struct("SCB3").finish()
1016 }
1017}
1018#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1019pub use self::scb0 as scb3;
1020#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1021pub struct SCB4 {
1022 _marker: PhantomData<*const ()>,
1023}
1024unsafe impl Send for SCB4 {}
1025impl SCB4 {
1026 #[doc = r"Pointer to the register block"]
1027 pub const PTR: *const scb0::RegisterBlock = 0x4064_0000 as *const _;
1028 #[doc = r"Return the pointer to the register block"]
1029 #[inline(always)]
1030 pub const fn ptr() -> *const scb0::RegisterBlock {
1031 Self::PTR
1032 }
1033}
1034impl Deref for SCB4 {
1035 type Target = scb0::RegisterBlock;
1036 #[inline(always)]
1037 fn deref(&self) -> &Self::Target {
1038 unsafe { &*Self::PTR }
1039 }
1040}
1041impl core::fmt::Debug for SCB4 {
1042 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1043 f.debug_struct("SCB4").finish()
1044 }
1045}
1046#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1047pub use self::scb0 as scb4;
1048#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1049pub struct SCB5 {
1050 _marker: PhantomData<*const ()>,
1051}
1052unsafe impl Send for SCB5 {}
1053impl SCB5 {
1054 #[doc = r"Pointer to the register block"]
1055 pub const PTR: *const scb0::RegisterBlock = 0x4065_0000 as *const _;
1056 #[doc = r"Return the pointer to the register block"]
1057 #[inline(always)]
1058 pub const fn ptr() -> *const scb0::RegisterBlock {
1059 Self::PTR
1060 }
1061}
1062impl Deref for SCB5 {
1063 type Target = scb0::RegisterBlock;
1064 #[inline(always)]
1065 fn deref(&self) -> &Self::Target {
1066 unsafe { &*Self::PTR }
1067 }
1068}
1069impl core::fmt::Debug for SCB5 {
1070 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1071 f.debug_struct("SCB5").finish()
1072 }
1073}
1074#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1075pub use self::scb0 as scb5;
1076#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1077pub struct SCB6 {
1078 _marker: PhantomData<*const ()>,
1079}
1080unsafe impl Send for SCB6 {}
1081impl SCB6 {
1082 #[doc = r"Pointer to the register block"]
1083 pub const PTR: *const scb0::RegisterBlock = 0x4066_0000 as *const _;
1084 #[doc = r"Return the pointer to the register block"]
1085 #[inline(always)]
1086 pub const fn ptr() -> *const scb0::RegisterBlock {
1087 Self::PTR
1088 }
1089}
1090impl Deref for SCB6 {
1091 type Target = scb0::RegisterBlock;
1092 #[inline(always)]
1093 fn deref(&self) -> &Self::Target {
1094 unsafe { &*Self::PTR }
1095 }
1096}
1097impl core::fmt::Debug for SCB6 {
1098 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1099 f.debug_struct("SCB6").finish()
1100 }
1101}
1102#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1103pub use self::scb0 as scb6;
1104#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1105pub struct SCB7 {
1106 _marker: PhantomData<*const ()>,
1107}
1108unsafe impl Send for SCB7 {}
1109impl SCB7 {
1110 #[doc = r"Pointer to the register block"]
1111 pub const PTR: *const scb0::RegisterBlock = 0x4067_0000 as *const _;
1112 #[doc = r"Return the pointer to the register block"]
1113 #[inline(always)]
1114 pub const fn ptr() -> *const scb0::RegisterBlock {
1115 Self::PTR
1116 }
1117}
1118impl Deref for SCB7 {
1119 type Target = scb0::RegisterBlock;
1120 #[inline(always)]
1121 fn deref(&self) -> &Self::Target {
1122 unsafe { &*Self::PTR }
1123 }
1124}
1125impl core::fmt::Debug for SCB7 {
1126 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1127 f.debug_struct("SCB7").finish()
1128 }
1129}
1130#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1131pub use self::scb0 as scb7;
1132#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1133pub struct SCB8 {
1134 _marker: PhantomData<*const ()>,
1135}
1136unsafe impl Send for SCB8 {}
1137impl SCB8 {
1138 #[doc = r"Pointer to the register block"]
1139 pub const PTR: *const scb0::RegisterBlock = 0x4068_0000 as *const _;
1140 #[doc = r"Return the pointer to the register block"]
1141 #[inline(always)]
1142 pub const fn ptr() -> *const scb0::RegisterBlock {
1143 Self::PTR
1144 }
1145}
1146impl Deref for SCB8 {
1147 type Target = scb0::RegisterBlock;
1148 #[inline(always)]
1149 fn deref(&self) -> &Self::Target {
1150 unsafe { &*Self::PTR }
1151 }
1152}
1153impl core::fmt::Debug for SCB8 {
1154 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1155 f.debug_struct("SCB8").finish()
1156 }
1157}
1158#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1159pub use self::scb0 as scb8;
1160#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1161pub struct SCB9 {
1162 _marker: PhantomData<*const ()>,
1163}
1164unsafe impl Send for SCB9 {}
1165impl SCB9 {
1166 #[doc = r"Pointer to the register block"]
1167 pub const PTR: *const scb0::RegisterBlock = 0x4069_0000 as *const _;
1168 #[doc = r"Return the pointer to the register block"]
1169 #[inline(always)]
1170 pub const fn ptr() -> *const scb0::RegisterBlock {
1171 Self::PTR
1172 }
1173}
1174impl Deref for SCB9 {
1175 type Target = scb0::RegisterBlock;
1176 #[inline(always)]
1177 fn deref(&self) -> &Self::Target {
1178 unsafe { &*Self::PTR }
1179 }
1180}
1181impl core::fmt::Debug for SCB9 {
1182 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1183 f.debug_struct("SCB9").finish()
1184 }
1185}
1186#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1187pub use self::scb0 as scb9;
1188#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1189pub struct SCB10 {
1190 _marker: PhantomData<*const ()>,
1191}
1192unsafe impl Send for SCB10 {}
1193impl SCB10 {
1194 #[doc = r"Pointer to the register block"]
1195 pub const PTR: *const scb0::RegisterBlock = 0x406a_0000 as *const _;
1196 #[doc = r"Return the pointer to the register block"]
1197 #[inline(always)]
1198 pub const fn ptr() -> *const scb0::RegisterBlock {
1199 Self::PTR
1200 }
1201}
1202impl Deref for SCB10 {
1203 type Target = scb0::RegisterBlock;
1204 #[inline(always)]
1205 fn deref(&self) -> &Self::Target {
1206 unsafe { &*Self::PTR }
1207 }
1208}
1209impl core::fmt::Debug for SCB10 {
1210 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1211 f.debug_struct("SCB10").finish()
1212 }
1213}
1214#[doc = "Serial Communications Block (SPI/UART/I2C)"]
1215pub use self::scb0 as scb10;
1216#[doc = "I2S registers"]
1217pub struct I2S0 {
1218 _marker: PhantomData<*const ()>,
1219}
1220unsafe impl Send for I2S0 {}
1221impl I2S0 {
1222 #[doc = r"Pointer to the register block"]
1223 pub const PTR: *const i2s0::RegisterBlock = 0x4080_0000 as *const _;
1224 #[doc = r"Return the pointer to the register block"]
1225 #[inline(always)]
1226 pub const fn ptr() -> *const i2s0::RegisterBlock {
1227 Self::PTR
1228 }
1229}
1230impl Deref for I2S0 {
1231 type Target = i2s0::RegisterBlock;
1232 #[inline(always)]
1233 fn deref(&self) -> &Self::Target {
1234 unsafe { &*Self::PTR }
1235 }
1236}
1237impl core::fmt::Debug for I2S0 {
1238 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1239 f.debug_struct("I2S0").finish()
1240 }
1241}
1242#[doc = "I2S registers"]
1243pub mod i2s0;
1244#[doc = "I2S registers"]
1245pub struct I2S1 {
1246 _marker: PhantomData<*const ()>,
1247}
1248unsafe impl Send for I2S1 {}
1249impl I2S1 {
1250 #[doc = r"Pointer to the register block"]
1251 pub const PTR: *const i2s0::RegisterBlock = 0x4080_1000 as *const _;
1252 #[doc = r"Return the pointer to the register block"]
1253 #[inline(always)]
1254 pub const fn ptr() -> *const i2s0::RegisterBlock {
1255 Self::PTR
1256 }
1257}
1258impl Deref for I2S1 {
1259 type Target = i2s0::RegisterBlock;
1260 #[inline(always)]
1261 fn deref(&self) -> &Self::Target {
1262 unsafe { &*Self::PTR }
1263 }
1264}
1265impl core::fmt::Debug for I2S1 {
1266 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1267 f.debug_struct("I2S1").finish()
1268 }
1269}
1270#[doc = "I2S registers"]
1271pub use self::i2s0 as i2s1;
1272#[doc = "I2S registers"]
1273pub struct I2S2 {
1274 _marker: PhantomData<*const ()>,
1275}
1276unsafe impl Send for I2S2 {}
1277impl I2S2 {
1278 #[doc = r"Pointer to the register block"]
1279 pub const PTR: *const i2s0::RegisterBlock = 0x4080_2000 as *const _;
1280 #[doc = r"Return the pointer to the register block"]
1281 #[inline(always)]
1282 pub const fn ptr() -> *const i2s0::RegisterBlock {
1283 Self::PTR
1284 }
1285}
1286impl Deref for I2S2 {
1287 type Target = i2s0::RegisterBlock;
1288 #[inline(always)]
1289 fn deref(&self) -> &Self::Target {
1290 unsafe { &*Self::PTR }
1291 }
1292}
1293impl core::fmt::Debug for I2S2 {
1294 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1295 f.debug_struct("I2S2").finish()
1296 }
1297}
1298#[doc = "I2S registers"]
1299pub use self::i2s0 as i2s2;
1300#[doc = "Programmable Analog Subsystem for S40E"]
1301pub struct PASS0 {
1302 _marker: PhantomData<*const ()>,
1303}
1304unsafe impl Send for PASS0 {}
1305impl PASS0 {
1306 #[doc = r"Pointer to the register block"]
1307 pub const PTR: *const pass0::RegisterBlock = 0x4090_0000 as *const _;
1308 #[doc = r"Return the pointer to the register block"]
1309 #[inline(always)]
1310 pub const fn ptr() -> *const pass0::RegisterBlock {
1311 Self::PTR
1312 }
1313}
1314impl Deref for PASS0 {
1315 type Target = pass0::RegisterBlock;
1316 #[inline(always)]
1317 fn deref(&self) -> &Self::Target {
1318 unsafe { &*Self::PTR }
1319 }
1320}
1321impl core::fmt::Debug for PASS0 {
1322 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1323 f.debug_struct("PASS0").finish()
1324 }
1325}
1326#[doc = "Programmable Analog Subsystem for S40E"]
1327pub mod pass0;
1328#[no_mangle]
1329static mut DEVICE_PERIPHERALS: bool = false;
1330#[doc = r" All the peripherals."]
1331#[allow(non_snake_case)]
1332pub struct Peripherals {
1333 #[doc = "PERI"]
1334 pub PERI: PERI,
1335 #[doc = "PERI_MS"]
1336 pub PERI_MS: PERI_MS,
1337 #[doc = "PERI_PCLK"]
1338 pub PERI_PCLK: PERI_PCLK,
1339 #[doc = "CRYPTO"]
1340 pub CRYPTO: CRYPTO,
1341 #[doc = "CPUSS"]
1342 pub CPUSS: CPUSS,
1343 #[doc = "FAULT"]
1344 pub FAULT: FAULT,
1345 #[doc = "IPC"]
1346 pub IPC: IPC,
1347 #[doc = "PROT"]
1348 pub PROT: PROT,
1349 #[doc = "FLASHC"]
1350 pub FLASHC: FLASHC,
1351 #[doc = "SRSS"]
1352 pub SRSS: SRSS,
1353 #[doc = "BACKUP"]
1354 pub BACKUP: BACKUP,
1355 #[doc = "DW0"]
1356 pub DW0: DW0,
1357 #[doc = "DW1"]
1358 pub DW1: DW1,
1359 #[doc = "DMAC"]
1360 pub DMAC: DMAC,
1361 #[doc = "EFUSE"]
1362 pub EFUSE: EFUSE,
1363 #[doc = "EFUSE_DATA"]
1364 pub EFUSE_DATA: EFUSE_DATA,
1365 #[doc = "HSIOM"]
1366 pub HSIOM: HSIOM,
1367 #[doc = "GPIO"]
1368 pub GPIO: GPIO,
1369 #[doc = "SMARTIO"]
1370 pub SMARTIO: SMARTIO,
1371 #[doc = "EVTGEN0"]
1372 pub EVTGEN0: EVTGEN0,
1373 #[doc = "SMIF0"]
1374 pub SMIF0: SMIF0,
1375 #[doc = "SDHC0"]
1376 pub SDHC0: SDHC0,
1377 #[doc = "ETH0"]
1378 pub ETH0: ETH0,
1379 #[doc = "LIN0"]
1380 pub LIN0: LIN0,
1381 #[doc = "CANFD0"]
1382 pub CANFD0: CANFD0,
1383 #[doc = "CANFD1"]
1384 pub CANFD1: CANFD1,
1385 #[doc = "TCPWM0"]
1386 pub TCPWM0: TCPWM0,
1387 #[doc = "SCB0"]
1388 pub SCB0: SCB0,
1389 #[doc = "SCB1"]
1390 pub SCB1: SCB1,
1391 #[doc = "SCB2"]
1392 pub SCB2: SCB2,
1393 #[doc = "SCB3"]
1394 pub SCB3: SCB3,
1395 #[doc = "SCB4"]
1396 pub SCB4: SCB4,
1397 #[doc = "SCB5"]
1398 pub SCB5: SCB5,
1399 #[doc = "SCB6"]
1400 pub SCB6: SCB6,
1401 #[doc = "SCB7"]
1402 pub SCB7: SCB7,
1403 #[doc = "SCB8"]
1404 pub SCB8: SCB8,
1405 #[doc = "SCB9"]
1406 pub SCB9: SCB9,
1407 #[doc = "SCB10"]
1408 pub SCB10: SCB10,
1409 #[doc = "I2S0"]
1410 pub I2S0: I2S0,
1411 #[doc = "I2S1"]
1412 pub I2S1: I2S1,
1413 #[doc = "I2S2"]
1414 pub I2S2: I2S2,
1415 #[doc = "PASS0"]
1416 pub PASS0: PASS0,
1417}
1418impl Peripherals {
1419 #[doc = r" Returns all the peripherals *once*."]
1420 #[cfg(feature = "critical-section")]
1421 #[inline]
1422 pub fn take() -> Option<Self> {
1423 critical_section::with(|_| {
1424 if unsafe { DEVICE_PERIPHERALS } {
1425 return None;
1426 }
1427 Some(unsafe { Peripherals::steal() })
1428 })
1429 }
1430 #[doc = r" Unchecked version of `Peripherals::take`."]
1431 #[doc = r""]
1432 #[doc = r" # Safety"]
1433 #[doc = r""]
1434 #[doc = r" Each of the returned peripherals must be used at most once."]
1435 #[inline]
1436 pub unsafe fn steal() -> Self {
1437 DEVICE_PERIPHERALS = true;
1438 Peripherals {
1439 PERI: PERI {
1440 _marker: PhantomData,
1441 },
1442 PERI_MS: PERI_MS {
1443 _marker: PhantomData,
1444 },
1445 PERI_PCLK: PERI_PCLK {
1446 _marker: PhantomData,
1447 },
1448 CRYPTO: CRYPTO {
1449 _marker: PhantomData,
1450 },
1451 CPUSS: CPUSS {
1452 _marker: PhantomData,
1453 },
1454 FAULT: FAULT {
1455 _marker: PhantomData,
1456 },
1457 IPC: IPC {
1458 _marker: PhantomData,
1459 },
1460 PROT: PROT {
1461 _marker: PhantomData,
1462 },
1463 FLASHC: FLASHC {
1464 _marker: PhantomData,
1465 },
1466 SRSS: SRSS {
1467 _marker: PhantomData,
1468 },
1469 BACKUP: BACKUP {
1470 _marker: PhantomData,
1471 },
1472 DW0: DW0 {
1473 _marker: PhantomData,
1474 },
1475 DW1: DW1 {
1476 _marker: PhantomData,
1477 },
1478 DMAC: DMAC {
1479 _marker: PhantomData,
1480 },
1481 EFUSE: EFUSE {
1482 _marker: PhantomData,
1483 },
1484 EFUSE_DATA: EFUSE_DATA {
1485 _marker: PhantomData,
1486 },
1487 HSIOM: HSIOM {
1488 _marker: PhantomData,
1489 },
1490 GPIO: GPIO {
1491 _marker: PhantomData,
1492 },
1493 SMARTIO: SMARTIO {
1494 _marker: PhantomData,
1495 },
1496 EVTGEN0: EVTGEN0 {
1497 _marker: PhantomData,
1498 },
1499 SMIF0: SMIF0 {
1500 _marker: PhantomData,
1501 },
1502 SDHC0: SDHC0 {
1503 _marker: PhantomData,
1504 },
1505 ETH0: ETH0 {
1506 _marker: PhantomData,
1507 },
1508 LIN0: LIN0 {
1509 _marker: PhantomData,
1510 },
1511 CANFD0: CANFD0 {
1512 _marker: PhantomData,
1513 },
1514 CANFD1: CANFD1 {
1515 _marker: PhantomData,
1516 },
1517 TCPWM0: TCPWM0 {
1518 _marker: PhantomData,
1519 },
1520 SCB0: SCB0 {
1521 _marker: PhantomData,
1522 },
1523 SCB1: SCB1 {
1524 _marker: PhantomData,
1525 },
1526 SCB2: SCB2 {
1527 _marker: PhantomData,
1528 },
1529 SCB3: SCB3 {
1530 _marker: PhantomData,
1531 },
1532 SCB4: SCB4 {
1533 _marker: PhantomData,
1534 },
1535 SCB5: SCB5 {
1536 _marker: PhantomData,
1537 },
1538 SCB6: SCB6 {
1539 _marker: PhantomData,
1540 },
1541 SCB7: SCB7 {
1542 _marker: PhantomData,
1543 },
1544 SCB8: SCB8 {
1545 _marker: PhantomData,
1546 },
1547 SCB9: SCB9 {
1548 _marker: PhantomData,
1549 },
1550 SCB10: SCB10 {
1551 _marker: PhantomData,
1552 },
1553 I2S0: I2S0 {
1554 _marker: PhantomData,
1555 },
1556 I2S1: I2S1 {
1557 _marker: PhantomData,
1558 },
1559 I2S2: I2S2 {
1560 _marker: PhantomData,
1561 },
1562 PASS0: PASS0 {
1563 _marker: PhantomData,
1564 },
1565 }
1566 }
1567}