#![allow(non_snake_case, non_upper_case_globals)]
#![allow(non_camel_case_types)]
#[cfg(not(feature = "nosync"))]
pub use crate::imxrt106::peripherals::gpio::Instance;
pub use crate::imxrt106::peripherals::gpio::{RegisterBlock, ResetValues};
pub use crate::imxrt106::peripherals::gpio::{
DR, DR_CLEAR, DR_SET, DR_TOGGLE, EDGE_SEL, GDIR, ICR1, ICR2, IMR, ISR, PSR,
};
pub mod GPIO1 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x401b8000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
DR: 0x00000000,
GDIR: 0x00000000,
PSR: 0x00000000,
ICR1: 0x00000000,
ICR2: 0x00000000,
IMR: 0x00000000,
ISR: 0x00000000,
EDGE_SEL: 0x00000000,
DR_SET: 0x00000000,
DR_CLEAR: 0x00000000,
DR_TOGGLE: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIO1_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO1_TAKEN {
None
} else {
GPIO1_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO1_TAKEN && inst.addr == INSTANCE.addr {
GPIO1_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIO1_TAKEN = true;
INSTANCE
}
}
pub const GPIO1: *const RegisterBlock = 0x401b8000 as *const _;
pub mod GPIO2 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x401bc000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
DR: 0x00000000,
GDIR: 0x00000000,
PSR: 0x00000000,
ICR1: 0x00000000,
ICR2: 0x00000000,
IMR: 0x00000000,
ISR: 0x00000000,
EDGE_SEL: 0x00000000,
DR_SET: 0x00000000,
DR_CLEAR: 0x00000000,
DR_TOGGLE: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIO2_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO2_TAKEN {
None
} else {
GPIO2_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO2_TAKEN && inst.addr == INSTANCE.addr {
GPIO2_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIO2_TAKEN = true;
INSTANCE
}
}
pub const GPIO2: *const RegisterBlock = 0x401bc000 as *const _;
pub mod GPIO3 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x401c0000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
DR: 0x00000000,
GDIR: 0x00000000,
PSR: 0x00000000,
ICR1: 0x00000000,
ICR2: 0x00000000,
IMR: 0x00000000,
ISR: 0x00000000,
EDGE_SEL: 0x00000000,
DR_SET: 0x00000000,
DR_CLEAR: 0x00000000,
DR_TOGGLE: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIO3_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO3_TAKEN {
None
} else {
GPIO3_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO3_TAKEN && inst.addr == INSTANCE.addr {
GPIO3_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIO3_TAKEN = true;
INSTANCE
}
}
pub const GPIO3: *const RegisterBlock = 0x401c0000 as *const _;
pub mod GPIO4 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x401c4000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
DR: 0x00000000,
GDIR: 0x00000000,
PSR: 0x00000000,
ICR1: 0x00000000,
ICR2: 0x00000000,
IMR: 0x00000000,
ISR: 0x00000000,
EDGE_SEL: 0x00000000,
DR_SET: 0x00000000,
DR_CLEAR: 0x00000000,
DR_TOGGLE: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIO4_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO4_TAKEN {
None
} else {
GPIO4_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO4_TAKEN && inst.addr == INSTANCE.addr {
GPIO4_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIO4_TAKEN = true;
INSTANCE
}
}
pub const GPIO4: *const RegisterBlock = 0x401c4000 as *const _;
pub mod GPIO5 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x400c0000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
DR: 0x00000000,
GDIR: 0x00000000,
PSR: 0x00000000,
ICR1: 0x00000000,
ICR2: 0x00000000,
IMR: 0x00000000,
ISR: 0x00000000,
EDGE_SEL: 0x00000000,
DR_SET: 0x00000000,
DR_CLEAR: 0x00000000,
DR_TOGGLE: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIO5_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO5_TAKEN {
None
} else {
GPIO5_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO5_TAKEN && inst.addr == INSTANCE.addr {
GPIO5_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIO5_TAKEN = true;
INSTANCE
}
}
pub const GPIO5: *const RegisterBlock = 0x400c0000 as *const _;
pub mod GPIO6 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42000000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
DR: 0x00000000,
GDIR: 0x00000000,
PSR: 0x00000000,
ICR1: 0x00000000,
ICR2: 0x00000000,
IMR: 0x00000000,
ISR: 0x00000000,
EDGE_SEL: 0x00000000,
DR_SET: 0x00000000,
DR_CLEAR: 0x00000000,
DR_TOGGLE: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIO6_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO6_TAKEN {
None
} else {
GPIO6_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO6_TAKEN && inst.addr == INSTANCE.addr {
GPIO6_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIO6_TAKEN = true;
INSTANCE
}
}
pub const GPIO6: *const RegisterBlock = 0x42000000 as *const _;
pub mod GPIO7 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42004000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
DR: 0x00000000,
GDIR: 0x00000000,
PSR: 0x00000000,
ICR1: 0x00000000,
ICR2: 0x00000000,
IMR: 0x00000000,
ISR: 0x00000000,
EDGE_SEL: 0x00000000,
DR_SET: 0x00000000,
DR_CLEAR: 0x00000000,
DR_TOGGLE: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIO7_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO7_TAKEN {
None
} else {
GPIO7_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO7_TAKEN && inst.addr == INSTANCE.addr {
GPIO7_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIO7_TAKEN = true;
INSTANCE
}
}
pub const GPIO7: *const RegisterBlock = 0x42004000 as *const _;
pub mod GPIO8 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42008000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
DR: 0x00000000,
GDIR: 0x00000000,
PSR: 0x00000000,
ICR1: 0x00000000,
ICR2: 0x00000000,
IMR: 0x00000000,
ISR: 0x00000000,
EDGE_SEL: 0x00000000,
DR_SET: 0x00000000,
DR_CLEAR: 0x00000000,
DR_TOGGLE: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIO8_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO8_TAKEN {
None
} else {
GPIO8_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO8_TAKEN && inst.addr == INSTANCE.addr {
GPIO8_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIO8_TAKEN = true;
INSTANCE
}
}
pub const GPIO8: *const RegisterBlock = 0x42008000 as *const _;
pub mod GPIO9 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x4200c000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
DR: 0x00000000,
GDIR: 0x00000000,
PSR: 0x00000000,
ICR1: 0x00000000,
ICR2: 0x00000000,
IMR: 0x00000000,
ISR: 0x00000000,
EDGE_SEL: 0x00000000,
DR_SET: 0x00000000,
DR_CLEAR: 0x00000000,
DR_TOGGLE: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIO9_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO9_TAKEN {
None
} else {
GPIO9_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIO9_TAKEN && inst.addr == INSTANCE.addr {
GPIO9_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIO9_TAKEN = true;
INSTANCE
}
}
pub const GPIO9: *const RegisterBlock = 0x4200c000 as *const _;