#[doc = "Register `WDT_CTRLOW` reader"]
pub struct R(crate::R<WDT_CTRLOW_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<WDT_CTRLOW_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<WDT_CTRLOW_SPEC>> for R {
    fn from(reader: crate::R<WDT_CTRLOW_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `WDT_CTRLOW` writer"]
pub struct W(crate::W<WDT_CTRLOW_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<WDT_CTRLOW_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 core::convert::From<crate::W<WDT_CTRLOW_SPEC>> for W {
    fn from(writer: crate::W<WDT_CTRLOW_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `WDT_CTR0` reader - Current value of WDT Counter 0"]
pub struct WDT_CTR0_R(crate::FieldReader<u16, u16>);
impl WDT_CTR0_R {
    pub(crate) fn new(bits: u16) -> Self {
        WDT_CTR0_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for WDT_CTR0_R {
    type Target = crate::FieldReader<u16, u16>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `WDT_CTR1` reader - Current value of WDT Counter 1"]
pub struct WDT_CTR1_R(crate::FieldReader<u16, u16>);
impl WDT_CTR1_R {
    pub(crate) fn new(bits: u16) -> Self {
        WDT_CTR1_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for WDT_CTR1_R {
    type Target = crate::FieldReader<u16, u16>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bits 0:15 - Current value of WDT Counter 0"]
    #[inline(always)]
    pub fn wdt_ctr0(&self) -> WDT_CTR0_R {
        WDT_CTR0_R::new((self.bits & 0xffff) as u16)
    }
    #[doc = "Bits 16:31 - Current value of WDT Counter 1"]
    #[inline(always)]
    pub fn wdt_ctr1(&self) -> WDT_CTR1_R {
        WDT_CTR1_R::new(((self.bits >> 16) & 0xffff) as u16)
    }
}
impl W {
    #[doc = "Writes raw bits to the register."]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Watchdog Counters 0/1\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [wdt_ctrlow](index.html) module"]
pub struct WDT_CTRLOW_SPEC;
impl crate::RegisterSpec for WDT_CTRLOW_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [wdt_ctrlow::R](R) reader structure"]
impl crate::Readable for WDT_CTRLOW_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [wdt_ctrlow::W](W) writer structure"]
impl crate::Writable for WDT_CTRLOW_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets WDT_CTRLOW to value 0"]
impl crate::Resettable for WDT_CTRLOW_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
