pub type R = crate::R<APB2RSTRrs>;
pub type W = crate::W<APB2RSTRrs>;
pub type SYSCFGRST_R = crate::BitReader;
pub type SYSCFGRST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM1RST_R = crate::BitReader;
pub type TIM1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SPI1RST_R = crate::BitReader;
pub type SPI1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM8RST_R = crate::BitReader;
pub type TIM8RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type USART1RST_R = crate::BitReader;
pub type USART1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM15RST_R = crate::BitReader;
pub type TIM15RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM16RST_R = crate::BitReader;
pub type TIM16RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM17RST_R = crate::BitReader;
pub type TIM17RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SAI1RST_R = crate::BitReader;
pub type SAI1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SAI2RST_R = crate::BitReader;
pub type SAI2RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DFSDM1RST_R = crate::BitReader;
pub type DFSDM1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LTDCRST_R = crate::BitReader;
pub type LTDCRST_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DSIRST_R = crate::BitReader;
pub type DSIRST_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn syscfgrst(&self) -> SYSCFGRST_R {
SYSCFGRST_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn tim1rst(&self) -> TIM1RST_R {
TIM1RST_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn spi1rst(&self) -> SPI1RST_R {
SPI1RST_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn tim8rst(&self) -> TIM8RST_R {
TIM8RST_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn usart1rst(&self) -> USART1RST_R {
USART1RST_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn tim15rst(&self) -> TIM15RST_R {
TIM15RST_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn tim16rst(&self) -> TIM16RST_R {
TIM16RST_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn tim17rst(&self) -> TIM17RST_R {
TIM17RST_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn sai1rst(&self) -> SAI1RST_R {
SAI1RST_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn sai2rst(&self) -> SAI2RST_R {
SAI2RST_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn dfsdm1rst(&self) -> DFSDM1RST_R {
DFSDM1RST_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn ltdcrst(&self) -> LTDCRST_R {
LTDCRST_R::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn dsirst(&self) -> DSIRST_R {
DSIRST_R::new(((self.bits >> 27) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("APB2RSTR")
.field("syscfgrst", &self.syscfgrst())
.field("tim1rst", &self.tim1rst())
.field("spi1rst", &self.spi1rst())
.field("tim8rst", &self.tim8rst())
.field("usart1rst", &self.usart1rst())
.field("tim15rst", &self.tim15rst())
.field("tim16rst", &self.tim16rst())
.field("tim17rst", &self.tim17rst())
.field("sai1rst", &self.sai1rst())
.field("sai2rst", &self.sai2rst())
.field("dfsdm1rst", &self.dfsdm1rst())
.field("ltdcrst", &self.ltdcrst())
.field("dsirst", &self.dsirst())
.finish()
}
}
impl W {
#[inline(always)]
pub fn syscfgrst(&mut self) -> SYSCFGRST_W<APB2RSTRrs> {
SYSCFGRST_W::new(self, 0)
}
#[inline(always)]
pub fn tim1rst(&mut self) -> TIM1RST_W<APB2RSTRrs> {
TIM1RST_W::new(self, 11)
}
#[inline(always)]
pub fn spi1rst(&mut self) -> SPI1RST_W<APB2RSTRrs> {
SPI1RST_W::new(self, 12)
}
#[inline(always)]
pub fn tim8rst(&mut self) -> TIM8RST_W<APB2RSTRrs> {
TIM8RST_W::new(self, 13)
}
#[inline(always)]
pub fn usart1rst(&mut self) -> USART1RST_W<APB2RSTRrs> {
USART1RST_W::new(self, 14)
}
#[inline(always)]
pub fn tim15rst(&mut self) -> TIM15RST_W<APB2RSTRrs> {
TIM15RST_W::new(self, 16)
}
#[inline(always)]
pub fn tim16rst(&mut self) -> TIM16RST_W<APB2RSTRrs> {
TIM16RST_W::new(self, 17)
}
#[inline(always)]
pub fn tim17rst(&mut self) -> TIM17RST_W<APB2RSTRrs> {
TIM17RST_W::new(self, 18)
}
#[inline(always)]
pub fn sai1rst(&mut self) -> SAI1RST_W<APB2RSTRrs> {
SAI1RST_W::new(self, 21)
}
#[inline(always)]
pub fn sai2rst(&mut self) -> SAI2RST_W<APB2RSTRrs> {
SAI2RST_W::new(self, 22)
}
#[inline(always)]
pub fn dfsdm1rst(&mut self) -> DFSDM1RST_W<APB2RSTRrs> {
DFSDM1RST_W::new(self, 24)
}
#[inline(always)]
pub fn ltdcrst(&mut self) -> LTDCRST_W<APB2RSTRrs> {
LTDCRST_W::new(self, 26)
}
#[inline(always)]
pub fn dsirst(&mut self) -> DSIRST_W<APB2RSTRrs> {
DSIRST_W::new(self, 27)
}
}
pub struct APB2RSTRrs;
impl crate::RegisterSpec for APB2RSTRrs {
type Ux = u32;
}
impl crate::Readable for APB2RSTRrs {}
impl crate::Writable for APB2RSTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for APB2RSTRrs {}