pub type R = crate::R<AHB3LPENRrs>;
pub type W = crate::W<AHB3LPENRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MDMALPEN {
Disabled = 0,
Enabled = 1,
}
impl From<MDMALPEN> for bool {
#[inline(always)]
fn from(variant: MDMALPEN) -> Self {
variant as u8 != 0
}
}
pub type MDMALPEN_R = crate::BitReader<MDMALPEN>;
impl MDMALPEN_R {
#[inline(always)]
pub const fn variant(&self) -> MDMALPEN {
match self.bits {
false => MDMALPEN::Disabled,
true => MDMALPEN::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == MDMALPEN::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == MDMALPEN::Enabled
}
}
pub type MDMALPEN_W<'a, REG> = crate::BitWriter<'a, REG, MDMALPEN>;
impl<'a, REG> MDMALPEN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(MDMALPEN::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(MDMALPEN::Enabled)
}
}
pub use MDMALPEN_R as DMA2DLPEN_R;
pub use MDMALPEN_R as JPGDECLPEN_R;
pub use MDMALPEN_R as FLASHLPEN_R;
pub use MDMALPEN_R as FMCLPEN_R;
pub use MDMALPEN_R as QSPILPEN_R;
pub use MDMALPEN_R as SDMMC1LPEN_R;
pub use MDMALPEN_R as D1DTCM1LPEN_R;
pub use MDMALPEN_R as DTCM2LPEN_R;
pub use MDMALPEN_R as ITCMLPEN_R;
pub use MDMALPEN_R as AXISRAMLPEN_R;
pub use MDMALPEN_W as DMA2DLPEN_W;
pub use MDMALPEN_W as JPGDECLPEN_W;
pub use MDMALPEN_W as FLASHLPEN_W;
pub use MDMALPEN_W as FMCLPEN_W;
pub use MDMALPEN_W as QSPILPEN_W;
pub use MDMALPEN_W as SDMMC1LPEN_W;
pub use MDMALPEN_W as D1DTCM1LPEN_W;
pub use MDMALPEN_W as DTCM2LPEN_W;
pub use MDMALPEN_W as ITCMLPEN_W;
pub use MDMALPEN_W as AXISRAMLPEN_W;
impl R {
#[inline(always)]
pub fn mdmalpen(&self) -> MDMALPEN_R {
MDMALPEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn dma2dlpen(&self) -> DMA2DLPEN_R {
DMA2DLPEN_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn jpgdeclpen(&self) -> JPGDECLPEN_R {
JPGDECLPEN_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn flashlpen(&self) -> FLASHLPEN_R {
FLASHLPEN_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn fmclpen(&self) -> FMCLPEN_R {
FMCLPEN_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn qspilpen(&self) -> QSPILPEN_R {
QSPILPEN_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn sdmmc1lpen(&self) -> SDMMC1LPEN_R {
SDMMC1LPEN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn d1dtcm1lpen(&self) -> D1DTCM1LPEN_R {
D1DTCM1LPEN_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("AHB3LPENR")
.field("mdmalpen", &self.mdmalpen())
.field("dma2dlpen", &self.dma2dlpen())
.field("jpgdeclpen", &self.jpgdeclpen())
.field("flashlpen", &self.flashlpen())
.field("fmclpen", &self.fmclpen())
.field("qspilpen", &self.qspilpen())
.field("sdmmc1lpen", &self.sdmmc1lpen())
.field("d1dtcm1lpen", &self.d1dtcm1lpen())
.field("dtcm2lpen", &self.dtcm2lpen())
.field("itcmlpen", &self.itcmlpen())
.field("axisramlpen", &self.axisramlpen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn mdmalpen(&mut self) -> MDMALPEN_W<AHB3LPENRrs> {
MDMALPEN_W::new(self, 0)
}
#[inline(always)]
pub fn dma2dlpen(&mut self) -> DMA2DLPEN_W<AHB3LPENRrs> {
DMA2DLPEN_W::new(self, 4)
}
#[inline(always)]
pub fn jpgdeclpen(&mut self) -> JPGDECLPEN_W<AHB3LPENRrs> {
JPGDECLPEN_W::new(self, 5)
}
#[inline(always)]
pub fn flashlpen(&mut self) -> FLASHLPEN_W<AHB3LPENRrs> {
FLASHLPEN_W::new(self, 8)
}
#[inline(always)]
pub fn fmclpen(&mut self) -> FMCLPEN_W<AHB3LPENRrs> {
FMCLPEN_W::new(self, 12)
}
#[inline(always)]
pub fn qspilpen(&mut self) -> QSPILPEN_W<AHB3LPENRrs> {
QSPILPEN_W::new(self, 14)
}
#[inline(always)]
pub fn sdmmc1lpen(&mut self) -> SDMMC1LPEN_W<AHB3LPENRrs> {
SDMMC1LPEN_W::new(self, 16)
}
#[inline(always)]
pub fn d1dtcm1lpen(&mut self) -> D1DTCM1LPEN_W<AHB3LPENRrs> {
D1DTCM1LPEN_W::new(self, 28)
}
#[inline(always)]
pub fn dtcm2lpen(&mut self) -> DTCM2LPEN_W<AHB3LPENRrs> {
DTCM2LPEN_W::new(self, 29)
}
#[inline(always)]
pub fn itcmlpen(&mut self) -> ITCMLPEN_W<AHB3LPENRrs> {
ITCMLPEN_W::new(self, 30)
}
#[inline(always)]
pub fn axisramlpen(&mut self) -> AXISRAMLPEN_W<AHB3LPENRrs> {
AXISRAMLPEN_W::new(self, 31)
}
}
pub struct AHB3LPENRrs;
impl crate::RegisterSpec for AHB3LPENRrs {
type Ux = u32;
}
impl crate::Readable for AHB3LPENRrs {}
impl crate::Writable for AHB3LPENRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AHB3LPENRrs {}