xmc4100/scu_reset/
prstat1.rs1#[doc = "Register `PRSTAT1` reader"]
2pub type R = crate::R<PRSTAT1_SPEC>;
3#[doc = "LEDTS Reset Status\n\nValue on reset: 1"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum LEDTSCU0RS_A {
6 #[doc = "0: Reset de-asserted"]
7 VALUE1 = 0,
8 #[doc = "1: Reset asserted"]
9 VALUE2 = 1,
10}
11impl From<LEDTSCU0RS_A> for bool {
12 #[inline(always)]
13 fn from(variant: LEDTSCU0RS_A) -> Self {
14 variant as u8 != 0
15 }
16}
17#[doc = "Field `LEDTSCU0RS` reader - LEDTS Reset Status"]
18pub type LEDTSCU0RS_R = crate::BitReader<LEDTSCU0RS_A>;
19impl LEDTSCU0RS_R {
20 #[doc = "Get enumerated values variant"]
21 #[inline(always)]
22 pub const fn variant(&self) -> LEDTSCU0RS_A {
23 match self.bits {
24 false => LEDTSCU0RS_A::VALUE1,
25 true => LEDTSCU0RS_A::VALUE2,
26 }
27 }
28 #[doc = "Reset de-asserted"]
29 #[inline(always)]
30 pub fn is_value1(&self) -> bool {
31 *self == LEDTSCU0RS_A::VALUE1
32 }
33 #[doc = "Reset asserted"]
34 #[inline(always)]
35 pub fn is_value2(&self) -> bool {
36 *self == LEDTSCU0RS_A::VALUE2
37 }
38}
39#[doc = "MultiCAN Reset Status\n\nValue on reset: 1"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum MCAN0RS_A {
42 #[doc = "0: Reset de-asserted"]
43 VALUE1 = 0,
44 #[doc = "1: Reset asserted"]
45 VALUE2 = 1,
46}
47impl From<MCAN0RS_A> for bool {
48 #[inline(always)]
49 fn from(variant: MCAN0RS_A) -> Self {
50 variant as u8 != 0
51 }
52}
53#[doc = "Field `MCAN0RS` reader - MultiCAN Reset Status"]
54pub type MCAN0RS_R = crate::BitReader<MCAN0RS_A>;
55impl MCAN0RS_R {
56 #[doc = "Get enumerated values variant"]
57 #[inline(always)]
58 pub const fn variant(&self) -> MCAN0RS_A {
59 match self.bits {
60 false => MCAN0RS_A::VALUE1,
61 true => MCAN0RS_A::VALUE2,
62 }
63 }
64 #[doc = "Reset de-asserted"]
65 #[inline(always)]
66 pub fn is_value1(&self) -> bool {
67 *self == MCAN0RS_A::VALUE1
68 }
69 #[doc = "Reset asserted"]
70 #[inline(always)]
71 pub fn is_value2(&self) -> bool {
72 *self == MCAN0RS_A::VALUE2
73 }
74}
75#[doc = "DAC Reset Status\n\nValue on reset: 1"]
76#[derive(Clone, Copy, Debug, PartialEq, Eq)]
77pub enum DACRS_A {
78 #[doc = "0: Reset de-asserted"]
79 VALUE1 = 0,
80 #[doc = "1: Reset asserted"]
81 VALUE2 = 1,
82}
83impl From<DACRS_A> for bool {
84 #[inline(always)]
85 fn from(variant: DACRS_A) -> Self {
86 variant as u8 != 0
87 }
88}
89#[doc = "Field `DACRS` reader - DAC Reset Status"]
90pub type DACRS_R = crate::BitReader<DACRS_A>;
91impl DACRS_R {
92 #[doc = "Get enumerated values variant"]
93 #[inline(always)]
94 pub const fn variant(&self) -> DACRS_A {
95 match self.bits {
96 false => DACRS_A::VALUE1,
97 true => DACRS_A::VALUE2,
98 }
99 }
100 #[doc = "Reset de-asserted"]
101 #[inline(always)]
102 pub fn is_value1(&self) -> bool {
103 *self == DACRS_A::VALUE1
104 }
105 #[doc = "Reset asserted"]
106 #[inline(always)]
107 pub fn is_value2(&self) -> bool {
108 *self == DACRS_A::VALUE2
109 }
110}
111#[doc = "USIC1 Reset Status\n\nValue on reset: 1"]
112#[derive(Clone, Copy, Debug, PartialEq, Eq)]
113pub enum USIC1RS_A {
114 #[doc = "0: Reset de-asserted"]
115 VALUE1 = 0,
116 #[doc = "1: Reset asserted"]
117 VALUE2 = 1,
118}
119impl From<USIC1RS_A> for bool {
120 #[inline(always)]
121 fn from(variant: USIC1RS_A) -> Self {
122 variant as u8 != 0
123 }
124}
125#[doc = "Field `USIC1RS` reader - USIC1 Reset Status"]
126pub type USIC1RS_R = crate::BitReader<USIC1RS_A>;
127impl USIC1RS_R {
128 #[doc = "Get enumerated values variant"]
129 #[inline(always)]
130 pub const fn variant(&self) -> USIC1RS_A {
131 match self.bits {
132 false => USIC1RS_A::VALUE1,
133 true => USIC1RS_A::VALUE2,
134 }
135 }
136 #[doc = "Reset de-asserted"]
137 #[inline(always)]
138 pub fn is_value1(&self) -> bool {
139 *self == USIC1RS_A::VALUE1
140 }
141 #[doc = "Reset asserted"]
142 #[inline(always)]
143 pub fn is_value2(&self) -> bool {
144 *self == USIC1RS_A::VALUE2
145 }
146}
147#[doc = "PORTS Reset Status\n\nValue on reset: 0"]
148#[derive(Clone, Copy, Debug, PartialEq, Eq)]
149pub enum PPORTSRS_A {
150 #[doc = "0: Reset de-asserted"]
151 VALUE1 = 0,
152 #[doc = "1: Reset asserted"]
153 VALUE2 = 1,
154}
155impl From<PPORTSRS_A> for bool {
156 #[inline(always)]
157 fn from(variant: PPORTSRS_A) -> Self {
158 variant as u8 != 0
159 }
160}
161#[doc = "Field `PPORTSRS` reader - PORTS Reset Status"]
162pub type PPORTSRS_R = crate::BitReader<PPORTSRS_A>;
163impl PPORTSRS_R {
164 #[doc = "Get enumerated values variant"]
165 #[inline(always)]
166 pub const fn variant(&self) -> PPORTSRS_A {
167 match self.bits {
168 false => PPORTSRS_A::VALUE1,
169 true => PPORTSRS_A::VALUE2,
170 }
171 }
172 #[doc = "Reset de-asserted"]
173 #[inline(always)]
174 pub fn is_value1(&self) -> bool {
175 *self == PPORTSRS_A::VALUE1
176 }
177 #[doc = "Reset asserted"]
178 #[inline(always)]
179 pub fn is_value2(&self) -> bool {
180 *self == PPORTSRS_A::VALUE2
181 }
182}
183impl R {
184 #[doc = "Bit 3 - LEDTS Reset Status"]
185 #[inline(always)]
186 pub fn ledtscu0rs(&self) -> LEDTSCU0RS_R {
187 LEDTSCU0RS_R::new(((self.bits >> 3) & 1) != 0)
188 }
189 #[doc = "Bit 4 - MultiCAN Reset Status"]
190 #[inline(always)]
191 pub fn mcan0rs(&self) -> MCAN0RS_R {
192 MCAN0RS_R::new(((self.bits >> 4) & 1) != 0)
193 }
194 #[doc = "Bit 5 - DAC Reset Status"]
195 #[inline(always)]
196 pub fn dacrs(&self) -> DACRS_R {
197 DACRS_R::new(((self.bits >> 5) & 1) != 0)
198 }
199 #[doc = "Bit 7 - USIC1 Reset Status"]
200 #[inline(always)]
201 pub fn usic1rs(&self) -> USIC1RS_R {
202 USIC1RS_R::new(((self.bits >> 7) & 1) != 0)
203 }
204 #[doc = "Bit 9 - PORTS Reset Status"]
205 #[inline(always)]
206 pub fn pportsrs(&self) -> PPORTSRS_R {
207 PPORTSRS_R::new(((self.bits >> 9) & 1) != 0)
208 }
209}
210#[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)."]
211pub struct PRSTAT1_SPEC;
212impl crate::RegisterSpec for PRSTAT1_SPEC {
213 type Ux = u32;
214}
215#[doc = "`read()` method returns [`prstat1::R`](R) reader structure"]
216impl crate::Readable for PRSTAT1_SPEC {}
217#[doc = "`reset()` method sets PRSTAT1 to value 0xb8"]
218impl crate::Resettable for PRSTAT1_SPEC {
219 const RESET_VALUE: u32 = 0xb8;
220}