efm32pg1b200_pac/emu/
status.rs

1#[doc = "Register `STATUS` reader"]
2pub struct R(crate::R<STATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<STATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<STATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<STATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `VMONRDY` reader - VMON Ready"]
17pub type VMONRDY_R = crate::BitReader<bool>;
18#[doc = "Field `VMONAVDD` reader - VMON AVDD Channel"]
19pub type VMONAVDD_R = crate::BitReader<bool>;
20#[doc = "Field `VMONALTAVDD` reader - Alternate VMON AVDD Channel"]
21pub type VMONALTAVDD_R = crate::BitReader<bool>;
22#[doc = "Field `VMONDVDD` reader - VMON DVDD Channel"]
23pub type VMONDVDD_R = crate::BitReader<bool>;
24#[doc = "Field `VMONIO0` reader - VMON IOVDD0 Channel"]
25pub type VMONIO0_R = crate::BitReader<bool>;
26#[doc = "Field `VMONFVDD` reader - VMON VDDFLASH Channel"]
27pub type VMONFVDD_R = crate::BitReader<bool>;
28#[doc = "Field `EM4IORET` reader - IO Retention Status"]
29pub type EM4IORET_R = crate::BitReader<bool>;
30impl R {
31    #[doc = "Bit 0 - VMON Ready"]
32    #[inline(always)]
33    pub fn vmonrdy(&self) -> VMONRDY_R {
34        VMONRDY_R::new((self.bits & 1) != 0)
35    }
36    #[doc = "Bit 1 - VMON AVDD Channel"]
37    #[inline(always)]
38    pub fn vmonavdd(&self) -> VMONAVDD_R {
39        VMONAVDD_R::new(((self.bits >> 1) & 1) != 0)
40    }
41    #[doc = "Bit 2 - Alternate VMON AVDD Channel"]
42    #[inline(always)]
43    pub fn vmonaltavdd(&self) -> VMONALTAVDD_R {
44        VMONALTAVDD_R::new(((self.bits >> 2) & 1) != 0)
45    }
46    #[doc = "Bit 3 - VMON DVDD Channel"]
47    #[inline(always)]
48    pub fn vmondvdd(&self) -> VMONDVDD_R {
49        VMONDVDD_R::new(((self.bits >> 3) & 1) != 0)
50    }
51    #[doc = "Bit 4 - VMON IOVDD0 Channel"]
52    #[inline(always)]
53    pub fn vmonio0(&self) -> VMONIO0_R {
54        VMONIO0_R::new(((self.bits >> 4) & 1) != 0)
55    }
56    #[doc = "Bit 8 - VMON VDDFLASH Channel"]
57    #[inline(always)]
58    pub fn vmonfvdd(&self) -> VMONFVDD_R {
59        VMONFVDD_R::new(((self.bits >> 8) & 1) != 0)
60    }
61    #[doc = "Bit 20 - IO Retention Status"]
62    #[inline(always)]
63    pub fn em4ioret(&self) -> EM4IORET_R {
64        EM4IORET_R::new(((self.bits >> 20) & 1) != 0)
65    }
66}
67#[doc = "Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [status](index.html) module"]
68pub struct STATUS_SPEC;
69impl crate::RegisterSpec for STATUS_SPEC {
70    type Ux = u32;
71}
72#[doc = "`read()` method returns [status::R](R) reader structure"]
73impl crate::Readable for STATUS_SPEC {
74    type Reader = R;
75}
76#[doc = "`reset()` method sets STATUS to value 0"]
77impl crate::Resettable for STATUS_SPEC {
78    #[inline(always)]
79    fn reset_value() -> Self::Ux {
80        0
81    }
82}