pub type R = crate::R<AHB1SMENRrs>;
pub type W = crate::W<AHB1SMENRrs>;
pub type DMA1SMEN_R = crate::BitReader;
pub type DMA1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DMA2SMEN_R = crate::BitReader;
pub type DMA2SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DMAMUX1SMEN_R = crate::BitReader;
pub type DMAMUX1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CORDICSMEN_R = crate::BitReader;
pub type CORDICSMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FMACSMEN_R = crate::BitReader;
pub type FMACSMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FLASHSMEN_R = crate::BitReader;
pub type FLASHSMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SRAM1SMEN_R = crate::BitReader;
pub type SRAM1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CRCSMEN_R = crate::BitReader;
pub type CRCSMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn dma1smen(&self) -> DMA1SMEN_R {
DMA1SMEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn dma2smen(&self) -> DMA2SMEN_R {
DMA2SMEN_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn dmamux1smen(&self) -> DMAMUX1SMEN_R {
DMAMUX1SMEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn cordicsmen(&self) -> CORDICSMEN_R {
CORDICSMEN_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn fmacsmen(&self) -> FMACSMEN_R {
FMACSMEN_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn flashsmen(&self) -> FLASHSMEN_R {
FLASHSMEN_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn sram1smen(&self) -> SRAM1SMEN_R {
SRAM1SMEN_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn crcsmen(&self) -> CRCSMEN_R {
CRCSMEN_R::new(((self.bits >> 12) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AHB1SMENR")
.field("dma1smen", &self.dma1smen())
.field("dma2smen", &self.dma2smen())
.field("dmamux1smen", &self.dmamux1smen())
.field("cordicsmen", &self.cordicsmen())
.field("fmacsmen", &self.fmacsmen())
.field("flashsmen", &self.flashsmen())
.field("sram1smen", &self.sram1smen())
.field("crcsmen", &self.crcsmen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dma1smen(&mut self) -> DMA1SMEN_W<AHB1SMENRrs> {
DMA1SMEN_W::new(self, 0)
}
#[inline(always)]
pub fn dma2smen(&mut self) -> DMA2SMEN_W<AHB1SMENRrs> {
DMA2SMEN_W::new(self, 1)
}
#[inline(always)]
pub fn dmamux1smen(&mut self) -> DMAMUX1SMEN_W<AHB1SMENRrs> {
DMAMUX1SMEN_W::new(self, 2)
}
#[inline(always)]
pub fn cordicsmen(&mut self) -> CORDICSMEN_W<AHB1SMENRrs> {
CORDICSMEN_W::new(self, 3)
}
#[inline(always)]
pub fn fmacsmen(&mut self) -> FMACSMEN_W<AHB1SMENRrs> {
FMACSMEN_W::new(self, 4)
}
#[inline(always)]
pub fn flashsmen(&mut self) -> FLASHSMEN_W<AHB1SMENRrs> {
FLASHSMEN_W::new(self, 8)
}
#[inline(always)]
pub fn sram1smen(&mut self) -> SRAM1SMEN_W<AHB1SMENRrs> {
SRAM1SMEN_W::new(self, 9)
}
#[inline(always)]
pub fn crcsmen(&mut self) -> CRCSMEN_W<AHB1SMENRrs> {
CRCSMEN_W::new(self, 12)
}
}
pub struct AHB1SMENRrs;
impl crate::RegisterSpec for AHB1SMENRrs {
type Ux = u32;
}
impl crate::Readable for AHB1SMENRrs {}
impl crate::Writable for AHB1SMENRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AHB1SMENRrs {
const RESET_VALUE: u32 = 0x130f;
}