pub type R = crate::R<APB1RSTR2rs>;
pub type W = crate::W<APB1RSTR2rs>;
pub type LPUART1RST_R = crate::BitReader;
pub type LPUART1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type I2C4RST_R = crate::BitReader;
pub type I2C4RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SWPMI1RST_R = crate::BitReader;
pub type SWPMI1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LPTIM2RST_R = crate::BitReader;
pub type LPTIM2RST_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn lpuart1rst(&self) -> LPUART1RST_R {
LPUART1RST_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn i2c4rst(&self) -> I2C4RST_R {
I2C4RST_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn swpmi1rst(&self) -> SWPMI1RST_R {
SWPMI1RST_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn lptim2rst(&self) -> LPTIM2RST_R {
LPTIM2RST_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("APB1RSTR2")
.field("lptim2rst", &self.lptim2rst())
.field("swpmi1rst", &self.swpmi1rst())
.field("lpuart1rst", &self.lpuart1rst())
.field("i2c4rst", &self.i2c4rst())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lpuart1rst(&mut self) -> LPUART1RST_W<APB1RSTR2rs> {
LPUART1RST_W::new(self, 0)
}
#[inline(always)]
pub fn i2c4rst(&mut self) -> I2C4RST_W<APB1RSTR2rs> {
I2C4RST_W::new(self, 1)
}
#[inline(always)]
pub fn swpmi1rst(&mut self) -> SWPMI1RST_W<APB1RSTR2rs> {
SWPMI1RST_W::new(self, 2)
}
#[inline(always)]
pub fn lptim2rst(&mut self) -> LPTIM2RST_W<APB1RSTR2rs> {
LPTIM2RST_W::new(self, 5)
}
}
pub struct APB1RSTR2rs;
impl crate::RegisterSpec for APB1RSTR2rs {
type Ux = u32;
}
impl crate::Readable for APB1RSTR2rs {}
impl crate::Writable for APB1RSTR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for APB1RSTR2rs {}