ra2a1/icu/
nmisr.rs

1#[doc = "Register `NMISR` reader"]
2pub struct R(crate::R<NMISR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<NMISR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<NMISR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<NMISR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `IWDTST` reader - IWDT Underflow/Refresh Error Status Flag"]
17pub type IWDTST_R = crate::BitReader<IWDTST_A>;
18#[doc = "IWDT Underflow/Refresh Error Status Flag\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq, Eq)]
20pub enum IWDTST_A {
21    #[doc = "0: IWDT underflow/refresh error interrupt is not requested."]
22    _0 = 0,
23    #[doc = "1: IWDT underflow/refresh error interrupt is requested."]
24    _1 = 1,
25}
26impl From<IWDTST_A> for bool {
27    #[inline(always)]
28    fn from(variant: IWDTST_A) -> Self {
29        variant as u8 != 0
30    }
31}
32impl IWDTST_R {
33    #[doc = "Get enumerated values variant"]
34    #[inline(always)]
35    pub fn variant(&self) -> IWDTST_A {
36        match self.bits {
37            false => IWDTST_A::_0,
38            true => IWDTST_A::_1,
39        }
40    }
41    #[doc = "Checks if the value of the field is `_0`"]
42    #[inline(always)]
43    pub fn is_0(&self) -> bool {
44        *self == IWDTST_A::_0
45    }
46    #[doc = "Checks if the value of the field is `_1`"]
47    #[inline(always)]
48    pub fn is_1(&self) -> bool {
49        *self == IWDTST_A::_1
50    }
51}
52#[doc = "Field `WDTST` reader - WDT Underflow/Refresh Error Status Flag"]
53pub type WDTST_R = crate::BitReader<WDTST_A>;
54#[doc = "WDT Underflow/Refresh Error Status Flag\n\nValue on reset: 0"]
55#[derive(Clone, Copy, Debug, PartialEq, Eq)]
56pub enum WDTST_A {
57    #[doc = "0: WDT underflow/refresh error interrupt is not requested."]
58    _0 = 0,
59    #[doc = "1: WDT underflow/refresh error interrupt is requested."]
60    _1 = 1,
61}
62impl From<WDTST_A> for bool {
63    #[inline(always)]
64    fn from(variant: WDTST_A) -> Self {
65        variant as u8 != 0
66    }
67}
68impl WDTST_R {
69    #[doc = "Get enumerated values variant"]
70    #[inline(always)]
71    pub fn variant(&self) -> WDTST_A {
72        match self.bits {
73            false => WDTST_A::_0,
74            true => WDTST_A::_1,
75        }
76    }
77    #[doc = "Checks if the value of the field is `_0`"]
78    #[inline(always)]
79    pub fn is_0(&self) -> bool {
80        *self == WDTST_A::_0
81    }
82    #[doc = "Checks if the value of the field is `_1`"]
83    #[inline(always)]
84    pub fn is_1(&self) -> bool {
85        *self == WDTST_A::_1
86    }
87}
88#[doc = "Field `LVD1ST` reader - Voltage-Monitoring 1 Interrupt Status Flag"]
89pub type LVD1ST_R = crate::BitReader<LVD1ST_A>;
90#[doc = "Voltage-Monitoring 1 Interrupt Status Flag\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum LVD1ST_A {
93    #[doc = "0: Voltage-monitoring 1 interrupt is not requested."]
94    _0 = 0,
95    #[doc = "1: Voltage-monitoring 1 interrupt is requested."]
96    _1 = 1,
97}
98impl From<LVD1ST_A> for bool {
99    #[inline(always)]
100    fn from(variant: LVD1ST_A) -> Self {
101        variant as u8 != 0
102    }
103}
104impl LVD1ST_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> LVD1ST_A {
108        match self.bits {
109            false => LVD1ST_A::_0,
110            true => LVD1ST_A::_1,
111        }
112    }
113    #[doc = "Checks if the value of the field is `_0`"]
114    #[inline(always)]
115    pub fn is_0(&self) -> bool {
116        *self == LVD1ST_A::_0
117    }
118    #[doc = "Checks if the value of the field is `_1`"]
119    #[inline(always)]
120    pub fn is_1(&self) -> bool {
121        *self == LVD1ST_A::_1
122    }
123}
124#[doc = "Field `LVD2ST` reader - Voltage-Monitoring 2 Interrupt Status Flag"]
125pub type LVD2ST_R = crate::BitReader<LVD2ST_A>;
126#[doc = "Voltage-Monitoring 2 Interrupt Status Flag\n\nValue on reset: 0"]
127#[derive(Clone, Copy, Debug, PartialEq, Eq)]
128pub enum LVD2ST_A {
129    #[doc = "0: Voltage-monitoring 2 interrupt is not requested."]
130    _0 = 0,
131    #[doc = "1: Voltage-monitoring 2 interrupt is requested."]
132    _1 = 1,
133}
134impl From<LVD2ST_A> for bool {
135    #[inline(always)]
136    fn from(variant: LVD2ST_A) -> Self {
137        variant as u8 != 0
138    }
139}
140impl LVD2ST_R {
141    #[doc = "Get enumerated values variant"]
142    #[inline(always)]
143    pub fn variant(&self) -> LVD2ST_A {
144        match self.bits {
145            false => LVD2ST_A::_0,
146            true => LVD2ST_A::_1,
147        }
148    }
149    #[doc = "Checks if the value of the field is `_0`"]
150    #[inline(always)]
151    pub fn is_0(&self) -> bool {
152        *self == LVD2ST_A::_0
153    }
154    #[doc = "Checks if the value of the field is `_1`"]
155    #[inline(always)]
156    pub fn is_1(&self) -> bool {
157        *self == LVD2ST_A::_1
158    }
159}
160#[doc = "Field `OSTST` reader - Oscillation Stop Detection Interrupt Status Flag"]
161pub type OSTST_R = crate::BitReader<OSTST_A>;
162#[doc = "Oscillation Stop Detection Interrupt Status Flag\n\nValue on reset: 0"]
163#[derive(Clone, Copy, Debug, PartialEq, Eq)]
164pub enum OSTST_A {
165    #[doc = "0: Main Oscillation stop detection interrupt is not requested."]
166    _0 = 0,
167    #[doc = "1: Main Oscillation stop detection interrupt is requested."]
168    _1 = 1,
169}
170impl From<OSTST_A> for bool {
171    #[inline(always)]
172    fn from(variant: OSTST_A) -> Self {
173        variant as u8 != 0
174    }
175}
176impl OSTST_R {
177    #[doc = "Get enumerated values variant"]
178    #[inline(always)]
179    pub fn variant(&self) -> OSTST_A {
180        match self.bits {
181            false => OSTST_A::_0,
182            true => OSTST_A::_1,
183        }
184    }
185    #[doc = "Checks if the value of the field is `_0`"]
186    #[inline(always)]
187    pub fn is_0(&self) -> bool {
188        *self == OSTST_A::_0
189    }
190    #[doc = "Checks if the value of the field is `_1`"]
191    #[inline(always)]
192    pub fn is_1(&self) -> bool {
193        *self == OSTST_A::_1
194    }
195}
196#[doc = "Field `NMIST` reader - NMI Status Flag"]
197pub type NMIST_R = crate::BitReader<NMIST_A>;
198#[doc = "NMI Status Flag\n\nValue on reset: 0"]
199#[derive(Clone, Copy, Debug, PartialEq, Eq)]
200pub enum NMIST_A {
201    #[doc = "0: NMI pin interrupt is not requested."]
202    _0 = 0,
203    #[doc = "1: NMI pin interrupt is requested."]
204    _1 = 1,
205}
206impl From<NMIST_A> for bool {
207    #[inline(always)]
208    fn from(variant: NMIST_A) -> Self {
209        variant as u8 != 0
210    }
211}
212impl NMIST_R {
213    #[doc = "Get enumerated values variant"]
214    #[inline(always)]
215    pub fn variant(&self) -> NMIST_A {
216        match self.bits {
217            false => NMIST_A::_0,
218            true => NMIST_A::_1,
219        }
220    }
221    #[doc = "Checks if the value of the field is `_0`"]
222    #[inline(always)]
223    pub fn is_0(&self) -> bool {
224        *self == NMIST_A::_0
225    }
226    #[doc = "Checks if the value of the field is `_1`"]
227    #[inline(always)]
228    pub fn is_1(&self) -> bool {
229        *self == NMIST_A::_1
230    }
231}
232#[doc = "Field `RPEST` reader - RAM Parity Error Interrupt Status Flag"]
233pub type RPEST_R = crate::BitReader<RPEST_A>;
234#[doc = "RAM Parity Error Interrupt Status Flag\n\nValue on reset: 0"]
235#[derive(Clone, Copy, Debug, PartialEq, Eq)]
236pub enum RPEST_A {
237    #[doc = "0: RAM Parity Error interrupt is not requested."]
238    _0 = 0,
239    #[doc = "1: RAM Parity Error interrupt is requested."]
240    _1 = 1,
241}
242impl From<RPEST_A> for bool {
243    #[inline(always)]
244    fn from(variant: RPEST_A) -> Self {
245        variant as u8 != 0
246    }
247}
248impl RPEST_R {
249    #[doc = "Get enumerated values variant"]
250    #[inline(always)]
251    pub fn variant(&self) -> RPEST_A {
252        match self.bits {
253            false => RPEST_A::_0,
254            true => RPEST_A::_1,
255        }
256    }
257    #[doc = "Checks if the value of the field is `_0`"]
258    #[inline(always)]
259    pub fn is_0(&self) -> bool {
260        *self == RPEST_A::_0
261    }
262    #[doc = "Checks if the value of the field is `_1`"]
263    #[inline(always)]
264    pub fn is_1(&self) -> bool {
265        *self == RPEST_A::_1
266    }
267}
268#[doc = "Field `RECCST` reader - SRAM ECC Error Interrupt Status Flag"]
269pub type RECCST_R = crate::BitReader<RECCST_A>;
270#[doc = "SRAM ECC Error Interrupt Status Flag\n\nValue on reset: 0"]
271#[derive(Clone, Copy, Debug, PartialEq, Eq)]
272pub enum RECCST_A {
273    #[doc = "0: Interrupt not requested"]
274    _0 = 0,
275    #[doc = "1: Interrupt requested."]
276    _1 = 1,
277}
278impl From<RECCST_A> for bool {
279    #[inline(always)]
280    fn from(variant: RECCST_A) -> Self {
281        variant as u8 != 0
282    }
283}
284impl RECCST_R {
285    #[doc = "Get enumerated values variant"]
286    #[inline(always)]
287    pub fn variant(&self) -> RECCST_A {
288        match self.bits {
289            false => RECCST_A::_0,
290            true => RECCST_A::_1,
291        }
292    }
293    #[doc = "Checks if the value of the field is `_0`"]
294    #[inline(always)]
295    pub fn is_0(&self) -> bool {
296        *self == RECCST_A::_0
297    }
298    #[doc = "Checks if the value of the field is `_1`"]
299    #[inline(always)]
300    pub fn is_1(&self) -> bool {
301        *self == RECCST_A::_1
302    }
303}
304#[doc = "Field `BUSSST` reader - MPU Bus Slave Error Interrupt Status Flag"]
305pub type BUSSST_R = crate::BitReader<BUSSST_A>;
306#[doc = "MPU Bus Slave Error Interrupt Status Flag\n\nValue on reset: 0"]
307#[derive(Clone, Copy, Debug, PartialEq, Eq)]
308pub enum BUSSST_A {
309    #[doc = "0: Interrupt not requested"]
310    _0 = 0,
311    #[doc = "1: Interrupt requested."]
312    _1 = 1,
313}
314impl From<BUSSST_A> for bool {
315    #[inline(always)]
316    fn from(variant: BUSSST_A) -> Self {
317        variant as u8 != 0
318    }
319}
320impl BUSSST_R {
321    #[doc = "Get enumerated values variant"]
322    #[inline(always)]
323    pub fn variant(&self) -> BUSSST_A {
324        match self.bits {
325            false => BUSSST_A::_0,
326            true => BUSSST_A::_1,
327        }
328    }
329    #[doc = "Checks if the value of the field is `_0`"]
330    #[inline(always)]
331    pub fn is_0(&self) -> bool {
332        *self == BUSSST_A::_0
333    }
334    #[doc = "Checks if the value of the field is `_1`"]
335    #[inline(always)]
336    pub fn is_1(&self) -> bool {
337        *self == BUSSST_A::_1
338    }
339}
340#[doc = "Field `BUSMST` reader - MPU Bus Master Error Interrupt Status Flag"]
341pub type BUSMST_R = crate::BitReader<BUSMST_A>;
342#[doc = "MPU Bus Master Error Interrupt Status Flag\n\nValue on reset: 0"]
343#[derive(Clone, Copy, Debug, PartialEq, Eq)]
344pub enum BUSMST_A {
345    #[doc = "0: Interrupt not requested"]
346    _0 = 0,
347    #[doc = "1: Interrupt requested."]
348    _1 = 1,
349}
350impl From<BUSMST_A> for bool {
351    #[inline(always)]
352    fn from(variant: BUSMST_A) -> Self {
353        variant as u8 != 0
354    }
355}
356impl BUSMST_R {
357    #[doc = "Get enumerated values variant"]
358    #[inline(always)]
359    pub fn variant(&self) -> BUSMST_A {
360        match self.bits {
361            false => BUSMST_A::_0,
362            true => BUSMST_A::_1,
363        }
364    }
365    #[doc = "Checks if the value of the field is `_0`"]
366    #[inline(always)]
367    pub fn is_0(&self) -> bool {
368        *self == BUSMST_A::_0
369    }
370    #[doc = "Checks if the value of the field is `_1`"]
371    #[inline(always)]
372    pub fn is_1(&self) -> bool {
373        *self == BUSMST_A::_1
374    }
375}
376#[doc = "Field `SPEST` reader - CPU Stack Pointer Monitor Interrupt Status Flag"]
377pub type SPEST_R = crate::BitReader<SPEST_A>;
378#[doc = "CPU Stack Pointer Monitor Interrupt Status Flag\n\nValue on reset: 0"]
379#[derive(Clone, Copy, Debug, PartialEq, Eq)]
380pub enum SPEST_A {
381    #[doc = "0: Interrupt not requested"]
382    _0 = 0,
383    #[doc = "1: Interrupt requested."]
384    _1 = 1,
385}
386impl From<SPEST_A> for bool {
387    #[inline(always)]
388    fn from(variant: SPEST_A) -> Self {
389        variant as u8 != 0
390    }
391}
392impl SPEST_R {
393    #[doc = "Get enumerated values variant"]
394    #[inline(always)]
395    pub fn variant(&self) -> SPEST_A {
396        match self.bits {
397            false => SPEST_A::_0,
398            true => SPEST_A::_1,
399        }
400    }
401    #[doc = "Checks if the value of the field is `_0`"]
402    #[inline(always)]
403    pub fn is_0(&self) -> bool {
404        *self == SPEST_A::_0
405    }
406    #[doc = "Checks if the value of the field is `_1`"]
407    #[inline(always)]
408    pub fn is_1(&self) -> bool {
409        *self == SPEST_A::_1
410    }
411}
412impl R {
413    #[doc = "Bit 0 - IWDT Underflow/Refresh Error Status Flag"]
414    #[inline(always)]
415    pub fn iwdtst(&self) -> IWDTST_R {
416        IWDTST_R::new((self.bits & 1) != 0)
417    }
418    #[doc = "Bit 1 - WDT Underflow/Refresh Error Status Flag"]
419    #[inline(always)]
420    pub fn wdtst(&self) -> WDTST_R {
421        WDTST_R::new(((self.bits >> 1) & 1) != 0)
422    }
423    #[doc = "Bit 2 - Voltage-Monitoring 1 Interrupt Status Flag"]
424    #[inline(always)]
425    pub fn lvd1st(&self) -> LVD1ST_R {
426        LVD1ST_R::new(((self.bits >> 2) & 1) != 0)
427    }
428    #[doc = "Bit 3 - Voltage-Monitoring 2 Interrupt Status Flag"]
429    #[inline(always)]
430    pub fn lvd2st(&self) -> LVD2ST_R {
431        LVD2ST_R::new(((self.bits >> 3) & 1) != 0)
432    }
433    #[doc = "Bit 6 - Oscillation Stop Detection Interrupt Status Flag"]
434    #[inline(always)]
435    pub fn ostst(&self) -> OSTST_R {
436        OSTST_R::new(((self.bits >> 6) & 1) != 0)
437    }
438    #[doc = "Bit 7 - NMI Status Flag"]
439    #[inline(always)]
440    pub fn nmist(&self) -> NMIST_R {
441        NMIST_R::new(((self.bits >> 7) & 1) != 0)
442    }
443    #[doc = "Bit 8 - RAM Parity Error Interrupt Status Flag"]
444    #[inline(always)]
445    pub fn rpest(&self) -> RPEST_R {
446        RPEST_R::new(((self.bits >> 8) & 1) != 0)
447    }
448    #[doc = "Bit 9 - SRAM ECC Error Interrupt Status Flag"]
449    #[inline(always)]
450    pub fn reccst(&self) -> RECCST_R {
451        RECCST_R::new(((self.bits >> 9) & 1) != 0)
452    }
453    #[doc = "Bit 10 - MPU Bus Slave Error Interrupt Status Flag"]
454    #[inline(always)]
455    pub fn bussst(&self) -> BUSSST_R {
456        BUSSST_R::new(((self.bits >> 10) & 1) != 0)
457    }
458    #[doc = "Bit 11 - MPU Bus Master Error Interrupt Status Flag"]
459    #[inline(always)]
460    pub fn busmst(&self) -> BUSMST_R {
461        BUSMST_R::new(((self.bits >> 11) & 1) != 0)
462    }
463    #[doc = "Bit 12 - CPU Stack Pointer Monitor Interrupt Status Flag"]
464    #[inline(always)]
465    pub fn spest(&self) -> SPEST_R {
466        SPEST_R::new(((self.bits >> 12) & 1) != 0)
467    }
468}
469#[doc = "Non-Maskable Interrupt Status 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 [nmisr](index.html) module"]
470pub struct NMISR_SPEC;
471impl crate::RegisterSpec for NMISR_SPEC {
472    type Ux = u16;
473}
474#[doc = "`read()` method returns [nmisr::R](R) reader structure"]
475impl crate::Readable for NMISR_SPEC {
476    type Reader = R;
477}
478#[doc = "`reset()` method sets NMISR to value 0"]
479impl crate::Resettable for NMISR_SPEC {
480    const RESET_VALUE: Self::Ux = 0;
481}