#![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]
svd2rust 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"]
#![deny(dead_code)]
#![deny(improper_ctypes)]
#![deny(missing_docs)]
#![deny(no_mangle_generic_items)]
#![deny(non_shorthand_field_patterns)]
#![deny(overflowing_literals)]
#![deny(path_statements)]
#![deny(patterns_in_fns_without_body)]
#![deny(private_in_public)]
#![deny(unconditional_recursion)]
#![deny(unused_allocation)]
#![deny(unused_comparisons)]
#![deny(unused_parens)]
#![deny(while_true)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![no_std]
use core::marker::PhantomData;
use core::ops::Deref;
#[doc = r"Number available in the NVIC for configuring priority"]
pub const NVIC_PRIO_BITS: u8 = 2;
#[cfg(feature = "rt")]
pub use self::Interrupt as interrupt;
pub use cortex_m::peripheral::Peripherals as CorePeripherals;
pub use cortex_m::peripheral::{CBP, CPUID, DCB, DWT, FPB, ITM, MPU, NVIC, SCB, SYST, TPIU};
#[cfg(feature = "rt")]
pub use cortex_m_rt::interrupt;
#[allow(unused_imports)]
use generic::*;
#[doc = r"Common register and bit access and modify traits"]
pub mod generic;
#[cfg(feature = "rt")]
extern "C" {
fn IEL0();
fn IEL1();
fn IEL2();
fn IEL3();
fn IEL4();
fn IEL5();
fn IEL6();
fn IEL7();
fn IEL8();
fn IEL9();
fn IEL10();
fn IEL11();
fn IEL12();
fn IEL13();
fn IEL14();
fn IEL15();
fn IEL16();
fn IEL17();
fn IEL18();
fn IEL19();
fn IEL20();
fn IEL21();
fn IEL22();
fn IEL23();
fn IEL24();
fn IEL25();
fn IEL26();
fn IEL27();
fn IEL28();
fn IEL29();
fn IEL30();
fn IEL31();
}
#[doc(hidden)]
pub union Vector {
_handler: unsafe extern "C" fn(),
_reserved: u32,
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".vector_table.interrupts"]
#[no_mangle]
pub static __INTERRUPTS: [Vector; 32] = [
Vector { _handler: IEL0 },
Vector { _handler: IEL1 },
Vector { _handler: IEL2 },
Vector { _handler: IEL3 },
Vector { _handler: IEL4 },
Vector { _handler: IEL5 },
Vector { _handler: IEL6 },
Vector { _handler: IEL7 },
Vector { _handler: IEL8 },
Vector { _handler: IEL9 },
Vector { _handler: IEL10 },
Vector { _handler: IEL11 },
Vector { _handler: IEL12 },
Vector { _handler: IEL13 },
Vector { _handler: IEL14 },
Vector { _handler: IEL15 },
Vector { _handler: IEL16 },
Vector { _handler: IEL17 },
Vector { _handler: IEL18 },
Vector { _handler: IEL19 },
Vector { _handler: IEL20 },
Vector { _handler: IEL21 },
Vector { _handler: IEL22 },
Vector { _handler: IEL23 },
Vector { _handler: IEL24 },
Vector { _handler: IEL25 },
Vector { _handler: IEL26 },
Vector { _handler: IEL27 },
Vector { _handler: IEL28 },
Vector { _handler: IEL29 },
Vector { _handler: IEL30 },
Vector { _handler: IEL31 },
];
#[doc = r"Enumeration of all the interrupts."]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[repr(u16)]
pub enum Interrupt {
#[doc = "0 - ICU Interrupt 0"]
IEL0 = 0,
#[doc = "1 - ICU Interrupt 1"]
IEL1 = 1,
#[doc = "2 - ICU Interrupt 2"]
IEL2 = 2,
#[doc = "3 - ICU Interrupt 3"]
IEL3 = 3,
#[doc = "4 - ICU Interrupt 4"]
IEL4 = 4,
#[doc = "5 - ICU Interrupt 5"]
IEL5 = 5,
#[doc = "6 - ICU Interrupt 6"]
IEL6 = 6,
#[doc = "7 - ICU Interrupt 7"]
IEL7 = 7,
#[doc = "8 - ICU Interrupt 8"]
IEL8 = 8,
#[doc = "9 - ICU Interrupt 9"]
IEL9 = 9,
#[doc = "10 - ICU Interrupt 10"]
IEL10 = 10,
#[doc = "11 - ICU Interrupt 11"]
IEL11 = 11,
#[doc = "12 - ICU Interrupt 12"]
IEL12 = 12,
#[doc = "13 - ICU Interrupt 13"]
IEL13 = 13,
#[doc = "14 - ICU Interrupt 14"]
IEL14 = 14,
#[doc = "15 - ICU Interrupt 15"]
IEL15 = 15,
#[doc = "16 - ICU Interrupt 16"]
IEL16 = 16,
#[doc = "17 - ICU Interrupt 17"]
IEL17 = 17,
#[doc = "18 - ICU Interrupt 18"]
IEL18 = 18,
#[doc = "19 - ICU Interrupt 19"]
IEL19 = 19,
#[doc = "20 - ICU Interrupt 20"]
IEL20 = 20,
#[doc = "21 - ICU Interrupt 21"]
IEL21 = 21,
#[doc = "22 - ICU Interrupt 22"]
IEL22 = 22,
#[doc = "23 - ICU Interrupt 23"]
IEL23 = 23,
#[doc = "24 - ICU Interrupt 24"]
IEL24 = 24,
#[doc = "25 - ICU Interrupt 25"]
IEL25 = 25,
#[doc = "26 - ICU Interrupt 26"]
IEL26 = 26,
#[doc = "27 - ICU Interrupt 27"]
IEL27 = 27,
#[doc = "28 - ICU Interrupt 28"]
IEL28 = 28,
#[doc = "29 - ICU Interrupt 29"]
IEL29 = 29,
#[doc = "30 - ICU Interrupt 30"]
IEL30 = 30,
#[doc = "31 - ICU Interrupt 31"]
IEL31 = 31,
}
unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt {
#[inline(always)]
fn number(self) -> u16 {
self as u16
}
}
#[doc = "SRAM Control"]
pub struct SRAM {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SRAM {}
impl SRAM {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sram::RegisterBlock = 0x4000_2000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sram::RegisterBlock {
Self::PTR
}
}
impl Deref for SRAM {
type Target = sram::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SRAM {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SRAM").finish()
}
}
#[doc = "SRAM Control"]
pub mod sram;
#[doc = "BUS Control"]
pub struct BUS {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for BUS {}
impl BUS {
#[doc = r"Pointer to the register block"]
pub const PTR: *const bus::RegisterBlock = 0x4000_3000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const bus::RegisterBlock {
Self::PTR
}
}
impl Deref for BUS {
type Target = bus::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for BUS {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("BUS").finish()
}
}
#[doc = "BUS Control"]
pub mod bus;
#[doc = "Data Transfer Controller"]
pub struct DTC {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for DTC {}
impl DTC {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dtc::RegisterBlock = 0x4000_5400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dtc::RegisterBlock {
Self::PTR
}
}
impl Deref for DTC {
type Target = dtc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for DTC {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DTC").finish()
}
}
#[doc = "Data Transfer Controller"]
pub mod dtc;
#[doc = "ICU for CPU"]
pub struct ICU {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for ICU {}
impl ICU {
#[doc = r"Pointer to the register block"]
pub const PTR: *const icu::RegisterBlock = 0x4000_6000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const icu::RegisterBlock {
Self::PTR
}
}
impl Deref for ICU {
type Target = icu::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for ICU {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ICU").finish()
}
}
#[doc = "ICU for CPU"]
pub mod icu;
#[doc = "Debug Function"]
pub struct DBG {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for DBG {}
impl DBG {
#[doc = r"Pointer to the register block"]
pub const PTR: *const dbg::RegisterBlock = 0x4001_b000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const dbg::RegisterBlock {
Self::PTR
}
}
impl Deref for DBG {
type Target = dbg::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for DBG {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DBG").finish()
}
}
#[doc = "Debug Function"]
pub mod dbg;
#[doc = "System Control"]
pub struct SYSC {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SYSC {}
impl SYSC {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sysc::RegisterBlock = 0x4001_e000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sysc::RegisterBlock {
Self::PTR
}
}
impl Deref for SYSC {
type Target = sysc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SYSC {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SYSC").finish()
}
}
#[doc = "System Control"]
pub mod sysc;
#[doc = "Port 0 Control Registers"]
pub struct PORT0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT0 {}
impl PORT0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port0::RegisterBlock = 0x4004_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port0::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT0 {
type Target = port0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT0").finish()
}
}
#[doc = "Port 0 Control Registers"]
pub mod port0;
#[doc = "Port 1 Control Registers"]
pub struct PORT1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT1 {}
impl PORT1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port1::RegisterBlock = 0x4004_0020 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port1::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT1 {
type Target = port1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT1").finish()
}
}
#[doc = "Port 1 Control Registers"]
pub mod port1;
#[doc = "Port 2 Control Registers"]
pub struct PORT2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT2 {}
impl PORT2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port1::RegisterBlock = 0x4004_0040 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port1::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT2 {
type Target = port1::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT2").finish()
}
}
#[doc = "Port 2 Control Registers"]
pub use self::port1 as port2;
#[doc = "Port 3 Control Registers"]
pub struct PORT3 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT3 {}
impl PORT3 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port0::RegisterBlock = 0x4004_0060 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port0::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT3 {
type Target = port0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT3 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT3").finish()
}
}
#[doc = "Port 3 Control Registers"]
pub use self::port0 as port3;
#[doc = "Port 4 Control Registers"]
pub struct PORT4 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT4 {}
impl PORT4 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port0::RegisterBlock = 0x4004_0080 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port0::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT4 {
type Target = port0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT4 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT4").finish()
}
}
#[doc = "Port 4 Control Registers"]
pub use self::port0 as port4;
#[doc = "Port 5 Control Registers"]
pub struct PORT5 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT5 {}
impl PORT5 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port0::RegisterBlock = 0x4004_00a0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port0::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT5 {
type Target = port0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT5 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT5").finish()
}
}
#[doc = "Port 5 Control Registers"]
pub use self::port0 as port5;
#[doc = "Port 9 Control Registers"]
pub struct PORT9 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PORT9 {}
impl PORT9 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const port0::RegisterBlock = 0x4004_0120 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const port0::RegisterBlock {
Self::PTR
}
}
impl Deref for PORT9 {
type Target = port0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PORT9 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PORT9").finish()
}
}
#[doc = "Port 9 Control Registers"]
pub use self::port0 as port9;
#[doc = "Pmn Pin Function Control Register"]
pub struct PFS {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for PFS {}
impl PFS {
#[doc = r"Pointer to the register block"]
pub const PTR: *const pfs::RegisterBlock = 0x4004_0800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const pfs::RegisterBlock {
Self::PTR
}
}
impl Deref for PFS {
type Target = pfs::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for PFS {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PFS").finish()
}
}
#[doc = "Pmn Pin Function Control Register"]
pub mod pfs;
#[doc = "Event Link Controller"]
pub struct ELC {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for ELC {}
impl ELC {
#[doc = r"Pointer to the register block"]
pub const PTR: *const elc::RegisterBlock = 0x4004_1000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const elc::RegisterBlock {
Self::PTR
}
}
impl Deref for ELC {
type Target = elc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for ELC {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ELC").finish()
}
}
#[doc = "Event Link Controller"]
pub mod elc;
#[doc = "Port Output Enable Module for GPT"]
pub struct POEG {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for POEG {}
impl POEG {
#[doc = r"Pointer to the register block"]
pub const PTR: *const poeg::RegisterBlock = 0x4004_2000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const poeg::RegisterBlock {
Self::PTR
}
}
impl Deref for POEG {
type Target = poeg::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for POEG {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("POEG").finish()
}
}
#[doc = "Port Output Enable Module for GPT"]
pub mod poeg;
#[doc = "Realtime Clock"]
pub struct RTC {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for RTC {}
impl RTC {
#[doc = r"Pointer to the register block"]
pub const PTR: *const rtc::RegisterBlock = 0x4004_4000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const rtc::RegisterBlock {
Self::PTR
}
}
impl Deref for RTC {
type Target = rtc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for RTC {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("RTC").finish()
}
}
#[doc = "Realtime Clock"]
pub mod rtc;
#[doc = "Watchdog Timer"]
pub struct WDT {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for WDT {}
impl WDT {
#[doc = r"Pointer to the register block"]
pub const PTR: *const wdt::RegisterBlock = 0x4004_4200 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const wdt::RegisterBlock {
Self::PTR
}
}
impl Deref for WDT {
type Target = wdt::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for WDT {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("WDT").finish()
}
}
#[doc = "Watchdog Timer"]
pub mod wdt;
#[doc = "Independent Watchdog Timer"]
pub struct IWDT {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for IWDT {}
impl IWDT {
#[doc = r"Pointer to the register block"]
pub const PTR: *const iwdt::RegisterBlock = 0x4004_4400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const iwdt::RegisterBlock {
Self::PTR
}
}
impl Deref for IWDT {
type Target = iwdt::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for IWDT {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IWDT").finish()
}
}
#[doc = "Independent Watchdog Timer"]
pub mod iwdt;
#[doc = "Clock Frequency Accuracy Measurement Circuit"]
pub struct CAC {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for CAC {}
impl CAC {
#[doc = r"Pointer to the register block"]
pub const PTR: *const cac::RegisterBlock = 0x4004_4600 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const cac::RegisterBlock {
Self::PTR
}
}
impl Deref for CAC {
type Target = cac::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for CAC {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CAC").finish()
}
}
#[doc = "Clock Frequency Accuracy Measurement Circuit"]
pub mod cac;
#[doc = "Module Stop Control B, C, D"]
pub struct MSTP {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for MSTP {}
impl MSTP {
#[doc = r"Pointer to the register block"]
pub const PTR: *const mstp::RegisterBlock = 0x4004_7000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const mstp::RegisterBlock {
Self::PTR
}
}
impl Deref for MSTP {
type Target = mstp::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for MSTP {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MSTP").finish()
}
}
#[doc = "Module Stop Control B, C, D"]
pub mod mstp;
#[doc = "Inter-Integrated Circuit 0"]
pub struct IIC0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for IIC0 {}
impl IIC0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const iic0::RegisterBlock = 0x4005_3000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const iic0::RegisterBlock {
Self::PTR
}
}
impl Deref for IIC0 {
type Target = iic0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for IIC0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IIC0").finish()
}
}
#[doc = "Inter-Integrated Circuit 0"]
pub mod iic0;
#[doc = "Inter-Integrated Circuit 0 Wake-up Unit"]
pub struct IIC0WU {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for IIC0WU {}
impl IIC0WU {
#[doc = r"Pointer to the register block"]
pub const PTR: *const iic0wu::RegisterBlock = 0x4005_3014 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const iic0wu::RegisterBlock {
Self::PTR
}
}
impl Deref for IIC0WU {
type Target = iic0wu::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for IIC0WU {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IIC0WU").finish()
}
}
#[doc = "Inter-Integrated Circuit 0 Wake-up Unit"]
pub mod iic0wu;
#[doc = "Data Operation Circuit"]
pub struct DOC {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for DOC {}
impl DOC {
#[doc = r"Pointer to the register block"]
pub const PTR: *const doc::RegisterBlock = 0x4005_4100 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const doc::RegisterBlock {
Self::PTR
}
}
impl Deref for DOC {
type Target = doc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for DOC {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DOC").finish()
}
}
#[doc = "Data Operation Circuit"]
pub mod doc;
#[doc = "12-bit A/D Converter"]
pub struct ADC120 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for ADC120 {}
impl ADC120 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const adc120::RegisterBlock = 0x4005_c000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const adc120::RegisterBlock {
Self::PTR
}
}
impl Deref for ADC120 {
type Target = adc120::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for ADC120 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ADC120").finish()
}
}
#[doc = "12-bit A/D Converter"]
pub mod adc120;
#[doc = "Serial Communication Interface"]
pub struct SCI0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SCI0 {}
impl SCI0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sci0::RegisterBlock = 0x4007_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sci0::RegisterBlock {
Self::PTR
}
}
impl Deref for SCI0 {
type Target = sci0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SCI0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SCI0").finish()
}
}
#[doc = "Serial Communication Interface"]
pub mod sci0;
#[doc = "Serial Communication Interface"]
pub struct SCI1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SCI1 {}
impl SCI1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sci0::RegisterBlock = 0x4007_0020 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sci0::RegisterBlock {
Self::PTR
}
}
impl Deref for SCI1 {
type Target = sci0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SCI1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SCI1").finish()
}
}
#[doc = "Serial Communication Interface"]
pub use self::sci0 as sci1;
#[doc = "Serial Communication Interface"]
pub struct SCI2 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SCI2 {}
impl SCI2 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sci0::RegisterBlock = 0x4007_0040 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sci0::RegisterBlock {
Self::PTR
}
}
impl Deref for SCI2 {
type Target = sci0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SCI2 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SCI2").finish()
}
}
#[doc = "Serial Communication Interface"]
pub use self::sci0 as sci2;
#[doc = "Serial Communication Interface"]
pub struct SCI9 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SCI9 {}
impl SCI9 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const sci0::RegisterBlock = 0x4007_0120 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const sci0::RegisterBlock {
Self::PTR
}
}
impl Deref for SCI9 {
type Target = sci0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SCI9 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SCI9").finish()
}
}
#[doc = "Serial Communication Interface"]
pub use self::sci0 as sci9;
#[doc = "Serial Peripheral Interface"]
pub struct SPI0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for SPI0 {}
impl SPI0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const spi0::RegisterBlock = 0x4007_2000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const spi0::RegisterBlock {
Self::PTR
}
}
impl Deref for SPI0 {
type Target = spi0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for SPI0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SPI0").finish()
}
}
#[doc = "Serial Peripheral Interface"]
pub mod spi0;
#[doc = "Cyclic Redundancy Check Calculator"]
pub struct CRC {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for CRC {}
impl CRC {
#[doc = r"Pointer to the register block"]
pub const PTR: *const crc::RegisterBlock = 0x4007_4000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const crc::RegisterBlock {
Self::PTR
}
}
impl Deref for CRC {
type Target = crc::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for CRC {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CRC").finish()
}
}
#[doc = "Cyclic Redundancy Check Calculator"]
pub mod crc;
#[doc = "General PWM 32-bit Timer 0"]
pub struct GPT320 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for GPT320 {}
impl GPT320 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpt320::RegisterBlock = 0x4007_8000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpt320::RegisterBlock {
Self::PTR
}
}
impl Deref for GPT320 {
type Target = gpt320::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for GPT320 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GPT320").finish()
}
}
#[doc = "General PWM 32-bit Timer 0"]
pub mod gpt320;
#[doc = "General PWM 16-bit Timer 4"]
pub struct GPT164 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for GPT164 {}
impl GPT164 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpt164::RegisterBlock = 0x4007_8400 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpt164::RegisterBlock {
Self::PTR
}
}
impl Deref for GPT164 {
type Target = gpt164::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for GPT164 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GPT164").finish()
}
}
#[doc = "General PWM 16-bit Timer 4"]
pub mod gpt164;
#[doc = "General PWM 16-bit Timer 5"]
pub struct GPT165 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for GPT165 {}
impl GPT165 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpt164::RegisterBlock = 0x4007_8500 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpt164::RegisterBlock {
Self::PTR
}
}
impl Deref for GPT165 {
type Target = gpt164::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for GPT165 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GPT165").finish()
}
}
#[doc = "General PWM 16-bit Timer 5"]
pub use self::gpt164 as gpt165;
#[doc = "General PWM 16-bit Timer 6"]
pub struct GPT166 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for GPT166 {}
impl GPT166 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpt164::RegisterBlock = 0x4007_8600 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpt164::RegisterBlock {
Self::PTR
}
}
impl Deref for GPT166 {
type Target = gpt164::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for GPT166 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GPT166").finish()
}
}
#[doc = "General PWM 16-bit Timer 6"]
pub use self::gpt164 as gpt166;
#[doc = "General PWM 16-bit Timer 7"]
pub struct GPT167 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for GPT167 {}
impl GPT167 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpt164::RegisterBlock = 0x4007_8700 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpt164::RegisterBlock {
Self::PTR
}
}
impl Deref for GPT167 {
type Target = gpt164::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for GPT167 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GPT167").finish()
}
}
#[doc = "General PWM 16-bit Timer 7"]
pub use self::gpt164 as gpt167;
#[doc = "General PWM 16-bit Timer 8"]
pub struct GPT168 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for GPT168 {}
impl GPT168 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpt164::RegisterBlock = 0x4007_8800 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpt164::RegisterBlock {
Self::PTR
}
}
impl Deref for GPT168 {
type Target = gpt164::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for GPT168 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GPT168").finish()
}
}
#[doc = "General PWM 16-bit Timer 8"]
pub use self::gpt164 as gpt168;
#[doc = "General PWM 16-bit Timer 9"]
pub struct GPT169 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for GPT169 {}
impl GPT169 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpt164::RegisterBlock = 0x4007_8900 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpt164::RegisterBlock {
Self::PTR
}
}
impl Deref for GPT169 {
type Target = gpt164::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for GPT169 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GPT169").finish()
}
}
#[doc = "General PWM 16-bit Timer 9"]
pub use self::gpt164 as gpt169;
#[doc = "Output Phase Switching Controller"]
pub struct GPT_OPS {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for GPT_OPS {}
impl GPT_OPS {
#[doc = r"Pointer to the register block"]
pub const PTR: *const gpt_ops::RegisterBlock = 0x4007_8ff0 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const gpt_ops::RegisterBlock {
Self::PTR
}
}
impl Deref for GPT_OPS {
type Target = gpt_ops::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for GPT_OPS {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GPT_OPS").finish()
}
}
#[doc = "Output Phase Switching Controller"]
pub mod gpt_ops;
#[doc = "Key Interrupt Function"]
pub struct KINT {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for KINT {}
impl KINT {
#[doc = r"Pointer to the register block"]
pub const PTR: *const kint::RegisterBlock = 0x4008_0000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const kint::RegisterBlock {
Self::PTR
}
}
impl Deref for KINT {
type Target = kint::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for KINT {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("KINT").finish()
}
}
#[doc = "Key Interrupt Function"]
pub mod kint;
#[doc = "Capacitive Touch Sensing Unit"]
pub struct CTSU {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for CTSU {}
impl CTSU {
#[doc = r"Pointer to the register block"]
pub const PTR: *const ctsu::RegisterBlock = 0x4008_2000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const ctsu::RegisterBlock {
Self::PTR
}
}
impl Deref for CTSU {
type Target = ctsu::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for CTSU {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CTSU").finish()
}
}
#[doc = "Capacitive Touch Sensing Unit"]
pub mod ctsu;
#[doc = "Low Power Asynchronous General Purpose Timer 0"]
pub struct AGT0 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for AGT0 {}
impl AGT0 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const agt0::RegisterBlock = 0x4008_4000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const agt0::RegisterBlock {
Self::PTR
}
}
impl Deref for AGT0 {
type Target = agt0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for AGT0 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AGT0").finish()
}
}
#[doc = "Low Power Asynchronous General Purpose Timer 0"]
pub mod agt0;
#[doc = "Low Power Asynchronous General Purpose Timer 1"]
pub struct AGT1 {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for AGT1 {}
impl AGT1 {
#[doc = r"Pointer to the register block"]
pub const PTR: *const agt0::RegisterBlock = 0x4008_4100 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const agt0::RegisterBlock {
Self::PTR
}
}
impl Deref for AGT1 {
type Target = agt0::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for AGT1 {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AGT1").finish()
}
}
#[doc = "Low Power Asynchronous General Purpose Timer 1"]
pub use self::agt0 as agt1;
#[doc = "Low-Power Analog Comparator"]
pub struct ACMPLP {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for ACMPLP {}
impl ACMPLP {
#[doc = r"Pointer to the register block"]
pub const PTR: *const acmplp::RegisterBlock = 0x4008_5e00 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const acmplp::RegisterBlock {
Self::PTR
}
}
impl Deref for ACMPLP {
type Target = acmplp::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for ACMPLP {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ACMPLP").finish()
}
}
#[doc = "Low-Power Analog Comparator"]
pub mod acmplp;
#[doc = "Flash I/O Registers"]
pub struct FLCN {
_marker: PhantomData<*const ()>,
}
unsafe impl Send for FLCN {}
impl FLCN {
#[doc = r"Pointer to the register block"]
pub const PTR: *const flcn::RegisterBlock = 0x407e_c000 as *const _;
#[doc = r"Return the pointer to the register block"]
#[inline(always)]
pub const fn ptr() -> *const flcn::RegisterBlock {
Self::PTR
}
}
impl Deref for FLCN {
type Target = flcn::RegisterBlock;
#[inline(always)]
fn deref(&self) -> &Self::Target {
unsafe { &*Self::PTR }
}
}
impl core::fmt::Debug for FLCN {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("FLCN").finish()
}
}
#[doc = "Flash I/O Registers"]
pub mod flcn;
#[no_mangle]
static mut DEVICE_PERIPHERALS: bool = false;
#[doc = r" All the peripherals."]
#[allow(non_snake_case)]
pub struct Peripherals {
#[doc = "SRAM"]
pub SRAM: SRAM,
#[doc = "BUS"]
pub BUS: BUS,
#[doc = "DTC"]
pub DTC: DTC,
#[doc = "ICU"]
pub ICU: ICU,
#[doc = "DBG"]
pub DBG: DBG,
#[doc = "SYSC"]
pub SYSC: SYSC,
#[doc = "PORT0"]
pub PORT0: PORT0,
#[doc = "PORT1"]
pub PORT1: PORT1,
#[doc = "PORT2"]
pub PORT2: PORT2,
#[doc = "PORT3"]
pub PORT3: PORT3,
#[doc = "PORT4"]
pub PORT4: PORT4,
#[doc = "PORT5"]
pub PORT5: PORT5,
#[doc = "PORT9"]
pub PORT9: PORT9,
#[doc = "PFS"]
pub PFS: PFS,
#[doc = "ELC"]
pub ELC: ELC,
#[doc = "POEG"]
pub POEG: POEG,
#[doc = "RTC"]
pub RTC: RTC,
#[doc = "WDT"]
pub WDT: WDT,
#[doc = "IWDT"]
pub IWDT: IWDT,
#[doc = "CAC"]
pub CAC: CAC,
#[doc = "MSTP"]
pub MSTP: MSTP,
#[doc = "IIC0"]
pub IIC0: IIC0,
#[doc = "IIC0WU"]
pub IIC0WU: IIC0WU,
#[doc = "DOC"]
pub DOC: DOC,
#[doc = "ADC120"]
pub ADC120: ADC120,
#[doc = "SCI0"]
pub SCI0: SCI0,
#[doc = "SCI1"]
pub SCI1: SCI1,
#[doc = "SCI2"]
pub SCI2: SCI2,
#[doc = "SCI9"]
pub SCI9: SCI9,
#[doc = "SPI0"]
pub SPI0: SPI0,
#[doc = "CRC"]
pub CRC: CRC,
#[doc = "GPT320"]
pub GPT320: GPT320,
#[doc = "GPT164"]
pub GPT164: GPT164,
#[doc = "GPT165"]
pub GPT165: GPT165,
#[doc = "GPT166"]
pub GPT166: GPT166,
#[doc = "GPT167"]
pub GPT167: GPT167,
#[doc = "GPT168"]
pub GPT168: GPT168,
#[doc = "GPT169"]
pub GPT169: GPT169,
#[doc = "GPT_OPS"]
pub GPT_OPS: GPT_OPS,
#[doc = "KINT"]
pub KINT: KINT,
#[doc = "CTSU"]
pub CTSU: CTSU,
#[doc = "AGT0"]
pub AGT0: AGT0,
#[doc = "AGT1"]
pub AGT1: AGT1,
#[doc = "ACMPLP"]
pub ACMPLP: ACMPLP,
#[doc = "FLCN"]
pub FLCN: FLCN,
}
impl Peripherals {
#[doc = r" Returns all the peripherals *once*."]
#[cfg(feature = "critical-section")]
#[inline]
pub fn take() -> Option<Self> {
critical_section::with(|_| {
if unsafe { DEVICE_PERIPHERALS } {
return None;
}
Some(unsafe { Peripherals::steal() })
})
}
#[doc = r" Unchecked version of `Peripherals::take`."]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Each of the returned peripherals must be used at most once."]
#[inline]
pub unsafe fn steal() -> Self {
DEVICE_PERIPHERALS = true;
Peripherals {
SRAM: SRAM {
_marker: PhantomData,
},
BUS: BUS {
_marker: PhantomData,
},
DTC: DTC {
_marker: PhantomData,
},
ICU: ICU {
_marker: PhantomData,
},
DBG: DBG {
_marker: PhantomData,
},
SYSC: SYSC {
_marker: PhantomData,
},
PORT0: PORT0 {
_marker: PhantomData,
},
PORT1: PORT1 {
_marker: PhantomData,
},
PORT2: PORT2 {
_marker: PhantomData,
},
PORT3: PORT3 {
_marker: PhantomData,
},
PORT4: PORT4 {
_marker: PhantomData,
},
PORT5: PORT5 {
_marker: PhantomData,
},
PORT9: PORT9 {
_marker: PhantomData,
},
PFS: PFS {
_marker: PhantomData,
},
ELC: ELC {
_marker: PhantomData,
},
POEG: POEG {
_marker: PhantomData,
},
RTC: RTC {
_marker: PhantomData,
},
WDT: WDT {
_marker: PhantomData,
},
IWDT: IWDT {
_marker: PhantomData,
},
CAC: CAC {
_marker: PhantomData,
},
MSTP: MSTP {
_marker: PhantomData,
},
IIC0: IIC0 {
_marker: PhantomData,
},
IIC0WU: IIC0WU {
_marker: PhantomData,
},
DOC: DOC {
_marker: PhantomData,
},
ADC120: ADC120 {
_marker: PhantomData,
},
SCI0: SCI0 {
_marker: PhantomData,
},
SCI1: SCI1 {
_marker: PhantomData,
},
SCI2: SCI2 {
_marker: PhantomData,
},
SCI9: SCI9 {
_marker: PhantomData,
},
SPI0: SPI0 {
_marker: PhantomData,
},
CRC: CRC {
_marker: PhantomData,
},
GPT320: GPT320 {
_marker: PhantomData,
},
GPT164: GPT164 {
_marker: PhantomData,
},
GPT165: GPT165 {
_marker: PhantomData,
},
GPT166: GPT166 {
_marker: PhantomData,
},
GPT167: GPT167 {
_marker: PhantomData,
},
GPT168: GPT168 {
_marker: PhantomData,
},
GPT169: GPT169 {
_marker: PhantomData,
},
GPT_OPS: GPT_OPS {
_marker: PhantomData,
},
KINT: KINT {
_marker: PhantomData,
},
CTSU: CTSU {
_marker: PhantomData,
},
AGT0: AGT0 {
_marker: PhantomData,
},
AGT1: AGT1 {
_marker: PhantomData,
},
ACMPLP: ACMPLP {
_marker: PhantomData,
},
FLCN: FLCN {
_marker: PhantomData,
},
}
}
}