ra2e1/
lib.rs

1#![doc = "Peripheral access API for R7FA2E1A9 microcontrollers (generated using svd2rust v0.28.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.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)]
19#![no_std]
20use core::marker::PhantomData;
21use core::ops::Deref;
22#[doc = r"Number available in the NVIC for configuring priority"]
23pub const NVIC_PRIO_BITS: u8 = 2;
24#[cfg(feature = "rt")]
25pub use self::Interrupt as interrupt;
26pub use cortex_m::peripheral::Peripherals as CorePeripherals;
27pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, ITM, MPU, NVIC, SCB, SYST, TPIU};
28#[cfg(feature = "rt")]
29pub use cortex_m_rt::interrupt;
30#[allow(unused_imports)]
31use generic::*;
32#[doc = r"Common register and bit access and modify traits"]
33pub mod generic;
34#[cfg(feature = "rt")]
35extern "C" {
36    fn IEL0();
37    fn IEL1();
38    fn IEL2();
39    fn IEL3();
40    fn IEL4();
41    fn IEL5();
42    fn IEL6();
43    fn IEL7();
44    fn IEL8();
45    fn IEL9();
46    fn IEL10();
47    fn IEL11();
48    fn IEL12();
49    fn IEL13();
50    fn IEL14();
51    fn IEL15();
52    fn IEL16();
53    fn IEL17();
54    fn IEL18();
55    fn IEL19();
56    fn IEL20();
57    fn IEL21();
58    fn IEL22();
59    fn IEL23();
60    fn IEL24();
61    fn IEL25();
62    fn IEL26();
63    fn IEL27();
64    fn IEL28();
65    fn IEL29();
66    fn IEL30();
67    fn IEL31();
68}
69#[doc(hidden)]
70pub union Vector {
71    _handler: unsafe extern "C" fn(),
72    _reserved: u32,
73}
74#[cfg(feature = "rt")]
75#[doc(hidden)]
76#[link_section = ".vector_table.interrupts"]
77#[no_mangle]
78pub static __INTERRUPTS: [Vector; 32] = [
79    Vector { _handler: IEL0 },
80    Vector { _handler: IEL1 },
81    Vector { _handler: IEL2 },
82    Vector { _handler: IEL3 },
83    Vector { _handler: IEL4 },
84    Vector { _handler: IEL5 },
85    Vector { _handler: IEL6 },
86    Vector { _handler: IEL7 },
87    Vector { _handler: IEL8 },
88    Vector { _handler: IEL9 },
89    Vector { _handler: IEL10 },
90    Vector { _handler: IEL11 },
91    Vector { _handler: IEL12 },
92    Vector { _handler: IEL13 },
93    Vector { _handler: IEL14 },
94    Vector { _handler: IEL15 },
95    Vector { _handler: IEL16 },
96    Vector { _handler: IEL17 },
97    Vector { _handler: IEL18 },
98    Vector { _handler: IEL19 },
99    Vector { _handler: IEL20 },
100    Vector { _handler: IEL21 },
101    Vector { _handler: IEL22 },
102    Vector { _handler: IEL23 },
103    Vector { _handler: IEL24 },
104    Vector { _handler: IEL25 },
105    Vector { _handler: IEL26 },
106    Vector { _handler: IEL27 },
107    Vector { _handler: IEL28 },
108    Vector { _handler: IEL29 },
109    Vector { _handler: IEL30 },
110    Vector { _handler: IEL31 },
111];
112#[doc = r"Enumeration of all the interrupts."]
113#[derive(Copy, Clone, Debug, PartialEq, Eq)]
114#[repr(u16)]
115pub enum Interrupt {
116    #[doc = "0 - ICU Interrupt 0"]
117    IEL0 = 0,
118    #[doc = "1 - ICU Interrupt 1"]
119    IEL1 = 1,
120    #[doc = "2 - ICU Interrupt 2"]
121    IEL2 = 2,
122    #[doc = "3 - ICU Interrupt 3"]
123    IEL3 = 3,
124    #[doc = "4 - ICU Interrupt 4"]
125    IEL4 = 4,
126    #[doc = "5 - ICU Interrupt 5"]
127    IEL5 = 5,
128    #[doc = "6 - ICU Interrupt 6"]
129    IEL6 = 6,
130    #[doc = "7 - ICU Interrupt 7"]
131    IEL7 = 7,
132    #[doc = "8 - ICU Interrupt 8"]
133    IEL8 = 8,
134    #[doc = "9 - ICU Interrupt 9"]
135    IEL9 = 9,
136    #[doc = "10 - ICU Interrupt 10"]
137    IEL10 = 10,
138    #[doc = "11 - ICU Interrupt 11"]
139    IEL11 = 11,
140    #[doc = "12 - ICU Interrupt 12"]
141    IEL12 = 12,
142    #[doc = "13 - ICU Interrupt 13"]
143    IEL13 = 13,
144    #[doc = "14 - ICU Interrupt 14"]
145    IEL14 = 14,
146    #[doc = "15 - ICU Interrupt 15"]
147    IEL15 = 15,
148    #[doc = "16 - ICU Interrupt 16"]
149    IEL16 = 16,
150    #[doc = "17 - ICU Interrupt 17"]
151    IEL17 = 17,
152    #[doc = "18 - ICU Interrupt 18"]
153    IEL18 = 18,
154    #[doc = "19 - ICU Interrupt 19"]
155    IEL19 = 19,
156    #[doc = "20 - ICU Interrupt 20"]
157    IEL20 = 20,
158    #[doc = "21 - ICU Interrupt 21"]
159    IEL21 = 21,
160    #[doc = "22 - ICU Interrupt 22"]
161    IEL22 = 22,
162    #[doc = "23 - ICU Interrupt 23"]
163    IEL23 = 23,
164    #[doc = "24 - ICU Interrupt 24"]
165    IEL24 = 24,
166    #[doc = "25 - ICU Interrupt 25"]
167    IEL25 = 25,
168    #[doc = "26 - ICU Interrupt 26"]
169    IEL26 = 26,
170    #[doc = "27 - ICU Interrupt 27"]
171    IEL27 = 27,
172    #[doc = "28 - ICU Interrupt 28"]
173    IEL28 = 28,
174    #[doc = "29 - ICU Interrupt 29"]
175    IEL29 = 29,
176    #[doc = "30 - ICU Interrupt 30"]
177    IEL30 = 30,
178    #[doc = "31 - ICU Interrupt 31"]
179    IEL31 = 31,
180}
181unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
182    #[inline(always)]
183    fn number(self) -> u16 {
184        self as u16
185    }
186}
187#[doc = "SRAM Control"]
188pub struct SRAM {
189    _marker: PhantomData<*const ()>,
190}
191unsafe impl Send for SRAM {}
192impl SRAM {
193    #[doc = r"Pointer to the register block"]
194    pub const PTR: *const sram::RegisterBlock = 0x4000_2000 as *const _;
195    #[doc = r"Return the pointer to the register block"]
196    #[inline(always)]
197    pub const fn ptr() -> *const sram::RegisterBlock {
198        Self::PTR
199    }
200}
201impl Deref for SRAM {
202    type Target = sram::RegisterBlock;
203    #[inline(always)]
204    fn deref(&self) -> &Self::Target {
205        unsafe { &*Self::PTR }
206    }
207}
208impl core::fmt::Debug for SRAM {
209    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
210        f.debug_struct("SRAM").finish()
211    }
212}
213#[doc = "SRAM Control"]
214pub mod sram;
215#[doc = "BUS Control"]
216pub struct BUS {
217    _marker: PhantomData<*const ()>,
218}
219unsafe impl Send for BUS {}
220impl BUS {
221    #[doc = r"Pointer to the register block"]
222    pub const PTR: *const bus::RegisterBlock = 0x4000_3000 as *const _;
223    #[doc = r"Return the pointer to the register block"]
224    #[inline(always)]
225    pub const fn ptr() -> *const bus::RegisterBlock {
226        Self::PTR
227    }
228}
229impl Deref for BUS {
230    type Target = bus::RegisterBlock;
231    #[inline(always)]
232    fn deref(&self) -> &Self::Target {
233        unsafe { &*Self::PTR }
234    }
235}
236impl core::fmt::Debug for BUS {
237    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
238        f.debug_struct("BUS").finish()
239    }
240}
241#[doc = "BUS Control"]
242pub mod bus;
243#[doc = "Data Transfer Controller"]
244pub struct DTC {
245    _marker: PhantomData<*const ()>,
246}
247unsafe impl Send for DTC {}
248impl DTC {
249    #[doc = r"Pointer to the register block"]
250    pub const PTR: *const dtc::RegisterBlock = 0x4000_5400 as *const _;
251    #[doc = r"Return the pointer to the register block"]
252    #[inline(always)]
253    pub const fn ptr() -> *const dtc::RegisterBlock {
254        Self::PTR
255    }
256}
257impl Deref for DTC {
258    type Target = dtc::RegisterBlock;
259    #[inline(always)]
260    fn deref(&self) -> &Self::Target {
261        unsafe { &*Self::PTR }
262    }
263}
264impl core::fmt::Debug for DTC {
265    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
266        f.debug_struct("DTC").finish()
267    }
268}
269#[doc = "Data Transfer Controller"]
270pub mod dtc;
271#[doc = "ICU for CPU"]
272pub struct ICU {
273    _marker: PhantomData<*const ()>,
274}
275unsafe impl Send for ICU {}
276impl ICU {
277    #[doc = r"Pointer to the register block"]
278    pub const PTR: *const icu::RegisterBlock = 0x4000_6000 as *const _;
279    #[doc = r"Return the pointer to the register block"]
280    #[inline(always)]
281    pub const fn ptr() -> *const icu::RegisterBlock {
282        Self::PTR
283    }
284}
285impl Deref for ICU {
286    type Target = icu::RegisterBlock;
287    #[inline(always)]
288    fn deref(&self) -> &Self::Target {
289        unsafe { &*Self::PTR }
290    }
291}
292impl core::fmt::Debug for ICU {
293    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
294        f.debug_struct("ICU").finish()
295    }
296}
297#[doc = "ICU for CPU"]
298pub mod icu;
299#[doc = "Debug Function"]
300pub struct DBG {
301    _marker: PhantomData<*const ()>,
302}
303unsafe impl Send for DBG {}
304impl DBG {
305    #[doc = r"Pointer to the register block"]
306    pub const PTR: *const dbg::RegisterBlock = 0x4001_b000 as *const _;
307    #[doc = r"Return the pointer to the register block"]
308    #[inline(always)]
309    pub const fn ptr() -> *const dbg::RegisterBlock {
310        Self::PTR
311    }
312}
313impl Deref for DBG {
314    type Target = dbg::RegisterBlock;
315    #[inline(always)]
316    fn deref(&self) -> &Self::Target {
317        unsafe { &*Self::PTR }
318    }
319}
320impl core::fmt::Debug for DBG {
321    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
322        f.debug_struct("DBG").finish()
323    }
324}
325#[doc = "Debug Function"]
326pub mod dbg;
327#[doc = "System Control"]
328pub struct SYSC {
329    _marker: PhantomData<*const ()>,
330}
331unsafe impl Send for SYSC {}
332impl SYSC {
333    #[doc = r"Pointer to the register block"]
334    pub const PTR: *const sysc::RegisterBlock = 0x4001_e000 as *const _;
335    #[doc = r"Return the pointer to the register block"]
336    #[inline(always)]
337    pub const fn ptr() -> *const sysc::RegisterBlock {
338        Self::PTR
339    }
340}
341impl Deref for SYSC {
342    type Target = sysc::RegisterBlock;
343    #[inline(always)]
344    fn deref(&self) -> &Self::Target {
345        unsafe { &*Self::PTR }
346    }
347}
348impl core::fmt::Debug for SYSC {
349    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
350        f.debug_struct("SYSC").finish()
351    }
352}
353#[doc = "System Control"]
354pub mod sysc;
355#[doc = "Port 0 Control Registers"]
356pub struct PORT0 {
357    _marker: PhantomData<*const ()>,
358}
359unsafe impl Send for PORT0 {}
360impl PORT0 {
361    #[doc = r"Pointer to the register block"]
362    pub const PTR: *const port0::RegisterBlock = 0x4004_0000 as *const _;
363    #[doc = r"Return the pointer to the register block"]
364    #[inline(always)]
365    pub const fn ptr() -> *const port0::RegisterBlock {
366        Self::PTR
367    }
368}
369impl Deref for PORT0 {
370    type Target = port0::RegisterBlock;
371    #[inline(always)]
372    fn deref(&self) -> &Self::Target {
373        unsafe { &*Self::PTR }
374    }
375}
376impl core::fmt::Debug for PORT0 {
377    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
378        f.debug_struct("PORT0").finish()
379    }
380}
381#[doc = "Port 0 Control Registers"]
382pub mod port0;
383#[doc = "Port 1 Control Registers"]
384pub struct PORT1 {
385    _marker: PhantomData<*const ()>,
386}
387unsafe impl Send for PORT1 {}
388impl PORT1 {
389    #[doc = r"Pointer to the register block"]
390    pub const PTR: *const port1::RegisterBlock = 0x4004_0020 as *const _;
391    #[doc = r"Return the pointer to the register block"]
392    #[inline(always)]
393    pub const fn ptr() -> *const port1::RegisterBlock {
394        Self::PTR
395    }
396}
397impl Deref for PORT1 {
398    type Target = port1::RegisterBlock;
399    #[inline(always)]
400    fn deref(&self) -> &Self::Target {
401        unsafe { &*Self::PTR }
402    }
403}
404impl core::fmt::Debug for PORT1 {
405    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
406        f.debug_struct("PORT1").finish()
407    }
408}
409#[doc = "Port 1 Control Registers"]
410pub mod port1;
411#[doc = "Port 2 Control Registers"]
412pub struct PORT2 {
413    _marker: PhantomData<*const ()>,
414}
415unsafe impl Send for PORT2 {}
416impl PORT2 {
417    #[doc = r"Pointer to the register block"]
418    pub const PTR: *const port1::RegisterBlock = 0x4004_0040 as *const _;
419    #[doc = r"Return the pointer to the register block"]
420    #[inline(always)]
421    pub const fn ptr() -> *const port1::RegisterBlock {
422        Self::PTR
423    }
424}
425impl Deref for PORT2 {
426    type Target = port1::RegisterBlock;
427    #[inline(always)]
428    fn deref(&self) -> &Self::Target {
429        unsafe { &*Self::PTR }
430    }
431}
432impl core::fmt::Debug for PORT2 {
433    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
434        f.debug_struct("PORT2").finish()
435    }
436}
437#[doc = "Port 2 Control Registers"]
438pub use self::port1 as port2;
439#[doc = "Port 3 Control Registers"]
440pub struct PORT3 {
441    _marker: PhantomData<*const ()>,
442}
443unsafe impl Send for PORT3 {}
444impl PORT3 {
445    #[doc = r"Pointer to the register block"]
446    pub const PTR: *const port0::RegisterBlock = 0x4004_0060 as *const _;
447    #[doc = r"Return the pointer to the register block"]
448    #[inline(always)]
449    pub const fn ptr() -> *const port0::RegisterBlock {
450        Self::PTR
451    }
452}
453impl Deref for PORT3 {
454    type Target = port0::RegisterBlock;
455    #[inline(always)]
456    fn deref(&self) -> &Self::Target {
457        unsafe { &*Self::PTR }
458    }
459}
460impl core::fmt::Debug for PORT3 {
461    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
462        f.debug_struct("PORT3").finish()
463    }
464}
465#[doc = "Port 3 Control Registers"]
466pub use self::port0 as port3;
467#[doc = "Port 4 Control Registers"]
468pub struct PORT4 {
469    _marker: PhantomData<*const ()>,
470}
471unsafe impl Send for PORT4 {}
472impl PORT4 {
473    #[doc = r"Pointer to the register block"]
474    pub const PTR: *const port0::RegisterBlock = 0x4004_0080 as *const _;
475    #[doc = r"Return the pointer to the register block"]
476    #[inline(always)]
477    pub const fn ptr() -> *const port0::RegisterBlock {
478        Self::PTR
479    }
480}
481impl Deref for PORT4 {
482    type Target = port0::RegisterBlock;
483    #[inline(always)]
484    fn deref(&self) -> &Self::Target {
485        unsafe { &*Self::PTR }
486    }
487}
488impl core::fmt::Debug for PORT4 {
489    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
490        f.debug_struct("PORT4").finish()
491    }
492}
493#[doc = "Port 4 Control Registers"]
494pub use self::port0 as port4;
495#[doc = "Port 5 Control Registers"]
496pub struct PORT5 {
497    _marker: PhantomData<*const ()>,
498}
499unsafe impl Send for PORT5 {}
500impl PORT5 {
501    #[doc = r"Pointer to the register block"]
502    pub const PTR: *const port0::RegisterBlock = 0x4004_00a0 as *const _;
503    #[doc = r"Return the pointer to the register block"]
504    #[inline(always)]
505    pub const fn ptr() -> *const port0::RegisterBlock {
506        Self::PTR
507    }
508}
509impl Deref for PORT5 {
510    type Target = port0::RegisterBlock;
511    #[inline(always)]
512    fn deref(&self) -> &Self::Target {
513        unsafe { &*Self::PTR }
514    }
515}
516impl core::fmt::Debug for PORT5 {
517    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
518        f.debug_struct("PORT5").finish()
519    }
520}
521#[doc = "Port 5 Control Registers"]
522pub use self::port0 as port5;
523#[doc = "Port 9 Control Registers"]
524pub struct PORT9 {
525    _marker: PhantomData<*const ()>,
526}
527unsafe impl Send for PORT9 {}
528impl PORT9 {
529    #[doc = r"Pointer to the register block"]
530    pub const PTR: *const port0::RegisterBlock = 0x4004_0120 as *const _;
531    #[doc = r"Return the pointer to the register block"]
532    #[inline(always)]
533    pub const fn ptr() -> *const port0::RegisterBlock {
534        Self::PTR
535    }
536}
537impl Deref for PORT9 {
538    type Target = port0::RegisterBlock;
539    #[inline(always)]
540    fn deref(&self) -> &Self::Target {
541        unsafe { &*Self::PTR }
542    }
543}
544impl core::fmt::Debug for PORT9 {
545    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
546        f.debug_struct("PORT9").finish()
547    }
548}
549#[doc = "Port 9 Control Registers"]
550pub use self::port0 as port9;
551#[doc = "Pmn Pin Function Control Register"]
552pub struct PFS {
553    _marker: PhantomData<*const ()>,
554}
555unsafe impl Send for PFS {}
556impl PFS {
557    #[doc = r"Pointer to the register block"]
558    pub const PTR: *const pfs::RegisterBlock = 0x4004_0800 as *const _;
559    #[doc = r"Return the pointer to the register block"]
560    #[inline(always)]
561    pub const fn ptr() -> *const pfs::RegisterBlock {
562        Self::PTR
563    }
564}
565impl Deref for PFS {
566    type Target = pfs::RegisterBlock;
567    #[inline(always)]
568    fn deref(&self) -> &Self::Target {
569        unsafe { &*Self::PTR }
570    }
571}
572impl core::fmt::Debug for PFS {
573    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
574        f.debug_struct("PFS").finish()
575    }
576}
577#[doc = "Pmn Pin Function Control Register"]
578pub mod pfs;
579#[doc = "Event Link Controller"]
580pub struct ELC {
581    _marker: PhantomData<*const ()>,
582}
583unsafe impl Send for ELC {}
584impl ELC {
585    #[doc = r"Pointer to the register block"]
586    pub const PTR: *const elc::RegisterBlock = 0x4004_1000 as *const _;
587    #[doc = r"Return the pointer to the register block"]
588    #[inline(always)]
589    pub const fn ptr() -> *const elc::RegisterBlock {
590        Self::PTR
591    }
592}
593impl Deref for ELC {
594    type Target = elc::RegisterBlock;
595    #[inline(always)]
596    fn deref(&self) -> &Self::Target {
597        unsafe { &*Self::PTR }
598    }
599}
600impl core::fmt::Debug for ELC {
601    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
602        f.debug_struct("ELC").finish()
603    }
604}
605#[doc = "Event Link Controller"]
606pub mod elc;
607#[doc = "Port Output Enable Module for GPT"]
608pub struct POEG {
609    _marker: PhantomData<*const ()>,
610}
611unsafe impl Send for POEG {}
612impl POEG {
613    #[doc = r"Pointer to the register block"]
614    pub const PTR: *const poeg::RegisterBlock = 0x4004_2000 as *const _;
615    #[doc = r"Return the pointer to the register block"]
616    #[inline(always)]
617    pub const fn ptr() -> *const poeg::RegisterBlock {
618        Self::PTR
619    }
620}
621impl Deref for POEG {
622    type Target = poeg::RegisterBlock;
623    #[inline(always)]
624    fn deref(&self) -> &Self::Target {
625        unsafe { &*Self::PTR }
626    }
627}
628impl core::fmt::Debug for POEG {
629    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
630        f.debug_struct("POEG").finish()
631    }
632}
633#[doc = "Port Output Enable Module for GPT"]
634pub mod poeg;
635#[doc = "Realtime Clock"]
636pub struct RTC {
637    _marker: PhantomData<*const ()>,
638}
639unsafe impl Send for RTC {}
640impl RTC {
641    #[doc = r"Pointer to the register block"]
642    pub const PTR: *const rtc::RegisterBlock = 0x4004_4000 as *const _;
643    #[doc = r"Return the pointer to the register block"]
644    #[inline(always)]
645    pub const fn ptr() -> *const rtc::RegisterBlock {
646        Self::PTR
647    }
648}
649impl Deref for RTC {
650    type Target = rtc::RegisterBlock;
651    #[inline(always)]
652    fn deref(&self) -> &Self::Target {
653        unsafe { &*Self::PTR }
654    }
655}
656impl core::fmt::Debug for RTC {
657    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
658        f.debug_struct("RTC").finish()
659    }
660}
661#[doc = "Realtime Clock"]
662pub mod rtc;
663#[doc = "Watchdog Timer"]
664pub struct WDT {
665    _marker: PhantomData<*const ()>,
666}
667unsafe impl Send for WDT {}
668impl WDT {
669    #[doc = r"Pointer to the register block"]
670    pub const PTR: *const wdt::RegisterBlock = 0x4004_4200 as *const _;
671    #[doc = r"Return the pointer to the register block"]
672    #[inline(always)]
673    pub const fn ptr() -> *const wdt::RegisterBlock {
674        Self::PTR
675    }
676}
677impl Deref for WDT {
678    type Target = wdt::RegisterBlock;
679    #[inline(always)]
680    fn deref(&self) -> &Self::Target {
681        unsafe { &*Self::PTR }
682    }
683}
684impl core::fmt::Debug for WDT {
685    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
686        f.debug_struct("WDT").finish()
687    }
688}
689#[doc = "Watchdog Timer"]
690pub mod wdt;
691#[doc = "Independent Watchdog Timer"]
692pub struct IWDT {
693    _marker: PhantomData<*const ()>,
694}
695unsafe impl Send for IWDT {}
696impl IWDT {
697    #[doc = r"Pointer to the register block"]
698    pub const PTR: *const iwdt::RegisterBlock = 0x4004_4400 as *const _;
699    #[doc = r"Return the pointer to the register block"]
700    #[inline(always)]
701    pub const fn ptr() -> *const iwdt::RegisterBlock {
702        Self::PTR
703    }
704}
705impl Deref for IWDT {
706    type Target = iwdt::RegisterBlock;
707    #[inline(always)]
708    fn deref(&self) -> &Self::Target {
709        unsafe { &*Self::PTR }
710    }
711}
712impl core::fmt::Debug for IWDT {
713    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
714        f.debug_struct("IWDT").finish()
715    }
716}
717#[doc = "Independent Watchdog Timer"]
718pub mod iwdt;
719#[doc = "Clock Frequency Accuracy Measurement Circuit"]
720pub struct CAC {
721    _marker: PhantomData<*const ()>,
722}
723unsafe impl Send for CAC {}
724impl CAC {
725    #[doc = r"Pointer to the register block"]
726    pub const PTR: *const cac::RegisterBlock = 0x4004_4600 as *const _;
727    #[doc = r"Return the pointer to the register block"]
728    #[inline(always)]
729    pub const fn ptr() -> *const cac::RegisterBlock {
730        Self::PTR
731    }
732}
733impl Deref for CAC {
734    type Target = cac::RegisterBlock;
735    #[inline(always)]
736    fn deref(&self) -> &Self::Target {
737        unsafe { &*Self::PTR }
738    }
739}
740impl core::fmt::Debug for CAC {
741    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
742        f.debug_struct("CAC").finish()
743    }
744}
745#[doc = "Clock Frequency Accuracy Measurement Circuit"]
746pub mod cac;
747#[doc = "Module Stop Control B, C, D"]
748pub struct MSTP {
749    _marker: PhantomData<*const ()>,
750}
751unsafe impl Send for MSTP {}
752impl MSTP {
753    #[doc = r"Pointer to the register block"]
754    pub const PTR: *const mstp::RegisterBlock = 0x4004_7000 as *const _;
755    #[doc = r"Return the pointer to the register block"]
756    #[inline(always)]
757    pub const fn ptr() -> *const mstp::RegisterBlock {
758        Self::PTR
759    }
760}
761impl Deref for MSTP {
762    type Target = mstp::RegisterBlock;
763    #[inline(always)]
764    fn deref(&self) -> &Self::Target {
765        unsafe { &*Self::PTR }
766    }
767}
768impl core::fmt::Debug for MSTP {
769    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
770        f.debug_struct("MSTP").finish()
771    }
772}
773#[doc = "Module Stop Control B, C, D"]
774pub mod mstp;
775#[doc = "Inter-Integrated Circuit 0"]
776pub struct IIC0 {
777    _marker: PhantomData<*const ()>,
778}
779unsafe impl Send for IIC0 {}
780impl IIC0 {
781    #[doc = r"Pointer to the register block"]
782    pub const PTR: *const iic0::RegisterBlock = 0x4005_3000 as *const _;
783    #[doc = r"Return the pointer to the register block"]
784    #[inline(always)]
785    pub const fn ptr() -> *const iic0::RegisterBlock {
786        Self::PTR
787    }
788}
789impl Deref for IIC0 {
790    type Target = iic0::RegisterBlock;
791    #[inline(always)]
792    fn deref(&self) -> &Self::Target {
793        unsafe { &*Self::PTR }
794    }
795}
796impl core::fmt::Debug for IIC0 {
797    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
798        f.debug_struct("IIC0").finish()
799    }
800}
801#[doc = "Inter-Integrated Circuit 0"]
802pub mod iic0;
803#[doc = "Inter-Integrated Circuit 0 Wake-up Unit"]
804pub struct IIC0WU {
805    _marker: PhantomData<*const ()>,
806}
807unsafe impl Send for IIC0WU {}
808impl IIC0WU {
809    #[doc = r"Pointer to the register block"]
810    pub const PTR: *const iic0wu::RegisterBlock = 0x4005_3014 as *const _;
811    #[doc = r"Return the pointer to the register block"]
812    #[inline(always)]
813    pub const fn ptr() -> *const iic0wu::RegisterBlock {
814        Self::PTR
815    }
816}
817impl Deref for IIC0WU {
818    type Target = iic0wu::RegisterBlock;
819    #[inline(always)]
820    fn deref(&self) -> &Self::Target {
821        unsafe { &*Self::PTR }
822    }
823}
824impl core::fmt::Debug for IIC0WU {
825    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
826        f.debug_struct("IIC0WU").finish()
827    }
828}
829#[doc = "Inter-Integrated Circuit 0 Wake-up Unit"]
830pub mod iic0wu;
831#[doc = "Data Operation Circuit"]
832pub struct DOC {
833    _marker: PhantomData<*const ()>,
834}
835unsafe impl Send for DOC {}
836impl DOC {
837    #[doc = r"Pointer to the register block"]
838    pub const PTR: *const doc::RegisterBlock = 0x4005_4100 as *const _;
839    #[doc = r"Return the pointer to the register block"]
840    #[inline(always)]
841    pub const fn ptr() -> *const doc::RegisterBlock {
842        Self::PTR
843    }
844}
845impl Deref for DOC {
846    type Target = doc::RegisterBlock;
847    #[inline(always)]
848    fn deref(&self) -> &Self::Target {
849        unsafe { &*Self::PTR }
850    }
851}
852impl core::fmt::Debug for DOC {
853    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
854        f.debug_struct("DOC").finish()
855    }
856}
857#[doc = "Data Operation Circuit"]
858pub mod doc;
859#[doc = "12-bit A/D Converter"]
860pub struct ADC120 {
861    _marker: PhantomData<*const ()>,
862}
863unsafe impl Send for ADC120 {}
864impl ADC120 {
865    #[doc = r"Pointer to the register block"]
866    pub const PTR: *const adc120::RegisterBlock = 0x4005_c000 as *const _;
867    #[doc = r"Return the pointer to the register block"]
868    #[inline(always)]
869    pub const fn ptr() -> *const adc120::RegisterBlock {
870        Self::PTR
871    }
872}
873impl Deref for ADC120 {
874    type Target = adc120::RegisterBlock;
875    #[inline(always)]
876    fn deref(&self) -> &Self::Target {
877        unsafe { &*Self::PTR }
878    }
879}
880impl core::fmt::Debug for ADC120 {
881    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
882        f.debug_struct("ADC120").finish()
883    }
884}
885#[doc = "12-bit A/D Converter"]
886pub mod adc120;
887#[doc = "Serial Communication Interface"]
888pub struct SCI0 {
889    _marker: PhantomData<*const ()>,
890}
891unsafe impl Send for SCI0 {}
892impl SCI0 {
893    #[doc = r"Pointer to the register block"]
894    pub const PTR: *const sci0::RegisterBlock = 0x4007_0000 as *const _;
895    #[doc = r"Return the pointer to the register block"]
896    #[inline(always)]
897    pub const fn ptr() -> *const sci0::RegisterBlock {
898        Self::PTR
899    }
900}
901impl Deref for SCI0 {
902    type Target = sci0::RegisterBlock;
903    #[inline(always)]
904    fn deref(&self) -> &Self::Target {
905        unsafe { &*Self::PTR }
906    }
907}
908impl core::fmt::Debug for SCI0 {
909    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
910        f.debug_struct("SCI0").finish()
911    }
912}
913#[doc = "Serial Communication Interface"]
914pub mod sci0;
915#[doc = "Serial Communication Interface"]
916pub struct SCI1 {
917    _marker: PhantomData<*const ()>,
918}
919unsafe impl Send for SCI1 {}
920impl SCI1 {
921    #[doc = r"Pointer to the register block"]
922    pub const PTR: *const sci0::RegisterBlock = 0x4007_0020 as *const _;
923    #[doc = r"Return the pointer to the register block"]
924    #[inline(always)]
925    pub const fn ptr() -> *const sci0::RegisterBlock {
926        Self::PTR
927    }
928}
929impl Deref for SCI1 {
930    type Target = sci0::RegisterBlock;
931    #[inline(always)]
932    fn deref(&self) -> &Self::Target {
933        unsafe { &*Self::PTR }
934    }
935}
936impl core::fmt::Debug for SCI1 {
937    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
938        f.debug_struct("SCI1").finish()
939    }
940}
941#[doc = "Serial Communication Interface"]
942pub use self::sci0 as sci1;
943#[doc = "Serial Communication Interface"]
944pub struct SCI2 {
945    _marker: PhantomData<*const ()>,
946}
947unsafe impl Send for SCI2 {}
948impl SCI2 {
949    #[doc = r"Pointer to the register block"]
950    pub const PTR: *const sci0::RegisterBlock = 0x4007_0040 as *const _;
951    #[doc = r"Return the pointer to the register block"]
952    #[inline(always)]
953    pub const fn ptr() -> *const sci0::RegisterBlock {
954        Self::PTR
955    }
956}
957impl Deref for SCI2 {
958    type Target = sci0::RegisterBlock;
959    #[inline(always)]
960    fn deref(&self) -> &Self::Target {
961        unsafe { &*Self::PTR }
962    }
963}
964impl core::fmt::Debug for SCI2 {
965    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
966        f.debug_struct("SCI2").finish()
967    }
968}
969#[doc = "Serial Communication Interface"]
970pub use self::sci0 as sci2;
971#[doc = "Serial Communication Interface"]
972pub struct SCI9 {
973    _marker: PhantomData<*const ()>,
974}
975unsafe impl Send for SCI9 {}
976impl SCI9 {
977    #[doc = r"Pointer to the register block"]
978    pub const PTR: *const sci0::RegisterBlock = 0x4007_0120 as *const _;
979    #[doc = r"Return the pointer to the register block"]
980    #[inline(always)]
981    pub const fn ptr() -> *const sci0::RegisterBlock {
982        Self::PTR
983    }
984}
985impl Deref for SCI9 {
986    type Target = sci0::RegisterBlock;
987    #[inline(always)]
988    fn deref(&self) -> &Self::Target {
989        unsafe { &*Self::PTR }
990    }
991}
992impl core::fmt::Debug for SCI9 {
993    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
994        f.debug_struct("SCI9").finish()
995    }
996}
997#[doc = "Serial Communication Interface"]
998pub use self::sci0 as sci9;
999#[doc = "Serial Peripheral Interface"]
1000pub struct SPI0 {
1001    _marker: PhantomData<*const ()>,
1002}
1003unsafe impl Send for SPI0 {}
1004impl SPI0 {
1005    #[doc = r"Pointer to the register block"]
1006    pub const PTR: *const spi0::RegisterBlock = 0x4007_2000 as *const _;
1007    #[doc = r"Return the pointer to the register block"]
1008    #[inline(always)]
1009    pub const fn ptr() -> *const spi0::RegisterBlock {
1010        Self::PTR
1011    }
1012}
1013impl Deref for SPI0 {
1014    type Target = spi0::RegisterBlock;
1015    #[inline(always)]
1016    fn deref(&self) -> &Self::Target {
1017        unsafe { &*Self::PTR }
1018    }
1019}
1020impl core::fmt::Debug for SPI0 {
1021    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1022        f.debug_struct("SPI0").finish()
1023    }
1024}
1025#[doc = "Serial Peripheral Interface"]
1026pub mod spi0;
1027#[doc = "Cyclic Redundancy Check Calculator"]
1028pub struct CRC {
1029    _marker: PhantomData<*const ()>,
1030}
1031unsafe impl Send for CRC {}
1032impl CRC {
1033    #[doc = r"Pointer to the register block"]
1034    pub const PTR: *const crc::RegisterBlock = 0x4007_4000 as *const _;
1035    #[doc = r"Return the pointer to the register block"]
1036    #[inline(always)]
1037    pub const fn ptr() -> *const crc::RegisterBlock {
1038        Self::PTR
1039    }
1040}
1041impl Deref for CRC {
1042    type Target = crc::RegisterBlock;
1043    #[inline(always)]
1044    fn deref(&self) -> &Self::Target {
1045        unsafe { &*Self::PTR }
1046    }
1047}
1048impl core::fmt::Debug for CRC {
1049    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1050        f.debug_struct("CRC").finish()
1051    }
1052}
1053#[doc = "Cyclic Redundancy Check Calculator"]
1054pub mod crc;
1055#[doc = "General PWM 32-bit Timer 0"]
1056pub struct GPT320 {
1057    _marker: PhantomData<*const ()>,
1058}
1059unsafe impl Send for GPT320 {}
1060impl GPT320 {
1061    #[doc = r"Pointer to the register block"]
1062    pub const PTR: *const gpt320::RegisterBlock = 0x4007_8000 as *const _;
1063    #[doc = r"Return the pointer to the register block"]
1064    #[inline(always)]
1065    pub const fn ptr() -> *const gpt320::RegisterBlock {
1066        Self::PTR
1067    }
1068}
1069impl Deref for GPT320 {
1070    type Target = gpt320::RegisterBlock;
1071    #[inline(always)]
1072    fn deref(&self) -> &Self::Target {
1073        unsafe { &*Self::PTR }
1074    }
1075}
1076impl core::fmt::Debug for GPT320 {
1077    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1078        f.debug_struct("GPT320").finish()
1079    }
1080}
1081#[doc = "General PWM 32-bit Timer 0"]
1082pub mod gpt320;
1083#[doc = "General PWM 16-bit Timer 4"]
1084pub struct GPT164 {
1085    _marker: PhantomData<*const ()>,
1086}
1087unsafe impl Send for GPT164 {}
1088impl GPT164 {
1089    #[doc = r"Pointer to the register block"]
1090    pub const PTR: *const gpt164::RegisterBlock = 0x4007_8400 as *const _;
1091    #[doc = r"Return the pointer to the register block"]
1092    #[inline(always)]
1093    pub const fn ptr() -> *const gpt164::RegisterBlock {
1094        Self::PTR
1095    }
1096}
1097impl Deref for GPT164 {
1098    type Target = gpt164::RegisterBlock;
1099    #[inline(always)]
1100    fn deref(&self) -> &Self::Target {
1101        unsafe { &*Self::PTR }
1102    }
1103}
1104impl core::fmt::Debug for GPT164 {
1105    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1106        f.debug_struct("GPT164").finish()
1107    }
1108}
1109#[doc = "General PWM 16-bit Timer 4"]
1110pub mod gpt164;
1111#[doc = "General PWM 16-bit Timer 5"]
1112pub struct GPT165 {
1113    _marker: PhantomData<*const ()>,
1114}
1115unsafe impl Send for GPT165 {}
1116impl GPT165 {
1117    #[doc = r"Pointer to the register block"]
1118    pub const PTR: *const gpt164::RegisterBlock = 0x4007_8500 as *const _;
1119    #[doc = r"Return the pointer to the register block"]
1120    #[inline(always)]
1121    pub const fn ptr() -> *const gpt164::RegisterBlock {
1122        Self::PTR
1123    }
1124}
1125impl Deref for GPT165 {
1126    type Target = gpt164::RegisterBlock;
1127    #[inline(always)]
1128    fn deref(&self) -> &Self::Target {
1129        unsafe { &*Self::PTR }
1130    }
1131}
1132impl core::fmt::Debug for GPT165 {
1133    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1134        f.debug_struct("GPT165").finish()
1135    }
1136}
1137#[doc = "General PWM 16-bit Timer 5"]
1138pub use self::gpt164 as gpt165;
1139#[doc = "General PWM 16-bit Timer 6"]
1140pub struct GPT166 {
1141    _marker: PhantomData<*const ()>,
1142}
1143unsafe impl Send for GPT166 {}
1144impl GPT166 {
1145    #[doc = r"Pointer to the register block"]
1146    pub const PTR: *const gpt164::RegisterBlock = 0x4007_8600 as *const _;
1147    #[doc = r"Return the pointer to the register block"]
1148    #[inline(always)]
1149    pub const fn ptr() -> *const gpt164::RegisterBlock {
1150        Self::PTR
1151    }
1152}
1153impl Deref for GPT166 {
1154    type Target = gpt164::RegisterBlock;
1155    #[inline(always)]
1156    fn deref(&self) -> &Self::Target {
1157        unsafe { &*Self::PTR }
1158    }
1159}
1160impl core::fmt::Debug for GPT166 {
1161    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1162        f.debug_struct("GPT166").finish()
1163    }
1164}
1165#[doc = "General PWM 16-bit Timer 6"]
1166pub use self::gpt164 as gpt166;
1167#[doc = "General PWM 16-bit Timer 7"]
1168pub struct GPT167 {
1169    _marker: PhantomData<*const ()>,
1170}
1171unsafe impl Send for GPT167 {}
1172impl GPT167 {
1173    #[doc = r"Pointer to the register block"]
1174    pub const PTR: *const gpt164::RegisterBlock = 0x4007_8700 as *const _;
1175    #[doc = r"Return the pointer to the register block"]
1176    #[inline(always)]
1177    pub const fn ptr() -> *const gpt164::RegisterBlock {
1178        Self::PTR
1179    }
1180}
1181impl Deref for GPT167 {
1182    type Target = gpt164::RegisterBlock;
1183    #[inline(always)]
1184    fn deref(&self) -> &Self::Target {
1185        unsafe { &*Self::PTR }
1186    }
1187}
1188impl core::fmt::Debug for GPT167 {
1189    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1190        f.debug_struct("GPT167").finish()
1191    }
1192}
1193#[doc = "General PWM 16-bit Timer 7"]
1194pub use self::gpt164 as gpt167;
1195#[doc = "General PWM 16-bit Timer 8"]
1196pub struct GPT168 {
1197    _marker: PhantomData<*const ()>,
1198}
1199unsafe impl Send for GPT168 {}
1200impl GPT168 {
1201    #[doc = r"Pointer to the register block"]
1202    pub const PTR: *const gpt164::RegisterBlock = 0x4007_8800 as *const _;
1203    #[doc = r"Return the pointer to the register block"]
1204    #[inline(always)]
1205    pub const fn ptr() -> *const gpt164::RegisterBlock {
1206        Self::PTR
1207    }
1208}
1209impl Deref for GPT168 {
1210    type Target = gpt164::RegisterBlock;
1211    #[inline(always)]
1212    fn deref(&self) -> &Self::Target {
1213        unsafe { &*Self::PTR }
1214    }
1215}
1216impl core::fmt::Debug for GPT168 {
1217    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1218        f.debug_struct("GPT168").finish()
1219    }
1220}
1221#[doc = "General PWM 16-bit Timer 8"]
1222pub use self::gpt164 as gpt168;
1223#[doc = "General PWM 16-bit Timer 9"]
1224pub struct GPT169 {
1225    _marker: PhantomData<*const ()>,
1226}
1227unsafe impl Send for GPT169 {}
1228impl GPT169 {
1229    #[doc = r"Pointer to the register block"]
1230    pub const PTR: *const gpt164::RegisterBlock = 0x4007_8900 as *const _;
1231    #[doc = r"Return the pointer to the register block"]
1232    #[inline(always)]
1233    pub const fn ptr() -> *const gpt164::RegisterBlock {
1234        Self::PTR
1235    }
1236}
1237impl Deref for GPT169 {
1238    type Target = gpt164::RegisterBlock;
1239    #[inline(always)]
1240    fn deref(&self) -> &Self::Target {
1241        unsafe { &*Self::PTR }
1242    }
1243}
1244impl core::fmt::Debug for GPT169 {
1245    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1246        f.debug_struct("GPT169").finish()
1247    }
1248}
1249#[doc = "General PWM 16-bit Timer 9"]
1250pub use self::gpt164 as gpt169;
1251#[doc = "Output Phase Switching Controller"]
1252pub struct GPT_OPS {
1253    _marker: PhantomData<*const ()>,
1254}
1255unsafe impl Send for GPT_OPS {}
1256impl GPT_OPS {
1257    #[doc = r"Pointer to the register block"]
1258    pub const PTR: *const gpt_ops::RegisterBlock = 0x4007_8ff0 as *const _;
1259    #[doc = r"Return the pointer to the register block"]
1260    #[inline(always)]
1261    pub const fn ptr() -> *const gpt_ops::RegisterBlock {
1262        Self::PTR
1263    }
1264}
1265impl Deref for GPT_OPS {
1266    type Target = gpt_ops::RegisterBlock;
1267    #[inline(always)]
1268    fn deref(&self) -> &Self::Target {
1269        unsafe { &*Self::PTR }
1270    }
1271}
1272impl core::fmt::Debug for GPT_OPS {
1273    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1274        f.debug_struct("GPT_OPS").finish()
1275    }
1276}
1277#[doc = "Output Phase Switching Controller"]
1278pub mod gpt_ops;
1279#[doc = "Key Interrupt Function"]
1280pub struct KINT {
1281    _marker: PhantomData<*const ()>,
1282}
1283unsafe impl Send for KINT {}
1284impl KINT {
1285    #[doc = r"Pointer to the register block"]
1286    pub const PTR: *const kint::RegisterBlock = 0x4008_0000 as *const _;
1287    #[doc = r"Return the pointer to the register block"]
1288    #[inline(always)]
1289    pub const fn ptr() -> *const kint::RegisterBlock {
1290        Self::PTR
1291    }
1292}
1293impl Deref for KINT {
1294    type Target = kint::RegisterBlock;
1295    #[inline(always)]
1296    fn deref(&self) -> &Self::Target {
1297        unsafe { &*Self::PTR }
1298    }
1299}
1300impl core::fmt::Debug for KINT {
1301    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1302        f.debug_struct("KINT").finish()
1303    }
1304}
1305#[doc = "Key Interrupt Function"]
1306pub mod kint;
1307#[doc = "Capacitive Touch Sensing Unit"]
1308pub struct CTSU {
1309    _marker: PhantomData<*const ()>,
1310}
1311unsafe impl Send for CTSU {}
1312impl CTSU {
1313    #[doc = r"Pointer to the register block"]
1314    pub const PTR: *const ctsu::RegisterBlock = 0x4008_2000 as *const _;
1315    #[doc = r"Return the pointer to the register block"]
1316    #[inline(always)]
1317    pub const fn ptr() -> *const ctsu::RegisterBlock {
1318        Self::PTR
1319    }
1320}
1321impl Deref for CTSU {
1322    type Target = ctsu::RegisterBlock;
1323    #[inline(always)]
1324    fn deref(&self) -> &Self::Target {
1325        unsafe { &*Self::PTR }
1326    }
1327}
1328impl core::fmt::Debug for CTSU {
1329    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1330        f.debug_struct("CTSU").finish()
1331    }
1332}
1333#[doc = "Capacitive Touch Sensing Unit"]
1334pub mod ctsu;
1335#[doc = "Low Power Asynchronous General Purpose Timer 0"]
1336pub struct AGT0 {
1337    _marker: PhantomData<*const ()>,
1338}
1339unsafe impl Send for AGT0 {}
1340impl AGT0 {
1341    #[doc = r"Pointer to the register block"]
1342    pub const PTR: *const agt0::RegisterBlock = 0x4008_4000 as *const _;
1343    #[doc = r"Return the pointer to the register block"]
1344    #[inline(always)]
1345    pub const fn ptr() -> *const agt0::RegisterBlock {
1346        Self::PTR
1347    }
1348}
1349impl Deref for AGT0 {
1350    type Target = agt0::RegisterBlock;
1351    #[inline(always)]
1352    fn deref(&self) -> &Self::Target {
1353        unsafe { &*Self::PTR }
1354    }
1355}
1356impl core::fmt::Debug for AGT0 {
1357    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1358        f.debug_struct("AGT0").finish()
1359    }
1360}
1361#[doc = "Low Power Asynchronous General Purpose Timer 0"]
1362pub mod agt0;
1363#[doc = "Low Power Asynchronous General Purpose Timer 1"]
1364pub struct AGT1 {
1365    _marker: PhantomData<*const ()>,
1366}
1367unsafe impl Send for AGT1 {}
1368impl AGT1 {
1369    #[doc = r"Pointer to the register block"]
1370    pub const PTR: *const agt0::RegisterBlock = 0x4008_4100 as *const _;
1371    #[doc = r"Return the pointer to the register block"]
1372    #[inline(always)]
1373    pub const fn ptr() -> *const agt0::RegisterBlock {
1374        Self::PTR
1375    }
1376}
1377impl Deref for AGT1 {
1378    type Target = agt0::RegisterBlock;
1379    #[inline(always)]
1380    fn deref(&self) -> &Self::Target {
1381        unsafe { &*Self::PTR }
1382    }
1383}
1384impl core::fmt::Debug for AGT1 {
1385    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1386        f.debug_struct("AGT1").finish()
1387    }
1388}
1389#[doc = "Low Power Asynchronous General Purpose Timer 1"]
1390pub use self::agt0 as agt1;
1391#[doc = "Low-Power Analog Comparator"]
1392pub struct ACMPLP {
1393    _marker: PhantomData<*const ()>,
1394}
1395unsafe impl Send for ACMPLP {}
1396impl ACMPLP {
1397    #[doc = r"Pointer to the register block"]
1398    pub const PTR: *const acmplp::RegisterBlock = 0x4008_5e00 as *const _;
1399    #[doc = r"Return the pointer to the register block"]
1400    #[inline(always)]
1401    pub const fn ptr() -> *const acmplp::RegisterBlock {
1402        Self::PTR
1403    }
1404}
1405impl Deref for ACMPLP {
1406    type Target = acmplp::RegisterBlock;
1407    #[inline(always)]
1408    fn deref(&self) -> &Self::Target {
1409        unsafe { &*Self::PTR }
1410    }
1411}
1412impl core::fmt::Debug for ACMPLP {
1413    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1414        f.debug_struct("ACMPLP").finish()
1415    }
1416}
1417#[doc = "Low-Power Analog Comparator"]
1418pub mod acmplp;
1419#[doc = "Flash I/O Registers"]
1420pub struct FLCN {
1421    _marker: PhantomData<*const ()>,
1422}
1423unsafe impl Send for FLCN {}
1424impl FLCN {
1425    #[doc = r"Pointer to the register block"]
1426    pub const PTR: *const flcn::RegisterBlock = 0x407e_c000 as *const _;
1427    #[doc = r"Return the pointer to the register block"]
1428    #[inline(always)]
1429    pub const fn ptr() -> *const flcn::RegisterBlock {
1430        Self::PTR
1431    }
1432}
1433impl Deref for FLCN {
1434    type Target = flcn::RegisterBlock;
1435    #[inline(always)]
1436    fn deref(&self) -> &Self::Target {
1437        unsafe { &*Self::PTR }
1438    }
1439}
1440impl core::fmt::Debug for FLCN {
1441    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1442        f.debug_struct("FLCN").finish()
1443    }
1444}
1445#[doc = "Flash I/O Registers"]
1446pub mod flcn;
1447#[no_mangle]
1448static mut DEVICE_PERIPHERALS: bool = false;
1449#[doc = r" All the peripherals."]
1450#[allow(non_snake_case)]
1451pub struct Peripherals {
1452    #[doc = "SRAM"]
1453    pub SRAM: SRAM,
1454    #[doc = "BUS"]
1455    pub BUS: BUS,
1456    #[doc = "DTC"]
1457    pub DTC: DTC,
1458    #[doc = "ICU"]
1459    pub ICU: ICU,
1460    #[doc = "DBG"]
1461    pub DBG: DBG,
1462    #[doc = "SYSC"]
1463    pub SYSC: SYSC,
1464    #[doc = "PORT0"]
1465    pub PORT0: PORT0,
1466    #[doc = "PORT1"]
1467    pub PORT1: PORT1,
1468    #[doc = "PORT2"]
1469    pub PORT2: PORT2,
1470    #[doc = "PORT3"]
1471    pub PORT3: PORT3,
1472    #[doc = "PORT4"]
1473    pub PORT4: PORT4,
1474    #[doc = "PORT5"]
1475    pub PORT5: PORT5,
1476    #[doc = "PORT9"]
1477    pub PORT9: PORT9,
1478    #[doc = "PFS"]
1479    pub PFS: PFS,
1480    #[doc = "ELC"]
1481    pub ELC: ELC,
1482    #[doc = "POEG"]
1483    pub POEG: POEG,
1484    #[doc = "RTC"]
1485    pub RTC: RTC,
1486    #[doc = "WDT"]
1487    pub WDT: WDT,
1488    #[doc = "IWDT"]
1489    pub IWDT: IWDT,
1490    #[doc = "CAC"]
1491    pub CAC: CAC,
1492    #[doc = "MSTP"]
1493    pub MSTP: MSTP,
1494    #[doc = "IIC0"]
1495    pub IIC0: IIC0,
1496    #[doc = "IIC0WU"]
1497    pub IIC0WU: IIC0WU,
1498    #[doc = "DOC"]
1499    pub DOC: DOC,
1500    #[doc = "ADC120"]
1501    pub ADC120: ADC120,
1502    #[doc = "SCI0"]
1503    pub SCI0: SCI0,
1504    #[doc = "SCI1"]
1505    pub SCI1: SCI1,
1506    #[doc = "SCI2"]
1507    pub SCI2: SCI2,
1508    #[doc = "SCI9"]
1509    pub SCI9: SCI9,
1510    #[doc = "SPI0"]
1511    pub SPI0: SPI0,
1512    #[doc = "CRC"]
1513    pub CRC: CRC,
1514    #[doc = "GPT320"]
1515    pub GPT320: GPT320,
1516    #[doc = "GPT164"]
1517    pub GPT164: GPT164,
1518    #[doc = "GPT165"]
1519    pub GPT165: GPT165,
1520    #[doc = "GPT166"]
1521    pub GPT166: GPT166,
1522    #[doc = "GPT167"]
1523    pub GPT167: GPT167,
1524    #[doc = "GPT168"]
1525    pub GPT168: GPT168,
1526    #[doc = "GPT169"]
1527    pub GPT169: GPT169,
1528    #[doc = "GPT_OPS"]
1529    pub GPT_OPS: GPT_OPS,
1530    #[doc = "KINT"]
1531    pub KINT: KINT,
1532    #[doc = "CTSU"]
1533    pub CTSU: CTSU,
1534    #[doc = "AGT0"]
1535    pub AGT0: AGT0,
1536    #[doc = "AGT1"]
1537    pub AGT1: AGT1,
1538    #[doc = "ACMPLP"]
1539    pub ACMPLP: ACMPLP,
1540    #[doc = "FLCN"]
1541    pub FLCN: FLCN,
1542}
1543impl Peripherals {
1544    #[doc = r" Returns all the peripherals *once*."]
1545    #[cfg(feature = "critical-section")]
1546    #[inline]
1547    pub fn take() -> Option<Self> {
1548        critical_section::with(|_| {
1549            if unsafe { DEVICE_PERIPHERALS } {
1550                return None;
1551            }
1552            Some(unsafe { Peripherals::steal() })
1553        })
1554    }
1555    #[doc = r" Unchecked version of `Peripherals::take`."]
1556    #[doc = r""]
1557    #[doc = r" # Safety"]
1558    #[doc = r""]
1559    #[doc = r" Each of the returned peripherals must be used at most once."]
1560    #[inline]
1561    pub unsafe fn steal() -> Self {
1562        DEVICE_PERIPHERALS = true;
1563        Peripherals {
1564            SRAM: SRAM {
1565                _marker: PhantomData,
1566            },
1567            BUS: BUS {
1568                _marker: PhantomData,
1569            },
1570            DTC: DTC {
1571                _marker: PhantomData,
1572            },
1573            ICU: ICU {
1574                _marker: PhantomData,
1575            },
1576            DBG: DBG {
1577                _marker: PhantomData,
1578            },
1579            SYSC: SYSC {
1580                _marker: PhantomData,
1581            },
1582            PORT0: PORT0 {
1583                _marker: PhantomData,
1584            },
1585            PORT1: PORT1 {
1586                _marker: PhantomData,
1587            },
1588            PORT2: PORT2 {
1589                _marker: PhantomData,
1590            },
1591            PORT3: PORT3 {
1592                _marker: PhantomData,
1593            },
1594            PORT4: PORT4 {
1595                _marker: PhantomData,
1596            },
1597            PORT5: PORT5 {
1598                _marker: PhantomData,
1599            },
1600            PORT9: PORT9 {
1601                _marker: PhantomData,
1602            },
1603            PFS: PFS {
1604                _marker: PhantomData,
1605            },
1606            ELC: ELC {
1607                _marker: PhantomData,
1608            },
1609            POEG: POEG {
1610                _marker: PhantomData,
1611            },
1612            RTC: RTC {
1613                _marker: PhantomData,
1614            },
1615            WDT: WDT {
1616                _marker: PhantomData,
1617            },
1618            IWDT: IWDT {
1619                _marker: PhantomData,
1620            },
1621            CAC: CAC {
1622                _marker: PhantomData,
1623            },
1624            MSTP: MSTP {
1625                _marker: PhantomData,
1626            },
1627            IIC0: IIC0 {
1628                _marker: PhantomData,
1629            },
1630            IIC0WU: IIC0WU {
1631                _marker: PhantomData,
1632            },
1633            DOC: DOC {
1634                _marker: PhantomData,
1635            },
1636            ADC120: ADC120 {
1637                _marker: PhantomData,
1638            },
1639            SCI0: SCI0 {
1640                _marker: PhantomData,
1641            },
1642            SCI1: SCI1 {
1643                _marker: PhantomData,
1644            },
1645            SCI2: SCI2 {
1646                _marker: PhantomData,
1647            },
1648            SCI9: SCI9 {
1649                _marker: PhantomData,
1650            },
1651            SPI0: SPI0 {
1652                _marker: PhantomData,
1653            },
1654            CRC: CRC {
1655                _marker: PhantomData,
1656            },
1657            GPT320: GPT320 {
1658                _marker: PhantomData,
1659            },
1660            GPT164: GPT164 {
1661                _marker: PhantomData,
1662            },
1663            GPT165: GPT165 {
1664                _marker: PhantomData,
1665            },
1666            GPT166: GPT166 {
1667                _marker: PhantomData,
1668            },
1669            GPT167: GPT167 {
1670                _marker: PhantomData,
1671            },
1672            GPT168: GPT168 {
1673                _marker: PhantomData,
1674            },
1675            GPT169: GPT169 {
1676                _marker: PhantomData,
1677            },
1678            GPT_OPS: GPT_OPS {
1679                _marker: PhantomData,
1680            },
1681            KINT: KINT {
1682                _marker: PhantomData,
1683            },
1684            CTSU: CTSU {
1685                _marker: PhantomData,
1686            },
1687            AGT0: AGT0 {
1688                _marker: PhantomData,
1689            },
1690            AGT1: AGT1 {
1691                _marker: PhantomData,
1692            },
1693            ACMPLP: ACMPLP {
1694                _marker: PhantomData,
1695            },
1696            FLCN: FLCN {
1697                _marker: PhantomData,
1698            },
1699        }
1700    }
1701}