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 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>;
pub type TSCSMEN_R = crate::BitReader;
pub type TSCSMEN_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 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)
}
#[inline(always)]
pub fn tscsmen(&self) -> TSCSMEN_R {
TSCSMEN_R::new(((self.bits >> 16) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AHB1SMENR")
.field("tscsmen", &self.tscsmen())
.field("crcsmen", &self.crcsmen())
.field("sram1smen", &self.sram1smen())
.field("flashsmen", &self.flashsmen())
.field("dma2smen", &self.dma2smen())
.field("dma1smen", &self.dma1smen())
.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 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)
}
#[inline(always)]
pub fn tscsmen(&mut self) -> TSCSMEN_W<AHB1SMENRrs> {
TSCSMEN_W::new(self, 16)
}
}
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 = 0x0001_1303;
}