d1_pac/cir_rx/
cir_rxcfg.rs

1#[doc = "Register `cir_rxcfg` reader"]
2pub type R = crate::R<CIR_RXCFG_SPEC>;
3#[doc = "Register `cir_rxcfg` writer"]
4pub type W = crate::W<CIR_RXCFG_SPEC>;
5#[doc = "Field `scs` reader - Sample Clock Select for CIR"]
6pub type SCS_R = crate::FieldReader;
7#[doc = "Field `scs` writer - Sample Clock Select for CIR"]
8pub type SCS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9#[doc = "Field `nthr` reader - Noise Threshold for CIR\n\nWhen the duration of the signal pulse (high or low level) is less than NTHR, the pulse is taken as noise and should be discarded by hardware."]
10pub type NTHR_R = crate::FieldReader<NTHR_A>;
11#[doc = "Noise Threshold for CIR\n\nWhen the duration of the signal pulse (high or low level) is less than NTHR, the pulse is taken as noise and should be discarded by hardware.\n\nValue on reset: 10"]
12#[derive(Clone, Copy, Debug, PartialEq, Eq)]
13#[repr(u8)]
14pub enum NTHR_A {
15    #[doc = "0: All samples are recorded into RX FIFO"]
16    T0 = 0,
17    #[doc = "1: If the signal is only one sample duration, it is taken as noise and discarded."]
18    T1 = 1,
19    #[doc = "2: If the signal is less than 2 sample duration, it is taken as noise and discarded"]
20    T2 = 2,
21    #[doc = "3: If the signal is less than 3 sample duration, it is taken as noise and discarded"]
22    T3 = 3,
23    #[doc = "4: If the signal is less than 4 sample duration, it is taken as noise and discarded"]
24    T4 = 4,
25    #[doc = "5: If the signal is less than 5 sample duration, it is taken as noise and discarded"]
26    T5 = 5,
27    #[doc = "6: If the signal is less than 6 sample duration, it is taken as noise and discarded"]
28    T6 = 6,
29    #[doc = "7: If the signal is less than 7 sample duration, it is taken as noise and discarded"]
30    T7 = 7,
31    #[doc = "8: If the signal is less than 8 sample duration, it is taken as noise and discarded"]
32    T8 = 8,
33    #[doc = "9: If the signal is less than 9 sample duration, it is taken as noise and discarded"]
34    T9 = 9,
35    #[doc = "10: If the signal is less than 10 sample duration, it is taken as noise and discarded"]
36    T10 = 10,
37    #[doc = "11: If the signal is less than 11 sample duration, it is taken as noise and discarded"]
38    T11 = 11,
39    #[doc = "12: If the signal is less than 12 sample duration, it is taken as noise and discarded"]
40    T12 = 12,
41    #[doc = "13: If the signal is less than 13 sample duration, it is taken as noise and discarded"]
42    T13 = 13,
43    #[doc = "14: If the signal is less than 14 sample duration, it is taken as noise and discarded"]
44    T14 = 14,
45    #[doc = "15: If the signal is less than 15 sample duration, it is taken as noise and discarded"]
46    T15 = 15,
47    #[doc = "16: If the signal is less than 16 sample duration, it is taken as noise and discarded"]
48    T16 = 16,
49    #[doc = "17: If the signal is less than 17 sample duration, it is taken as noise and discarded"]
50    T17 = 17,
51    #[doc = "18: If the signal is less than 18 sample duration, it is taken as noise and discarded"]
52    T18 = 18,
53    #[doc = "19: If the signal is less than 19 sample duration, it is taken as noise and discarded"]
54    T19 = 19,
55    #[doc = "20: If the signal is less than 20 sample duration, it is taken as noise and discarded"]
56    T20 = 20,
57    #[doc = "21: If the signal is less than 21 sample duration, it is taken as noise and discarded"]
58    T21 = 21,
59    #[doc = "22: If the signal is less than 22 sample duration, it is taken as noise and discarded"]
60    T22 = 22,
61    #[doc = "23: If the signal is less than 23 sample duration, it is taken as noise and discarded"]
62    T23 = 23,
63    #[doc = "24: If the signal is less than 24 sample duration, it is taken as noise and discarded"]
64    T24 = 24,
65    #[doc = "25: If the signal is less than 25 sample duration, it is taken as noise and discarded"]
66    T25 = 25,
67    #[doc = "26: If the signal is less than 26 sample duration, it is taken as noise and discarded"]
68    T26 = 26,
69    #[doc = "27: If the signal is less than 27 sample duration, it is taken as noise and discarded"]
70    T27 = 27,
71    #[doc = "28: If the signal is less than 28 sample duration, it is taken as noise and discarded"]
72    T28 = 28,
73    #[doc = "29: If the signal is less than 29 sample duration, it is taken as noise and discarded"]
74    T29 = 29,
75    #[doc = "30: If the signal is less than 30 sample duration, it is taken as noise and discarded"]
76    T30 = 30,
77    #[doc = "31: If the signal is less than 31 sample duration, it is taken as noise and discarded"]
78    T31 = 31,
79    #[doc = "32: If the signal is less than 32 sample duration, it is taken as noise and discarded"]
80    T32 = 32,
81    #[doc = "33: If the signal is less than 33 sample duration, it is taken as noise and discarded"]
82    T33 = 33,
83    #[doc = "34: If the signal is less than 34 sample duration, it is taken as noise and discarded"]
84    T34 = 34,
85    #[doc = "35: If the signal is less than 35 sample duration, it is taken as noise and discarded"]
86    T35 = 35,
87    #[doc = "36: If the signal is less than 36 sample duration, it is taken as noise and discarded"]
88    T36 = 36,
89    #[doc = "37: If the signal is less than 37 sample duration, it is taken as noise and discarded"]
90    T37 = 37,
91    #[doc = "38: If the signal is less than 38 sample duration, it is taken as noise and discarded"]
92    T38 = 38,
93    #[doc = "39: If the signal is less than 39 sample duration, it is taken as noise and discarded"]
94    T39 = 39,
95    #[doc = "40: If the signal is less than 40 sample duration, it is taken as noise and discarded"]
96    T40 = 40,
97    #[doc = "41: If the signal is less than 41 sample duration, it is taken as noise and discarded"]
98    T41 = 41,
99    #[doc = "42: If the signal is less than 42 sample duration, it is taken as noise and discarded"]
100    T42 = 42,
101    #[doc = "43: If the signal is less than 43 sample duration, it is taken as noise and discarded"]
102    T43 = 43,
103    #[doc = "44: If the signal is less than 44 sample duration, it is taken as noise and discarded"]
104    T44 = 44,
105    #[doc = "45: If the signal is less than 45 sample duration, it is taken as noise and discarded"]
106    T45 = 45,
107    #[doc = "46: If the signal is less than 46 sample duration, it is taken as noise and discarded"]
108    T46 = 46,
109    #[doc = "47: If the signal is less than 47 sample duration, it is taken as noise and discarded"]
110    T47 = 47,
111    #[doc = "48: If the signal is less than 48 sample duration, it is taken as noise and discarded"]
112    T48 = 48,
113    #[doc = "49: If the signal is less than 49 sample duration, it is taken as noise and discarded"]
114    T49 = 49,
115    #[doc = "50: If the signal is less than 50 sample duration, it is taken as noise and discarded"]
116    T50 = 50,
117    #[doc = "51: If the signal is less than 51 sample duration, it is taken as noise and discarded"]
118    T51 = 51,
119    #[doc = "52: If the signal is less than 52 sample duration, it is taken as noise and discarded"]
120    T52 = 52,
121    #[doc = "53: If the signal is less than 53 sample duration, it is taken as noise and discarded"]
122    T53 = 53,
123    #[doc = "54: If the signal is less than 54 sample duration, it is taken as noise and discarded"]
124    T54 = 54,
125    #[doc = "55: If the signal is less than 55 sample duration, it is taken as noise and discarded"]
126    T55 = 55,
127    #[doc = "56: If the signal is less than 56 sample duration, it is taken as noise and discarded"]
128    T56 = 56,
129    #[doc = "57: If the signal is less than 57 sample duration, it is taken as noise and discarded"]
130    T57 = 57,
131    #[doc = "58: If the signal is less than 58 sample duration, it is taken as noise and discarded"]
132    T58 = 58,
133    #[doc = "59: If the signal is less than 59 sample duration, it is taken as noise and discarded"]
134    T59 = 59,
135    #[doc = "60: If the signal is less than 60 sample duration, it is taken as noise and discarded"]
136    T60 = 60,
137    #[doc = "61: If the signal is less than 61 sample duration, it is taken as noise and discarded"]
138    T61 = 61,
139}
140impl From<NTHR_A> for u8 {
141    #[inline(always)]
142    fn from(variant: NTHR_A) -> Self {
143        variant as _
144    }
145}
146impl crate::FieldSpec for NTHR_A {
147    type Ux = u8;
148}
149impl NTHR_R {
150    #[doc = "Get enumerated values variant"]
151    #[inline(always)]
152    pub const fn variant(&self) -> Option<NTHR_A> {
153        match self.bits {
154            0 => Some(NTHR_A::T0),
155            1 => Some(NTHR_A::T1),
156            2 => Some(NTHR_A::T2),
157            3 => Some(NTHR_A::T3),
158            4 => Some(NTHR_A::T4),
159            5 => Some(NTHR_A::T5),
160            6 => Some(NTHR_A::T6),
161            7 => Some(NTHR_A::T7),
162            8 => Some(NTHR_A::T8),
163            9 => Some(NTHR_A::T9),
164            10 => Some(NTHR_A::T10),
165            11 => Some(NTHR_A::T11),
166            12 => Some(NTHR_A::T12),
167            13 => Some(NTHR_A::T13),
168            14 => Some(NTHR_A::T14),
169            15 => Some(NTHR_A::T15),
170            16 => Some(NTHR_A::T16),
171            17 => Some(NTHR_A::T17),
172            18 => Some(NTHR_A::T18),
173            19 => Some(NTHR_A::T19),
174            20 => Some(NTHR_A::T20),
175            21 => Some(NTHR_A::T21),
176            22 => Some(NTHR_A::T22),
177            23 => Some(NTHR_A::T23),
178            24 => Some(NTHR_A::T24),
179            25 => Some(NTHR_A::T25),
180            26 => Some(NTHR_A::T26),
181            27 => Some(NTHR_A::T27),
182            28 => Some(NTHR_A::T28),
183            29 => Some(NTHR_A::T29),
184            30 => Some(NTHR_A::T30),
185            31 => Some(NTHR_A::T31),
186            32 => Some(NTHR_A::T32),
187            33 => Some(NTHR_A::T33),
188            34 => Some(NTHR_A::T34),
189            35 => Some(NTHR_A::T35),
190            36 => Some(NTHR_A::T36),
191            37 => Some(NTHR_A::T37),
192            38 => Some(NTHR_A::T38),
193            39 => Some(NTHR_A::T39),
194            40 => Some(NTHR_A::T40),
195            41 => Some(NTHR_A::T41),
196            42 => Some(NTHR_A::T42),
197            43 => Some(NTHR_A::T43),
198            44 => Some(NTHR_A::T44),
199            45 => Some(NTHR_A::T45),
200            46 => Some(NTHR_A::T46),
201            47 => Some(NTHR_A::T47),
202            48 => Some(NTHR_A::T48),
203            49 => Some(NTHR_A::T49),
204            50 => Some(NTHR_A::T50),
205            51 => Some(NTHR_A::T51),
206            52 => Some(NTHR_A::T52),
207            53 => Some(NTHR_A::T53),
208            54 => Some(NTHR_A::T54),
209            55 => Some(NTHR_A::T55),
210            56 => Some(NTHR_A::T56),
211            57 => Some(NTHR_A::T57),
212            58 => Some(NTHR_A::T58),
213            59 => Some(NTHR_A::T59),
214            60 => Some(NTHR_A::T60),
215            61 => Some(NTHR_A::T61),
216            _ => None,
217        }
218    }
219    #[doc = "All samples are recorded into RX FIFO"]
220    #[inline(always)]
221    pub fn is_t0(&self) -> bool {
222        *self == NTHR_A::T0
223    }
224    #[doc = "If the signal is only one sample duration, it is taken as noise and discarded."]
225    #[inline(always)]
226    pub fn is_t1(&self) -> bool {
227        *self == NTHR_A::T1
228    }
229    #[doc = "If the signal is less than 2 sample duration, it is taken as noise and discarded"]
230    #[inline(always)]
231    pub fn is_t2(&self) -> bool {
232        *self == NTHR_A::T2
233    }
234    #[doc = "If the signal is less than 3 sample duration, it is taken as noise and discarded"]
235    #[inline(always)]
236    pub fn is_t3(&self) -> bool {
237        *self == NTHR_A::T3
238    }
239    #[doc = "If the signal is less than 4 sample duration, it is taken as noise and discarded"]
240    #[inline(always)]
241    pub fn is_t4(&self) -> bool {
242        *self == NTHR_A::T4
243    }
244    #[doc = "If the signal is less than 5 sample duration, it is taken as noise and discarded"]
245    #[inline(always)]
246    pub fn is_t5(&self) -> bool {
247        *self == NTHR_A::T5
248    }
249    #[doc = "If the signal is less than 6 sample duration, it is taken as noise and discarded"]
250    #[inline(always)]
251    pub fn is_t6(&self) -> bool {
252        *self == NTHR_A::T6
253    }
254    #[doc = "If the signal is less than 7 sample duration, it is taken as noise and discarded"]
255    #[inline(always)]
256    pub fn is_t7(&self) -> bool {
257        *self == NTHR_A::T7
258    }
259    #[doc = "If the signal is less than 8 sample duration, it is taken as noise and discarded"]
260    #[inline(always)]
261    pub fn is_t8(&self) -> bool {
262        *self == NTHR_A::T8
263    }
264    #[doc = "If the signal is less than 9 sample duration, it is taken as noise and discarded"]
265    #[inline(always)]
266    pub fn is_t9(&self) -> bool {
267        *self == NTHR_A::T9
268    }
269    #[doc = "If the signal is less than 10 sample duration, it is taken as noise and discarded"]
270    #[inline(always)]
271    pub fn is_t10(&self) -> bool {
272        *self == NTHR_A::T10
273    }
274    #[doc = "If the signal is less than 11 sample duration, it is taken as noise and discarded"]
275    #[inline(always)]
276    pub fn is_t11(&self) -> bool {
277        *self == NTHR_A::T11
278    }
279    #[doc = "If the signal is less than 12 sample duration, it is taken as noise and discarded"]
280    #[inline(always)]
281    pub fn is_t12(&self) -> bool {
282        *self == NTHR_A::T12
283    }
284    #[doc = "If the signal is less than 13 sample duration, it is taken as noise and discarded"]
285    #[inline(always)]
286    pub fn is_t13(&self) -> bool {
287        *self == NTHR_A::T13
288    }
289    #[doc = "If the signal is less than 14 sample duration, it is taken as noise and discarded"]
290    #[inline(always)]
291    pub fn is_t14(&self) -> bool {
292        *self == NTHR_A::T14
293    }
294    #[doc = "If the signal is less than 15 sample duration, it is taken as noise and discarded"]
295    #[inline(always)]
296    pub fn is_t15(&self) -> bool {
297        *self == NTHR_A::T15
298    }
299    #[doc = "If the signal is less than 16 sample duration, it is taken as noise and discarded"]
300    #[inline(always)]
301    pub fn is_t16(&self) -> bool {
302        *self == NTHR_A::T16
303    }
304    #[doc = "If the signal is less than 17 sample duration, it is taken as noise and discarded"]
305    #[inline(always)]
306    pub fn is_t17(&self) -> bool {
307        *self == NTHR_A::T17
308    }
309    #[doc = "If the signal is less than 18 sample duration, it is taken as noise and discarded"]
310    #[inline(always)]
311    pub fn is_t18(&self) -> bool {
312        *self == NTHR_A::T18
313    }
314    #[doc = "If the signal is less than 19 sample duration, it is taken as noise and discarded"]
315    #[inline(always)]
316    pub fn is_t19(&self) -> bool {
317        *self == NTHR_A::T19
318    }
319    #[doc = "If the signal is less than 20 sample duration, it is taken as noise and discarded"]
320    #[inline(always)]
321    pub fn is_t20(&self) -> bool {
322        *self == NTHR_A::T20
323    }
324    #[doc = "If the signal is less than 21 sample duration, it is taken as noise and discarded"]
325    #[inline(always)]
326    pub fn is_t21(&self) -> bool {
327        *self == NTHR_A::T21
328    }
329    #[doc = "If the signal is less than 22 sample duration, it is taken as noise and discarded"]
330    #[inline(always)]
331    pub fn is_t22(&self) -> bool {
332        *self == NTHR_A::T22
333    }
334    #[doc = "If the signal is less than 23 sample duration, it is taken as noise and discarded"]
335    #[inline(always)]
336    pub fn is_t23(&self) -> bool {
337        *self == NTHR_A::T23
338    }
339    #[doc = "If the signal is less than 24 sample duration, it is taken as noise and discarded"]
340    #[inline(always)]
341    pub fn is_t24(&self) -> bool {
342        *self == NTHR_A::T24
343    }
344    #[doc = "If the signal is less than 25 sample duration, it is taken as noise and discarded"]
345    #[inline(always)]
346    pub fn is_t25(&self) -> bool {
347        *self == NTHR_A::T25
348    }
349    #[doc = "If the signal is less than 26 sample duration, it is taken as noise and discarded"]
350    #[inline(always)]
351    pub fn is_t26(&self) -> bool {
352        *self == NTHR_A::T26
353    }
354    #[doc = "If the signal is less than 27 sample duration, it is taken as noise and discarded"]
355    #[inline(always)]
356    pub fn is_t27(&self) -> bool {
357        *self == NTHR_A::T27
358    }
359    #[doc = "If the signal is less than 28 sample duration, it is taken as noise and discarded"]
360    #[inline(always)]
361    pub fn is_t28(&self) -> bool {
362        *self == NTHR_A::T28
363    }
364    #[doc = "If the signal is less than 29 sample duration, it is taken as noise and discarded"]
365    #[inline(always)]
366    pub fn is_t29(&self) -> bool {
367        *self == NTHR_A::T29
368    }
369    #[doc = "If the signal is less than 30 sample duration, it is taken as noise and discarded"]
370    #[inline(always)]
371    pub fn is_t30(&self) -> bool {
372        *self == NTHR_A::T30
373    }
374    #[doc = "If the signal is less than 31 sample duration, it is taken as noise and discarded"]
375    #[inline(always)]
376    pub fn is_t31(&self) -> bool {
377        *self == NTHR_A::T31
378    }
379    #[doc = "If the signal is less than 32 sample duration, it is taken as noise and discarded"]
380    #[inline(always)]
381    pub fn is_t32(&self) -> bool {
382        *self == NTHR_A::T32
383    }
384    #[doc = "If the signal is less than 33 sample duration, it is taken as noise and discarded"]
385    #[inline(always)]
386    pub fn is_t33(&self) -> bool {
387        *self == NTHR_A::T33
388    }
389    #[doc = "If the signal is less than 34 sample duration, it is taken as noise and discarded"]
390    #[inline(always)]
391    pub fn is_t34(&self) -> bool {
392        *self == NTHR_A::T34
393    }
394    #[doc = "If the signal is less than 35 sample duration, it is taken as noise and discarded"]
395    #[inline(always)]
396    pub fn is_t35(&self) -> bool {
397        *self == NTHR_A::T35
398    }
399    #[doc = "If the signal is less than 36 sample duration, it is taken as noise and discarded"]
400    #[inline(always)]
401    pub fn is_t36(&self) -> bool {
402        *self == NTHR_A::T36
403    }
404    #[doc = "If the signal is less than 37 sample duration, it is taken as noise and discarded"]
405    #[inline(always)]
406    pub fn is_t37(&self) -> bool {
407        *self == NTHR_A::T37
408    }
409    #[doc = "If the signal is less than 38 sample duration, it is taken as noise and discarded"]
410    #[inline(always)]
411    pub fn is_t38(&self) -> bool {
412        *self == NTHR_A::T38
413    }
414    #[doc = "If the signal is less than 39 sample duration, it is taken as noise and discarded"]
415    #[inline(always)]
416    pub fn is_t39(&self) -> bool {
417        *self == NTHR_A::T39
418    }
419    #[doc = "If the signal is less than 40 sample duration, it is taken as noise and discarded"]
420    #[inline(always)]
421    pub fn is_t40(&self) -> bool {
422        *self == NTHR_A::T40
423    }
424    #[doc = "If the signal is less than 41 sample duration, it is taken as noise and discarded"]
425    #[inline(always)]
426    pub fn is_t41(&self) -> bool {
427        *self == NTHR_A::T41
428    }
429    #[doc = "If the signal is less than 42 sample duration, it is taken as noise and discarded"]
430    #[inline(always)]
431    pub fn is_t42(&self) -> bool {
432        *self == NTHR_A::T42
433    }
434    #[doc = "If the signal is less than 43 sample duration, it is taken as noise and discarded"]
435    #[inline(always)]
436    pub fn is_t43(&self) -> bool {
437        *self == NTHR_A::T43
438    }
439    #[doc = "If the signal is less than 44 sample duration, it is taken as noise and discarded"]
440    #[inline(always)]
441    pub fn is_t44(&self) -> bool {
442        *self == NTHR_A::T44
443    }
444    #[doc = "If the signal is less than 45 sample duration, it is taken as noise and discarded"]
445    #[inline(always)]
446    pub fn is_t45(&self) -> bool {
447        *self == NTHR_A::T45
448    }
449    #[doc = "If the signal is less than 46 sample duration, it is taken as noise and discarded"]
450    #[inline(always)]
451    pub fn is_t46(&self) -> bool {
452        *self == NTHR_A::T46
453    }
454    #[doc = "If the signal is less than 47 sample duration, it is taken as noise and discarded"]
455    #[inline(always)]
456    pub fn is_t47(&self) -> bool {
457        *self == NTHR_A::T47
458    }
459    #[doc = "If the signal is less than 48 sample duration, it is taken as noise and discarded"]
460    #[inline(always)]
461    pub fn is_t48(&self) -> bool {
462        *self == NTHR_A::T48
463    }
464    #[doc = "If the signal is less than 49 sample duration, it is taken as noise and discarded"]
465    #[inline(always)]
466    pub fn is_t49(&self) -> bool {
467        *self == NTHR_A::T49
468    }
469    #[doc = "If the signal is less than 50 sample duration, it is taken as noise and discarded"]
470    #[inline(always)]
471    pub fn is_t50(&self) -> bool {
472        *self == NTHR_A::T50
473    }
474    #[doc = "If the signal is less than 51 sample duration, it is taken as noise and discarded"]
475    #[inline(always)]
476    pub fn is_t51(&self) -> bool {
477        *self == NTHR_A::T51
478    }
479    #[doc = "If the signal is less than 52 sample duration, it is taken as noise and discarded"]
480    #[inline(always)]
481    pub fn is_t52(&self) -> bool {
482        *self == NTHR_A::T52
483    }
484    #[doc = "If the signal is less than 53 sample duration, it is taken as noise and discarded"]
485    #[inline(always)]
486    pub fn is_t53(&self) -> bool {
487        *self == NTHR_A::T53
488    }
489    #[doc = "If the signal is less than 54 sample duration, it is taken as noise and discarded"]
490    #[inline(always)]
491    pub fn is_t54(&self) -> bool {
492        *self == NTHR_A::T54
493    }
494    #[doc = "If the signal is less than 55 sample duration, it is taken as noise and discarded"]
495    #[inline(always)]
496    pub fn is_t55(&self) -> bool {
497        *self == NTHR_A::T55
498    }
499    #[doc = "If the signal is less than 56 sample duration, it is taken as noise and discarded"]
500    #[inline(always)]
501    pub fn is_t56(&self) -> bool {
502        *self == NTHR_A::T56
503    }
504    #[doc = "If the signal is less than 57 sample duration, it is taken as noise and discarded"]
505    #[inline(always)]
506    pub fn is_t57(&self) -> bool {
507        *self == NTHR_A::T57
508    }
509    #[doc = "If the signal is less than 58 sample duration, it is taken as noise and discarded"]
510    #[inline(always)]
511    pub fn is_t58(&self) -> bool {
512        *self == NTHR_A::T58
513    }
514    #[doc = "If the signal is less than 59 sample duration, it is taken as noise and discarded"]
515    #[inline(always)]
516    pub fn is_t59(&self) -> bool {
517        *self == NTHR_A::T59
518    }
519    #[doc = "If the signal is less than 60 sample duration, it is taken as noise and discarded"]
520    #[inline(always)]
521    pub fn is_t60(&self) -> bool {
522        *self == NTHR_A::T60
523    }
524    #[doc = "If the signal is less than 61 sample duration, it is taken as noise and discarded"]
525    #[inline(always)]
526    pub fn is_t61(&self) -> bool {
527        *self == NTHR_A::T61
528    }
529}
530#[doc = "Field `nthr` writer - Noise Threshold for CIR\n\nWhen the duration of the signal pulse (high or low level) is less than NTHR, the pulse is taken as noise and should be discarded by hardware."]
531pub type NTHR_W<'a, REG> = crate::FieldWriter<'a, REG, 6, NTHR_A>;
532impl<'a, REG> NTHR_W<'a, REG>
533where
534    REG: crate::Writable + crate::RegisterSpec,
535    REG::Ux: From<u8>,
536{
537    #[doc = "All samples are recorded into RX FIFO"]
538    #[inline(always)]
539    pub fn t0(self) -> &'a mut crate::W<REG> {
540        self.variant(NTHR_A::T0)
541    }
542    #[doc = "If the signal is only one sample duration, it is taken as noise and discarded."]
543    #[inline(always)]
544    pub fn t1(self) -> &'a mut crate::W<REG> {
545        self.variant(NTHR_A::T1)
546    }
547    #[doc = "If the signal is less than 2 sample duration, it is taken as noise and discarded"]
548    #[inline(always)]
549    pub fn t2(self) -> &'a mut crate::W<REG> {
550        self.variant(NTHR_A::T2)
551    }
552    #[doc = "If the signal is less than 3 sample duration, it is taken as noise and discarded"]
553    #[inline(always)]
554    pub fn t3(self) -> &'a mut crate::W<REG> {
555        self.variant(NTHR_A::T3)
556    }
557    #[doc = "If the signal is less than 4 sample duration, it is taken as noise and discarded"]
558    #[inline(always)]
559    pub fn t4(self) -> &'a mut crate::W<REG> {
560        self.variant(NTHR_A::T4)
561    }
562    #[doc = "If the signal is less than 5 sample duration, it is taken as noise and discarded"]
563    #[inline(always)]
564    pub fn t5(self) -> &'a mut crate::W<REG> {
565        self.variant(NTHR_A::T5)
566    }
567    #[doc = "If the signal is less than 6 sample duration, it is taken as noise and discarded"]
568    #[inline(always)]
569    pub fn t6(self) -> &'a mut crate::W<REG> {
570        self.variant(NTHR_A::T6)
571    }
572    #[doc = "If the signal is less than 7 sample duration, it is taken as noise and discarded"]
573    #[inline(always)]
574    pub fn t7(self) -> &'a mut crate::W<REG> {
575        self.variant(NTHR_A::T7)
576    }
577    #[doc = "If the signal is less than 8 sample duration, it is taken as noise and discarded"]
578    #[inline(always)]
579    pub fn t8(self) -> &'a mut crate::W<REG> {
580        self.variant(NTHR_A::T8)
581    }
582    #[doc = "If the signal is less than 9 sample duration, it is taken as noise and discarded"]
583    #[inline(always)]
584    pub fn t9(self) -> &'a mut crate::W<REG> {
585        self.variant(NTHR_A::T9)
586    }
587    #[doc = "If the signal is less than 10 sample duration, it is taken as noise and discarded"]
588    #[inline(always)]
589    pub fn t10(self) -> &'a mut crate::W<REG> {
590        self.variant(NTHR_A::T10)
591    }
592    #[doc = "If the signal is less than 11 sample duration, it is taken as noise and discarded"]
593    #[inline(always)]
594    pub fn t11(self) -> &'a mut crate::W<REG> {
595        self.variant(NTHR_A::T11)
596    }
597    #[doc = "If the signal is less than 12 sample duration, it is taken as noise and discarded"]
598    #[inline(always)]
599    pub fn t12(self) -> &'a mut crate::W<REG> {
600        self.variant(NTHR_A::T12)
601    }
602    #[doc = "If the signal is less than 13 sample duration, it is taken as noise and discarded"]
603    #[inline(always)]
604    pub fn t13(self) -> &'a mut crate::W<REG> {
605        self.variant(NTHR_A::T13)
606    }
607    #[doc = "If the signal is less than 14 sample duration, it is taken as noise and discarded"]
608    #[inline(always)]
609    pub fn t14(self) -> &'a mut crate::W<REG> {
610        self.variant(NTHR_A::T14)
611    }
612    #[doc = "If the signal is less than 15 sample duration, it is taken as noise and discarded"]
613    #[inline(always)]
614    pub fn t15(self) -> &'a mut crate::W<REG> {
615        self.variant(NTHR_A::T15)
616    }
617    #[doc = "If the signal is less than 16 sample duration, it is taken as noise and discarded"]
618    #[inline(always)]
619    pub fn t16(self) -> &'a mut crate::W<REG> {
620        self.variant(NTHR_A::T16)
621    }
622    #[doc = "If the signal is less than 17 sample duration, it is taken as noise and discarded"]
623    #[inline(always)]
624    pub fn t17(self) -> &'a mut crate::W<REG> {
625        self.variant(NTHR_A::T17)
626    }
627    #[doc = "If the signal is less than 18 sample duration, it is taken as noise and discarded"]
628    #[inline(always)]
629    pub fn t18(self) -> &'a mut crate::W<REG> {
630        self.variant(NTHR_A::T18)
631    }
632    #[doc = "If the signal is less than 19 sample duration, it is taken as noise and discarded"]
633    #[inline(always)]
634    pub fn t19(self) -> &'a mut crate::W<REG> {
635        self.variant(NTHR_A::T19)
636    }
637    #[doc = "If the signal is less than 20 sample duration, it is taken as noise and discarded"]
638    #[inline(always)]
639    pub fn t20(self) -> &'a mut crate::W<REG> {
640        self.variant(NTHR_A::T20)
641    }
642    #[doc = "If the signal is less than 21 sample duration, it is taken as noise and discarded"]
643    #[inline(always)]
644    pub fn t21(self) -> &'a mut crate::W<REG> {
645        self.variant(NTHR_A::T21)
646    }
647    #[doc = "If the signal is less than 22 sample duration, it is taken as noise and discarded"]
648    #[inline(always)]
649    pub fn t22(self) -> &'a mut crate::W<REG> {
650        self.variant(NTHR_A::T22)
651    }
652    #[doc = "If the signal is less than 23 sample duration, it is taken as noise and discarded"]
653    #[inline(always)]
654    pub fn t23(self) -> &'a mut crate::W<REG> {
655        self.variant(NTHR_A::T23)
656    }
657    #[doc = "If the signal is less than 24 sample duration, it is taken as noise and discarded"]
658    #[inline(always)]
659    pub fn t24(self) -> &'a mut crate::W<REG> {
660        self.variant(NTHR_A::T24)
661    }
662    #[doc = "If the signal is less than 25 sample duration, it is taken as noise and discarded"]
663    #[inline(always)]
664    pub fn t25(self) -> &'a mut crate::W<REG> {
665        self.variant(NTHR_A::T25)
666    }
667    #[doc = "If the signal is less than 26 sample duration, it is taken as noise and discarded"]
668    #[inline(always)]
669    pub fn t26(self) -> &'a mut crate::W<REG> {
670        self.variant(NTHR_A::T26)
671    }
672    #[doc = "If the signal is less than 27 sample duration, it is taken as noise and discarded"]
673    #[inline(always)]
674    pub fn t27(self) -> &'a mut crate::W<REG> {
675        self.variant(NTHR_A::T27)
676    }
677    #[doc = "If the signal is less than 28 sample duration, it is taken as noise and discarded"]
678    #[inline(always)]
679    pub fn t28(self) -> &'a mut crate::W<REG> {
680        self.variant(NTHR_A::T28)
681    }
682    #[doc = "If the signal is less than 29 sample duration, it is taken as noise and discarded"]
683    #[inline(always)]
684    pub fn t29(self) -> &'a mut crate::W<REG> {
685        self.variant(NTHR_A::T29)
686    }
687    #[doc = "If the signal is less than 30 sample duration, it is taken as noise and discarded"]
688    #[inline(always)]
689    pub fn t30(self) -> &'a mut crate::W<REG> {
690        self.variant(NTHR_A::T30)
691    }
692    #[doc = "If the signal is less than 31 sample duration, it is taken as noise and discarded"]
693    #[inline(always)]
694    pub fn t31(self) -> &'a mut crate::W<REG> {
695        self.variant(NTHR_A::T31)
696    }
697    #[doc = "If the signal is less than 32 sample duration, it is taken as noise and discarded"]
698    #[inline(always)]
699    pub fn t32(self) -> &'a mut crate::W<REG> {
700        self.variant(NTHR_A::T32)
701    }
702    #[doc = "If the signal is less than 33 sample duration, it is taken as noise and discarded"]
703    #[inline(always)]
704    pub fn t33(self) -> &'a mut crate::W<REG> {
705        self.variant(NTHR_A::T33)
706    }
707    #[doc = "If the signal is less than 34 sample duration, it is taken as noise and discarded"]
708    #[inline(always)]
709    pub fn t34(self) -> &'a mut crate::W<REG> {
710        self.variant(NTHR_A::T34)
711    }
712    #[doc = "If the signal is less than 35 sample duration, it is taken as noise and discarded"]
713    #[inline(always)]
714    pub fn t35(self) -> &'a mut crate::W<REG> {
715        self.variant(NTHR_A::T35)
716    }
717    #[doc = "If the signal is less than 36 sample duration, it is taken as noise and discarded"]
718    #[inline(always)]
719    pub fn t36(self) -> &'a mut crate::W<REG> {
720        self.variant(NTHR_A::T36)
721    }
722    #[doc = "If the signal is less than 37 sample duration, it is taken as noise and discarded"]
723    #[inline(always)]
724    pub fn t37(self) -> &'a mut crate::W<REG> {
725        self.variant(NTHR_A::T37)
726    }
727    #[doc = "If the signal is less than 38 sample duration, it is taken as noise and discarded"]
728    #[inline(always)]
729    pub fn t38(self) -> &'a mut crate::W<REG> {
730        self.variant(NTHR_A::T38)
731    }
732    #[doc = "If the signal is less than 39 sample duration, it is taken as noise and discarded"]
733    #[inline(always)]
734    pub fn t39(self) -> &'a mut crate::W<REG> {
735        self.variant(NTHR_A::T39)
736    }
737    #[doc = "If the signal is less than 40 sample duration, it is taken as noise and discarded"]
738    #[inline(always)]
739    pub fn t40(self) -> &'a mut crate::W<REG> {
740        self.variant(NTHR_A::T40)
741    }
742    #[doc = "If the signal is less than 41 sample duration, it is taken as noise and discarded"]
743    #[inline(always)]
744    pub fn t41(self) -> &'a mut crate::W<REG> {
745        self.variant(NTHR_A::T41)
746    }
747    #[doc = "If the signal is less than 42 sample duration, it is taken as noise and discarded"]
748    #[inline(always)]
749    pub fn t42(self) -> &'a mut crate::W<REG> {
750        self.variant(NTHR_A::T42)
751    }
752    #[doc = "If the signal is less than 43 sample duration, it is taken as noise and discarded"]
753    #[inline(always)]
754    pub fn t43(self) -> &'a mut crate::W<REG> {
755        self.variant(NTHR_A::T43)
756    }
757    #[doc = "If the signal is less than 44 sample duration, it is taken as noise and discarded"]
758    #[inline(always)]
759    pub fn t44(self) -> &'a mut crate::W<REG> {
760        self.variant(NTHR_A::T44)
761    }
762    #[doc = "If the signal is less than 45 sample duration, it is taken as noise and discarded"]
763    #[inline(always)]
764    pub fn t45(self) -> &'a mut crate::W<REG> {
765        self.variant(NTHR_A::T45)
766    }
767    #[doc = "If the signal is less than 46 sample duration, it is taken as noise and discarded"]
768    #[inline(always)]
769    pub fn t46(self) -> &'a mut crate::W<REG> {
770        self.variant(NTHR_A::T46)
771    }
772    #[doc = "If the signal is less than 47 sample duration, it is taken as noise and discarded"]
773    #[inline(always)]
774    pub fn t47(self) -> &'a mut crate::W<REG> {
775        self.variant(NTHR_A::T47)
776    }
777    #[doc = "If the signal is less than 48 sample duration, it is taken as noise and discarded"]
778    #[inline(always)]
779    pub fn t48(self) -> &'a mut crate::W<REG> {
780        self.variant(NTHR_A::T48)
781    }
782    #[doc = "If the signal is less than 49 sample duration, it is taken as noise and discarded"]
783    #[inline(always)]
784    pub fn t49(self) -> &'a mut crate::W<REG> {
785        self.variant(NTHR_A::T49)
786    }
787    #[doc = "If the signal is less than 50 sample duration, it is taken as noise and discarded"]
788    #[inline(always)]
789    pub fn t50(self) -> &'a mut crate::W<REG> {
790        self.variant(NTHR_A::T50)
791    }
792    #[doc = "If the signal is less than 51 sample duration, it is taken as noise and discarded"]
793    #[inline(always)]
794    pub fn t51(self) -> &'a mut crate::W<REG> {
795        self.variant(NTHR_A::T51)
796    }
797    #[doc = "If the signal is less than 52 sample duration, it is taken as noise and discarded"]
798    #[inline(always)]
799    pub fn t52(self) -> &'a mut crate::W<REG> {
800        self.variant(NTHR_A::T52)
801    }
802    #[doc = "If the signal is less than 53 sample duration, it is taken as noise and discarded"]
803    #[inline(always)]
804    pub fn t53(self) -> &'a mut crate::W<REG> {
805        self.variant(NTHR_A::T53)
806    }
807    #[doc = "If the signal is less than 54 sample duration, it is taken as noise and discarded"]
808    #[inline(always)]
809    pub fn t54(self) -> &'a mut crate::W<REG> {
810        self.variant(NTHR_A::T54)
811    }
812    #[doc = "If the signal is less than 55 sample duration, it is taken as noise and discarded"]
813    #[inline(always)]
814    pub fn t55(self) -> &'a mut crate::W<REG> {
815        self.variant(NTHR_A::T55)
816    }
817    #[doc = "If the signal is less than 56 sample duration, it is taken as noise and discarded"]
818    #[inline(always)]
819    pub fn t56(self) -> &'a mut crate::W<REG> {
820        self.variant(NTHR_A::T56)
821    }
822    #[doc = "If the signal is less than 57 sample duration, it is taken as noise and discarded"]
823    #[inline(always)]
824    pub fn t57(self) -> &'a mut crate::W<REG> {
825        self.variant(NTHR_A::T57)
826    }
827    #[doc = "If the signal is less than 58 sample duration, it is taken as noise and discarded"]
828    #[inline(always)]
829    pub fn t58(self) -> &'a mut crate::W<REG> {
830        self.variant(NTHR_A::T58)
831    }
832    #[doc = "If the signal is less than 59 sample duration, it is taken as noise and discarded"]
833    #[inline(always)]
834    pub fn t59(self) -> &'a mut crate::W<REG> {
835        self.variant(NTHR_A::T59)
836    }
837    #[doc = "If the signal is less than 60 sample duration, it is taken as noise and discarded"]
838    #[inline(always)]
839    pub fn t60(self) -> &'a mut crate::W<REG> {
840        self.variant(NTHR_A::T60)
841    }
842    #[doc = "If the signal is less than 61 sample duration, it is taken as noise and discarded"]
843    #[inline(always)]
844    pub fn t61(self) -> &'a mut crate::W<REG> {
845        self.variant(NTHR_A::T61)
846    }
847}
848#[doc = "Field `ithr` reader - Idle Threshold for CIR\n\nThe Receiver uses it to decide whether the CIR command is received. If there is no CIR signal on the air, the receiver is staying in IDLE status. One active pulse will bring the receiver from IDLE status to Receiving status. After the CIR receiver ends, the inputting signal will keep the specified level (high or low level) for a long time. The receiver can use this idle signal duration to decide that it has received the CIR command. The corresponding flag is asserted. If the corresponding interrupt is enabled, the interrupt line is asserted to the CPU.\n\nWhen the duration of the signal keeps one status (high or low level) for the specified duration ((ITHR + 1)*128 sample_clk), this means that the previous CIR command is finished."]
849pub type ITHR_R = crate::FieldReader;
850#[doc = "Field `ithr` writer - Idle Threshold for CIR\n\nThe Receiver uses it to decide whether the CIR command is received. If there is no CIR signal on the air, the receiver is staying in IDLE status. One active pulse will bring the receiver from IDLE status to Receiving status. After the CIR receiver ends, the inputting signal will keep the specified level (high or low level) for a long time. The receiver can use this idle signal duration to decide that it has received the CIR command. The corresponding flag is asserted. If the corresponding interrupt is enabled, the interrupt line is asserted to the CPU.\n\nWhen the duration of the signal keeps one status (high or low level) for the specified duration ((ITHR + 1)*128 sample_clk), this means that the previous CIR command is finished."]
851pub type ITHR_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
852#[doc = "Field `athr` reader - Active Threshold for CIR\n\nThese bits control the duration of CIR from the idle to the active state. The duration can be calculated by ((ATHR + 1)*(ATHC? Sample Clock: 128*Sample Clock))."]
853pub type ATHR_R = crate::FieldReader;
854#[doc = "Field `athr` writer - Active Threshold for CIR\n\nThese bits control the duration of CIR from the idle to the active state. The duration can be calculated by ((ATHR + 1)*(ATHC? Sample Clock: 128*Sample Clock))."]
855pub type ATHR_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
856#[doc = "Field `athc` reader - Active Threshold Control for CIR"]
857pub type ATHC_R = crate::BitReader<ATHC_A>;
858#[doc = "Active Threshold Control for CIR\n\nValue on reset: 0"]
859#[derive(Clone, Copy, Debug, PartialEq, Eq)]
860pub enum ATHC_A {
861    #[doc = "0: ATHR in a unit of (Sample Clock)"]
862    SAMPLE = 0,
863    #[doc = "1: ATHR in a unit of (128*Sample Clocks)"]
864    SAMPLE_128 = 1,
865}
866impl From<ATHC_A> for bool {
867    #[inline(always)]
868    fn from(variant: ATHC_A) -> Self {
869        variant as u8 != 0
870    }
871}
872impl ATHC_R {
873    #[doc = "Get enumerated values variant"]
874    #[inline(always)]
875    pub const fn variant(&self) -> ATHC_A {
876        match self.bits {
877            false => ATHC_A::SAMPLE,
878            true => ATHC_A::SAMPLE_128,
879        }
880    }
881    #[doc = "ATHR in a unit of (Sample Clock)"]
882    #[inline(always)]
883    pub fn is_sample(&self) -> bool {
884        *self == ATHC_A::SAMPLE
885    }
886    #[doc = "ATHR in a unit of (128*Sample Clocks)"]
887    #[inline(always)]
888    pub fn is_sample_128(&self) -> bool {
889        *self == ATHC_A::SAMPLE_128
890    }
891}
892#[doc = "Field `athc` writer - Active Threshold Control for CIR"]
893pub type ATHC_W<'a, REG> = crate::BitWriter<'a, REG, ATHC_A>;
894impl<'a, REG> ATHC_W<'a, REG>
895where
896    REG: crate::Writable + crate::RegisterSpec,
897{
898    #[doc = "ATHR in a unit of (Sample Clock)"]
899    #[inline(always)]
900    pub fn sample(self) -> &'a mut crate::W<REG> {
901        self.variant(ATHC_A::SAMPLE)
902    }
903    #[doc = "ATHR in a unit of (128*Sample Clocks)"]
904    #[inline(always)]
905    pub fn sample_128(self) -> &'a mut crate::W<REG> {
906        self.variant(ATHC_A::SAMPLE_128)
907    }
908}
909#[doc = "Field `scs2` reader - Bit2 of Sample Clock Select for CIR\n\nThis bit is defined by SCS bits below."]
910pub type SCS2_R = crate::BitReader;
911#[doc = "Field `scs2` writer - Bit2 of Sample Clock Select for CIR\n\nThis bit is defined by SCS bits below."]
912pub type SCS2_W<'a, REG> = crate::BitWriter<'a, REG>;
913impl R {
914    #[doc = "Bits 0:1 - Sample Clock Select for CIR"]
915    #[inline(always)]
916    pub fn scs(&self) -> SCS_R {
917        SCS_R::new((self.bits & 3) as u8)
918    }
919    #[doc = "Bits 2:7 - Noise Threshold for CIR\n\nWhen the duration of the signal pulse (high or low level) is less than NTHR, the pulse is taken as noise and should be discarded by hardware."]
920    #[inline(always)]
921    pub fn nthr(&self) -> NTHR_R {
922        NTHR_R::new(((self.bits >> 2) & 0x3f) as u8)
923    }
924    #[doc = "Bits 8:15 - Idle Threshold for CIR\n\nThe Receiver uses it to decide whether the CIR command is received. If there is no CIR signal on the air, the receiver is staying in IDLE status. One active pulse will bring the receiver from IDLE status to Receiving status. After the CIR receiver ends, the inputting signal will keep the specified level (high or low level) for a long time. The receiver can use this idle signal duration to decide that it has received the CIR command. The corresponding flag is asserted. If the corresponding interrupt is enabled, the interrupt line is asserted to the CPU.\n\nWhen the duration of the signal keeps one status (high or low level) for the specified duration ((ITHR + 1)*128 sample_clk), this means that the previous CIR command is finished."]
925    #[inline(always)]
926    pub fn ithr(&self) -> ITHR_R {
927        ITHR_R::new(((self.bits >> 8) & 0xff) as u8)
928    }
929    #[doc = "Bits 16:22 - Active Threshold for CIR\n\nThese bits control the duration of CIR from the idle to the active state. The duration can be calculated by ((ATHR + 1)*(ATHC? Sample Clock: 128*Sample Clock))."]
930    #[inline(always)]
931    pub fn athr(&self) -> ATHR_R {
932        ATHR_R::new(((self.bits >> 16) & 0x7f) as u8)
933    }
934    #[doc = "Bit 23 - Active Threshold Control for CIR"]
935    #[inline(always)]
936    pub fn athc(&self) -> ATHC_R {
937        ATHC_R::new(((self.bits >> 23) & 1) != 0)
938    }
939    #[doc = "Bit 24 - Bit2 of Sample Clock Select for CIR\n\nThis bit is defined by SCS bits below."]
940    #[inline(always)]
941    pub fn scs2(&self) -> SCS2_R {
942        SCS2_R::new(((self.bits >> 24) & 1) != 0)
943    }
944}
945impl W {
946    #[doc = "Bits 0:1 - Sample Clock Select for CIR"]
947    #[inline(always)]
948    #[must_use]
949    pub fn scs(&mut self) -> SCS_W<CIR_RXCFG_SPEC> {
950        SCS_W::new(self, 0)
951    }
952    #[doc = "Bits 2:7 - Noise Threshold for CIR\n\nWhen the duration of the signal pulse (high or low level) is less than NTHR, the pulse is taken as noise and should be discarded by hardware."]
953    #[inline(always)]
954    #[must_use]
955    pub fn nthr(&mut self) -> NTHR_W<CIR_RXCFG_SPEC> {
956        NTHR_W::new(self, 2)
957    }
958    #[doc = "Bits 8:15 - Idle Threshold for CIR\n\nThe Receiver uses it to decide whether the CIR command is received. If there is no CIR signal on the air, the receiver is staying in IDLE status. One active pulse will bring the receiver from IDLE status to Receiving status. After the CIR receiver ends, the inputting signal will keep the specified level (high or low level) for a long time. The receiver can use this idle signal duration to decide that it has received the CIR command. The corresponding flag is asserted. If the corresponding interrupt is enabled, the interrupt line is asserted to the CPU.\n\nWhen the duration of the signal keeps one status (high or low level) for the specified duration ((ITHR + 1)*128 sample_clk), this means that the previous CIR command is finished."]
959    #[inline(always)]
960    #[must_use]
961    pub fn ithr(&mut self) -> ITHR_W<CIR_RXCFG_SPEC> {
962        ITHR_W::new(self, 8)
963    }
964    #[doc = "Bits 16:22 - Active Threshold for CIR\n\nThese bits control the duration of CIR from the idle to the active state. The duration can be calculated by ((ATHR + 1)*(ATHC? Sample Clock: 128*Sample Clock))."]
965    #[inline(always)]
966    #[must_use]
967    pub fn athr(&mut self) -> ATHR_W<CIR_RXCFG_SPEC> {
968        ATHR_W::new(self, 16)
969    }
970    #[doc = "Bit 23 - Active Threshold Control for CIR"]
971    #[inline(always)]
972    #[must_use]
973    pub fn athc(&mut self) -> ATHC_W<CIR_RXCFG_SPEC> {
974        ATHC_W::new(self, 23)
975    }
976    #[doc = "Bit 24 - Bit2 of Sample Clock Select for CIR\n\nThis bit is defined by SCS bits below."]
977    #[inline(always)]
978    #[must_use]
979    pub fn scs2(&mut self) -> SCS2_W<CIR_RXCFG_SPEC> {
980        SCS2_W::new(self, 24)
981    }
982    #[doc = r" Writes raw bits to the register."]
983    #[doc = r""]
984    #[doc = r" # Safety"]
985    #[doc = r""]
986    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
987    #[inline(always)]
988    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
989        self.bits = bits;
990        self
991    }
992}
993#[doc = "CIR Receiver Configure Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cir_rxcfg::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cir_rxcfg::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
994pub struct CIR_RXCFG_SPEC;
995impl crate::RegisterSpec for CIR_RXCFG_SPEC {
996    type Ux = u32;
997}
998#[doc = "`read()` method returns [`cir_rxcfg::R`](R) reader structure"]
999impl crate::Readable for CIR_RXCFG_SPEC {}
1000#[doc = "`write(|w| ..)` method takes [`cir_rxcfg::W`](W) writer structure"]
1001impl crate::Writable for CIR_RXCFG_SPEC {
1002    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1003    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1004}
1005#[doc = "`reset()` method sets cir_rxcfg to value 0x1828"]
1006impl crate::Resettable for CIR_RXCFG_SPEC {
1007    const RESET_VALUE: Self::Ux = 0x1828;
1008}