Skip to main content

mcxa_pac/cdog0/
status2.rs

1#[doc = "Register `STATUS2` reader"]
2pub type R = crate::R<Status2Spec>;
3#[doc = "Field `NUMCNTF` reader - Number of CONTROL faults (FLAGS\\[CONTROL_FLAG\\]) since the last POR"]
4pub type NumcntfR = crate::FieldReader;
5#[doc = "Field `NUMILLSTF` reader - Number of STATE faults (FLAGS\\[STATE_FLAG\\]) since the last POR"]
6pub type NumillstfR = crate::FieldReader;
7#[doc = "Field `NUMILLA` reader - Number of ADDRESS faults (FLAGS\\[ADDR_FLAG\\]) since the last POR"]
8pub type NumillaR = crate::FieldReader;
9impl R {
10    #[doc = "Bits 0:7 - Number of CONTROL faults (FLAGS\\[CONTROL_FLAG\\]) since the last POR"]
11    #[inline(always)]
12    pub fn numcntf(&self) -> NumcntfR {
13        NumcntfR::new((self.bits & 0xff) as u8)
14    }
15    #[doc = "Bits 8:15 - Number of STATE faults (FLAGS\\[STATE_FLAG\\]) since the last POR"]
16    #[inline(always)]
17    pub fn numillstf(&self) -> NumillstfR {
18        NumillstfR::new(((self.bits >> 8) & 0xff) as u8)
19    }
20    #[doc = "Bits 16:23 - Number of ADDRESS faults (FLAGS\\[ADDR_FLAG\\]) since the last POR"]
21    #[inline(always)]
22    pub fn numilla(&self) -> NumillaR {
23        NumillaR::new(((self.bits >> 16) & 0xff) as u8)
24    }
25}
26#[cfg(feature = "debug")]
27impl core::fmt::Debug for R {
28    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
29        f.debug_struct("STATUS2")
30            .field("numcntf", &self.numcntf())
31            .field("numillstf", &self.numillstf())
32            .field("numilla", &self.numilla())
33            .finish()
34    }
35}
36#[doc = "Status 2 Register\n\nYou can [`read`](crate::Reg::read) this register and get [`status2::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
37pub struct Status2Spec;
38impl crate::RegisterSpec for Status2Spec {
39    type Ux = u32;
40}
41#[doc = "`read()` method returns [`status2::R`](R) reader structure"]
42impl crate::Readable for Status2Spec {}
43#[doc = "`reset()` method sets STATUS2 to value 0"]
44impl crate::Resettable for Status2Spec {}