#![allow(non_snake_case, non_upper_case_globals)]
#![allow(non_camel_case_types)]
#[cfg(not(feature = "nosync"))]
pub use crate::stm32l5::peripherals::lptim::Instance;
pub use crate::stm32l5::peripherals::lptim::{RegisterBlock, ResetValues};
pub use crate::stm32l5::peripherals::lptim::{ARR, CFGR, CMP, CNT, CR, ICR, IER, ISR, OR, RCR};
pub mod LPTIM1 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x40007c00,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
ISR: 0x00000000,
ICR: 0x00000000,
IER: 0x00000000,
CFGR: 0x00000000,
CR: 0x00000000,
CMP: 0x00000000,
ARR: 0x00000001,
CNT: 0x00000000,
OR: 0x00000000,
RCR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut LPTIM1_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if LPTIM1_TAKEN {
None
} else {
LPTIM1_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if LPTIM1_TAKEN && inst.addr == INSTANCE.addr {
LPTIM1_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
LPTIM1_TAKEN = true;
INSTANCE
}
}
pub const LPTIM1: *const RegisterBlock = 0x40007c00 as *const _;
pub mod LPTIM2 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x40009400,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
ISR: 0x00000000,
ICR: 0x00000000,
IER: 0x00000000,
CFGR: 0x00000000,
CR: 0x00000000,
CMP: 0x00000000,
ARR: 0x00000001,
CNT: 0x00000000,
OR: 0x00000000,
RCR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut LPTIM2_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if LPTIM2_TAKEN {
None
} else {
LPTIM2_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if LPTIM2_TAKEN && inst.addr == INSTANCE.addr {
LPTIM2_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
LPTIM2_TAKEN = true;
INSTANCE
}
}
pub const LPTIM2: *const RegisterBlock = 0x40009400 as *const _;
pub mod LPTIM3 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x40009800,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
ISR: 0x00000000,
ICR: 0x00000000,
IER: 0x00000000,
CFGR: 0x00000000,
CR: 0x00000000,
CMP: 0x00000000,
ARR: 0x00000001,
CNT: 0x00000000,
OR: 0x00000000,
RCR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut LPTIM3_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if LPTIM3_TAKEN {
None
} else {
LPTIM3_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if LPTIM3_TAKEN && inst.addr == INSTANCE.addr {
LPTIM3_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
LPTIM3_TAKEN = true;
INSTANCE
}
}
pub const LPTIM3: *const RegisterBlock = 0x40009800 as *const _;
pub mod SEC_LPTIM1 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x50007c00,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
ISR: 0x00000000,
ICR: 0x00000000,
IER: 0x00000000,
CFGR: 0x00000000,
CR: 0x00000000,
CMP: 0x00000000,
ARR: 0x00000001,
CNT: 0x00000000,
OR: 0x00000000,
RCR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_LPTIM1_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_LPTIM1_TAKEN {
None
} else {
SEC_LPTIM1_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_LPTIM1_TAKEN && inst.addr == INSTANCE.addr {
SEC_LPTIM1_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_LPTIM1_TAKEN = true;
INSTANCE
}
}
pub const SEC_LPTIM1: *const RegisterBlock = 0x50007c00 as *const _;
pub mod SEC_LPTIM2 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x50009400,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
ISR: 0x00000000,
ICR: 0x00000000,
IER: 0x00000000,
CFGR: 0x00000000,
CR: 0x00000000,
CMP: 0x00000000,
ARR: 0x00000001,
CNT: 0x00000000,
OR: 0x00000000,
RCR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_LPTIM2_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_LPTIM2_TAKEN {
None
} else {
SEC_LPTIM2_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_LPTIM2_TAKEN && inst.addr == INSTANCE.addr {
SEC_LPTIM2_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_LPTIM2_TAKEN = true;
INSTANCE
}
}
pub const SEC_LPTIM2: *const RegisterBlock = 0x50009400 as *const _;
pub mod SEC_LPTIM3 {
use super::ResetValues;
#[cfg(not(feature = "nosync"))]
use super::Instance;
#[cfg(not(feature = "nosync"))]
const INSTANCE: Instance = Instance {
addr: 0x50009800,
_marker: ::core::marker::PhantomData,
};
pub const reset: ResetValues = ResetValues {
ISR: 0x00000000,
ICR: 0x00000000,
IER: 0x00000000,
CFGR: 0x00000000,
CR: 0x00000000,
CMP: 0x00000000,
ARR: 0x00000001,
CNT: 0x00000000,
OR: 0x00000000,
RCR: 0x00000000,
};
#[cfg(not(feature = "nosync"))]
#[allow(renamed_and_removed_lints)]
#[allow(private_no_mangle_statics)]
#[no_mangle]
static mut SEC_LPTIM3_TAKEN: bool = false;
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn take() -> Option<Instance> {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_LPTIM3_TAKEN {
None
} else {
SEC_LPTIM3_TAKEN = true;
Some(INSTANCE)
}
})
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub fn release(inst: Instance) {
external_cortex_m::interrupt::free(|_| unsafe {
if SEC_LPTIM3_TAKEN && inst.addr == INSTANCE.addr {
SEC_LPTIM3_TAKEN = false;
} else {
panic!("Released a peripheral which was not taken");
}
});
}
#[cfg(not(feature = "nosync"))]
#[inline]
pub unsafe fn steal() -> Instance {
SEC_LPTIM3_TAKEN = true;
INSTANCE
}
}
pub const SEC_LPTIM3: *const RegisterBlock = 0x50009800 as *const _;