pub type R = crate::R<APB2SMENRrs>;
pub type W = crate::W<APB2SMENRrs>;
pub type SYSCFGSMEN_R = crate::BitReader;
pub type SYSCFGSMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM1SMEN_R = crate::BitReader;
pub type TIM1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SPI1SMEN_R = crate::BitReader;
pub type SPI1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM8SMEN_R = crate::BitReader;
pub type TIM8SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type USART1SMEN_R = crate::BitReader;
pub type USART1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SPI4SMEN_R = crate::BitReader;
pub type SPI4SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM15SMEN_R = crate::BitReader;
pub type TIM15SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM16SMEN_R = crate::BitReader;
pub type TIM16SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM17SMEN_R = crate::BitReader;
pub type TIM17SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM20SMEN_R = crate::BitReader;
pub type TIM20SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SAI1SMEN_R = crate::BitReader;
pub type SAI1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HRTIM1SMEN_R = crate::BitReader;
pub type HRTIM1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn syscfgsmen(&self) -> SYSCFGSMEN_R {
SYSCFGSMEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn tim1smen(&self) -> TIM1SMEN_R {
TIM1SMEN_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn spi1smen(&self) -> SPI1SMEN_R {
SPI1SMEN_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn tim8smen(&self) -> TIM8SMEN_R {
TIM8SMEN_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn usart1smen(&self) -> USART1SMEN_R {
USART1SMEN_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn spi4smen(&self) -> SPI4SMEN_R {
SPI4SMEN_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn tim15smen(&self) -> TIM15SMEN_R {
TIM15SMEN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn tim16smen(&self) -> TIM16SMEN_R {
TIM16SMEN_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn tim17smen(&self) -> TIM17SMEN_R {
TIM17SMEN_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn tim20smen(&self) -> TIM20SMEN_R {
TIM20SMEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn sai1smen(&self) -> SAI1SMEN_R {
SAI1SMEN_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn hrtim1smen(&self) -> HRTIM1SMEN_R {
HRTIM1SMEN_R::new(((self.bits >> 26) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("APB2SMENR")
.field("syscfgsmen", &self.syscfgsmen())
.field("tim1smen", &self.tim1smen())
.field("spi1smen", &self.spi1smen())
.field("tim8smen", &self.tim8smen())
.field("usart1smen", &self.usart1smen())
.field("spi4smen", &self.spi4smen())
.field("tim15smen", &self.tim15smen())
.field("tim16smen", &self.tim16smen())
.field("tim17smen", &self.tim17smen())
.field("tim20smen", &self.tim20smen())
.field("sai1smen", &self.sai1smen())
.field("hrtim1smen", &self.hrtim1smen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn syscfgsmen(&mut self) -> SYSCFGSMEN_W<APB2SMENRrs> {
SYSCFGSMEN_W::new(self, 0)
}
#[inline(always)]
pub fn tim1smen(&mut self) -> TIM1SMEN_W<APB2SMENRrs> {
TIM1SMEN_W::new(self, 11)
}
#[inline(always)]
pub fn spi1smen(&mut self) -> SPI1SMEN_W<APB2SMENRrs> {
SPI1SMEN_W::new(self, 12)
}
#[inline(always)]
pub fn tim8smen(&mut self) -> TIM8SMEN_W<APB2SMENRrs> {
TIM8SMEN_W::new(self, 13)
}
#[inline(always)]
pub fn usart1smen(&mut self) -> USART1SMEN_W<APB2SMENRrs> {
USART1SMEN_W::new(self, 14)
}
#[inline(always)]
pub fn spi4smen(&mut self) -> SPI4SMEN_W<APB2SMENRrs> {
SPI4SMEN_W::new(self, 15)
}
#[inline(always)]
pub fn tim15smen(&mut self) -> TIM15SMEN_W<APB2SMENRrs> {
TIM15SMEN_W::new(self, 16)
}
#[inline(always)]
pub fn tim16smen(&mut self) -> TIM16SMEN_W<APB2SMENRrs> {
TIM16SMEN_W::new(self, 17)
}
#[inline(always)]
pub fn tim17smen(&mut self) -> TIM17SMEN_W<APB2SMENRrs> {
TIM17SMEN_W::new(self, 18)
}
#[inline(always)]
pub fn tim20smen(&mut self) -> TIM20SMEN_W<APB2SMENRrs> {
TIM20SMEN_W::new(self, 20)
}
#[inline(always)]
pub fn sai1smen(&mut self) -> SAI1SMEN_W<APB2SMENRrs> {
SAI1SMEN_W::new(self, 21)
}
#[inline(always)]
pub fn hrtim1smen(&mut self) -> HRTIM1SMEN_W<APB2SMENRrs> {
HRTIM1SMEN_W::new(self, 26)
}
}
pub struct APB2SMENRrs;
impl crate::RegisterSpec for APB2SMENRrs {
type Ux = u32;
}
impl crate::Readable for APB2SMENRrs {}
impl crate::Writable for APB2SMENRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for APB2SMENRrs {
const RESET_VALUE: u32 = 0x0437_f801;
}