mcxa_pac/cdog0/
status.rs

1#[doc = "Register `STATUS` reader"]
2pub type R = crate::R<StatusSpec>;
3#[doc = "Field `NUMTOF` reader - Number of TIMEOUT faults (FLAGS\\[TIMEOUT_FLAG\\]) since the last POR"]
4pub type NumtofR = crate::FieldReader;
5#[doc = "Field `NUMMISCOMPF` reader - Number of MISCOMPARE faults (FLAGS\\[MISCOMPARE_FLAG\\]) since the last POR"]
6pub type NummiscompfR = crate::FieldReader;
7#[doc = "Field `NUMILSEQF` reader - Number of SEQUENCE faults (FLAGS\\[SEQUENCE_FLAG\\]) since the last POR"]
8pub type NumilseqfR = crate::FieldReader;
9#[doc = "Field `CURST` reader - Current State"]
10pub type CurstR = crate::FieldReader;
11impl R {
12    #[doc = "Bits 0:7 - Number of TIMEOUT faults (FLAGS\\[TIMEOUT_FLAG\\]) since the last POR"]
13    #[inline(always)]
14    pub fn numtof(&self) -> NumtofR {
15        NumtofR::new((self.bits & 0xff) as u8)
16    }
17    #[doc = "Bits 8:15 - Number of MISCOMPARE faults (FLAGS\\[MISCOMPARE_FLAG\\]) since the last POR"]
18    #[inline(always)]
19    pub fn nummiscompf(&self) -> NummiscompfR {
20        NummiscompfR::new(((self.bits >> 8) & 0xff) as u8)
21    }
22    #[doc = "Bits 16:23 - Number of SEQUENCE faults (FLAGS\\[SEQUENCE_FLAG\\]) since the last POR"]
23    #[inline(always)]
24    pub fn numilseqf(&self) -> NumilseqfR {
25        NumilseqfR::new(((self.bits >> 16) & 0xff) as u8)
26    }
27    #[doc = "Bits 28:31 - Current State"]
28    #[inline(always)]
29    pub fn curst(&self) -> CurstR {
30        CurstR::new(((self.bits >> 28) & 0x0f) as u8)
31    }
32}
33#[cfg(feature = "debug")]
34impl core::fmt::Debug for R {
35    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36        f.debug_struct("STATUS")
37            .field("numtof", &self.numtof())
38            .field("nummiscompf", &self.nummiscompf())
39            .field("numilseqf", &self.numilseqf())
40            .field("curst", &self.curst())
41            .finish()
42    }
43}
44#[doc = "Status 1 Register\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct StatusSpec;
46impl crate::RegisterSpec for StatusSpec {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [`status::R`](R) reader structure"]
50impl crate::Readable for StatusSpec {}
51#[doc = "`reset()` method sets STATUS to value 0x5000_0000"]
52impl crate::Resettable for StatusSpec {
53    const RESET_VALUE: u32 = 0x5000_0000;
54}