efm32lg230_pac/lesense/
route.rs

1#[doc = "Register `ROUTE` reader"]
2pub struct R(crate::R<ROUTE_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<ROUTE_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<ROUTE_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<ROUTE_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `ROUTE` writer"]
17pub struct W(crate::W<ROUTE_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<ROUTE_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<ROUTE_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<ROUTE_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `CH0PEN` reader - CH0 Pin Enable"]
38pub type CH0PEN_R = crate::BitReader<bool>;
39#[doc = "Field `CH0PEN` writer - CH0 Pin Enable"]
40pub type CH0PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 0>;
41#[doc = "Field `CH1PEN` reader - CH0 Pin Enable"]
42pub type CH1PEN_R = crate::BitReader<bool>;
43#[doc = "Field `CH1PEN` writer - CH0 Pin Enable"]
44pub type CH1PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 1>;
45#[doc = "Field `CH2PEN` reader - CH2 Pin Enable"]
46pub type CH2PEN_R = crate::BitReader<bool>;
47#[doc = "Field `CH2PEN` writer - CH2 Pin Enable"]
48pub type CH2PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 2>;
49#[doc = "Field `CH3PEN` reader - CH3 Pin Enable"]
50pub type CH3PEN_R = crate::BitReader<bool>;
51#[doc = "Field `CH3PEN` writer - CH3 Pin Enable"]
52pub type CH3PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 3>;
53#[doc = "Field `CH4PEN` reader - CH4 Pin Enable"]
54pub type CH4PEN_R = crate::BitReader<bool>;
55#[doc = "Field `CH4PEN` writer - CH4 Pin Enable"]
56pub type CH4PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 4>;
57#[doc = "Field `CH5PEN` reader - CH5 Pin Enable"]
58pub type CH5PEN_R = crate::BitReader<bool>;
59#[doc = "Field `CH5PEN` writer - CH5 Pin Enable"]
60pub type CH5PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 5>;
61#[doc = "Field `CH6PEN` reader - CH6 Pin Enable"]
62pub type CH6PEN_R = crate::BitReader<bool>;
63#[doc = "Field `CH6PEN` writer - CH6 Pin Enable"]
64pub type CH6PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 6>;
65#[doc = "Field `CH7PEN` reader - CH7 Pin Enable"]
66pub type CH7PEN_R = crate::BitReader<bool>;
67#[doc = "Field `CH7PEN` writer - CH7 Pin Enable"]
68pub type CH7PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 7>;
69#[doc = "Field `CH8PEN` reader - CH8 Pin Enable"]
70pub type CH8PEN_R = crate::BitReader<bool>;
71#[doc = "Field `CH8PEN` writer - CH8 Pin Enable"]
72pub type CH8PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 8>;
73#[doc = "Field `CH9PEN` reader - CH9 Pin Enable"]
74pub type CH9PEN_R = crate::BitReader<bool>;
75#[doc = "Field `CH9PEN` writer - CH9 Pin Enable"]
76pub type CH9PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 9>;
77#[doc = "Field `CH10PEN` reader - CH10 Pin Enable"]
78pub type CH10PEN_R = crate::BitReader<bool>;
79#[doc = "Field `CH10PEN` writer - CH10 Pin Enable"]
80pub type CH10PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 10>;
81#[doc = "Field `CH11PEN` reader - CH11 Pin Enable"]
82pub type CH11PEN_R = crate::BitReader<bool>;
83#[doc = "Field `CH11PEN` writer - CH11 Pin Enable"]
84pub type CH11PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 11>;
85#[doc = "Field `CH12PEN` reader - CH12 Pin Enable"]
86pub type CH12PEN_R = crate::BitReader<bool>;
87#[doc = "Field `CH12PEN` writer - CH12 Pin Enable"]
88pub type CH12PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 12>;
89#[doc = "Field `CH13PEN` reader - CH13 Pin Enable"]
90pub type CH13PEN_R = crate::BitReader<bool>;
91#[doc = "Field `CH13PEN` writer - CH13 Pin Enable"]
92pub type CH13PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 13>;
93#[doc = "Field `CH14PEN` reader - CH14 Pin Enable"]
94pub type CH14PEN_R = crate::BitReader<bool>;
95#[doc = "Field `CH14PEN` writer - CH14 Pin Enable"]
96pub type CH14PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 14>;
97#[doc = "Field `CH15PEN` reader - CH15 Pin Enable"]
98pub type CH15PEN_R = crate::BitReader<bool>;
99#[doc = "Field `CH15PEN` writer - CH15 Pin Enable"]
100pub type CH15PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 15>;
101#[doc = "Field `ALTEX0PEN` reader - ALTEX0 Pin Enable"]
102pub type ALTEX0PEN_R = crate::BitReader<bool>;
103#[doc = "Field `ALTEX0PEN` writer - ALTEX0 Pin Enable"]
104pub type ALTEX0PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 16>;
105#[doc = "Field `ALTEX1PEN` reader - ALTEX1 Pin Enable"]
106pub type ALTEX1PEN_R = crate::BitReader<bool>;
107#[doc = "Field `ALTEX1PEN` writer - ALTEX1 Pin Enable"]
108pub type ALTEX1PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 17>;
109#[doc = "Field `ALTEX2PEN` reader - ALTEX2 Pin Enable"]
110pub type ALTEX2PEN_R = crate::BitReader<bool>;
111#[doc = "Field `ALTEX2PEN` writer - ALTEX2 Pin Enable"]
112pub type ALTEX2PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 18>;
113#[doc = "Field `ALTEX3PEN` reader - ALTEX3 Pin Enable"]
114pub type ALTEX3PEN_R = crate::BitReader<bool>;
115#[doc = "Field `ALTEX3PEN` writer - ALTEX3 Pin Enable"]
116pub type ALTEX3PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 19>;
117#[doc = "Field `ALTEX4PEN` reader - ALTEX4 Pin Enable"]
118pub type ALTEX4PEN_R = crate::BitReader<bool>;
119#[doc = "Field `ALTEX4PEN` writer - ALTEX4 Pin Enable"]
120pub type ALTEX4PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 20>;
121#[doc = "Field `ALTEX5PEN` reader - ALTEX5 Pin Enable"]
122pub type ALTEX5PEN_R = crate::BitReader<bool>;
123#[doc = "Field `ALTEX5PEN` writer - ALTEX5 Pin Enable"]
124pub type ALTEX5PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 21>;
125#[doc = "Field `ALTEX6PEN` reader - ALTEX6 Pin Enable"]
126pub type ALTEX6PEN_R = crate::BitReader<bool>;
127#[doc = "Field `ALTEX6PEN` writer - ALTEX6 Pin Enable"]
128pub type ALTEX6PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 22>;
129#[doc = "Field `ALTEX7PEN` reader - ALTEX7 Pin Enable"]
130pub type ALTEX7PEN_R = crate::BitReader<bool>;
131#[doc = "Field `ALTEX7PEN` writer - ALTEX7 Pin Enable"]
132pub type ALTEX7PEN_W<'a> = crate::BitWriter<'a, u32, ROUTE_SPEC, bool, 23>;
133impl R {
134    #[doc = "Bit 0 - CH0 Pin Enable"]
135    #[inline(always)]
136    pub fn ch0pen(&self) -> CH0PEN_R {
137        CH0PEN_R::new((self.bits & 1) != 0)
138    }
139    #[doc = "Bit 1 - CH0 Pin Enable"]
140    #[inline(always)]
141    pub fn ch1pen(&self) -> CH1PEN_R {
142        CH1PEN_R::new(((self.bits >> 1) & 1) != 0)
143    }
144    #[doc = "Bit 2 - CH2 Pin Enable"]
145    #[inline(always)]
146    pub fn ch2pen(&self) -> CH2PEN_R {
147        CH2PEN_R::new(((self.bits >> 2) & 1) != 0)
148    }
149    #[doc = "Bit 3 - CH3 Pin Enable"]
150    #[inline(always)]
151    pub fn ch3pen(&self) -> CH3PEN_R {
152        CH3PEN_R::new(((self.bits >> 3) & 1) != 0)
153    }
154    #[doc = "Bit 4 - CH4 Pin Enable"]
155    #[inline(always)]
156    pub fn ch4pen(&self) -> CH4PEN_R {
157        CH4PEN_R::new(((self.bits >> 4) & 1) != 0)
158    }
159    #[doc = "Bit 5 - CH5 Pin Enable"]
160    #[inline(always)]
161    pub fn ch5pen(&self) -> CH5PEN_R {
162        CH5PEN_R::new(((self.bits >> 5) & 1) != 0)
163    }
164    #[doc = "Bit 6 - CH6 Pin Enable"]
165    #[inline(always)]
166    pub fn ch6pen(&self) -> CH6PEN_R {
167        CH6PEN_R::new(((self.bits >> 6) & 1) != 0)
168    }
169    #[doc = "Bit 7 - CH7 Pin Enable"]
170    #[inline(always)]
171    pub fn ch7pen(&self) -> CH7PEN_R {
172        CH7PEN_R::new(((self.bits >> 7) & 1) != 0)
173    }
174    #[doc = "Bit 8 - CH8 Pin Enable"]
175    #[inline(always)]
176    pub fn ch8pen(&self) -> CH8PEN_R {
177        CH8PEN_R::new(((self.bits >> 8) & 1) != 0)
178    }
179    #[doc = "Bit 9 - CH9 Pin Enable"]
180    #[inline(always)]
181    pub fn ch9pen(&self) -> CH9PEN_R {
182        CH9PEN_R::new(((self.bits >> 9) & 1) != 0)
183    }
184    #[doc = "Bit 10 - CH10 Pin Enable"]
185    #[inline(always)]
186    pub fn ch10pen(&self) -> CH10PEN_R {
187        CH10PEN_R::new(((self.bits >> 10) & 1) != 0)
188    }
189    #[doc = "Bit 11 - CH11 Pin Enable"]
190    #[inline(always)]
191    pub fn ch11pen(&self) -> CH11PEN_R {
192        CH11PEN_R::new(((self.bits >> 11) & 1) != 0)
193    }
194    #[doc = "Bit 12 - CH12 Pin Enable"]
195    #[inline(always)]
196    pub fn ch12pen(&self) -> CH12PEN_R {
197        CH12PEN_R::new(((self.bits >> 12) & 1) != 0)
198    }
199    #[doc = "Bit 13 - CH13 Pin Enable"]
200    #[inline(always)]
201    pub fn ch13pen(&self) -> CH13PEN_R {
202        CH13PEN_R::new(((self.bits >> 13) & 1) != 0)
203    }
204    #[doc = "Bit 14 - CH14 Pin Enable"]
205    #[inline(always)]
206    pub fn ch14pen(&self) -> CH14PEN_R {
207        CH14PEN_R::new(((self.bits >> 14) & 1) != 0)
208    }
209    #[doc = "Bit 15 - CH15 Pin Enable"]
210    #[inline(always)]
211    pub fn ch15pen(&self) -> CH15PEN_R {
212        CH15PEN_R::new(((self.bits >> 15) & 1) != 0)
213    }
214    #[doc = "Bit 16 - ALTEX0 Pin Enable"]
215    #[inline(always)]
216    pub fn altex0pen(&self) -> ALTEX0PEN_R {
217        ALTEX0PEN_R::new(((self.bits >> 16) & 1) != 0)
218    }
219    #[doc = "Bit 17 - ALTEX1 Pin Enable"]
220    #[inline(always)]
221    pub fn altex1pen(&self) -> ALTEX1PEN_R {
222        ALTEX1PEN_R::new(((self.bits >> 17) & 1) != 0)
223    }
224    #[doc = "Bit 18 - ALTEX2 Pin Enable"]
225    #[inline(always)]
226    pub fn altex2pen(&self) -> ALTEX2PEN_R {
227        ALTEX2PEN_R::new(((self.bits >> 18) & 1) != 0)
228    }
229    #[doc = "Bit 19 - ALTEX3 Pin Enable"]
230    #[inline(always)]
231    pub fn altex3pen(&self) -> ALTEX3PEN_R {
232        ALTEX3PEN_R::new(((self.bits >> 19) & 1) != 0)
233    }
234    #[doc = "Bit 20 - ALTEX4 Pin Enable"]
235    #[inline(always)]
236    pub fn altex4pen(&self) -> ALTEX4PEN_R {
237        ALTEX4PEN_R::new(((self.bits >> 20) & 1) != 0)
238    }
239    #[doc = "Bit 21 - ALTEX5 Pin Enable"]
240    #[inline(always)]
241    pub fn altex5pen(&self) -> ALTEX5PEN_R {
242        ALTEX5PEN_R::new(((self.bits >> 21) & 1) != 0)
243    }
244    #[doc = "Bit 22 - ALTEX6 Pin Enable"]
245    #[inline(always)]
246    pub fn altex6pen(&self) -> ALTEX6PEN_R {
247        ALTEX6PEN_R::new(((self.bits >> 22) & 1) != 0)
248    }
249    #[doc = "Bit 23 - ALTEX7 Pin Enable"]
250    #[inline(always)]
251    pub fn altex7pen(&self) -> ALTEX7PEN_R {
252        ALTEX7PEN_R::new(((self.bits >> 23) & 1) != 0)
253    }
254}
255impl W {
256    #[doc = "Bit 0 - CH0 Pin Enable"]
257    #[inline(always)]
258    pub fn ch0pen(&mut self) -> CH0PEN_W {
259        CH0PEN_W::new(self)
260    }
261    #[doc = "Bit 1 - CH0 Pin Enable"]
262    #[inline(always)]
263    pub fn ch1pen(&mut self) -> CH1PEN_W {
264        CH1PEN_W::new(self)
265    }
266    #[doc = "Bit 2 - CH2 Pin Enable"]
267    #[inline(always)]
268    pub fn ch2pen(&mut self) -> CH2PEN_W {
269        CH2PEN_W::new(self)
270    }
271    #[doc = "Bit 3 - CH3 Pin Enable"]
272    #[inline(always)]
273    pub fn ch3pen(&mut self) -> CH3PEN_W {
274        CH3PEN_W::new(self)
275    }
276    #[doc = "Bit 4 - CH4 Pin Enable"]
277    #[inline(always)]
278    pub fn ch4pen(&mut self) -> CH4PEN_W {
279        CH4PEN_W::new(self)
280    }
281    #[doc = "Bit 5 - CH5 Pin Enable"]
282    #[inline(always)]
283    pub fn ch5pen(&mut self) -> CH5PEN_W {
284        CH5PEN_W::new(self)
285    }
286    #[doc = "Bit 6 - CH6 Pin Enable"]
287    #[inline(always)]
288    pub fn ch6pen(&mut self) -> CH6PEN_W {
289        CH6PEN_W::new(self)
290    }
291    #[doc = "Bit 7 - CH7 Pin Enable"]
292    #[inline(always)]
293    pub fn ch7pen(&mut self) -> CH7PEN_W {
294        CH7PEN_W::new(self)
295    }
296    #[doc = "Bit 8 - CH8 Pin Enable"]
297    #[inline(always)]
298    pub fn ch8pen(&mut self) -> CH8PEN_W {
299        CH8PEN_W::new(self)
300    }
301    #[doc = "Bit 9 - CH9 Pin Enable"]
302    #[inline(always)]
303    pub fn ch9pen(&mut self) -> CH9PEN_W {
304        CH9PEN_W::new(self)
305    }
306    #[doc = "Bit 10 - CH10 Pin Enable"]
307    #[inline(always)]
308    pub fn ch10pen(&mut self) -> CH10PEN_W {
309        CH10PEN_W::new(self)
310    }
311    #[doc = "Bit 11 - CH11 Pin Enable"]
312    #[inline(always)]
313    pub fn ch11pen(&mut self) -> CH11PEN_W {
314        CH11PEN_W::new(self)
315    }
316    #[doc = "Bit 12 - CH12 Pin Enable"]
317    #[inline(always)]
318    pub fn ch12pen(&mut self) -> CH12PEN_W {
319        CH12PEN_W::new(self)
320    }
321    #[doc = "Bit 13 - CH13 Pin Enable"]
322    #[inline(always)]
323    pub fn ch13pen(&mut self) -> CH13PEN_W {
324        CH13PEN_W::new(self)
325    }
326    #[doc = "Bit 14 - CH14 Pin Enable"]
327    #[inline(always)]
328    pub fn ch14pen(&mut self) -> CH14PEN_W {
329        CH14PEN_W::new(self)
330    }
331    #[doc = "Bit 15 - CH15 Pin Enable"]
332    #[inline(always)]
333    pub fn ch15pen(&mut self) -> CH15PEN_W {
334        CH15PEN_W::new(self)
335    }
336    #[doc = "Bit 16 - ALTEX0 Pin Enable"]
337    #[inline(always)]
338    pub fn altex0pen(&mut self) -> ALTEX0PEN_W {
339        ALTEX0PEN_W::new(self)
340    }
341    #[doc = "Bit 17 - ALTEX1 Pin Enable"]
342    #[inline(always)]
343    pub fn altex1pen(&mut self) -> ALTEX1PEN_W {
344        ALTEX1PEN_W::new(self)
345    }
346    #[doc = "Bit 18 - ALTEX2 Pin Enable"]
347    #[inline(always)]
348    pub fn altex2pen(&mut self) -> ALTEX2PEN_W {
349        ALTEX2PEN_W::new(self)
350    }
351    #[doc = "Bit 19 - ALTEX3 Pin Enable"]
352    #[inline(always)]
353    pub fn altex3pen(&mut self) -> ALTEX3PEN_W {
354        ALTEX3PEN_W::new(self)
355    }
356    #[doc = "Bit 20 - ALTEX4 Pin Enable"]
357    #[inline(always)]
358    pub fn altex4pen(&mut self) -> ALTEX4PEN_W {
359        ALTEX4PEN_W::new(self)
360    }
361    #[doc = "Bit 21 - ALTEX5 Pin Enable"]
362    #[inline(always)]
363    pub fn altex5pen(&mut self) -> ALTEX5PEN_W {
364        ALTEX5PEN_W::new(self)
365    }
366    #[doc = "Bit 22 - ALTEX6 Pin Enable"]
367    #[inline(always)]
368    pub fn altex6pen(&mut self) -> ALTEX6PEN_W {
369        ALTEX6PEN_W::new(self)
370    }
371    #[doc = "Bit 23 - ALTEX7 Pin Enable"]
372    #[inline(always)]
373    pub fn altex7pen(&mut self) -> ALTEX7PEN_W {
374        ALTEX7PEN_W::new(self)
375    }
376    #[doc = "Writes raw bits to the register."]
377    #[inline(always)]
378    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
379        self.0.bits(bits);
380        self
381    }
382}
383#[doc = "I/O Routing Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [route](index.html) module"]
384pub struct ROUTE_SPEC;
385impl crate::RegisterSpec for ROUTE_SPEC {
386    type Ux = u32;
387}
388#[doc = "`read()` method returns [route::R](R) reader structure"]
389impl crate::Readable for ROUTE_SPEC {
390    type Reader = R;
391}
392#[doc = "`write(|w| ..)` method takes [route::W](W) writer structure"]
393impl crate::Writable for ROUTE_SPEC {
394    type Writer = W;
395}
396#[doc = "`reset()` method sets ROUTE to value 0"]
397impl crate::Resettable for ROUTE_SPEC {
398    #[inline(always)]
399    fn reset_value() -> Self::Ux {
400        0
401    }
402}