mcxa_pac/flexpwm0/
sm2cnt.rs1#[doc = "Register `SM2CNT` reader"]
2pub type R = crate::R<Sm2cntSpec>;
3#[doc = "Field `CNT` reader - Counter Register Bits"]
4pub type CntR = crate::FieldReader<u16>;
5impl R {
6 #[doc = "Bits 0:15 - Counter Register Bits"]
7 #[inline(always)]
8 pub fn cnt(&self) -> CntR {
9 CntR::new(self.bits)
10 }
11}
12#[cfg(feature = "debug")]
13impl core::fmt::Debug for R {
14 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
15 f.debug_struct("SM2CNT").field("cnt", &self.cnt()).finish()
16 }
17}
18#[doc = "Counter Register\n\nYou can [`read`](crate::Reg::read) this register and get [`sm2cnt::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
19pub struct Sm2cntSpec;
20impl crate::RegisterSpec for Sm2cntSpec {
21 type Ux = u16;
22}
23#[doc = "`read()` method returns [`sm2cnt::R`](R) reader structure"]
24impl crate::Readable for Sm2cntSpec {}
25#[doc = "`reset()` method sets SM2CNT to value 0"]
26impl crate::Resettable for Sm2cntSpec {}