mcxa-pac 0.3.0

Peripheral Access Crate for MCXA256 devices
Documentation
#[doc = "Register `SM3DTCNT0` reader"]
pub type R = crate::R<Sm3dtcnt0Spec>;
#[doc = "Register `SM3DTCNT0` writer"]
pub type W = crate::W<Sm3dtcnt0Spec>;
#[doc = "Field `DTCNT0` reader - Deadtime Count Register 0"]
pub type Dtcnt0R = crate::FieldReader<u16>;
#[doc = "Field `DTCNT0` writer - Deadtime Count Register 0"]
pub type Dtcnt0W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16>;
impl R {
    #[doc = "Bits 0:10 - Deadtime Count Register 0"]
    #[inline(always)]
    pub fn dtcnt0(&self) -> Dtcnt0R {
        Dtcnt0R::new(self.bits & 0x07ff)
    }
}
#[cfg(feature = "debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("SM3DTCNT0").field("dtcnt0", &self.dtcnt0()).finish()
    }
}
impl W {
    #[doc = "Bits 0:10 - Deadtime Count Register 0"]
    #[inline(always)]
    pub fn dtcnt0(&mut self) -> Dtcnt0W<'_, Sm3dtcnt0Spec> {
        Dtcnt0W::new(self, 0)
    }
}
#[doc = "Deadtime Count Register 0\n\nYou can [`read`](crate::Reg::read) this register and get [`sm3dtcnt0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sm3dtcnt0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct Sm3dtcnt0Spec;
impl crate::RegisterSpec for Sm3dtcnt0Spec {
    type Ux = u16;
}
#[doc = "`read()` method returns [`sm3dtcnt0::R`](R) reader structure"]
impl crate::Readable for Sm3dtcnt0Spec {}
#[doc = "`write(|w| ..)` method takes [`sm3dtcnt0::W`](W) writer structure"]
impl crate::Writable for Sm3dtcnt0Spec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets SM3DTCNT0 to value 0x07ff"]
impl crate::Resettable for Sm3dtcnt0Spec {
    const RESET_VALUE: u16 = 0x07ff;
}