efm32gg12b830_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>;
48impl R {
49    #[doc = "Bit 0 - Channel 0 Current Value"]
50    #[inline(always)]
51    pub fn ch0val(&self) -> CH0VAL_R {
52        CH0VAL_R::new((self.bits & 1) != 0)
53    }
54    #[doc = "Bit 1 - Channel 1 Current Value"]
55    #[inline(always)]
56    pub fn ch1val(&self) -> CH1VAL_R {
57        CH1VAL_R::new(((self.bits >> 1) & 1) != 0)
58    }
59    #[doc = "Bit 2 - Channel 2 Current Value"]
60    #[inline(always)]
61    pub fn ch2val(&self) -> CH2VAL_R {
62        CH2VAL_R::new(((self.bits >> 2) & 1) != 0)
63    }
64    #[doc = "Bit 3 - Channel 3 Current Value"]
65    #[inline(always)]
66    pub fn ch3val(&self) -> CH3VAL_R {
67        CH3VAL_R::new(((self.bits >> 3) & 1) != 0)
68    }
69    #[doc = "Bit 4 - Channel 4 Current Value"]
70    #[inline(always)]
71    pub fn ch4val(&self) -> CH4VAL_R {
72        CH4VAL_R::new(((self.bits >> 4) & 1) != 0)
73    }
74    #[doc = "Bit 5 - Channel 5 Current Value"]
75    #[inline(always)]
76    pub fn ch5val(&self) -> CH5VAL_R {
77        CH5VAL_R::new(((self.bits >> 5) & 1) != 0)
78    }
79    #[doc = "Bit 6 - Channel 6 Current Value"]
80    #[inline(always)]
81    pub fn ch6val(&self) -> CH6VAL_R {
82        CH6VAL_R::new(((self.bits >> 6) & 1) != 0)
83    }
84    #[doc = "Bit 7 - Channel 7 Current Value"]
85    #[inline(always)]
86    pub fn ch7val(&self) -> CH7VAL_R {
87        CH7VAL_R::new(((self.bits >> 7) & 1) != 0)
88    }
89    #[doc = "Bit 8 - Channel 8 Current Value"]
90    #[inline(always)]
91    pub fn ch8val(&self) -> CH8VAL_R {
92        CH8VAL_R::new(((self.bits >> 8) & 1) != 0)
93    }
94    #[doc = "Bit 9 - Channel 9 Current Value"]
95    #[inline(always)]
96    pub fn ch9val(&self) -> CH9VAL_R {
97        CH9VAL_R::new(((self.bits >> 9) & 1) != 0)
98    }
99    #[doc = "Bit 10 - Channel 10 Current Value"]
100    #[inline(always)]
101    pub fn ch10val(&self) -> CH10VAL_R {
102        CH10VAL_R::new(((self.bits >> 10) & 1) != 0)
103    }
104    #[doc = "Bit 11 - Channel 11 Current Value"]
105    #[inline(always)]
106    pub fn ch11val(&self) -> CH11VAL_R {
107        CH11VAL_R::new(((self.bits >> 11) & 1) != 0)
108    }
109    #[doc = "Bit 12 - Channel 12 Current Value"]
110    #[inline(always)]
111    pub fn ch12val(&self) -> CH12VAL_R {
112        CH12VAL_R::new(((self.bits >> 12) & 1) != 0)
113    }
114    #[doc = "Bit 13 - Channel 13 Current Value"]
115    #[inline(always)]
116    pub fn ch13val(&self) -> CH13VAL_R {
117        CH13VAL_R::new(((self.bits >> 13) & 1) != 0)
118    }
119    #[doc = "Bit 14 - Channel 14 Current Value"]
120    #[inline(always)]
121    pub fn ch14val(&self) -> CH14VAL_R {
122        CH14VAL_R::new(((self.bits >> 14) & 1) != 0)
123    }
124    #[doc = "Bit 15 - Channel 15 Current Value"]
125    #[inline(always)]
126    pub fn ch15val(&self) -> CH15VAL_R {
127        CH15VAL_R::new(((self.bits >> 15) & 1) != 0)
128    }
129}
130#[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"]
131pub struct PEEK_SPEC;
132impl crate::RegisterSpec for PEEK_SPEC {
133    type Ux = u32;
134}
135#[doc = "`read()` method returns [peek::R](R) reader structure"]
136impl crate::Readable for PEEK_SPEC {
137    type Reader = R;
138}
139#[doc = "`reset()` method sets PEEK to value 0"]
140impl crate::Resettable for PEEK_SPEC {
141    #[inline(always)]
142    fn reset_value() -> Self::Ux {
143        0
144    }
145}