stm32h7 0.16.0

Device support crates for STM32H7 devices
Documentation
///Register `APB4RSTR` reader
pub type R = crate::R<APB4RSTRrs>;
///Register `APB4RSTR` writer
pub type W = crate::W<APB4RSTRrs>;
/**SYSCFG block reset Set and reset by software.

Value on reset: 0*/
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SYSCFGRST {
    ///1: Reset the selected module
    Reset = 1,
}
impl From<SYSCFGRST> for bool {
    #[inline(always)]
    fn from(variant: SYSCFGRST) -> Self {
        variant as u8 != 0
    }
}
///Field `SYSCFGRST` reader - SYSCFG block reset Set and reset by software.
pub type SYSCFGRST_R = crate::BitReader<SYSCFGRST>;
impl SYSCFGRST_R {
    ///Get enumerated values variant
    #[inline(always)]
    pub const fn variant(&self) -> Option<SYSCFGRST> {
        match self.bits {
            true => Some(SYSCFGRST::Reset),
            _ => None,
        }
    }
    ///Reset the selected module
    #[inline(always)]
    pub fn is_reset(&self) -> bool {
        *self == SYSCFGRST::Reset
    }
}
///Field `SYSCFGRST` writer - SYSCFG block reset Set and reset by software.
pub type SYSCFGRST_W<'a, REG> = crate::BitWriter<'a, REG, SYSCFGRST>;
impl<'a, REG> SYSCFGRST_W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    ///Reset the selected module
    #[inline(always)]
    pub fn reset(self) -> &'a mut crate::W<REG> {
        self.variant(SYSCFGRST::Reset)
    }
}
///Field `LPUART1RST` reader - LPUART1 block reset Set and reset by software.
pub use SYSCFGRST_R as LPUART1RST_R;
///Field `SPI6RST` reader - SPI6 block reset Set and reset by software.
pub use SYSCFGRST_R as SPI6RST_R;
///Field `I2C4RST` reader - I2C4 block reset Set and reset by software.
pub use SYSCFGRST_R as I2C4RST_R;
///Field `LPTIM2RST` reader - LPTIM2 block reset Set and reset by software.
pub use SYSCFGRST_R as LPTIM2RST_R;
///Field `LPTIM3RST` reader - LPTIM3 block reset Set and reset by software.
pub use SYSCFGRST_R as LPTIM3RST_R;
///Field `DAC2RST` reader - DAC2 (containing one converter) reset Set and reset by software.
pub use SYSCFGRST_R as DAC2RST_R;
///Field `COMP12RST` reader - COMP1 and 2 blocks reset Set and reset by software.
pub use SYSCFGRST_R as COMP12RST_R;
///Field `VREFRST` reader - VREF block reset Set and reset by software.
pub use SYSCFGRST_R as VREFRST_R;
///Field `DTSRST` reader - Digital temperature sensor block reset Set and reset by software.
pub use SYSCFGRST_R as DTSRST_R;
///Field `DFSDM2RST` reader - DFSDM2 block reset Set and reset by software.
pub use SYSCFGRST_R as DFSDM2RST_R;
///Field `LPUART1RST` writer - LPUART1 block reset Set and reset by software.
pub use SYSCFGRST_W as LPUART1RST_W;
///Field `SPI6RST` writer - SPI6 block reset Set and reset by software.
pub use SYSCFGRST_W as SPI6RST_W;
///Field `I2C4RST` writer - I2C4 block reset Set and reset by software.
pub use SYSCFGRST_W as I2C4RST_W;
///Field `LPTIM2RST` writer - LPTIM2 block reset Set and reset by software.
pub use SYSCFGRST_W as LPTIM2RST_W;
///Field `LPTIM3RST` writer - LPTIM3 block reset Set and reset by software.
pub use SYSCFGRST_W as LPTIM3RST_W;
///Field `DAC2RST` writer - DAC2 (containing one converter) reset Set and reset by software.
pub use SYSCFGRST_W as DAC2RST_W;
///Field `COMP12RST` writer - COMP1 and 2 blocks reset Set and reset by software.
pub use SYSCFGRST_W as COMP12RST_W;
///Field `VREFRST` writer - VREF block reset Set and reset by software.
pub use SYSCFGRST_W as VREFRST_W;
///Field `DTSRST` writer - Digital temperature sensor block reset Set and reset by software.
pub use SYSCFGRST_W as DTSRST_W;
///Field `DFSDM2RST` writer - DFSDM2 block reset Set and reset by software.
pub use SYSCFGRST_W as DFSDM2RST_W;
impl R {
    ///Bit 1 - SYSCFG block reset Set and reset by software.
    #[inline(always)]
    pub fn syscfgrst(&self) -> SYSCFGRST_R {
        SYSCFGRST_R::new(((self.bits >> 1) & 1) != 0)
    }
    ///Bit 3 - LPUART1 block reset Set and reset by software.
    #[inline(always)]
    pub fn lpuart1rst(&self) -> LPUART1RST_R {
        LPUART1RST_R::new(((self.bits >> 3) & 1) != 0)
    }
    ///Bit 5 - SPI6 block reset Set and reset by software.
    #[inline(always)]
    pub fn spi6rst(&self) -> SPI6RST_R {
        SPI6RST_R::new(((self.bits >> 5) & 1) != 0)
    }
    ///Bit 7 - I2C4 block reset Set and reset by software.
    #[inline(always)]
    pub fn i2c4rst(&self) -> I2C4RST_R {
        I2C4RST_R::new(((self.bits >> 7) & 1) != 0)
    }
    ///Bit 9 - LPTIM2 block reset Set and reset by software.
    #[inline(always)]
    pub fn lptim2rst(&self) -> LPTIM2RST_R {
        LPTIM2RST_R::new(((self.bits >> 9) & 1) != 0)
    }
    ///Bit 10 - LPTIM3 block reset Set and reset by software.
    #[inline(always)]
    pub fn lptim3rst(&self) -> LPTIM3RST_R {
        LPTIM3RST_R::new(((self.bits >> 10) & 1) != 0)
    }
    ///Bit 13 - DAC2 (containing one converter) reset Set and reset by software.
    #[inline(always)]
    pub fn dac2rst(&self) -> DAC2RST_R {
        DAC2RST_R::new(((self.bits >> 13) & 1) != 0)
    }
    ///Bit 14 - COMP1 and 2 blocks reset Set and reset by software.
    #[inline(always)]
    pub fn comp12rst(&self) -> COMP12RST_R {
        COMP12RST_R::new(((self.bits >> 14) & 1) != 0)
    }
    ///Bit 15 - VREF block reset Set and reset by software.
    #[inline(always)]
    pub fn vrefrst(&self) -> VREFRST_R {
        VREFRST_R::new(((self.bits >> 15) & 1) != 0)
    }
    ///Bit 26 - Digital temperature sensor block reset Set and reset by software.
    #[inline(always)]
    pub fn dtsrst(&self) -> DTSRST_R {
        DTSRST_R::new(((self.bits >> 26) & 1) != 0)
    }
    ///Bit 27 - DFSDM2 block reset Set and reset by software.
    #[inline(always)]
    pub fn dfsdm2rst(&self) -> DFSDM2RST_R {
        DFSDM2RST_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("APB4RSTR")
            .field("syscfgrst", &self.syscfgrst())
            .field("lpuart1rst", &self.lpuart1rst())
            .field("spi6rst", &self.spi6rst())
            .field("i2c4rst", &self.i2c4rst())
            .field("lptim2rst", &self.lptim2rst())
            .field("lptim3rst", &self.lptim3rst())
            .field("dac2rst", &self.dac2rst())
            .field("comp12rst", &self.comp12rst())
            .field("vrefrst", &self.vrefrst())
            .field("dtsrst", &self.dtsrst())
            .field("dfsdm2rst", &self.dfsdm2rst())
            .finish()
    }
}
impl W {
    ///Bit 1 - SYSCFG block reset Set and reset by software.
    #[inline(always)]
    pub fn syscfgrst(&mut self) -> SYSCFGRST_W<APB4RSTRrs> {
        SYSCFGRST_W::new(self, 1)
    }
    ///Bit 3 - LPUART1 block reset Set and reset by software.
    #[inline(always)]
    pub fn lpuart1rst(&mut self) -> LPUART1RST_W<APB4RSTRrs> {
        LPUART1RST_W::new(self, 3)
    }
    ///Bit 5 - SPI6 block reset Set and reset by software.
    #[inline(always)]
    pub fn spi6rst(&mut self) -> SPI6RST_W<APB4RSTRrs> {
        SPI6RST_W::new(self, 5)
    }
    ///Bit 7 - I2C4 block reset Set and reset by software.
    #[inline(always)]
    pub fn i2c4rst(&mut self) -> I2C4RST_W<APB4RSTRrs> {
        I2C4RST_W::new(self, 7)
    }
    ///Bit 9 - LPTIM2 block reset Set and reset by software.
    #[inline(always)]
    pub fn lptim2rst(&mut self) -> LPTIM2RST_W<APB4RSTRrs> {
        LPTIM2RST_W::new(self, 9)
    }
    ///Bit 10 - LPTIM3 block reset Set and reset by software.
    #[inline(always)]
    pub fn lptim3rst(&mut self) -> LPTIM3RST_W<APB4RSTRrs> {
        LPTIM3RST_W::new(self, 10)
    }
    ///Bit 13 - DAC2 (containing one converter) reset Set and reset by software.
    #[inline(always)]
    pub fn dac2rst(&mut self) -> DAC2RST_W<APB4RSTRrs> {
        DAC2RST_W::new(self, 13)
    }
    ///Bit 14 - COMP1 and 2 blocks reset Set and reset by software.
    #[inline(always)]
    pub fn comp12rst(&mut self) -> COMP12RST_W<APB4RSTRrs> {
        COMP12RST_W::new(self, 14)
    }
    ///Bit 15 - VREF block reset Set and reset by software.
    #[inline(always)]
    pub fn vrefrst(&mut self) -> VREFRST_W<APB4RSTRrs> {
        VREFRST_W::new(self, 15)
    }
    ///Bit 26 - Digital temperature sensor block reset Set and reset by software.
    #[inline(always)]
    pub fn dtsrst(&mut self) -> DTSRST_W<APB4RSTRrs> {
        DTSRST_W::new(self, 26)
    }
    ///Bit 27 - DFSDM2 block reset Set and reset by software.
    #[inline(always)]
    pub fn dfsdm2rst(&mut self) -> DFSDM2RST_W<APB4RSTRrs> {
        DFSDM2RST_W::new(self, 27)
    }
}
/**

You can [`read`](crate::Reg::read) this register and get [`apb4rstr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apb4rstr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).*/
pub struct APB4RSTRrs;
impl crate::RegisterSpec for APB4RSTRrs {
    type Ux = u32;
}
///`read()` method returns [`apb4rstr::R`](R) reader structure
impl crate::Readable for APB4RSTRrs {}
///`write(|w| ..)` method takes [`apb4rstr::W`](W) writer structure
impl crate::Writable for APB4RSTRrs {
    type Safety = crate::Unsafe;
}
///`reset()` method sets APB4RSTR to value 0
impl crate::Resettable for APB4RSTRrs {}