efm32gg_pac/efm32gg230/cmu/
lfapresc0.rs

1#[doc = "Register `LFAPRESC0` reader"]
2pub struct R(crate::R<LFAPRESC0_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<LFAPRESC0_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<LFAPRESC0_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<LFAPRESC0_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `LFAPRESC0` writer"]
17pub struct W(crate::W<LFAPRESC0_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<LFAPRESC0_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<LFAPRESC0_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<LFAPRESC0_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `LESENSE` reader - Low Energy Sensor Interface Prescaler"]
38pub type LESENSE_R = crate::FieldReader<u8, LESENSE_A>;
39#[doc = "Low Energy Sensor Interface Prescaler\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum LESENSE_A {
43    #[doc = "0: LFACLKLESENSE = LFACLK"]
44    DIV1 = 0,
45    #[doc = "1: LFACLKLESENSE = LFACLK/2"]
46    DIV2 = 1,
47    #[doc = "2: LFACLKLESENSE = LFACLK/4"]
48    DIV4 = 2,
49    #[doc = "3: LFACLKLESENSE = LFACLK/8"]
50    DIV8 = 3,
51}
52impl From<LESENSE_A> for u8 {
53    #[inline(always)]
54    fn from(variant: LESENSE_A) -> Self {
55        variant as _
56    }
57}
58impl LESENSE_R {
59    #[doc = "Get enumerated values variant"]
60    #[inline(always)]
61    pub fn variant(&self) -> LESENSE_A {
62        match self.bits {
63            0 => LESENSE_A::DIV1,
64            1 => LESENSE_A::DIV2,
65            2 => LESENSE_A::DIV4,
66            3 => LESENSE_A::DIV8,
67            _ => unreachable!(),
68        }
69    }
70    #[doc = "Checks if the value of the field is `DIV1`"]
71    #[inline(always)]
72    pub fn is_div1(&self) -> bool {
73        *self == LESENSE_A::DIV1
74    }
75    #[doc = "Checks if the value of the field is `DIV2`"]
76    #[inline(always)]
77    pub fn is_div2(&self) -> bool {
78        *self == LESENSE_A::DIV2
79    }
80    #[doc = "Checks if the value of the field is `DIV4`"]
81    #[inline(always)]
82    pub fn is_div4(&self) -> bool {
83        *self == LESENSE_A::DIV4
84    }
85    #[doc = "Checks if the value of the field is `DIV8`"]
86    #[inline(always)]
87    pub fn is_div8(&self) -> bool {
88        *self == LESENSE_A::DIV8
89    }
90}
91#[doc = "Field `LESENSE` writer - Low Energy Sensor Interface Prescaler"]
92pub type LESENSE_W<'a, const O: u8> =
93    crate::FieldWriterSafe<'a, u32, LFAPRESC0_SPEC, u8, LESENSE_A, 2, O>;
94impl<'a, const O: u8> LESENSE_W<'a, O> {
95    #[doc = "LFACLKLESENSE = LFACLK"]
96    #[inline(always)]
97    pub fn div1(self) -> &'a mut W {
98        self.variant(LESENSE_A::DIV1)
99    }
100    #[doc = "LFACLKLESENSE = LFACLK/2"]
101    #[inline(always)]
102    pub fn div2(self) -> &'a mut W {
103        self.variant(LESENSE_A::DIV2)
104    }
105    #[doc = "LFACLKLESENSE = LFACLK/4"]
106    #[inline(always)]
107    pub fn div4(self) -> &'a mut W {
108        self.variant(LESENSE_A::DIV4)
109    }
110    #[doc = "LFACLKLESENSE = LFACLK/8"]
111    #[inline(always)]
112    pub fn div8(self) -> &'a mut W {
113        self.variant(LESENSE_A::DIV8)
114    }
115}
116#[doc = "Field `RTC` reader - Real-Time Counter Prescaler"]
117pub type RTC_R = crate::FieldReader<u8, RTC_A>;
118#[doc = "Real-Time Counter Prescaler\n\nValue on reset: 0"]
119#[derive(Clone, Copy, Debug, PartialEq, Eq)]
120#[repr(u8)]
121pub enum RTC_A {
122    #[doc = "0: LFACLKRTC = LFACLK"]
123    DIV1 = 0,
124    #[doc = "1: LFACLKRTC = LFACLK/2"]
125    DIV2 = 1,
126    #[doc = "2: LFACLKRTC = LFACLK/4"]
127    DIV4 = 2,
128    #[doc = "3: LFACLKRTC = LFACLK/8"]
129    DIV8 = 3,
130    #[doc = "4: LFACLKRTC = LFACLK/16"]
131    DIV16 = 4,
132    #[doc = "5: LFACLKRTC = LFACLK/32"]
133    DIV32 = 5,
134    #[doc = "6: LFACLKRTC = LFACLK/64"]
135    DIV64 = 6,
136    #[doc = "7: LFACLKRTC = LFACLK/128"]
137    DIV128 = 7,
138    #[doc = "8: LFACLKRTC = LFACLK/256"]
139    DIV256 = 8,
140    #[doc = "9: LFACLKRTC = LFACLK/512"]
141    DIV512 = 9,
142    #[doc = "10: LFACLKRTC = LFACLK/1024"]
143    DIV1024 = 10,
144    #[doc = "11: LFACLKRTC = LFACLK/2048"]
145    DIV2048 = 11,
146    #[doc = "12: LFACLKRTC = LFACLK/4096"]
147    DIV4096 = 12,
148    #[doc = "13: LFACLKRTC = LFACLK/8192"]
149    DIV8192 = 13,
150    #[doc = "14: LFACLKRTC = LFACLK/16384"]
151    DIV16384 = 14,
152    #[doc = "15: LFACLKRTC = LFACLK/32768"]
153    DIV32768 = 15,
154}
155impl From<RTC_A> for u8 {
156    #[inline(always)]
157    fn from(variant: RTC_A) -> Self {
158        variant as _
159    }
160}
161impl RTC_R {
162    #[doc = "Get enumerated values variant"]
163    #[inline(always)]
164    pub fn variant(&self) -> RTC_A {
165        match self.bits {
166            0 => RTC_A::DIV1,
167            1 => RTC_A::DIV2,
168            2 => RTC_A::DIV4,
169            3 => RTC_A::DIV8,
170            4 => RTC_A::DIV16,
171            5 => RTC_A::DIV32,
172            6 => RTC_A::DIV64,
173            7 => RTC_A::DIV128,
174            8 => RTC_A::DIV256,
175            9 => RTC_A::DIV512,
176            10 => RTC_A::DIV1024,
177            11 => RTC_A::DIV2048,
178            12 => RTC_A::DIV4096,
179            13 => RTC_A::DIV8192,
180            14 => RTC_A::DIV16384,
181            15 => RTC_A::DIV32768,
182            _ => unreachable!(),
183        }
184    }
185    #[doc = "Checks if the value of the field is `DIV1`"]
186    #[inline(always)]
187    pub fn is_div1(&self) -> bool {
188        *self == RTC_A::DIV1
189    }
190    #[doc = "Checks if the value of the field is `DIV2`"]
191    #[inline(always)]
192    pub fn is_div2(&self) -> bool {
193        *self == RTC_A::DIV2
194    }
195    #[doc = "Checks if the value of the field is `DIV4`"]
196    #[inline(always)]
197    pub fn is_div4(&self) -> bool {
198        *self == RTC_A::DIV4
199    }
200    #[doc = "Checks if the value of the field is `DIV8`"]
201    #[inline(always)]
202    pub fn is_div8(&self) -> bool {
203        *self == RTC_A::DIV8
204    }
205    #[doc = "Checks if the value of the field is `DIV16`"]
206    #[inline(always)]
207    pub fn is_div16(&self) -> bool {
208        *self == RTC_A::DIV16
209    }
210    #[doc = "Checks if the value of the field is `DIV32`"]
211    #[inline(always)]
212    pub fn is_div32(&self) -> bool {
213        *self == RTC_A::DIV32
214    }
215    #[doc = "Checks if the value of the field is `DIV64`"]
216    #[inline(always)]
217    pub fn is_div64(&self) -> bool {
218        *self == RTC_A::DIV64
219    }
220    #[doc = "Checks if the value of the field is `DIV128`"]
221    #[inline(always)]
222    pub fn is_div128(&self) -> bool {
223        *self == RTC_A::DIV128
224    }
225    #[doc = "Checks if the value of the field is `DIV256`"]
226    #[inline(always)]
227    pub fn is_div256(&self) -> bool {
228        *self == RTC_A::DIV256
229    }
230    #[doc = "Checks if the value of the field is `DIV512`"]
231    #[inline(always)]
232    pub fn is_div512(&self) -> bool {
233        *self == RTC_A::DIV512
234    }
235    #[doc = "Checks if the value of the field is `DIV1024`"]
236    #[inline(always)]
237    pub fn is_div1024(&self) -> bool {
238        *self == RTC_A::DIV1024
239    }
240    #[doc = "Checks if the value of the field is `DIV2048`"]
241    #[inline(always)]
242    pub fn is_div2048(&self) -> bool {
243        *self == RTC_A::DIV2048
244    }
245    #[doc = "Checks if the value of the field is `DIV4096`"]
246    #[inline(always)]
247    pub fn is_div4096(&self) -> bool {
248        *self == RTC_A::DIV4096
249    }
250    #[doc = "Checks if the value of the field is `DIV8192`"]
251    #[inline(always)]
252    pub fn is_div8192(&self) -> bool {
253        *self == RTC_A::DIV8192
254    }
255    #[doc = "Checks if the value of the field is `DIV16384`"]
256    #[inline(always)]
257    pub fn is_div16384(&self) -> bool {
258        *self == RTC_A::DIV16384
259    }
260    #[doc = "Checks if the value of the field is `DIV32768`"]
261    #[inline(always)]
262    pub fn is_div32768(&self) -> bool {
263        *self == RTC_A::DIV32768
264    }
265}
266#[doc = "Field `RTC` writer - Real-Time Counter Prescaler"]
267pub type RTC_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, LFAPRESC0_SPEC, u8, RTC_A, 4, O>;
268impl<'a, const O: u8> RTC_W<'a, O> {
269    #[doc = "LFACLKRTC = LFACLK"]
270    #[inline(always)]
271    pub fn div1(self) -> &'a mut W {
272        self.variant(RTC_A::DIV1)
273    }
274    #[doc = "LFACLKRTC = LFACLK/2"]
275    #[inline(always)]
276    pub fn div2(self) -> &'a mut W {
277        self.variant(RTC_A::DIV2)
278    }
279    #[doc = "LFACLKRTC = LFACLK/4"]
280    #[inline(always)]
281    pub fn div4(self) -> &'a mut W {
282        self.variant(RTC_A::DIV4)
283    }
284    #[doc = "LFACLKRTC = LFACLK/8"]
285    #[inline(always)]
286    pub fn div8(self) -> &'a mut W {
287        self.variant(RTC_A::DIV8)
288    }
289    #[doc = "LFACLKRTC = LFACLK/16"]
290    #[inline(always)]
291    pub fn div16(self) -> &'a mut W {
292        self.variant(RTC_A::DIV16)
293    }
294    #[doc = "LFACLKRTC = LFACLK/32"]
295    #[inline(always)]
296    pub fn div32(self) -> &'a mut W {
297        self.variant(RTC_A::DIV32)
298    }
299    #[doc = "LFACLKRTC = LFACLK/64"]
300    #[inline(always)]
301    pub fn div64(self) -> &'a mut W {
302        self.variant(RTC_A::DIV64)
303    }
304    #[doc = "LFACLKRTC = LFACLK/128"]
305    #[inline(always)]
306    pub fn div128(self) -> &'a mut W {
307        self.variant(RTC_A::DIV128)
308    }
309    #[doc = "LFACLKRTC = LFACLK/256"]
310    #[inline(always)]
311    pub fn div256(self) -> &'a mut W {
312        self.variant(RTC_A::DIV256)
313    }
314    #[doc = "LFACLKRTC = LFACLK/512"]
315    #[inline(always)]
316    pub fn div512(self) -> &'a mut W {
317        self.variant(RTC_A::DIV512)
318    }
319    #[doc = "LFACLKRTC = LFACLK/1024"]
320    #[inline(always)]
321    pub fn div1024(self) -> &'a mut W {
322        self.variant(RTC_A::DIV1024)
323    }
324    #[doc = "LFACLKRTC = LFACLK/2048"]
325    #[inline(always)]
326    pub fn div2048(self) -> &'a mut W {
327        self.variant(RTC_A::DIV2048)
328    }
329    #[doc = "LFACLKRTC = LFACLK/4096"]
330    #[inline(always)]
331    pub fn div4096(self) -> &'a mut W {
332        self.variant(RTC_A::DIV4096)
333    }
334    #[doc = "LFACLKRTC = LFACLK/8192"]
335    #[inline(always)]
336    pub fn div8192(self) -> &'a mut W {
337        self.variant(RTC_A::DIV8192)
338    }
339    #[doc = "LFACLKRTC = LFACLK/16384"]
340    #[inline(always)]
341    pub fn div16384(self) -> &'a mut W {
342        self.variant(RTC_A::DIV16384)
343    }
344    #[doc = "LFACLKRTC = LFACLK/32768"]
345    #[inline(always)]
346    pub fn div32768(self) -> &'a mut W {
347        self.variant(RTC_A::DIV32768)
348    }
349}
350#[doc = "Field `LETIMER0` reader - Low Energy Timer 0 Prescaler"]
351pub type LETIMER0_R = crate::FieldReader<u8, LETIMER0_A>;
352#[doc = "Low Energy Timer 0 Prescaler\n\nValue on reset: 0"]
353#[derive(Clone, Copy, Debug, PartialEq, Eq)]
354#[repr(u8)]
355pub enum LETIMER0_A {
356    #[doc = "0: LFACLKLETIMER0 = LFACLK"]
357    DIV1 = 0,
358    #[doc = "1: LFACLKLETIMER0 = LFACLK/2"]
359    DIV2 = 1,
360    #[doc = "2: LFACLKLETIMER0 = LFACLK/4"]
361    DIV4 = 2,
362    #[doc = "3: LFACLKLETIMER0 = LFACLK/8"]
363    DIV8 = 3,
364    #[doc = "4: LFACLKLETIMER0 = LFACLK/16"]
365    DIV16 = 4,
366    #[doc = "5: LFACLKLETIMER0 = LFACLK/32"]
367    DIV32 = 5,
368    #[doc = "6: LFACLKLETIMER0 = LFACLK/64"]
369    DIV64 = 6,
370    #[doc = "7: LFACLKLETIMER0 = LFACLK/128"]
371    DIV128 = 7,
372    #[doc = "8: LFACLKLETIMER0 = LFACLK/256"]
373    DIV256 = 8,
374    #[doc = "9: LFACLKLETIMER0 = LFACLK/512"]
375    DIV512 = 9,
376    #[doc = "10: LFACLKLETIMER0 = LFACLK/1024"]
377    DIV1024 = 10,
378    #[doc = "11: LFACLKLETIMER0 = LFACLK/2048"]
379    DIV2048 = 11,
380    #[doc = "12: LFACLKLETIMER0 = LFACLK/4096"]
381    DIV4096 = 12,
382    #[doc = "13: LFACLKLETIMER0 = LFACLK/8192"]
383    DIV8192 = 13,
384    #[doc = "14: LFACLKLETIMER0 = LFACLK/16384"]
385    DIV16384 = 14,
386    #[doc = "15: LFACLKLETIMER0 = LFACLK/32768"]
387    DIV32768 = 15,
388}
389impl From<LETIMER0_A> for u8 {
390    #[inline(always)]
391    fn from(variant: LETIMER0_A) -> Self {
392        variant as _
393    }
394}
395impl LETIMER0_R {
396    #[doc = "Get enumerated values variant"]
397    #[inline(always)]
398    pub fn variant(&self) -> LETIMER0_A {
399        match self.bits {
400            0 => LETIMER0_A::DIV1,
401            1 => LETIMER0_A::DIV2,
402            2 => LETIMER0_A::DIV4,
403            3 => LETIMER0_A::DIV8,
404            4 => LETIMER0_A::DIV16,
405            5 => LETIMER0_A::DIV32,
406            6 => LETIMER0_A::DIV64,
407            7 => LETIMER0_A::DIV128,
408            8 => LETIMER0_A::DIV256,
409            9 => LETIMER0_A::DIV512,
410            10 => LETIMER0_A::DIV1024,
411            11 => LETIMER0_A::DIV2048,
412            12 => LETIMER0_A::DIV4096,
413            13 => LETIMER0_A::DIV8192,
414            14 => LETIMER0_A::DIV16384,
415            15 => LETIMER0_A::DIV32768,
416            _ => unreachable!(),
417        }
418    }
419    #[doc = "Checks if the value of the field is `DIV1`"]
420    #[inline(always)]
421    pub fn is_div1(&self) -> bool {
422        *self == LETIMER0_A::DIV1
423    }
424    #[doc = "Checks if the value of the field is `DIV2`"]
425    #[inline(always)]
426    pub fn is_div2(&self) -> bool {
427        *self == LETIMER0_A::DIV2
428    }
429    #[doc = "Checks if the value of the field is `DIV4`"]
430    #[inline(always)]
431    pub fn is_div4(&self) -> bool {
432        *self == LETIMER0_A::DIV4
433    }
434    #[doc = "Checks if the value of the field is `DIV8`"]
435    #[inline(always)]
436    pub fn is_div8(&self) -> bool {
437        *self == LETIMER0_A::DIV8
438    }
439    #[doc = "Checks if the value of the field is `DIV16`"]
440    #[inline(always)]
441    pub fn is_div16(&self) -> bool {
442        *self == LETIMER0_A::DIV16
443    }
444    #[doc = "Checks if the value of the field is `DIV32`"]
445    #[inline(always)]
446    pub fn is_div32(&self) -> bool {
447        *self == LETIMER0_A::DIV32
448    }
449    #[doc = "Checks if the value of the field is `DIV64`"]
450    #[inline(always)]
451    pub fn is_div64(&self) -> bool {
452        *self == LETIMER0_A::DIV64
453    }
454    #[doc = "Checks if the value of the field is `DIV128`"]
455    #[inline(always)]
456    pub fn is_div128(&self) -> bool {
457        *self == LETIMER0_A::DIV128
458    }
459    #[doc = "Checks if the value of the field is `DIV256`"]
460    #[inline(always)]
461    pub fn is_div256(&self) -> bool {
462        *self == LETIMER0_A::DIV256
463    }
464    #[doc = "Checks if the value of the field is `DIV512`"]
465    #[inline(always)]
466    pub fn is_div512(&self) -> bool {
467        *self == LETIMER0_A::DIV512
468    }
469    #[doc = "Checks if the value of the field is `DIV1024`"]
470    #[inline(always)]
471    pub fn is_div1024(&self) -> bool {
472        *self == LETIMER0_A::DIV1024
473    }
474    #[doc = "Checks if the value of the field is `DIV2048`"]
475    #[inline(always)]
476    pub fn is_div2048(&self) -> bool {
477        *self == LETIMER0_A::DIV2048
478    }
479    #[doc = "Checks if the value of the field is `DIV4096`"]
480    #[inline(always)]
481    pub fn is_div4096(&self) -> bool {
482        *self == LETIMER0_A::DIV4096
483    }
484    #[doc = "Checks if the value of the field is `DIV8192`"]
485    #[inline(always)]
486    pub fn is_div8192(&self) -> bool {
487        *self == LETIMER0_A::DIV8192
488    }
489    #[doc = "Checks if the value of the field is `DIV16384`"]
490    #[inline(always)]
491    pub fn is_div16384(&self) -> bool {
492        *self == LETIMER0_A::DIV16384
493    }
494    #[doc = "Checks if the value of the field is `DIV32768`"]
495    #[inline(always)]
496    pub fn is_div32768(&self) -> bool {
497        *self == LETIMER0_A::DIV32768
498    }
499}
500#[doc = "Field `LETIMER0` writer - Low Energy Timer 0 Prescaler"]
501pub type LETIMER0_W<'a, const O: u8> =
502    crate::FieldWriterSafe<'a, u32, LFAPRESC0_SPEC, u8, LETIMER0_A, 4, O>;
503impl<'a, const O: u8> LETIMER0_W<'a, O> {
504    #[doc = "LFACLKLETIMER0 = LFACLK"]
505    #[inline(always)]
506    pub fn div1(self) -> &'a mut W {
507        self.variant(LETIMER0_A::DIV1)
508    }
509    #[doc = "LFACLKLETIMER0 = LFACLK/2"]
510    #[inline(always)]
511    pub fn div2(self) -> &'a mut W {
512        self.variant(LETIMER0_A::DIV2)
513    }
514    #[doc = "LFACLKLETIMER0 = LFACLK/4"]
515    #[inline(always)]
516    pub fn div4(self) -> &'a mut W {
517        self.variant(LETIMER0_A::DIV4)
518    }
519    #[doc = "LFACLKLETIMER0 = LFACLK/8"]
520    #[inline(always)]
521    pub fn div8(self) -> &'a mut W {
522        self.variant(LETIMER0_A::DIV8)
523    }
524    #[doc = "LFACLKLETIMER0 = LFACLK/16"]
525    #[inline(always)]
526    pub fn div16(self) -> &'a mut W {
527        self.variant(LETIMER0_A::DIV16)
528    }
529    #[doc = "LFACLKLETIMER0 = LFACLK/32"]
530    #[inline(always)]
531    pub fn div32(self) -> &'a mut W {
532        self.variant(LETIMER0_A::DIV32)
533    }
534    #[doc = "LFACLKLETIMER0 = LFACLK/64"]
535    #[inline(always)]
536    pub fn div64(self) -> &'a mut W {
537        self.variant(LETIMER0_A::DIV64)
538    }
539    #[doc = "LFACLKLETIMER0 = LFACLK/128"]
540    #[inline(always)]
541    pub fn div128(self) -> &'a mut W {
542        self.variant(LETIMER0_A::DIV128)
543    }
544    #[doc = "LFACLKLETIMER0 = LFACLK/256"]
545    #[inline(always)]
546    pub fn div256(self) -> &'a mut W {
547        self.variant(LETIMER0_A::DIV256)
548    }
549    #[doc = "LFACLKLETIMER0 = LFACLK/512"]
550    #[inline(always)]
551    pub fn div512(self) -> &'a mut W {
552        self.variant(LETIMER0_A::DIV512)
553    }
554    #[doc = "LFACLKLETIMER0 = LFACLK/1024"]
555    #[inline(always)]
556    pub fn div1024(self) -> &'a mut W {
557        self.variant(LETIMER0_A::DIV1024)
558    }
559    #[doc = "LFACLKLETIMER0 = LFACLK/2048"]
560    #[inline(always)]
561    pub fn div2048(self) -> &'a mut W {
562        self.variant(LETIMER0_A::DIV2048)
563    }
564    #[doc = "LFACLKLETIMER0 = LFACLK/4096"]
565    #[inline(always)]
566    pub fn div4096(self) -> &'a mut W {
567        self.variant(LETIMER0_A::DIV4096)
568    }
569    #[doc = "LFACLKLETIMER0 = LFACLK/8192"]
570    #[inline(always)]
571    pub fn div8192(self) -> &'a mut W {
572        self.variant(LETIMER0_A::DIV8192)
573    }
574    #[doc = "LFACLKLETIMER0 = LFACLK/16384"]
575    #[inline(always)]
576    pub fn div16384(self) -> &'a mut W {
577        self.variant(LETIMER0_A::DIV16384)
578    }
579    #[doc = "LFACLKLETIMER0 = LFACLK/32768"]
580    #[inline(always)]
581    pub fn div32768(self) -> &'a mut W {
582        self.variant(LETIMER0_A::DIV32768)
583    }
584}
585impl R {
586    #[doc = "Bits 0:1 - Low Energy Sensor Interface Prescaler"]
587    #[inline(always)]
588    pub fn lesense(&self) -> LESENSE_R {
589        LESENSE_R::new((self.bits & 3) as u8)
590    }
591    #[doc = "Bits 4:7 - Real-Time Counter Prescaler"]
592    #[inline(always)]
593    pub fn rtc(&self) -> RTC_R {
594        RTC_R::new(((self.bits >> 4) & 0x0f) as u8)
595    }
596    #[doc = "Bits 8:11 - Low Energy Timer 0 Prescaler"]
597    #[inline(always)]
598    pub fn letimer0(&self) -> LETIMER0_R {
599        LETIMER0_R::new(((self.bits >> 8) & 0x0f) as u8)
600    }
601}
602impl W {
603    #[doc = "Bits 0:1 - Low Energy Sensor Interface Prescaler"]
604    #[inline(always)]
605    #[must_use]
606    pub fn lesense(&mut self) -> LESENSE_W<0> {
607        LESENSE_W::new(self)
608    }
609    #[doc = "Bits 4:7 - Real-Time Counter Prescaler"]
610    #[inline(always)]
611    #[must_use]
612    pub fn rtc(&mut self) -> RTC_W<4> {
613        RTC_W::new(self)
614    }
615    #[doc = "Bits 8:11 - Low Energy Timer 0 Prescaler"]
616    #[inline(always)]
617    #[must_use]
618    pub fn letimer0(&mut self) -> LETIMER0_W<8> {
619        LETIMER0_W::new(self)
620    }
621    #[doc = "Writes raw bits to the register."]
622    #[inline(always)]
623    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
624        self.0.bits(bits);
625        self
626    }
627}
628#[doc = "Low Frequency A Prescaler Register 0 (Async Reg)\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 [lfapresc0](index.html) module"]
629pub struct LFAPRESC0_SPEC;
630impl crate::RegisterSpec for LFAPRESC0_SPEC {
631    type Ux = u32;
632}
633#[doc = "`read()` method returns [lfapresc0::R](R) reader structure"]
634impl crate::Readable for LFAPRESC0_SPEC {
635    type Reader = R;
636}
637#[doc = "`write(|w| ..)` method takes [lfapresc0::W](W) writer structure"]
638impl crate::Writable for LFAPRESC0_SPEC {
639    type Writer = W;
640    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
641    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
642}
643#[doc = "`reset()` method sets LFAPRESC0 to value 0"]
644impl crate::Resettable for LFAPRESC0_SPEC {
645    const RESET_VALUE: Self::Ux = 0;
646}