pub type R = crate::R<APB1SMENR2rs>;
pub type W = crate::W<APB1SMENR2rs>;
pub type LPUART1SMEN_R = crate::BitReader;
pub type LPUART1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SWPMI1SMEN_R = crate::BitReader;
pub type SWPMI1SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LPTIM2SMEN_R = crate::BitReader;
pub type LPTIM2SMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn lpuart1smen(&self) -> LPUART1SMEN_R {
LPUART1SMEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn swpmi1smen(&self) -> SWPMI1SMEN_R {
SWPMI1SMEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn lptim2smen(&self) -> LPTIM2SMEN_R {
LPTIM2SMEN_R::new(((self.bits >> 5) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("APB1SMENR2")
.field("lptim2smen", &self.lptim2smen())
.field("swpmi1smen", &self.swpmi1smen())
.field("lpuart1smen", &self.lpuart1smen())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lpuart1smen(&mut self) -> LPUART1SMEN_W<APB1SMENR2rs> {
LPUART1SMEN_W::new(self, 0)
}
#[inline(always)]
pub fn swpmi1smen(&mut self) -> SWPMI1SMEN_W<APB1SMENR2rs> {
SWPMI1SMEN_W::new(self, 2)
}
#[inline(always)]
pub fn lptim2smen(&mut self) -> LPTIM2SMEN_W<APB1SMENR2rs> {
LPTIM2SMEN_W::new(self, 5)
}
}
pub struct APB1SMENR2rs;
impl crate::RegisterSpec for APB1SMENR2rs {
type Ux = u32;
}
impl crate::Readable for APB1SMENR2rs {}
impl crate::Writable for APB1SMENR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for APB1SMENR2rs {
const RESET_VALUE: u32 = 0x25;
}