efm32tg11b540_pac/prs/
peek.rs1#[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>;
32impl R {
33 #[doc = "Bit 0 - Channel 0 Current Value"]
34 #[inline(always)]
35 pub fn ch0val(&self) -> CH0VAL_R {
36 CH0VAL_R::new((self.bits & 1) != 0)
37 }
38 #[doc = "Bit 1 - Channel 1 Current Value"]
39 #[inline(always)]
40 pub fn ch1val(&self) -> CH1VAL_R {
41 CH1VAL_R::new(((self.bits >> 1) & 1) != 0)
42 }
43 #[doc = "Bit 2 - Channel 2 Current Value"]
44 #[inline(always)]
45 pub fn ch2val(&self) -> CH2VAL_R {
46 CH2VAL_R::new(((self.bits >> 2) & 1) != 0)
47 }
48 #[doc = "Bit 3 - Channel 3 Current Value"]
49 #[inline(always)]
50 pub fn ch3val(&self) -> CH3VAL_R {
51 CH3VAL_R::new(((self.bits >> 3) & 1) != 0)
52 }
53 #[doc = "Bit 4 - Channel 4 Current Value"]
54 #[inline(always)]
55 pub fn ch4val(&self) -> CH4VAL_R {
56 CH4VAL_R::new(((self.bits >> 4) & 1) != 0)
57 }
58 #[doc = "Bit 5 - Channel 5 Current Value"]
59 #[inline(always)]
60 pub fn ch5val(&self) -> CH5VAL_R {
61 CH5VAL_R::new(((self.bits >> 5) & 1) != 0)
62 }
63 #[doc = "Bit 6 - Channel 6 Current Value"]
64 #[inline(always)]
65 pub fn ch6val(&self) -> CH6VAL_R {
66 CH6VAL_R::new(((self.bits >> 6) & 1) != 0)
67 }
68 #[doc = "Bit 7 - Channel 7 Current Value"]
69 #[inline(always)]
70 pub fn ch7val(&self) -> CH7VAL_R {
71 CH7VAL_R::new(((self.bits >> 7) & 1) != 0)
72 }
73}
74#[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"]
75pub struct PEEK_SPEC;
76impl crate::RegisterSpec for PEEK_SPEC {
77 type Ux = u32;
78}
79#[doc = "`read()` method returns [peek::R](R) reader structure"]
80impl crate::Readable for PEEK_SPEC {
81 type Reader = R;
82}
83#[doc = "`reset()` method sets PEEK to value 0"]
84impl crate::Resettable for PEEK_SPEC {
85 #[inline(always)]
86 fn reset_value() -> Self::Ux {
87 0
88 }
89}