xmc4800/scu_reset/
prstat1.rs

1#[doc = "Register `PRSTAT1` reader"]
2pub type R = crate::R<PRSTAT1_SPEC>;
3#[doc = "CCU43 Reset Status\n\nValue on reset: 1"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum CCU43RS_A {
6    #[doc = "0: Reset de-asserted"]
7    VALUE1 = 0,
8    #[doc = "1: Reset asserted"]
9    VALUE2 = 1,
10}
11impl From<CCU43RS_A> for bool {
12    #[inline(always)]
13    fn from(variant: CCU43RS_A) -> Self {
14        variant as u8 != 0
15    }
16}
17#[doc = "Field `CCU43RS` reader - CCU43 Reset Status"]
18pub type CCU43RS_R = crate::BitReader<CCU43RS_A>;
19impl CCU43RS_R {
20    #[doc = "Get enumerated values variant"]
21    #[inline(always)]
22    pub const fn variant(&self) -> CCU43RS_A {
23        match self.bits {
24            false => CCU43RS_A::VALUE1,
25            true => CCU43RS_A::VALUE2,
26        }
27    }
28    #[doc = "Reset de-asserted"]
29    #[inline(always)]
30    pub fn is_value1(&self) -> bool {
31        *self == CCU43RS_A::VALUE1
32    }
33    #[doc = "Reset asserted"]
34    #[inline(always)]
35    pub fn is_value2(&self) -> bool {
36        *self == CCU43RS_A::VALUE2
37    }
38}
39#[doc = "LEDTS Reset Status\n\nValue on reset: 1"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum LEDTSCU0RS_A {
42    #[doc = "0: Reset de-asserted"]
43    VALUE1 = 0,
44    #[doc = "1: Reset asserted"]
45    VALUE2 = 1,
46}
47impl From<LEDTSCU0RS_A> for bool {
48    #[inline(always)]
49    fn from(variant: LEDTSCU0RS_A) -> Self {
50        variant as u8 != 0
51    }
52}
53#[doc = "Field `LEDTSCU0RS` reader - LEDTS Reset Status"]
54pub type LEDTSCU0RS_R = crate::BitReader<LEDTSCU0RS_A>;
55impl LEDTSCU0RS_R {
56    #[doc = "Get enumerated values variant"]
57    #[inline(always)]
58    pub const fn variant(&self) -> LEDTSCU0RS_A {
59        match self.bits {
60            false => LEDTSCU0RS_A::VALUE1,
61            true => LEDTSCU0RS_A::VALUE2,
62        }
63    }
64    #[doc = "Reset de-asserted"]
65    #[inline(always)]
66    pub fn is_value1(&self) -> bool {
67        *self == LEDTSCU0RS_A::VALUE1
68    }
69    #[doc = "Reset asserted"]
70    #[inline(always)]
71    pub fn is_value2(&self) -> bool {
72        *self == LEDTSCU0RS_A::VALUE2
73    }
74}
75#[doc = "MultiCAN Reset Status\n\nValue on reset: 1"]
76#[derive(Clone, Copy, Debug, PartialEq, Eq)]
77pub enum MCAN0RS_A {
78    #[doc = "0: Reset de-asserted"]
79    VALUE1 = 0,
80    #[doc = "1: Reset asserted"]
81    VALUE2 = 1,
82}
83impl From<MCAN0RS_A> for bool {
84    #[inline(always)]
85    fn from(variant: MCAN0RS_A) -> Self {
86        variant as u8 != 0
87    }
88}
89#[doc = "Field `MCAN0RS` reader - MultiCAN Reset Status"]
90pub type MCAN0RS_R = crate::BitReader<MCAN0RS_A>;
91impl MCAN0RS_R {
92    #[doc = "Get enumerated values variant"]
93    #[inline(always)]
94    pub const fn variant(&self) -> MCAN0RS_A {
95        match self.bits {
96            false => MCAN0RS_A::VALUE1,
97            true => MCAN0RS_A::VALUE2,
98        }
99    }
100    #[doc = "Reset de-asserted"]
101    #[inline(always)]
102    pub fn is_value1(&self) -> bool {
103        *self == MCAN0RS_A::VALUE1
104    }
105    #[doc = "Reset asserted"]
106    #[inline(always)]
107    pub fn is_value2(&self) -> bool {
108        *self == MCAN0RS_A::VALUE2
109    }
110}
111#[doc = "DAC Reset Status\n\nValue on reset: 1"]
112#[derive(Clone, Copy, Debug, PartialEq, Eq)]
113pub enum DACRS_A {
114    #[doc = "0: Reset de-asserted"]
115    VALUE1 = 0,
116    #[doc = "1: Reset asserted"]
117    VALUE2 = 1,
118}
119impl From<DACRS_A> for bool {
120    #[inline(always)]
121    fn from(variant: DACRS_A) -> Self {
122        variant as u8 != 0
123    }
124}
125#[doc = "Field `DACRS` reader - DAC Reset Status"]
126pub type DACRS_R = crate::BitReader<DACRS_A>;
127impl DACRS_R {
128    #[doc = "Get enumerated values variant"]
129    #[inline(always)]
130    pub const fn variant(&self) -> DACRS_A {
131        match self.bits {
132            false => DACRS_A::VALUE1,
133            true => DACRS_A::VALUE2,
134        }
135    }
136    #[doc = "Reset de-asserted"]
137    #[inline(always)]
138    pub fn is_value1(&self) -> bool {
139        *self == DACRS_A::VALUE1
140    }
141    #[doc = "Reset asserted"]
142    #[inline(always)]
143    pub fn is_value2(&self) -> bool {
144        *self == DACRS_A::VALUE2
145    }
146}
147#[doc = "MMC Interface Reset Status\n\nValue on reset: 1"]
148#[derive(Clone, Copy, Debug, PartialEq, Eq)]
149pub enum MMCIRS_A {
150    #[doc = "0: Reset de-asserted"]
151    VALUE1 = 0,
152    #[doc = "1: Reset asserted"]
153    VALUE2 = 1,
154}
155impl From<MMCIRS_A> for bool {
156    #[inline(always)]
157    fn from(variant: MMCIRS_A) -> Self {
158        variant as u8 != 0
159    }
160}
161#[doc = "Field `MMCIRS` reader - MMC Interface Reset Status"]
162pub type MMCIRS_R = crate::BitReader<MMCIRS_A>;
163impl MMCIRS_R {
164    #[doc = "Get enumerated values variant"]
165    #[inline(always)]
166    pub const fn variant(&self) -> MMCIRS_A {
167        match self.bits {
168            false => MMCIRS_A::VALUE1,
169            true => MMCIRS_A::VALUE2,
170        }
171    }
172    #[doc = "Reset de-asserted"]
173    #[inline(always)]
174    pub fn is_value1(&self) -> bool {
175        *self == MMCIRS_A::VALUE1
176    }
177    #[doc = "Reset asserted"]
178    #[inline(always)]
179    pub fn is_value2(&self) -> bool {
180        *self == MMCIRS_A::VALUE2
181    }
182}
183#[doc = "USIC1 Reset Status\n\nValue on reset: 1"]
184#[derive(Clone, Copy, Debug, PartialEq, Eq)]
185pub enum USIC1RS_A {
186    #[doc = "0: Reset de-asserted"]
187    VALUE1 = 0,
188    #[doc = "1: Reset asserted"]
189    VALUE2 = 1,
190}
191impl From<USIC1RS_A> for bool {
192    #[inline(always)]
193    fn from(variant: USIC1RS_A) -> Self {
194        variant as u8 != 0
195    }
196}
197#[doc = "Field `USIC1RS` reader - USIC1 Reset Status"]
198pub type USIC1RS_R = crate::BitReader<USIC1RS_A>;
199impl USIC1RS_R {
200    #[doc = "Get enumerated values variant"]
201    #[inline(always)]
202    pub const fn variant(&self) -> USIC1RS_A {
203        match self.bits {
204            false => USIC1RS_A::VALUE1,
205            true => USIC1RS_A::VALUE2,
206        }
207    }
208    #[doc = "Reset de-asserted"]
209    #[inline(always)]
210    pub fn is_value1(&self) -> bool {
211        *self == USIC1RS_A::VALUE1
212    }
213    #[doc = "Reset asserted"]
214    #[inline(always)]
215    pub fn is_value2(&self) -> bool {
216        *self == USIC1RS_A::VALUE2
217    }
218}
219#[doc = "USIC2 Reset Status\n\nValue on reset: 1"]
220#[derive(Clone, Copy, Debug, PartialEq, Eq)]
221pub enum USIC2RS_A {
222    #[doc = "0: Reset de-asserted"]
223    VALUE1 = 0,
224    #[doc = "1: Reset asserted"]
225    VALUE2 = 1,
226}
227impl From<USIC2RS_A> for bool {
228    #[inline(always)]
229    fn from(variant: USIC2RS_A) -> Self {
230        variant as u8 != 0
231    }
232}
233#[doc = "Field `USIC2RS` reader - USIC2 Reset Status"]
234pub type USIC2RS_R = crate::BitReader<USIC2RS_A>;
235impl USIC2RS_R {
236    #[doc = "Get enumerated values variant"]
237    #[inline(always)]
238    pub const fn variant(&self) -> USIC2RS_A {
239        match self.bits {
240            false => USIC2RS_A::VALUE1,
241            true => USIC2RS_A::VALUE2,
242        }
243    }
244    #[doc = "Reset de-asserted"]
245    #[inline(always)]
246    pub fn is_value1(&self) -> bool {
247        *self == USIC2RS_A::VALUE1
248    }
249    #[doc = "Reset asserted"]
250    #[inline(always)]
251    pub fn is_value2(&self) -> bool {
252        *self == USIC2RS_A::VALUE2
253    }
254}
255#[doc = "PORTS Reset Status\n\nValue on reset: 0"]
256#[derive(Clone, Copy, Debug, PartialEq, Eq)]
257pub enum PPORTSRS_A {
258    #[doc = "0: Reset de-asserted"]
259    VALUE1 = 0,
260    #[doc = "1: Reset asserted"]
261    VALUE2 = 1,
262}
263impl From<PPORTSRS_A> for bool {
264    #[inline(always)]
265    fn from(variant: PPORTSRS_A) -> Self {
266        variant as u8 != 0
267    }
268}
269#[doc = "Field `PPORTSRS` reader - PORTS Reset Status"]
270pub type PPORTSRS_R = crate::BitReader<PPORTSRS_A>;
271impl PPORTSRS_R {
272    #[doc = "Get enumerated values variant"]
273    #[inline(always)]
274    pub const fn variant(&self) -> PPORTSRS_A {
275        match self.bits {
276            false => PPORTSRS_A::VALUE1,
277            true => PPORTSRS_A::VALUE2,
278        }
279    }
280    #[doc = "Reset de-asserted"]
281    #[inline(always)]
282    pub fn is_value1(&self) -> bool {
283        *self == PPORTSRS_A::VALUE1
284    }
285    #[doc = "Reset asserted"]
286    #[inline(always)]
287    pub fn is_value2(&self) -> bool {
288        *self == PPORTSRS_A::VALUE2
289    }
290}
291impl R {
292    #[doc = "Bit 0 - CCU43 Reset Status"]
293    #[inline(always)]
294    pub fn ccu43rs(&self) -> CCU43RS_R {
295        CCU43RS_R::new((self.bits & 1) != 0)
296    }
297    #[doc = "Bit 3 - LEDTS Reset Status"]
298    #[inline(always)]
299    pub fn ledtscu0rs(&self) -> LEDTSCU0RS_R {
300        LEDTSCU0RS_R::new(((self.bits >> 3) & 1) != 0)
301    }
302    #[doc = "Bit 4 - MultiCAN Reset Status"]
303    #[inline(always)]
304    pub fn mcan0rs(&self) -> MCAN0RS_R {
305        MCAN0RS_R::new(((self.bits >> 4) & 1) != 0)
306    }
307    #[doc = "Bit 5 - DAC Reset Status"]
308    #[inline(always)]
309    pub fn dacrs(&self) -> DACRS_R {
310        DACRS_R::new(((self.bits >> 5) & 1) != 0)
311    }
312    #[doc = "Bit 6 - MMC Interface Reset Status"]
313    #[inline(always)]
314    pub fn mmcirs(&self) -> MMCIRS_R {
315        MMCIRS_R::new(((self.bits >> 6) & 1) != 0)
316    }
317    #[doc = "Bit 7 - USIC1 Reset Status"]
318    #[inline(always)]
319    pub fn usic1rs(&self) -> USIC1RS_R {
320        USIC1RS_R::new(((self.bits >> 7) & 1) != 0)
321    }
322    #[doc = "Bit 8 - USIC2 Reset Status"]
323    #[inline(always)]
324    pub fn usic2rs(&self) -> USIC2RS_R {
325        USIC2RS_R::new(((self.bits >> 8) & 1) != 0)
326    }
327    #[doc = "Bit 9 - PORTS Reset Status"]
328    #[inline(always)]
329    pub fn pportsrs(&self) -> PPORTSRS_R {
330        PPORTSRS_R::new(((self.bits >> 9) & 1) != 0)
331    }
332}
333#[doc = "RCU Peripheral 1 Reset Status\n\nYou can [`read`](crate::Reg::read) this register and get [`prstat1::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
334pub struct PRSTAT1_SPEC;
335impl crate::RegisterSpec for PRSTAT1_SPEC {
336    type Ux = u32;
337}
338#[doc = "`read()` method returns [`prstat1::R`](R) reader structure"]
339impl crate::Readable for PRSTAT1_SPEC {}
340#[doc = "`reset()` method sets PRSTAT1 to value 0x01f9"]
341impl crate::Resettable for PRSTAT1_SPEC {
342    const RESET_VALUE: u32 = 0x01f9;
343}