#![allow(non_snake_case, non_upper_case_globals)]
#![allow(non_camel_case_types)]
#[cfg(not(feature = "nosync"))]
pub use crate::stm32l5::peripherals::gpio::Instance;
pub use crate::stm32l5::peripherals::gpio::{RegisterBlock, ResetValues};
pub use crate::stm32l5::peripherals::gpio::{
AFRH, AFRL, BRR, BSRR, IDR, LCKR, MODER, ODR, OSPEEDR, OTYPER, PUPDR, SECCFGR,
};
pub mod GPIOA {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42020000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xABFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x0C000000,
PUPDR: 0x64000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIOA_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOA_TAKEN {
None
} else {
GPIOA_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOA_TAKEN && inst.addr == INSTANCE.addr {
GPIOA_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIOA_TAKEN = true;
INSTANCE
}
}
pub const GPIOA: *const RegisterBlock = 0x42020000 as *const _;
pub mod GPIOB {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42020400,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFEBF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000100,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIOB_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOB_TAKEN {
None
} else {
GPIOB_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOB_TAKEN && inst.addr == INSTANCE.addr {
GPIOB_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIOB_TAKEN = true;
INSTANCE
}
}
pub const GPIOB: *const RegisterBlock = 0x42020400 as *const _;
pub mod GPIOC {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42020800,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIOC_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOC_TAKEN {
None
} else {
GPIOC_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOC_TAKEN && inst.addr == INSTANCE.addr {
GPIOC_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIOC_TAKEN = true;
INSTANCE
}
}
pub const GPIOC: *const RegisterBlock = 0x42020800 as *const _;
pub mod GPIOD {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42020c00,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIOD_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOD_TAKEN {
None
} else {
GPIOD_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOD_TAKEN && inst.addr == INSTANCE.addr {
GPIOD_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIOD_TAKEN = true;
INSTANCE
}
}
pub const GPIOD: *const RegisterBlock = 0x42020c00 as *const _;
pub mod GPIOE {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42021000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIOE_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOE_TAKEN {
None
} else {
GPIOE_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOE_TAKEN && inst.addr == INSTANCE.addr {
GPIOE_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIOE_TAKEN = true;
INSTANCE
}
}
pub const GPIOE: *const RegisterBlock = 0x42021000 as *const _;
pub mod GPIOF {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42021400,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIOF_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOF_TAKEN {
None
} else {
GPIOF_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOF_TAKEN && inst.addr == INSTANCE.addr {
GPIOF_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIOF_TAKEN = true;
INSTANCE
}
}
pub const GPIOF: *const RegisterBlock = 0x42021400 as *const _;
pub mod GPIOG {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42021800,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIOG_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOG_TAKEN {
None
} else {
GPIOG_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOG_TAKEN && inst.addr == INSTANCE.addr {
GPIOG_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIOG_TAKEN = true;
INSTANCE
}
}
pub const GPIOG: *const RegisterBlock = 0x42021800 as *const _;
pub mod GPIOH {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x42021c00,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0x0000000F,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut GPIOH_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOH_TAKEN {
None
} else {
GPIOH_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if GPIOH_TAKEN && inst.addr == INSTANCE.addr {
GPIOH_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
GPIOH_TAKEN = true;
INSTANCE
}
}
pub const GPIOH: *const RegisterBlock = 0x42021c00 as *const _;
pub mod SEC_GPIOA {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x52020000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xABFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x0C000000,
PUPDR: 0x64000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_GPIOA_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOA_TAKEN {
None
} else {
SEC_GPIOA_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOA_TAKEN && inst.addr == INSTANCE.addr {
SEC_GPIOA_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_GPIOA_TAKEN = true;
INSTANCE
}
}
pub const SEC_GPIOA: *const RegisterBlock = 0x52020000 as *const _;
pub mod SEC_GPIOB {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x52020400,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFEBF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000100,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_GPIOB_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOB_TAKEN {
None
} else {
SEC_GPIOB_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOB_TAKEN && inst.addr == INSTANCE.addr {
SEC_GPIOB_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_GPIOB_TAKEN = true;
INSTANCE
}
}
pub const SEC_GPIOB: *const RegisterBlock = 0x52020400 as *const _;
pub mod SEC_GPIOC {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x52020800,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_GPIOC_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOC_TAKEN {
None
} else {
SEC_GPIOC_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOC_TAKEN && inst.addr == INSTANCE.addr {
SEC_GPIOC_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_GPIOC_TAKEN = true;
INSTANCE
}
}
pub const SEC_GPIOC: *const RegisterBlock = 0x52020800 as *const _;
pub mod SEC_GPIOD {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x52020c00,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_GPIOD_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOD_TAKEN {
None
} else {
SEC_GPIOD_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOD_TAKEN && inst.addr == INSTANCE.addr {
SEC_GPIOD_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_GPIOD_TAKEN = true;
INSTANCE
}
}
pub const SEC_GPIOD: *const RegisterBlock = 0x52020c00 as *const _;
pub mod SEC_GPIOE {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x52021000,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_GPIOE_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOE_TAKEN {
None
} else {
SEC_GPIOE_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOE_TAKEN && inst.addr == INSTANCE.addr {
SEC_GPIOE_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_GPIOE_TAKEN = true;
INSTANCE
}
}
pub const SEC_GPIOE: *const RegisterBlock = 0x52021000 as *const _;
pub mod SEC_GPIOF {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x52021400,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_GPIOF_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOF_TAKEN {
None
} else {
SEC_GPIOF_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOF_TAKEN && inst.addr == INSTANCE.addr {
SEC_GPIOF_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_GPIOF_TAKEN = true;
INSTANCE
}
}
pub const SEC_GPIOF: *const RegisterBlock = 0x52021400 as *const _;
pub mod SEC_GPIOG {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x52021800,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0xFFFFFFFF,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_GPIOG_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOG_TAKEN {
None
} else {
SEC_GPIOG_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOG_TAKEN && inst.addr == INSTANCE.addr {
SEC_GPIOG_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_GPIOG_TAKEN = true;
INSTANCE
}
}
pub const SEC_GPIOG: *const RegisterBlock = 0x52021800 as *const _;
pub mod SEC_GPIOH {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x52021c00,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
MODER: 0x0000000F,
OTYPER: 0x00000000,
OSPEEDR: 0x00000000,
PUPDR: 0x00000000,
IDR: 0x00000000,
ODR: 0x00000000,
BSRR: 0x00000000,
LCKR: 0x00000000,
AFRL: 0x00000000,
AFRH: 0x00000000,
BRR: 0x00000000,
SECCFGR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_GPIOH_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOH_TAKEN {
None
} else {
SEC_GPIOH_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_GPIOH_TAKEN && inst.addr == INSTANCE.addr {
SEC_GPIOH_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_GPIOH_TAKEN = true;
INSTANCE
}
}
pub const SEC_GPIOH: *const RegisterBlock = 0x52021c00 as *const _;