#[doc = "Register `CNT` reader"]
pub type R = crate::R<CntSpec>;
#[doc = "Register `CNT` writer"]
pub type W = crate::W<CntSpec>;
#[doc = "Field `CNT` reader - current counter value"]
pub type CntR = crate::FieldReader<u16>;
#[doc = "Field `CNT` writer - current counter value"]
pub type CntW<'a, REG> = crate::FieldWriterSafe<'a, REG, 16, u16>;
impl R {
#[doc = "Bits 0:15 - current counter value"]
#[inline(always)]
pub fn cnt(&self) -> CntR {
CntR::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:15 - current counter value"]
#[inline(always)]
#[must_use]
pub fn cnt(&mut self) -> CntW<CntSpec> {
CntW::new(self, 0)
}
}
#[doc = "Counter register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cnt::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cnt::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CntSpec;
impl crate::RegisterSpec for CntSpec {
type Ux = u16;
}
#[doc = "`read()` method returns [`cnt::R`](R) reader structure"]
impl crate::Readable for CntSpec {}
#[doc = "`write(|w| ..)` method takes [`cnt::W`](W) writer structure"]
impl crate::Writable for CntSpec {
type Safety = crate::Safe;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
}
#[doc = "`reset()` method sets CNT to value 0"]
impl crate::Resettable for CntSpec {
const RESET_VALUE: u16 = 0;
}