eos_s3/pmu/
audio_status.rs

1#[doc = "Register `AUDIO_STATUS` reader"]
2pub struct R(crate::R<AUDIO_STATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<AUDIO_STATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<AUDIO_STATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<AUDIO_STATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `AD0` reader - Bit is set if AD0 is on"]
17pub struct AD0_R(crate::FieldReader<bool, bool>);
18impl AD0_R {
19    #[inline(always)]
20    pub(crate) fn new(bits: bool) -> Self {
21        AD0_R(crate::FieldReader::new(bits))
22    }
23}
24impl core::ops::Deref for AD0_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 `AD1` reader - Bit is set if AD1 power domain is on"]
32pub struct AD1_R(crate::FieldReader<bool, bool>);
33impl AD1_R {
34    #[inline(always)]
35    pub(crate) fn new(bits: bool) -> Self {
36        AD1_R(crate::FieldReader::new(bits))
37    }
38}
39impl core::ops::Deref for AD1_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 `AD2` reader - Bit is set if AD2 power domain is on"]
47pub struct AD2_R(crate::FieldReader<bool, bool>);
48impl AD2_R {
49    #[inline(always)]
50    pub(crate) fn new(bits: bool) -> Self {
51        AD2_R(crate::FieldReader::new(bits))
52    }
53}
54impl core::ops::Deref for AD2_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 `AD3` reader - Bit is set if AD3 power domain is on"]
62pub struct AD3_R(crate::FieldReader<bool, bool>);
63impl AD3_R {
64    #[inline(always)]
65    pub(crate) fn new(bits: bool) -> Self {
66        AD3_R(crate::FieldReader::new(bits))
67    }
68}
69impl core::ops::Deref for AD3_R {
70    type Target = crate::FieldReader<bool, bool>;
71    #[inline(always)]
72    fn deref(&self) -> &Self::Target {
73        &self.0
74    }
75}
76#[doc = "Field `AD4` reader - Bit is set if AD4 power domain is on"]
77pub struct AD4_R(crate::FieldReader<bool, bool>);
78impl AD4_R {
79    #[inline(always)]
80    pub(crate) fn new(bits: bool) -> Self {
81        AD4_R(crate::FieldReader::new(bits))
82    }
83}
84impl core::ops::Deref for AD4_R {
85    type Target = crate::FieldReader<bool, bool>;
86    #[inline(always)]
87    fn deref(&self) -> &Self::Target {
88        &self.0
89    }
90}
91#[doc = "Field `AD5` reader - Bit is set if AD5 power domain is on"]
92pub struct AD5_R(crate::FieldReader<bool, bool>);
93impl AD5_R {
94    #[inline(always)]
95    pub(crate) fn new(bits: bool) -> Self {
96        AD5_R(crate::FieldReader::new(bits))
97    }
98}
99impl core::ops::Deref for AD5_R {
100    type Target = crate::FieldReader<bool, bool>;
101    #[inline(always)]
102    fn deref(&self) -> &Self::Target {
103        &self.0
104    }
105}
106impl R {
107    #[doc = "Bit 0 - Bit is set if AD0 is on"]
108    #[inline(always)]
109    pub fn ad0(&self) -> AD0_R {
110        AD0_R::new((self.bits & 0x01) != 0)
111    }
112    #[doc = "Bit 1 - Bit is set if AD1 power domain is on"]
113    #[inline(always)]
114    pub fn ad1(&self) -> AD1_R {
115        AD1_R::new(((self.bits >> 1) & 0x01) != 0)
116    }
117    #[doc = "Bit 2 - Bit is set if AD2 power domain is on"]
118    #[inline(always)]
119    pub fn ad2(&self) -> AD2_R {
120        AD2_R::new(((self.bits >> 2) & 0x01) != 0)
121    }
122    #[doc = "Bit 3 - Bit is set if AD3 power domain is on"]
123    #[inline(always)]
124    pub fn ad3(&self) -> AD3_R {
125        AD3_R::new(((self.bits >> 3) & 0x01) != 0)
126    }
127    #[doc = "Bit 4 - Bit is set if AD4 power domain is on"]
128    #[inline(always)]
129    pub fn ad4(&self) -> AD4_R {
130        AD4_R::new(((self.bits >> 4) & 0x01) != 0)
131    }
132    #[doc = "Bit 5 - Bit is set if AD5 power domain is on"]
133    #[inline(always)]
134    pub fn ad5(&self) -> AD5_R {
135        AD5_R::new(((self.bits >> 5) & 0x01) != 0)
136    }
137}
138#[doc = "Audio power domain status\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 [audio_status](index.html) module"]
139pub struct AUDIO_STATUS_SPEC;
140impl crate::RegisterSpec for AUDIO_STATUS_SPEC {
141    type Ux = u32;
142}
143#[doc = "`read()` method returns [audio_status::R](R) reader structure"]
144impl crate::Readable for AUDIO_STATUS_SPEC {
145    type Reader = R;
146}
147#[doc = "`reset()` method sets AUDIO_STATUS to value 0"]
148impl crate::Resettable for AUDIO_STATUS_SPEC {
149    #[inline(always)]
150    fn reset_value() -> Self::Ux {
151        0
152    }
153}