#![allow(unused, non_snake_case, non_upper_case_globals)]
pub mod lp {
pub mod core {
use crate::ral::RWRegister;
#[repr(C)]
pub struct RegisterBlock {
pub LPLR: RWRegister<u32>,
pub LPCR: RWRegister<u32>,
pub LPMKCR: RWRegister<u32>,
pub LPSVCR: RWRegister<u32>,
_reserved1: [u32; 1],
pub LPTDCR: RWRegister<u32>,
pub LPSR: RWRegister<u32>,
}
pub mod LPLR {
pub use crate::ral::snvs::LPLR::*;
}
pub mod LPCR {
pub use crate::ral::snvs::LPCR::*;
}
pub mod LPSR {
pub use crate::ral::snvs::LPSR::*;
}
}
pub mod srtc {
use crate::ral::RWRegister;
#[repr(C)]
pub struct RegisterBlock {
pub LPSRTCMR: RWRegister<u32>,
pub LPSRTCLR: RWRegister<u32>,
}
pub mod LPSRTCMR {
pub use crate::ral::snvs::LPSRTCMR::*;
}
pub mod LPSRTCLR {
pub use crate::ral::snvs::LPSRTCLR::*;
}
}
pub type Core = super::Instance<core::RegisterBlock>;
pub type Srtc = super::Instance<srtc::RegisterBlock>;
}
pub struct Instance<RB>(*const RB);
unsafe impl<RB> Send for Instance<RB> {}
impl<RB> core::ops::Deref for Instance<RB> {
type Target = RB;
#[inline]
fn deref(&self) -> &Self::Target {
unsafe { &*self.0 }
}
}
pub(super) struct Components {
pub(super) lp_core: lp::Core,
pub(super) lp_srtc: lp::Srtc,
}
pub(super) fn new(snvs: crate::ral::snvs::SNVS) -> Components {
Components {
lp_core: Instance(core::ptr::addr_of!(snvs.LPLR) as *const _),
lp_srtc: Instance(core::ptr::addr_of!(snvs.LPSRTCMR) as *const _),
}
}