xmc4100/scu_general/
mirrallstat.rs

1#[doc = "Register `MIRRALLSTAT` reader"]
2pub type R = crate::R<MIRRALLSTAT_SPEC>;
3#[doc = "Mirror All Execution Status\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum BUSY_A {
6    #[doc = "0: No update is pening"]
7    VALUE1 = 0,
8    #[doc = "1: Update is pending"]
9    VALUE2 = 1,
10}
11impl From<BUSY_A> for bool {
12    #[inline(always)]
13    fn from(variant: BUSY_A) -> Self {
14        variant as u8 != 0
15    }
16}
17#[doc = "Field `BUSY` reader - Mirror All Execution Status"]
18pub type BUSY_R = crate::BitReader<BUSY_A>;
19impl BUSY_R {
20    #[doc = "Get enumerated values variant"]
21    #[inline(always)]
22    pub const fn variant(&self) -> BUSY_A {
23        match self.bits {
24            false => BUSY_A::VALUE1,
25            true => BUSY_A::VALUE2,
26        }
27    }
28    #[doc = "No update is pening"]
29    #[inline(always)]
30    pub fn is_value1(&self) -> bool {
31        *self == BUSY_A::VALUE1
32    }
33    #[doc = "Update is pending"]
34    #[inline(always)]
35    pub fn is_value2(&self) -> bool {
36        *self == BUSY_A::VALUE2
37    }
38}
39impl R {
40    #[doc = "Bit 0 - Mirror All Execution Status"]
41    #[inline(always)]
42    pub fn busy(&self) -> BUSY_R {
43        BUSY_R::new((self.bits & 1) != 0)
44    }
45}
46#[doc = "Mirror All Status\n\nYou can [`read`](crate::Reg::read) this register and get [`mirrallstat::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct MIRRALLSTAT_SPEC;
48impl crate::RegisterSpec for MIRRALLSTAT_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [`mirrallstat::R`](R) reader structure"]
52impl crate::Readable for MIRRALLSTAT_SPEC {}
53#[doc = "`reset()` method sets MIRRALLSTAT to value 0"]
54impl crate::Resettable for MIRRALLSTAT_SPEC {
55    const RESET_VALUE: u32 = 0;
56}