xmc4100/scu_reset/
prset0.rs

1#[doc = "Register `PRSET0` writer"]
2pub type W = crate::W<PRSET0_SPEC>;
3#[doc = "VADC Reset Assert\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum VADCRS_A {
6    #[doc = "0: No effect"]
7    VALUE1 = 0,
8    #[doc = "1: Assert reset"]
9    VALUE2 = 1,
10}
11impl From<VADCRS_A> for bool {
12    #[inline(always)]
13    fn from(variant: VADCRS_A) -> Self {
14        variant as u8 != 0
15    }
16}
17#[doc = "Field `VADCRS` writer - VADC Reset Assert"]
18pub type VADCRS_W<'a, REG> = crate::BitWriter<'a, REG, VADCRS_A>;
19impl<'a, REG> VADCRS_W<'a, REG>
20where
21    REG: crate::Writable + crate::RegisterSpec,
22{
23    #[doc = "No effect"]
24    #[inline(always)]
25    pub fn value1(self) -> &'a mut crate::W<REG> {
26        self.variant(VADCRS_A::VALUE1)
27    }
28    #[doc = "Assert reset"]
29    #[inline(always)]
30    pub fn value2(self) -> &'a mut crate::W<REG> {
31        self.variant(VADCRS_A::VALUE2)
32    }
33}
34#[doc = "CCU40 Reset Assert\n\nValue on reset: 0"]
35#[derive(Clone, Copy, Debug, PartialEq, Eq)]
36pub enum CCU40RS_A {
37    #[doc = "0: No effect"]
38    VALUE1 = 0,
39    #[doc = "1: Assert reset"]
40    VALUE2 = 1,
41}
42impl From<CCU40RS_A> for bool {
43    #[inline(always)]
44    fn from(variant: CCU40RS_A) -> Self {
45        variant as u8 != 0
46    }
47}
48#[doc = "Field `CCU40RS` writer - CCU40 Reset Assert"]
49pub type CCU40RS_W<'a, REG> = crate::BitWriter<'a, REG, CCU40RS_A>;
50impl<'a, REG> CCU40RS_W<'a, REG>
51where
52    REG: crate::Writable + crate::RegisterSpec,
53{
54    #[doc = "No effect"]
55    #[inline(always)]
56    pub fn value1(self) -> &'a mut crate::W<REG> {
57        self.variant(CCU40RS_A::VALUE1)
58    }
59    #[doc = "Assert reset"]
60    #[inline(always)]
61    pub fn value2(self) -> &'a mut crate::W<REG> {
62        self.variant(CCU40RS_A::VALUE2)
63    }
64}
65#[doc = "CCU41 Reset Assert\n\nValue on reset: 0"]
66#[derive(Clone, Copy, Debug, PartialEq, Eq)]
67pub enum CCU41RS_A {
68    #[doc = "0: No effect"]
69    VALUE1 = 0,
70    #[doc = "1: Assert reset"]
71    VALUE2 = 1,
72}
73impl From<CCU41RS_A> for bool {
74    #[inline(always)]
75    fn from(variant: CCU41RS_A) -> Self {
76        variant as u8 != 0
77    }
78}
79#[doc = "Field `CCU41RS` writer - CCU41 Reset Assert"]
80pub type CCU41RS_W<'a, REG> = crate::BitWriter<'a, REG, CCU41RS_A>;
81impl<'a, REG> CCU41RS_W<'a, REG>
82where
83    REG: crate::Writable + crate::RegisterSpec,
84{
85    #[doc = "No effect"]
86    #[inline(always)]
87    pub fn value1(self) -> &'a mut crate::W<REG> {
88        self.variant(CCU41RS_A::VALUE1)
89    }
90    #[doc = "Assert reset"]
91    #[inline(always)]
92    pub fn value2(self) -> &'a mut crate::W<REG> {
93        self.variant(CCU41RS_A::VALUE2)
94    }
95}
96#[doc = "CCU80 Reset Assert\n\nValue on reset: 0"]
97#[derive(Clone, Copy, Debug, PartialEq, Eq)]
98pub enum CCU80RS_A {
99    #[doc = "0: No effect"]
100    VALUE1 = 0,
101    #[doc = "1: Assert reset"]
102    VALUE2 = 1,
103}
104impl From<CCU80RS_A> for bool {
105    #[inline(always)]
106    fn from(variant: CCU80RS_A) -> Self {
107        variant as u8 != 0
108    }
109}
110#[doc = "Field `CCU80RS` writer - CCU80 Reset Assert"]
111pub type CCU80RS_W<'a, REG> = crate::BitWriter<'a, REG, CCU80RS_A>;
112impl<'a, REG> CCU80RS_W<'a, REG>
113where
114    REG: crate::Writable + crate::RegisterSpec,
115{
116    #[doc = "No effect"]
117    #[inline(always)]
118    pub fn value1(self) -> &'a mut crate::W<REG> {
119        self.variant(CCU80RS_A::VALUE1)
120    }
121    #[doc = "Assert reset"]
122    #[inline(always)]
123    pub fn value2(self) -> &'a mut crate::W<REG> {
124        self.variant(CCU80RS_A::VALUE2)
125    }
126}
127#[doc = "POSIF0 Reset Assert\n\nValue on reset: 0"]
128#[derive(Clone, Copy, Debug, PartialEq, Eq)]
129pub enum POSIF0RS_A {
130    #[doc = "0: No effect"]
131    VALUE1 = 0,
132    #[doc = "1: Assert reset"]
133    VALUE2 = 1,
134}
135impl From<POSIF0RS_A> for bool {
136    #[inline(always)]
137    fn from(variant: POSIF0RS_A) -> Self {
138        variant as u8 != 0
139    }
140}
141#[doc = "Field `POSIF0RS` writer - POSIF0 Reset Assert"]
142pub type POSIF0RS_W<'a, REG> = crate::BitWriter<'a, REG, POSIF0RS_A>;
143impl<'a, REG> POSIF0RS_W<'a, REG>
144where
145    REG: crate::Writable + crate::RegisterSpec,
146{
147    #[doc = "No effect"]
148    #[inline(always)]
149    pub fn value1(self) -> &'a mut crate::W<REG> {
150        self.variant(POSIF0RS_A::VALUE1)
151    }
152    #[doc = "Assert reset"]
153    #[inline(always)]
154    pub fn value2(self) -> &'a mut crate::W<REG> {
155        self.variant(POSIF0RS_A::VALUE2)
156    }
157}
158#[doc = "USIC0 Reset Assert\n\nValue on reset: 0"]
159#[derive(Clone, Copy, Debug, PartialEq, Eq)]
160pub enum USIC0RS_A {
161    #[doc = "0: No effect"]
162    VALUE1 = 0,
163    #[doc = "1: Assert reset"]
164    VALUE2 = 1,
165}
166impl From<USIC0RS_A> for bool {
167    #[inline(always)]
168    fn from(variant: USIC0RS_A) -> Self {
169        variant as u8 != 0
170    }
171}
172#[doc = "Field `USIC0RS` writer - USIC0 Reset Assert"]
173pub type USIC0RS_W<'a, REG> = crate::BitWriter<'a, REG, USIC0RS_A>;
174impl<'a, REG> USIC0RS_W<'a, REG>
175where
176    REG: crate::Writable + crate::RegisterSpec,
177{
178    #[doc = "No effect"]
179    #[inline(always)]
180    pub fn value1(self) -> &'a mut crate::W<REG> {
181        self.variant(USIC0RS_A::VALUE1)
182    }
183    #[doc = "Assert reset"]
184    #[inline(always)]
185    pub fn value2(self) -> &'a mut crate::W<REG> {
186        self.variant(USIC0RS_A::VALUE2)
187    }
188}
189#[doc = "ERU1 Reset Assert\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191pub enum ERU1RS_A {
192    #[doc = "0: No effect"]
193    VALUE1 = 0,
194    #[doc = "1: Assert reset"]
195    VALUE2 = 1,
196}
197impl From<ERU1RS_A> for bool {
198    #[inline(always)]
199    fn from(variant: ERU1RS_A) -> Self {
200        variant as u8 != 0
201    }
202}
203#[doc = "Field `ERU1RS` writer - ERU1 Reset Assert"]
204pub type ERU1RS_W<'a, REG> = crate::BitWriter<'a, REG, ERU1RS_A>;
205impl<'a, REG> ERU1RS_W<'a, REG>
206where
207    REG: crate::Writable + crate::RegisterSpec,
208{
209    #[doc = "No effect"]
210    #[inline(always)]
211    pub fn value1(self) -> &'a mut crate::W<REG> {
212        self.variant(ERU1RS_A::VALUE1)
213    }
214    #[doc = "Assert reset"]
215    #[inline(always)]
216    pub fn value2(self) -> &'a mut crate::W<REG> {
217        self.variant(ERU1RS_A::VALUE2)
218    }
219}
220#[doc = "HRPWM0 Reset Assert\n\nValue on reset: 0"]
221#[derive(Clone, Copy, Debug, PartialEq, Eq)]
222pub enum HRPWM0RS_A {
223    #[doc = "0: No effect"]
224    VALUE1 = 0,
225    #[doc = "1: Assert reset"]
226    VALUE2 = 1,
227}
228impl From<HRPWM0RS_A> for bool {
229    #[inline(always)]
230    fn from(variant: HRPWM0RS_A) -> Self {
231        variant as u8 != 0
232    }
233}
234#[doc = "Field `HRPWM0RS` writer - HRPWM0 Reset Assert"]
235pub type HRPWM0RS_W<'a, REG> = crate::BitWriter<'a, REG, HRPWM0RS_A>;
236impl<'a, REG> HRPWM0RS_W<'a, REG>
237where
238    REG: crate::Writable + crate::RegisterSpec,
239{
240    #[doc = "No effect"]
241    #[inline(always)]
242    pub fn value1(self) -> &'a mut crate::W<REG> {
243        self.variant(HRPWM0RS_A::VALUE1)
244    }
245    #[doc = "Assert reset"]
246    #[inline(always)]
247    pub fn value2(self) -> &'a mut crate::W<REG> {
248        self.variant(HRPWM0RS_A::VALUE2)
249    }
250}
251impl W {
252    #[doc = "Bit 0 - VADC Reset Assert"]
253    #[inline(always)]
254    pub fn vadcrs(&mut self) -> VADCRS_W<PRSET0_SPEC> {
255        VADCRS_W::new(self, 0)
256    }
257    #[doc = "Bit 2 - CCU40 Reset Assert"]
258    #[inline(always)]
259    pub fn ccu40rs(&mut self) -> CCU40RS_W<PRSET0_SPEC> {
260        CCU40RS_W::new(self, 2)
261    }
262    #[doc = "Bit 3 - CCU41 Reset Assert"]
263    #[inline(always)]
264    pub fn ccu41rs(&mut self) -> CCU41RS_W<PRSET0_SPEC> {
265        CCU41RS_W::new(self, 3)
266    }
267    #[doc = "Bit 7 - CCU80 Reset Assert"]
268    #[inline(always)]
269    pub fn ccu80rs(&mut self) -> CCU80RS_W<PRSET0_SPEC> {
270        CCU80RS_W::new(self, 7)
271    }
272    #[doc = "Bit 9 - POSIF0 Reset Assert"]
273    #[inline(always)]
274    pub fn posif0rs(&mut self) -> POSIF0RS_W<PRSET0_SPEC> {
275        POSIF0RS_W::new(self, 9)
276    }
277    #[doc = "Bit 11 - USIC0 Reset Assert"]
278    #[inline(always)]
279    pub fn usic0rs(&mut self) -> USIC0RS_W<PRSET0_SPEC> {
280        USIC0RS_W::new(self, 11)
281    }
282    #[doc = "Bit 16 - ERU1 Reset Assert"]
283    #[inline(always)]
284    pub fn eru1rs(&mut self) -> ERU1RS_W<PRSET0_SPEC> {
285        ERU1RS_W::new(self, 16)
286    }
287    #[doc = "Bit 23 - HRPWM0 Reset Assert"]
288    #[inline(always)]
289    pub fn hrpwm0rs(&mut self) -> HRPWM0RS_W<PRSET0_SPEC> {
290        HRPWM0RS_W::new(self, 23)
291    }
292}
293#[doc = "RCU Peripheral 0 Reset Set\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prset0::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
294pub struct PRSET0_SPEC;
295impl crate::RegisterSpec for PRSET0_SPEC {
296    type Ux = u32;
297}
298#[doc = "`write(|w| ..)` method takes [`prset0::W`](W) writer structure"]
299impl crate::Writable for PRSET0_SPEC {
300    type Safety = crate::Unsafe;
301    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
302    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
303}
304#[doc = "`reset()` method sets PRSET0 to value 0"]
305impl crate::Resettable for PRSET0_SPEC {
306    const RESET_VALUE: u32 = 0;
307}