pub struct R(crate::R<AHBRSTR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<AHBRSTR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<AHBRSTR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<AHBRSTR_SPEC>) -> Self {
R(reader)
}
}
pub struct W(crate::W<AHBRSTR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<AHBRSTR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<AHBRSTR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<AHBRSTR_SPEC>) -> Self {
W(writer)
}
}
pub type DMARST_R = crate::BitReader<DMARSTW_A>;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DMARSTW_A {
Reset = 1,
}
impl From<DMARSTW_A> for bool {
#[inline(always)]
fn from(variant: DMARSTW_A) -> Self {
variant as u8 != 0
}
}
impl DMARST_R {
#[inline(always)]
pub fn variant(&self) -> Option<DMARSTW_A> {
match self.bits {
true => Some(DMARSTW_A::Reset),
_ => None,
}
}
#[inline(always)]
pub fn is_reset(&self) -> bool {
*self == DMARSTW_A::Reset
}
}
pub type DMARST_W<'a, const O: u8> = crate::BitWriter<'a, u32, AHBRSTR_SPEC, DMARSTW_A, O>;
impl<'a, const O: u8> DMARST_W<'a, O> {
#[inline(always)]
pub fn reset(self) -> &'a mut W {
self.variant(DMARSTW_A::Reset)
}
}
pub use DMARST_R as CRCRST_R;
pub use DMARST_W as CRCRST_W;
impl R {
#[inline(always)]
pub fn dmarst(&self) -> DMARST_R {
DMARST_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn crcrst(&self) -> CRCRST_R {
CRCRST_R::new(((self.bits >> 12) & 1) != 0)
}
}
impl W {
#[inline(always)]
#[must_use]
pub fn dmarst(&mut self) -> DMARST_W<0> {
DMARST_W::new(self)
}
#[inline(always)]
#[must_use]
pub fn crcrst(&mut self) -> CRCRST_W<12> {
CRCRST_W::new(self)
}
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
pub struct AHBRSTR_SPEC;
impl crate::RegisterSpec for AHBRSTR_SPEC {
type Ux = u32;
}
impl crate::Readable for AHBRSTR_SPEC {
type Reader = R;
}
impl crate::Writable for AHBRSTR_SPEC {
type Writer = W;
const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
impl crate::Resettable for AHBRSTR_SPEC {
const RESET_VALUE: Self::Ux = 0;
}