eos_s3/pmu/
a1_status.rs

1#[doc = "Register `A1_STATUS` reader"]
2pub struct R(crate::R<A1_STATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<A1_STATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<A1_STATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<A1_STATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `M4S0_Active` reader - A1 Power domain is active."]
17pub struct M4S0_ACTIVE_R(crate::FieldReader<bool, bool>);
18impl M4S0_ACTIVE_R {
19    #[inline(always)]
20    pub(crate) fn new(bits: bool) -> Self {
21        M4S0_ACTIVE_R(crate::FieldReader::new(bits))
22    }
23}
24impl core::ops::Deref for M4S0_ACTIVE_R {
25    type Target = crate::FieldReader<bool, bool>;
26    #[inline(always)]
27    fn deref(&self) -> &Self::Target {
28        &self.0
29    }
30}
31#[doc = "Field `M4S0_Deep_Sleep` reader - A1 Power domain is in retention mode"]
32pub struct M4S0_DEEP_SLEEP_R(crate::FieldReader<bool, bool>);
33impl M4S0_DEEP_SLEEP_R {
34    #[inline(always)]
35    pub(crate) fn new(bits: bool) -> Self {
36        M4S0_DEEP_SLEEP_R(crate::FieldReader::new(bits))
37    }
38}
39impl core::ops::Deref for M4S0_DEEP_SLEEP_R {
40    type Target = crate::FieldReader<bool, bool>;
41    #[inline(always)]
42    fn deref(&self) -> &Self::Target {
43        &self.0
44    }
45}
46#[doc = "Field `M4S0_Shut_Down` reader - A1 Power domain is in mode."]
47pub struct M4S0_SHUT_DOWN_R(crate::FieldReader<bool, bool>);
48impl M4S0_SHUT_DOWN_R {
49    #[inline(always)]
50    pub(crate) fn new(bits: bool) -> Self {
51        M4S0_SHUT_DOWN_R(crate::FieldReader::new(bits))
52    }
53}
54impl core::ops::Deref for M4S0_SHUT_DOWN_R {
55    type Target = crate::FieldReader<bool, bool>;
56    #[inline(always)]
57    fn deref(&self) -> &Self::Target {
58        &self.0
59    }
60}
61#[doc = "Field `M4S0_Clock_Gating` reader - Reserved"]
62pub struct M4S0_CLOCK_GATING_R(crate::FieldReader<bool, bool>);
63impl M4S0_CLOCK_GATING_R {
64    #[inline(always)]
65    pub(crate) fn new(bits: bool) -> Self {
66        M4S0_CLOCK_GATING_R(crate::FieldReader::new(bits))
67    }
68}
69impl core::ops::Deref for M4S0_CLOCK_GATING_R {
70    type Target = crate::FieldReader<bool, bool>;
71    #[inline(always)]
72    fn deref(&self) -> &Self::Target {
73        &self.0
74    }
75}
76impl R {
77    #[doc = "Bit 0 - A1 Power domain is active."]
78    #[inline(always)]
79    pub fn m4s0_active(&self) -> M4S0_ACTIVE_R {
80        M4S0_ACTIVE_R::new((self.bits & 0x01) != 0)
81    }
82    #[doc = "Bit 1 - A1 Power domain is in retention mode"]
83    #[inline(always)]
84    pub fn m4s0_deep_sleep(&self) -> M4S0_DEEP_SLEEP_R {
85        M4S0_DEEP_SLEEP_R::new(((self.bits >> 1) & 0x01) != 0)
86    }
87    #[doc = "Bit 2 - A1 Power domain is in mode."]
88    #[inline(always)]
89    pub fn m4s0_shut_down(&self) -> M4S0_SHUT_DOWN_R {
90        M4S0_SHUT_DOWN_R::new(((self.bits >> 2) & 0x01) != 0)
91    }
92    #[doc = "Bit 3 - Reserved"]
93    #[inline(always)]
94    pub fn m4s0_clock_gating(&self) -> M4S0_CLOCK_GATING_R {
95        M4S0_CLOCK_GATING_R::new(((self.bits >> 3) & 0x01) != 0)
96    }
97}
98#[doc = "Status of the A1 power domain\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 [a1_status](index.html) module"]
99pub struct A1_STATUS_SPEC;
100impl crate::RegisterSpec for A1_STATUS_SPEC {
101    type Ux = u32;
102}
103#[doc = "`read()` method returns [a1_status::R](R) reader structure"]
104impl crate::Readable for A1_STATUS_SPEC {
105    type Reader = R;
106}
107#[doc = "`reset()` method sets A1_STATUS to value 0"]
108impl crate::Resettable for A1_STATUS_SPEC {
109    #[inline(always)]
110    fn reset_value() -> Self::Ux {
111        0
112    }
113}