pub type R = crate::R<AHB5LPENRrs>;
pub type W = crate::W<AHB5LPENRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum HPDMA1LPEN {
Disabled = 0,
Enabled = 1,
}
impl From<HPDMA1LPEN> for bool {
#[inline(always)]
fn from(variant: HPDMA1LPEN) -> Self {
variant as u8 != 0
}
}
pub type HPDMA1LPEN_R = crate::BitReader<HPDMA1LPEN>;
impl HPDMA1LPEN_R {
#[inline(always)]
pub const fn variant(&self) -> HPDMA1LPEN {
match self.bits {
false => HPDMA1LPEN::Disabled,
true => HPDMA1LPEN::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == HPDMA1LPEN::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == HPDMA1LPEN::Enabled
}
}
pub type HPDMA1LPEN_W<'a, REG> = crate::BitWriter<'a, REG, HPDMA1LPEN>;
impl<'a, REG> HPDMA1LPEN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(HPDMA1LPEN::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(HPDMA1LPEN::Enabled)
}
}
pub use HPDMA1LPEN_R as DMA2DLPEN_R;
pub use HPDMA1LPEN_R as FLITFLPEN_R;
pub use HPDMA1LPEN_R as JPEGLPEN_R;
pub use HPDMA1LPEN_R as FMCLPEN_R;
pub use HPDMA1LPEN_R as XSPI1LPEN_R;
pub use HPDMA1LPEN_R as SDMMC1LPEN_R;
pub use HPDMA1LPEN_R as XSPI2LPEN_R;
pub use HPDMA1LPEN_R as XSPIMLPEN_R;
pub use HPDMA1LPEN_R as GFXMMULPEN_R;
pub use HPDMA1LPEN_R as GPULPEN_R;
pub use HPDMA1LPEN_R as DTCM1LPEN_R;
pub use HPDMA1LPEN_R as DTCM2LPEN_R;
pub use HPDMA1LPEN_R as ITCMLPEN_R;
pub use HPDMA1LPEN_R as AXISRAMLPEN_R;
pub use HPDMA1LPEN_W as DMA2DLPEN_W;
pub use HPDMA1LPEN_W as FLITFLPEN_W;
pub use HPDMA1LPEN_W as JPEGLPEN_W;
pub use HPDMA1LPEN_W as FMCLPEN_W;
pub use HPDMA1LPEN_W as XSPI1LPEN_W;
pub use HPDMA1LPEN_W as SDMMC1LPEN_W;
pub use HPDMA1LPEN_W as XSPI2LPEN_W;
pub use HPDMA1LPEN_W as XSPIMLPEN_W;
pub use HPDMA1LPEN_W as GFXMMULPEN_W;
pub use HPDMA1LPEN_W as GPULPEN_W;
pub use HPDMA1LPEN_W as DTCM1LPEN_W;
pub use HPDMA1LPEN_W as DTCM2LPEN_W;
pub use HPDMA1LPEN_W as ITCMLPEN_W;
pub use HPDMA1LPEN_W as AXISRAMLPEN_W;
impl R {
#[inline(always)]
pub fn hpdma1lpen(&self) -> HPDMA1LPEN_R {
HPDMA1LPEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn dma2dlpen(&self) -> DMA2DLPEN_R {
DMA2DLPEN_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn flitflpen(&self) -> FLITFLPEN_R {
FLITFLPEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn jpeglpen(&self) -> JPEGLPEN_R {
JPEGLPEN_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn fmclpen(&self) -> FMCLPEN_R {
FMCLPEN_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn xspi1lpen(&self) -> XSPI1LPEN_R {
XSPI1LPEN_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn sdmmc1lpen(&self) -> SDMMC1LPEN_R {
SDMMC1LPEN_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn xspi2lpen(&self) -> XSPI2LPEN_R {
XSPI2LPEN_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn xspimlpen(&self) -> XSPIMLPEN_R {
XSPIMLPEN_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn gfxmmulpen(&self) -> GFXMMULPEN_R {
GFXMMULPEN_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn gpulpen(&self) -> GPULPEN_R {
GPULPEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn dtcm1lpen(&self) -> DTCM1LPEN_R {
DTCM1LPEN_R::new(((self.bits >> 28) & 1) != 0)
}
#[inline(always)]
pub fn dtcm2lpen(&self) -> DTCM2LPEN_R {
DTCM2LPEN_R::new(((self.bits >> 29) & 1) != 0)
}
#[inline(always)]
pub fn itcmlpen(&self) -> ITCMLPEN_R {
ITCMLPEN_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn axisramlpen(&self) -> AXISRAMLPEN_R {
AXISRAMLPEN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AHB5LPENR")
.field("hpdma1lpen", &self.hpdma1lpen())
.field("dma2dlpen", &self.dma2dlpen())
.field("flitflpen", &self.flitflpen())
.field("jpeglpen", &self.jpeglpen())
.field("fmclpen", &self.fmclpen())
.field("xspi1lpen", &self.xspi1lpen())
.field("sdmmc1lpen", &self.sdmmc1lpen())
.field("xspi2lpen", &self.xspi2lpen())
.field("xspimlpen", &self.xspimlpen())
.field("gfxmmulpen", &self.gfxmmulpen())
.field("gpulpen", &self.gpulpen())
.field("dtcm1lpen", &self.dtcm1lpen())
.field("dtcm2lpen", &self.dtcm2lpen())
.field("itcmlpen", &self.itcmlpen())
.field("axisramlpen", &self.axisramlpen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn hpdma1lpen(&mut self) -> HPDMA1LPEN_W<AHB5LPENRrs> {
HPDMA1LPEN_W::new(self, 0)
}
#[inline(always)]
pub fn dma2dlpen(&mut self) -> DMA2DLPEN_W<AHB5LPENRrs> {
DMA2DLPEN_W::new(self, 1)
}
#[inline(always)]
pub fn flitflpen(&mut self) -> FLITFLPEN_W<AHB5LPENRrs> {
FLITFLPEN_W::new(self, 2)
}
#[inline(always)]
pub fn jpeglpen(&mut self) -> JPEGLPEN_W<AHB5LPENRrs> {
JPEGLPEN_W::new(self, 3)
}
#[inline(always)]
pub fn fmclpen(&mut self) -> FMCLPEN_W<AHB5LPENRrs> {
FMCLPEN_W::new(self, 4)
}
#[inline(always)]
pub fn xspi1lpen(&mut self) -> XSPI1LPEN_W<AHB5LPENRrs> {
XSPI1LPEN_W::new(self, 5)
}
#[inline(always)]
pub fn sdmmc1lpen(&mut self) -> SDMMC1LPEN_W<AHB5LPENRrs> {
SDMMC1LPEN_W::new(self, 8)
}
#[inline(always)]
pub fn xspi2lpen(&mut self) -> XSPI2LPEN_W<AHB5LPENRrs> {
XSPI2LPEN_W::new(self, 12)
}
#[inline(always)]
pub fn xspimlpen(&mut self) -> XSPIMLPEN_W<AHB5LPENRrs> {
XSPIMLPEN_W::new(self, 14)
}
#[inline(always)]
pub fn gfxmmulpen(&mut self) -> GFXMMULPEN_W<AHB5LPENRrs> {
GFXMMULPEN_W::new(self, 19)
}
#[inline(always)]
pub fn gpulpen(&mut self) -> GPULPEN_W<AHB5LPENRrs> {
GPULPEN_W::new(self, 20)
}
#[inline(always)]
pub fn dtcm1lpen(&mut self) -> DTCM1LPEN_W<AHB5LPENRrs> {
DTCM1LPEN_W::new(self, 28)
}
#[inline(always)]
pub fn dtcm2lpen(&mut self) -> DTCM2LPEN_W<AHB5LPENRrs> {
DTCM2LPEN_W::new(self, 29)
}
#[inline(always)]
pub fn itcmlpen(&mut self) -> ITCMLPEN_W<AHB5LPENRrs> {
ITCMLPEN_W::new(self, 30)
}
#[inline(always)]
pub fn axisramlpen(&mut self) -> AXISRAMLPEN_W<AHB5LPENRrs> {
AXISRAMLPEN_W::new(self, 31)
}
}
pub struct AHB5LPENRrs;
impl crate::RegisterSpec for AHB5LPENRrs {
type Ux = u32;
}
impl crate::Readable for AHB5LPENRrs {}
impl crate::Writable for AHB5LPENRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AHB5LPENRrs {
const RESET_VALUE: u32 = 0xf018_513f;
}