efm32gg11b310_pac/prs/
peek.rs

1#[doc = "Register `PEEK` reader"]
2pub struct R(crate::R<PEEK_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PEEK_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PEEK_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PEEK_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `CH0VAL` reader - Channel 0 Current Value"]
17pub type CH0VAL_R = crate::BitReader<bool>;
18#[doc = "Field `CH1VAL` reader - Channel 1 Current Value"]
19pub type CH1VAL_R = crate::BitReader<bool>;
20#[doc = "Field `CH2VAL` reader - Channel 2 Current Value"]
21pub type CH2VAL_R = crate::BitReader<bool>;
22#[doc = "Field `CH3VAL` reader - Channel 3 Current Value"]
23pub type CH3VAL_R = crate::BitReader<bool>;
24#[doc = "Field `CH4VAL` reader - Channel 4 Current Value"]
25pub type CH4VAL_R = crate::BitReader<bool>;
26#[doc = "Field `CH5VAL` reader - Channel 5 Current Value"]
27pub type CH5VAL_R = crate::BitReader<bool>;
28#[doc = "Field `CH6VAL` reader - Channel 6 Current Value"]
29pub type CH6VAL_R = crate::BitReader<bool>;
30#[doc = "Field `CH7VAL` reader - Channel 7 Current Value"]
31pub type CH7VAL_R = crate::BitReader<bool>;
32#[doc = "Field `CH8VAL` reader - Channel 8 Current Value"]
33pub type CH8VAL_R = crate::BitReader<bool>;
34#[doc = "Field `CH9VAL` reader - Channel 9 Current Value"]
35pub type CH9VAL_R = crate::BitReader<bool>;
36#[doc = "Field `CH10VAL` reader - Channel 10 Current Value"]
37pub type CH10VAL_R = crate::BitReader<bool>;
38#[doc = "Field `CH11VAL` reader - Channel 11 Current Value"]
39pub type CH11VAL_R = crate::BitReader<bool>;
40#[doc = "Field `CH12VAL` reader - Channel 12 Current Value"]
41pub type CH12VAL_R = crate::BitReader<bool>;
42#[doc = "Field `CH13VAL` reader - Channel 13 Current Value"]
43pub type CH13VAL_R = crate::BitReader<bool>;
44#[doc = "Field `CH14VAL` reader - Channel 14 Current Value"]
45pub type CH14VAL_R = crate::BitReader<bool>;
46#[doc = "Field `CH15VAL` reader - Channel 15 Current Value"]
47pub type CH15VAL_R = crate::BitReader<bool>;
48#[doc = "Field `CH16VAL` reader - Channel 16 Current Value"]
49pub type CH16VAL_R = crate::BitReader<bool>;
50#[doc = "Field `CH17VAL` reader - Channel 17 Current Value"]
51pub type CH17VAL_R = crate::BitReader<bool>;
52#[doc = "Field `CH18VAL` reader - Channel 18 Current Value"]
53pub type CH18VAL_R = crate::BitReader<bool>;
54#[doc = "Field `CH19VAL` reader - Channel 19 Current Value"]
55pub type CH19VAL_R = crate::BitReader<bool>;
56#[doc = "Field `CH20VAL` reader - Channel 20 Current Value"]
57pub type CH20VAL_R = crate::BitReader<bool>;
58#[doc = "Field `CH21VAL` reader - Channel 21 Current Value"]
59pub type CH21VAL_R = crate::BitReader<bool>;
60#[doc = "Field `CH22VAL` reader - Channel 22 Current Value"]
61pub type CH22VAL_R = crate::BitReader<bool>;
62#[doc = "Field `CH23VAL` reader - Channel 23 Current Value"]
63pub type CH23VAL_R = crate::BitReader<bool>;
64impl R {
65    #[doc = "Bit 0 - Channel 0 Current Value"]
66    #[inline(always)]
67    pub fn ch0val(&self) -> CH0VAL_R {
68        CH0VAL_R::new((self.bits & 1) != 0)
69    }
70    #[doc = "Bit 1 - Channel 1 Current Value"]
71    #[inline(always)]
72    pub fn ch1val(&self) -> CH1VAL_R {
73        CH1VAL_R::new(((self.bits >> 1) & 1) != 0)
74    }
75    #[doc = "Bit 2 - Channel 2 Current Value"]
76    #[inline(always)]
77    pub fn ch2val(&self) -> CH2VAL_R {
78        CH2VAL_R::new(((self.bits >> 2) & 1) != 0)
79    }
80    #[doc = "Bit 3 - Channel 3 Current Value"]
81    #[inline(always)]
82    pub fn ch3val(&self) -> CH3VAL_R {
83        CH3VAL_R::new(((self.bits >> 3) & 1) != 0)
84    }
85    #[doc = "Bit 4 - Channel 4 Current Value"]
86    #[inline(always)]
87    pub fn ch4val(&self) -> CH4VAL_R {
88        CH4VAL_R::new(((self.bits >> 4) & 1) != 0)
89    }
90    #[doc = "Bit 5 - Channel 5 Current Value"]
91    #[inline(always)]
92    pub fn ch5val(&self) -> CH5VAL_R {
93        CH5VAL_R::new(((self.bits >> 5) & 1) != 0)
94    }
95    #[doc = "Bit 6 - Channel 6 Current Value"]
96    #[inline(always)]
97    pub fn ch6val(&self) -> CH6VAL_R {
98        CH6VAL_R::new(((self.bits >> 6) & 1) != 0)
99    }
100    #[doc = "Bit 7 - Channel 7 Current Value"]
101    #[inline(always)]
102    pub fn ch7val(&self) -> CH7VAL_R {
103        CH7VAL_R::new(((self.bits >> 7) & 1) != 0)
104    }
105    #[doc = "Bit 8 - Channel 8 Current Value"]
106    #[inline(always)]
107    pub fn ch8val(&self) -> CH8VAL_R {
108        CH8VAL_R::new(((self.bits >> 8) & 1) != 0)
109    }
110    #[doc = "Bit 9 - Channel 9 Current Value"]
111    #[inline(always)]
112    pub fn ch9val(&self) -> CH9VAL_R {
113        CH9VAL_R::new(((self.bits >> 9) & 1) != 0)
114    }
115    #[doc = "Bit 10 - Channel 10 Current Value"]
116    #[inline(always)]
117    pub fn ch10val(&self) -> CH10VAL_R {
118        CH10VAL_R::new(((self.bits >> 10) & 1) != 0)
119    }
120    #[doc = "Bit 11 - Channel 11 Current Value"]
121    #[inline(always)]
122    pub fn ch11val(&self) -> CH11VAL_R {
123        CH11VAL_R::new(((self.bits >> 11) & 1) != 0)
124    }
125    #[doc = "Bit 12 - Channel 12 Current Value"]
126    #[inline(always)]
127    pub fn ch12val(&self) -> CH12VAL_R {
128        CH12VAL_R::new(((self.bits >> 12) & 1) != 0)
129    }
130    #[doc = "Bit 13 - Channel 13 Current Value"]
131    #[inline(always)]
132    pub fn ch13val(&self) -> CH13VAL_R {
133        CH13VAL_R::new(((self.bits >> 13) & 1) != 0)
134    }
135    #[doc = "Bit 14 - Channel 14 Current Value"]
136    #[inline(always)]
137    pub fn ch14val(&self) -> CH14VAL_R {
138        CH14VAL_R::new(((self.bits >> 14) & 1) != 0)
139    }
140    #[doc = "Bit 15 - Channel 15 Current Value"]
141    #[inline(always)]
142    pub fn ch15val(&self) -> CH15VAL_R {
143        CH15VAL_R::new(((self.bits >> 15) & 1) != 0)
144    }
145    #[doc = "Bit 16 - Channel 16 Current Value"]
146    #[inline(always)]
147    pub fn ch16val(&self) -> CH16VAL_R {
148        CH16VAL_R::new(((self.bits >> 16) & 1) != 0)
149    }
150    #[doc = "Bit 17 - Channel 17 Current Value"]
151    #[inline(always)]
152    pub fn ch17val(&self) -> CH17VAL_R {
153        CH17VAL_R::new(((self.bits >> 17) & 1) != 0)
154    }
155    #[doc = "Bit 18 - Channel 18 Current Value"]
156    #[inline(always)]
157    pub fn ch18val(&self) -> CH18VAL_R {
158        CH18VAL_R::new(((self.bits >> 18) & 1) != 0)
159    }
160    #[doc = "Bit 19 - Channel 19 Current Value"]
161    #[inline(always)]
162    pub fn ch19val(&self) -> CH19VAL_R {
163        CH19VAL_R::new(((self.bits >> 19) & 1) != 0)
164    }
165    #[doc = "Bit 20 - Channel 20 Current Value"]
166    #[inline(always)]
167    pub fn ch20val(&self) -> CH20VAL_R {
168        CH20VAL_R::new(((self.bits >> 20) & 1) != 0)
169    }
170    #[doc = "Bit 21 - Channel 21 Current Value"]
171    #[inline(always)]
172    pub fn ch21val(&self) -> CH21VAL_R {
173        CH21VAL_R::new(((self.bits >> 21) & 1) != 0)
174    }
175    #[doc = "Bit 22 - Channel 22 Current Value"]
176    #[inline(always)]
177    pub fn ch22val(&self) -> CH22VAL_R {
178        CH22VAL_R::new(((self.bits >> 22) & 1) != 0)
179    }
180    #[doc = "Bit 23 - Channel 23 Current Value"]
181    #[inline(always)]
182    pub fn ch23val(&self) -> CH23VAL_R {
183        CH23VAL_R::new(((self.bits >> 23) & 1) != 0)
184    }
185}
186#[doc = "PRS Channel Values\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 [peek](index.html) module"]
187pub struct PEEK_SPEC;
188impl crate::RegisterSpec for PEEK_SPEC {
189    type Ux = u32;
190}
191#[doc = "`read()` method returns [peek::R](R) reader structure"]
192impl crate::Readable for PEEK_SPEC {
193    type Reader = R;
194}
195#[doc = "`reset()` method sets PEEK to value 0"]
196impl crate::Resettable for PEEK_SPEC {
197    #[inline(always)]
198    fn reset_value() -> Self::Ux {
199        0
200    }
201}