efm32wg330_pac/lesense/
syncbusy.rs

1#[doc = "Register `SYNCBUSY` reader"]
2pub struct R(crate::R<SYNCBUSY_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SYNCBUSY_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SYNCBUSY_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SYNCBUSY_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `CTRL` reader - LESENSE_CTRL Register Busy"]
17pub type CTRL_R = crate::BitReader<bool>;
18#[doc = "Field `TIMCTRL` reader - LESENSE_TIMCTRL Register Busy"]
19pub type TIMCTRL_R = crate::BitReader<bool>;
20#[doc = "Field `PERCTRL` reader - LESENSE_PERCTRL Register Busy"]
21pub type PERCTRL_R = crate::BitReader<bool>;
22#[doc = "Field `DECCTRL` reader - LESENSE_DECCTRL Register Busy"]
23pub type DECCTRL_R = crate::BitReader<bool>;
24#[doc = "Field `BIASCTRL` reader - LESENSE_BIASCTRL Register Busy"]
25pub type BIASCTRL_R = crate::BitReader<bool>;
26#[doc = "Field `CMD` reader - LESENSE_CMD Register Busy"]
27pub type CMD_R = crate::BitReader<bool>;
28#[doc = "Field `CHEN` reader - LESENSE_CHEN Register Busy"]
29pub type CHEN_R = crate::BitReader<bool>;
30#[doc = "Field `SCANRES` reader - LESENSE_SCANRES Register Busy"]
31pub type SCANRES_R = crate::BitReader<bool>;
32#[doc = "Field `STATUS` reader - LESENSE_STATUS Register Busy"]
33pub type STATUS_R = crate::BitReader<bool>;
34#[doc = "Field `PTR` reader - LESENSE_PTR Register Busy"]
35pub type PTR_R = crate::BitReader<bool>;
36#[doc = "Field `BUFDATA` reader - LESENSE_BUFDATA Register Busy"]
37pub type BUFDATA_R = crate::BitReader<bool>;
38#[doc = "Field `CURCH` reader - LESENSE_CURCH Register Busy"]
39pub type CURCH_R = crate::BitReader<bool>;
40#[doc = "Field `DECSTATE` reader - LESENSE_DECSTATE Register Busy"]
41pub type DECSTATE_R = crate::BitReader<bool>;
42#[doc = "Field `SENSORSTATE` reader - LESENSE_SENSORSTATE Register Busy"]
43pub type SENSORSTATE_R = crate::BitReader<bool>;
44#[doc = "Field `IDLECONF` reader - LESENSE_IDLECONF Register Busy"]
45pub type IDLECONF_R = crate::BitReader<bool>;
46#[doc = "Field `ALTEXCONF` reader - LESENSE_ALTEXCONF Register Busy"]
47pub type ALTEXCONF_R = crate::BitReader<bool>;
48#[doc = "Field `ROUTE` reader - LESENSE_ROUTE Register Busy"]
49pub type ROUTE_R = crate::BitReader<bool>;
50#[doc = "Field `POWERDOWN` reader - LESENSE_POWERDOWN Register Busy"]
51pub type POWERDOWN_R = crate::BitReader<bool>;
52#[doc = "Field `TCONFA` reader - LESENSE_STx_TCONFA Register Busy"]
53pub type TCONFA_R = crate::BitReader<bool>;
54#[doc = "Field `TCONFB` reader - LESENSE_STx_TCONFB Register Busy"]
55pub type TCONFB_R = crate::BitReader<bool>;
56#[doc = "Field `DATA` reader - LESENSE_BUFx_DATA Register Busy"]
57pub type DATA_R = crate::BitReader<bool>;
58#[doc = "Field `TIMING` reader - LESENSE_CHx_TIMING Register Busy"]
59pub type TIMING_R = crate::BitReader<bool>;
60#[doc = "Field `INTERACT` reader - LESENSE_CHx_INTERACT Register Busy"]
61pub type INTERACT_R = crate::BitReader<bool>;
62#[doc = "Field `EVAL` reader - LESENSE_CHx_EVAL Register Busy"]
63pub type EVAL_R = crate::BitReader<bool>;
64impl R {
65    #[doc = "Bit 0 - LESENSE_CTRL Register Busy"]
66    #[inline(always)]
67    pub fn ctrl(&self) -> CTRL_R {
68        CTRL_R::new((self.bits & 1) != 0)
69    }
70    #[doc = "Bit 1 - LESENSE_TIMCTRL Register Busy"]
71    #[inline(always)]
72    pub fn timctrl(&self) -> TIMCTRL_R {
73        TIMCTRL_R::new(((self.bits >> 1) & 1) != 0)
74    }
75    #[doc = "Bit 2 - LESENSE_PERCTRL Register Busy"]
76    #[inline(always)]
77    pub fn perctrl(&self) -> PERCTRL_R {
78        PERCTRL_R::new(((self.bits >> 2) & 1) != 0)
79    }
80    #[doc = "Bit 3 - LESENSE_DECCTRL Register Busy"]
81    #[inline(always)]
82    pub fn decctrl(&self) -> DECCTRL_R {
83        DECCTRL_R::new(((self.bits >> 3) & 1) != 0)
84    }
85    #[doc = "Bit 4 - LESENSE_BIASCTRL Register Busy"]
86    #[inline(always)]
87    pub fn biasctrl(&self) -> BIASCTRL_R {
88        BIASCTRL_R::new(((self.bits >> 4) & 1) != 0)
89    }
90    #[doc = "Bit 5 - LESENSE_CMD Register Busy"]
91    #[inline(always)]
92    pub fn cmd(&self) -> CMD_R {
93        CMD_R::new(((self.bits >> 5) & 1) != 0)
94    }
95    #[doc = "Bit 6 - LESENSE_CHEN Register Busy"]
96    #[inline(always)]
97    pub fn chen(&self) -> CHEN_R {
98        CHEN_R::new(((self.bits >> 6) & 1) != 0)
99    }
100    #[doc = "Bit 7 - LESENSE_SCANRES Register Busy"]
101    #[inline(always)]
102    pub fn scanres(&self) -> SCANRES_R {
103        SCANRES_R::new(((self.bits >> 7) & 1) != 0)
104    }
105    #[doc = "Bit 8 - LESENSE_STATUS Register Busy"]
106    #[inline(always)]
107    pub fn status(&self) -> STATUS_R {
108        STATUS_R::new(((self.bits >> 8) & 1) != 0)
109    }
110    #[doc = "Bit 9 - LESENSE_PTR Register Busy"]
111    #[inline(always)]
112    pub fn ptr(&self) -> PTR_R {
113        PTR_R::new(((self.bits >> 9) & 1) != 0)
114    }
115    #[doc = "Bit 10 - LESENSE_BUFDATA Register Busy"]
116    #[inline(always)]
117    pub fn bufdata(&self) -> BUFDATA_R {
118        BUFDATA_R::new(((self.bits >> 10) & 1) != 0)
119    }
120    #[doc = "Bit 11 - LESENSE_CURCH Register Busy"]
121    #[inline(always)]
122    pub fn curch(&self) -> CURCH_R {
123        CURCH_R::new(((self.bits >> 11) & 1) != 0)
124    }
125    #[doc = "Bit 12 - LESENSE_DECSTATE Register Busy"]
126    #[inline(always)]
127    pub fn decstate(&self) -> DECSTATE_R {
128        DECSTATE_R::new(((self.bits >> 12) & 1) != 0)
129    }
130    #[doc = "Bit 13 - LESENSE_SENSORSTATE Register Busy"]
131    #[inline(always)]
132    pub fn sensorstate(&self) -> SENSORSTATE_R {
133        SENSORSTATE_R::new(((self.bits >> 13) & 1) != 0)
134    }
135    #[doc = "Bit 14 - LESENSE_IDLECONF Register Busy"]
136    #[inline(always)]
137    pub fn idleconf(&self) -> IDLECONF_R {
138        IDLECONF_R::new(((self.bits >> 14) & 1) != 0)
139    }
140    #[doc = "Bit 15 - LESENSE_ALTEXCONF Register Busy"]
141    #[inline(always)]
142    pub fn altexconf(&self) -> ALTEXCONF_R {
143        ALTEXCONF_R::new(((self.bits >> 15) & 1) != 0)
144    }
145    #[doc = "Bit 16 - LESENSE_ROUTE Register Busy"]
146    #[inline(always)]
147    pub fn route(&self) -> ROUTE_R {
148        ROUTE_R::new(((self.bits >> 16) & 1) != 0)
149    }
150    #[doc = "Bit 17 - LESENSE_POWERDOWN Register Busy"]
151    #[inline(always)]
152    pub fn powerdown(&self) -> POWERDOWN_R {
153        POWERDOWN_R::new(((self.bits >> 17) & 1) != 0)
154    }
155    #[doc = "Bit 21 - LESENSE_STx_TCONFA Register Busy"]
156    #[inline(always)]
157    pub fn tconfa(&self) -> TCONFA_R {
158        TCONFA_R::new(((self.bits >> 21) & 1) != 0)
159    }
160    #[doc = "Bit 22 - LESENSE_STx_TCONFB Register Busy"]
161    #[inline(always)]
162    pub fn tconfb(&self) -> TCONFB_R {
163        TCONFB_R::new(((self.bits >> 22) & 1) != 0)
164    }
165    #[doc = "Bit 23 - LESENSE_BUFx_DATA Register Busy"]
166    #[inline(always)]
167    pub fn data(&self) -> DATA_R {
168        DATA_R::new(((self.bits >> 23) & 1) != 0)
169    }
170    #[doc = "Bit 24 - LESENSE_CHx_TIMING Register Busy"]
171    #[inline(always)]
172    pub fn timing(&self) -> TIMING_R {
173        TIMING_R::new(((self.bits >> 24) & 1) != 0)
174    }
175    #[doc = "Bit 25 - LESENSE_CHx_INTERACT Register Busy"]
176    #[inline(always)]
177    pub fn interact(&self) -> INTERACT_R {
178        INTERACT_R::new(((self.bits >> 25) & 1) != 0)
179    }
180    #[doc = "Bit 26 - LESENSE_CHx_EVAL Register Busy"]
181    #[inline(always)]
182    pub fn eval(&self) -> EVAL_R {
183        EVAL_R::new(((self.bits >> 26) & 1) != 0)
184    }
185}
186#[doc = "Synchronization Busy Register\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 [syncbusy](index.html) module"]
187pub struct SYNCBUSY_SPEC;
188impl crate::RegisterSpec for SYNCBUSY_SPEC {
189    type Ux = u32;
190}
191#[doc = "`read()` method returns [syncbusy::R](R) reader structure"]
192impl crate::Readable for SYNCBUSY_SPEC {
193    type Reader = R;
194}
195#[doc = "`reset()` method sets SYNCBUSY to value 0"]
196impl crate::Resettable for SYNCBUSY_SPEC {
197    #[inline(always)]
198    fn reset_value() -> Self::Ux {
199        0
200    }
201}