pub type R = crate::R<AHB3RSTRrs>;
pub type W = crate::W<AHB3RSTRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MDMARST {
Reset = 1,
}
impl From<MDMARST> for bool {
#[inline(always)]
fn from(variant: MDMARST) -> Self {
variant as u8 != 0
}
}
pub type MDMARST_R = crate::BitReader<MDMARST>;
impl MDMARST_R {
#[inline(always)]
pub const fn variant(&self) -> Option<MDMARST> {
match self.bits {
true => Some(MDMARST::Reset),
_ => None,
}
}
#[inline(always)]
pub fn is_reset(&self) -> bool {
*self == MDMARST::Reset
}
}
pub type MDMARST_W<'a, REG> = crate::BitWriter<'a, REG, MDMARST>;
impl<'a, REG> MDMARST_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn reset(self) -> &'a mut crate::W<REG> {
self.variant(MDMARST::Reset)
}
}
pub use MDMARST_R as DMA2DRST_R;
pub use MDMARST_R as JPGDECRST_R;
pub use MDMARST_R as FMCRST_R;
pub use MDMARST_R as OCTOSPI1RST_R;
pub use MDMARST_R as SDMMC1RST_R;
pub use MDMARST_R as OCTOSPI2RST_R;
pub use MDMARST_R as OCTOSPIMRST_R;
pub use MDMARST_R as OTFD1RST_R;
pub use MDMARST_R as OTFD2RST_R;
pub use MDMARST_R as GFXMMURST_R;
pub use MDMARST_W as DMA2DRST_W;
pub use MDMARST_W as JPGDECRST_W;
pub use MDMARST_W as FMCRST_W;
pub use MDMARST_W as OCTOSPI1RST_W;
pub use MDMARST_W as SDMMC1RST_W;
pub use MDMARST_W as OCTOSPI2RST_W;
pub use MDMARST_W as OCTOSPIMRST_W;
pub use MDMARST_W as OTFD1RST_W;
pub use MDMARST_W as OTFD2RST_W;
pub use MDMARST_W as GFXMMURST_W;
impl R {
#[inline(always)]
pub fn mdmarst(&self) -> MDMARST_R {
MDMARST_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn dma2drst(&self) -> DMA2DRST_R {
DMA2DRST_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn jpgdecrst(&self) -> JPGDECRST_R {
JPGDECRST_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn fmcrst(&self) -> FMCRST_R {
FMCRST_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn octospi1rst(&self) -> OCTOSPI1RST_R {
OCTOSPI1RST_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn sdmmc1rst(&self) -> SDMMC1RST_R {
SDMMC1RST_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn octospi2rst(&self) -> OCTOSPI2RST_R {
OCTOSPI2RST_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn octospimrst(&self) -> OCTOSPIMRST_R {
OCTOSPIMRST_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn otfd1rst(&self) -> OTFD1RST_R {
OTFD1RST_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn otfd2rst(&self) -> OTFD2RST_R {
OTFD2RST_R::new(((self.bits >> 23) & 1) != 0)
}
#[inline(always)]
pub fn gfxmmurst(&self) -> GFXMMURST_R {
GFXMMURST_R::new(((self.bits >> 24) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AHB3RSTR")
.field("mdmarst", &self.mdmarst())
.field("dma2drst", &self.dma2drst())
.field("jpgdecrst", &self.jpgdecrst())
.field("fmcrst", &self.fmcrst())
.field("octospi1rst", &self.octospi1rst())
.field("sdmmc1rst", &self.sdmmc1rst())
.field("octospi2rst", &self.octospi2rst())
.field("octospimrst", &self.octospimrst())
.field("otfd1rst", &self.otfd1rst())
.field("otfd2rst", &self.otfd2rst())
.field("gfxmmurst", &self.gfxmmurst())
.finish()
}
}
impl W {
#[inline(always)]
pub fn mdmarst(&mut self) -> MDMARST_W<AHB3RSTRrs> {
MDMARST_W::new(self, 0)
}
#[inline(always)]
pub fn dma2drst(&mut self) -> DMA2DRST_W<AHB3RSTRrs> {
DMA2DRST_W::new(self, 4)
}
#[inline(always)]
pub fn jpgdecrst(&mut self) -> JPGDECRST_W<AHB3RSTRrs> {
JPGDECRST_W::new(self, 5)
}
#[inline(always)]
pub fn fmcrst(&mut self) -> FMCRST_W<AHB3RSTRrs> {
FMCRST_W::new(self, 12)
}
#[inline(always)]
pub fn octospi1rst(&mut self) -> OCTOSPI1RST_W<AHB3RSTRrs> {
OCTOSPI1RST_W::new(self, 14)
}
#[inline(always)]
pub fn sdmmc1rst(&mut self) -> SDMMC1RST_W<AHB3RSTRrs> {
SDMMC1RST_W::new(self, 16)
}
#[inline(always)]
pub fn octospi2rst(&mut self) -> OCTOSPI2RST_W<AHB3RSTRrs> {
OCTOSPI2RST_W::new(self, 19)
}
#[inline(always)]
pub fn octospimrst(&mut self) -> OCTOSPIMRST_W<AHB3RSTRrs> {
OCTOSPIMRST_W::new(self, 21)
}
#[inline(always)]
pub fn otfd1rst(&mut self) -> OTFD1RST_W<AHB3RSTRrs> {
OTFD1RST_W::new(self, 22)
}
#[inline(always)]
pub fn otfd2rst(&mut self) -> OTFD2RST_W<AHB3RSTRrs> {
OTFD2RST_W::new(self, 23)
}
#[inline(always)]
pub fn gfxmmurst(&mut self) -> GFXMMURST_W<AHB3RSTRrs> {
GFXMMURST_W::new(self, 24)
}
}
pub struct AHB3RSTRrs;
impl crate::RegisterSpec for AHB3RSTRrs {
type Ux = u32;
}
impl crate::Readable for AHB3RSTRrs {}
impl crate::Writable for AHB3RSTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AHB3RSTRrs {}