lpc550x/syscon/
presetctrl0.rs

1#[doc = "Register `PRESETCTRL0` reader"]
2pub struct R(crate::R<PRESETCTRL0_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PRESETCTRL0_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PRESETCTRL0_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PRESETCTRL0_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `PRESETCTRL0` writer"]
17pub struct W(crate::W<PRESETCTRL0_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<PRESETCTRL0_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<PRESETCTRL0_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<PRESETCTRL0_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `ROM_RST` reader - ROM reset control."]
38pub type ROM_RST_R = crate::BitReader<ROM_RST_A>;
39#[doc = "ROM reset control.\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum ROM_RST_A {
42    #[doc = "0: Bloc is not reset."]
43    RELEASED = 0,
44    #[doc = "1: Bloc is reset."]
45    ASSERTED = 1,
46}
47impl From<ROM_RST_A> for bool {
48    #[inline(always)]
49    fn from(variant: ROM_RST_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl ROM_RST_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> ROM_RST_A {
57        match self.bits {
58            false => ROM_RST_A::RELEASED,
59            true => ROM_RST_A::ASSERTED,
60        }
61    }
62    #[doc = "Checks if the value of the field is `RELEASED`"]
63    #[inline(always)]
64    pub fn is_released(&self) -> bool {
65        *self == ROM_RST_A::RELEASED
66    }
67    #[doc = "Checks if the value of the field is `ASSERTED`"]
68    #[inline(always)]
69    pub fn is_asserted(&self) -> bool {
70        *self == ROM_RST_A::ASSERTED
71    }
72}
73#[doc = "Field `ROM_RST` writer - ROM reset control."]
74pub type ROM_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, ROM_RST_A, O>;
75impl<'a, const O: u8> ROM_RST_W<'a, O> {
76    #[doc = "Bloc is not reset."]
77    #[inline(always)]
78    pub fn released(self) -> &'a mut W {
79        self.variant(ROM_RST_A::RELEASED)
80    }
81    #[doc = "Bloc is reset."]
82    #[inline(always)]
83    pub fn asserted(self) -> &'a mut W {
84        self.variant(ROM_RST_A::ASSERTED)
85    }
86}
87#[doc = "Field `SRAM_CTRL1_RST` reader - SRAM Controller 1 reset control."]
88pub type SRAM_CTRL1_RST_R = crate::BitReader<SRAM_CTRL1_RST_A>;
89#[doc = "SRAM Controller 1 reset control.\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum SRAM_CTRL1_RST_A {
92    #[doc = "0: Bloc is not reset."]
93    RELEASED = 0,
94    #[doc = "1: Bloc is reset."]
95    ASSERTED = 1,
96}
97impl From<SRAM_CTRL1_RST_A> for bool {
98    #[inline(always)]
99    fn from(variant: SRAM_CTRL1_RST_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl SRAM_CTRL1_RST_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> SRAM_CTRL1_RST_A {
107        match self.bits {
108            false => SRAM_CTRL1_RST_A::RELEASED,
109            true => SRAM_CTRL1_RST_A::ASSERTED,
110        }
111    }
112    #[doc = "Checks if the value of the field is `RELEASED`"]
113    #[inline(always)]
114    pub fn is_released(&self) -> bool {
115        *self == SRAM_CTRL1_RST_A::RELEASED
116    }
117    #[doc = "Checks if the value of the field is `ASSERTED`"]
118    #[inline(always)]
119    pub fn is_asserted(&self) -> bool {
120        *self == SRAM_CTRL1_RST_A::ASSERTED
121    }
122}
123#[doc = "Field `SRAM_CTRL1_RST` writer - SRAM Controller 1 reset control."]
124pub type SRAM_CTRL1_RST_W<'a, const O: u8> =
125    crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, SRAM_CTRL1_RST_A, O>;
126impl<'a, const O: u8> SRAM_CTRL1_RST_W<'a, O> {
127    #[doc = "Bloc is not reset."]
128    #[inline(always)]
129    pub fn released(self) -> &'a mut W {
130        self.variant(SRAM_CTRL1_RST_A::RELEASED)
131    }
132    #[doc = "Bloc is reset."]
133    #[inline(always)]
134    pub fn asserted(self) -> &'a mut W {
135        self.variant(SRAM_CTRL1_RST_A::ASSERTED)
136    }
137}
138#[doc = "Field `SRAM_CTRL2_RST` reader - SRAM Controller 2 reset control."]
139pub type SRAM_CTRL2_RST_R = crate::BitReader<SRAM_CTRL2_RST_A>;
140#[doc = "SRAM Controller 2 reset control.\n\nValue on reset: 0"]
141#[derive(Clone, Copy, Debug, PartialEq, Eq)]
142pub enum SRAM_CTRL2_RST_A {
143    #[doc = "0: Bloc is not reset."]
144    RELEASED = 0,
145    #[doc = "1: Bloc is reset."]
146    ASSERTED = 1,
147}
148impl From<SRAM_CTRL2_RST_A> for bool {
149    #[inline(always)]
150    fn from(variant: SRAM_CTRL2_RST_A) -> Self {
151        variant as u8 != 0
152    }
153}
154impl SRAM_CTRL2_RST_R {
155    #[doc = "Get enumerated values variant"]
156    #[inline(always)]
157    pub fn variant(&self) -> SRAM_CTRL2_RST_A {
158        match self.bits {
159            false => SRAM_CTRL2_RST_A::RELEASED,
160            true => SRAM_CTRL2_RST_A::ASSERTED,
161        }
162    }
163    #[doc = "Checks if the value of the field is `RELEASED`"]
164    #[inline(always)]
165    pub fn is_released(&self) -> bool {
166        *self == SRAM_CTRL2_RST_A::RELEASED
167    }
168    #[doc = "Checks if the value of the field is `ASSERTED`"]
169    #[inline(always)]
170    pub fn is_asserted(&self) -> bool {
171        *self == SRAM_CTRL2_RST_A::ASSERTED
172    }
173}
174#[doc = "Field `SRAM_CTRL2_RST` writer - SRAM Controller 2 reset control."]
175pub type SRAM_CTRL2_RST_W<'a, const O: u8> =
176    crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, SRAM_CTRL2_RST_A, O>;
177impl<'a, const O: u8> SRAM_CTRL2_RST_W<'a, O> {
178    #[doc = "Bloc is not reset."]
179    #[inline(always)]
180    pub fn released(self) -> &'a mut W {
181        self.variant(SRAM_CTRL2_RST_A::RELEASED)
182    }
183    #[doc = "Bloc is reset."]
184    #[inline(always)]
185    pub fn asserted(self) -> &'a mut W {
186        self.variant(SRAM_CTRL2_RST_A::ASSERTED)
187    }
188}
189#[doc = "Field `FLASH_RST` reader - Flash controller reset control."]
190pub type FLASH_RST_R = crate::BitReader<FLASH_RST_A>;
191#[doc = "Flash controller reset control.\n\nValue on reset: 0"]
192#[derive(Clone, Copy, Debug, PartialEq, Eq)]
193pub enum FLASH_RST_A {
194    #[doc = "0: Bloc is not reset."]
195    RELEASED = 0,
196    #[doc = "1: Bloc is reset."]
197    ASSERTED = 1,
198}
199impl From<FLASH_RST_A> for bool {
200    #[inline(always)]
201    fn from(variant: FLASH_RST_A) -> Self {
202        variant as u8 != 0
203    }
204}
205impl FLASH_RST_R {
206    #[doc = "Get enumerated values variant"]
207    #[inline(always)]
208    pub fn variant(&self) -> FLASH_RST_A {
209        match self.bits {
210            false => FLASH_RST_A::RELEASED,
211            true => FLASH_RST_A::ASSERTED,
212        }
213    }
214    #[doc = "Checks if the value of the field is `RELEASED`"]
215    #[inline(always)]
216    pub fn is_released(&self) -> bool {
217        *self == FLASH_RST_A::RELEASED
218    }
219    #[doc = "Checks if the value of the field is `ASSERTED`"]
220    #[inline(always)]
221    pub fn is_asserted(&self) -> bool {
222        *self == FLASH_RST_A::ASSERTED
223    }
224}
225#[doc = "Field `FLASH_RST` writer - Flash controller reset control."]
226pub type FLASH_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, FLASH_RST_A, O>;
227impl<'a, const O: u8> FLASH_RST_W<'a, O> {
228    #[doc = "Bloc is not reset."]
229    #[inline(always)]
230    pub fn released(self) -> &'a mut W {
231        self.variant(FLASH_RST_A::RELEASED)
232    }
233    #[doc = "Bloc is reset."]
234    #[inline(always)]
235    pub fn asserted(self) -> &'a mut W {
236        self.variant(FLASH_RST_A::ASSERTED)
237    }
238}
239#[doc = "Field `FMC_RST` reader - FMC controller reset control."]
240pub type FMC_RST_R = crate::BitReader<FMC_RST_A>;
241#[doc = "FMC controller reset control.\n\nValue on reset: 0"]
242#[derive(Clone, Copy, Debug, PartialEq, Eq)]
243pub enum FMC_RST_A {
244    #[doc = "0: Bloc is not reset."]
245    RELEASED = 0,
246    #[doc = "1: Bloc is reset."]
247    ASSERTED = 1,
248}
249impl From<FMC_RST_A> for bool {
250    #[inline(always)]
251    fn from(variant: FMC_RST_A) -> Self {
252        variant as u8 != 0
253    }
254}
255impl FMC_RST_R {
256    #[doc = "Get enumerated values variant"]
257    #[inline(always)]
258    pub fn variant(&self) -> FMC_RST_A {
259        match self.bits {
260            false => FMC_RST_A::RELEASED,
261            true => FMC_RST_A::ASSERTED,
262        }
263    }
264    #[doc = "Checks if the value of the field is `RELEASED`"]
265    #[inline(always)]
266    pub fn is_released(&self) -> bool {
267        *self == FMC_RST_A::RELEASED
268    }
269    #[doc = "Checks if the value of the field is `ASSERTED`"]
270    #[inline(always)]
271    pub fn is_asserted(&self) -> bool {
272        *self == FMC_RST_A::ASSERTED
273    }
274}
275#[doc = "Field `FMC_RST` writer - FMC controller reset control."]
276pub type FMC_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, FMC_RST_A, O>;
277impl<'a, const O: u8> FMC_RST_W<'a, O> {
278    #[doc = "Bloc is not reset."]
279    #[inline(always)]
280    pub fn released(self) -> &'a mut W {
281        self.variant(FMC_RST_A::RELEASED)
282    }
283    #[doc = "Bloc is reset."]
284    #[inline(always)]
285    pub fn asserted(self) -> &'a mut W {
286        self.variant(FMC_RST_A::ASSERTED)
287    }
288}
289#[doc = "Field `MUX_RST` reader - Input Mux reset control."]
290pub type MUX_RST_R = crate::BitReader<MUX_RST_A>;
291#[doc = "Input Mux reset control.\n\nValue on reset: 0"]
292#[derive(Clone, Copy, Debug, PartialEq, Eq)]
293pub enum MUX_RST_A {
294    #[doc = "0: Bloc is not reset."]
295    RELEASED = 0,
296    #[doc = "1: Bloc is reset."]
297    ASSERTED = 1,
298}
299impl From<MUX_RST_A> for bool {
300    #[inline(always)]
301    fn from(variant: MUX_RST_A) -> Self {
302        variant as u8 != 0
303    }
304}
305impl MUX_RST_R {
306    #[doc = "Get enumerated values variant"]
307    #[inline(always)]
308    pub fn variant(&self) -> MUX_RST_A {
309        match self.bits {
310            false => MUX_RST_A::RELEASED,
311            true => MUX_RST_A::ASSERTED,
312        }
313    }
314    #[doc = "Checks if the value of the field is `RELEASED`"]
315    #[inline(always)]
316    pub fn is_released(&self) -> bool {
317        *self == MUX_RST_A::RELEASED
318    }
319    #[doc = "Checks if the value of the field is `ASSERTED`"]
320    #[inline(always)]
321    pub fn is_asserted(&self) -> bool {
322        *self == MUX_RST_A::ASSERTED
323    }
324}
325#[doc = "Field `MUX_RST` writer - Input Mux reset control."]
326pub type MUX_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, MUX_RST_A, O>;
327impl<'a, const O: u8> MUX_RST_W<'a, O> {
328    #[doc = "Bloc is not reset."]
329    #[inline(always)]
330    pub fn released(self) -> &'a mut W {
331        self.variant(MUX_RST_A::RELEASED)
332    }
333    #[doc = "Bloc is reset."]
334    #[inline(always)]
335    pub fn asserted(self) -> &'a mut W {
336        self.variant(MUX_RST_A::ASSERTED)
337    }
338}
339#[doc = "Field `IOCON_RST` reader - I/O controller reset control."]
340pub type IOCON_RST_R = crate::BitReader<IOCON_RST_A>;
341#[doc = "I/O controller reset control.\n\nValue on reset: 0"]
342#[derive(Clone, Copy, Debug, PartialEq, Eq)]
343pub enum IOCON_RST_A {
344    #[doc = "0: Bloc is not reset."]
345    RELEASED = 0,
346    #[doc = "1: Bloc is reset."]
347    ASSERTED = 1,
348}
349impl From<IOCON_RST_A> for bool {
350    #[inline(always)]
351    fn from(variant: IOCON_RST_A) -> Self {
352        variant as u8 != 0
353    }
354}
355impl IOCON_RST_R {
356    #[doc = "Get enumerated values variant"]
357    #[inline(always)]
358    pub fn variant(&self) -> IOCON_RST_A {
359        match self.bits {
360            false => IOCON_RST_A::RELEASED,
361            true => IOCON_RST_A::ASSERTED,
362        }
363    }
364    #[doc = "Checks if the value of the field is `RELEASED`"]
365    #[inline(always)]
366    pub fn is_released(&self) -> bool {
367        *self == IOCON_RST_A::RELEASED
368    }
369    #[doc = "Checks if the value of the field is `ASSERTED`"]
370    #[inline(always)]
371    pub fn is_asserted(&self) -> bool {
372        *self == IOCON_RST_A::ASSERTED
373    }
374}
375#[doc = "Field `IOCON_RST` writer - I/O controller reset control."]
376pub type IOCON_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, IOCON_RST_A, O>;
377impl<'a, const O: u8> IOCON_RST_W<'a, O> {
378    #[doc = "Bloc is not reset."]
379    #[inline(always)]
380    pub fn released(self) -> &'a mut W {
381        self.variant(IOCON_RST_A::RELEASED)
382    }
383    #[doc = "Bloc is reset."]
384    #[inline(always)]
385    pub fn asserted(self) -> &'a mut W {
386        self.variant(IOCON_RST_A::ASSERTED)
387    }
388}
389#[doc = "Field `GPIO0_RST` reader - GPIO0 reset control."]
390pub type GPIO0_RST_R = crate::BitReader<GPIO0_RST_A>;
391#[doc = "GPIO0 reset control.\n\nValue on reset: 0"]
392#[derive(Clone, Copy, Debug, PartialEq, Eq)]
393pub enum GPIO0_RST_A {
394    #[doc = "0: Bloc is not reset."]
395    RELEASED = 0,
396    #[doc = "1: Bloc is reset."]
397    ASSERTED = 1,
398}
399impl From<GPIO0_RST_A> for bool {
400    #[inline(always)]
401    fn from(variant: GPIO0_RST_A) -> Self {
402        variant as u8 != 0
403    }
404}
405impl GPIO0_RST_R {
406    #[doc = "Get enumerated values variant"]
407    #[inline(always)]
408    pub fn variant(&self) -> GPIO0_RST_A {
409        match self.bits {
410            false => GPIO0_RST_A::RELEASED,
411            true => GPIO0_RST_A::ASSERTED,
412        }
413    }
414    #[doc = "Checks if the value of the field is `RELEASED`"]
415    #[inline(always)]
416    pub fn is_released(&self) -> bool {
417        *self == GPIO0_RST_A::RELEASED
418    }
419    #[doc = "Checks if the value of the field is `ASSERTED`"]
420    #[inline(always)]
421    pub fn is_asserted(&self) -> bool {
422        *self == GPIO0_RST_A::ASSERTED
423    }
424}
425#[doc = "Field `GPIO0_RST` writer - GPIO0 reset control."]
426pub type GPIO0_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, GPIO0_RST_A, O>;
427impl<'a, const O: u8> GPIO0_RST_W<'a, O> {
428    #[doc = "Bloc is not reset."]
429    #[inline(always)]
430    pub fn released(self) -> &'a mut W {
431        self.variant(GPIO0_RST_A::RELEASED)
432    }
433    #[doc = "Bloc is reset."]
434    #[inline(always)]
435    pub fn asserted(self) -> &'a mut W {
436        self.variant(GPIO0_RST_A::ASSERTED)
437    }
438}
439#[doc = "Field `GPIO1_RST` reader - GPIO1 reset control."]
440pub type GPIO1_RST_R = crate::BitReader<GPIO1_RST_A>;
441#[doc = "GPIO1 reset control.\n\nValue on reset: 0"]
442#[derive(Clone, Copy, Debug, PartialEq, Eq)]
443pub enum GPIO1_RST_A {
444    #[doc = "0: Bloc is not reset."]
445    RELEASED = 0,
446    #[doc = "1: Bloc is reset."]
447    ASSERTED = 1,
448}
449impl From<GPIO1_RST_A> for bool {
450    #[inline(always)]
451    fn from(variant: GPIO1_RST_A) -> Self {
452        variant as u8 != 0
453    }
454}
455impl GPIO1_RST_R {
456    #[doc = "Get enumerated values variant"]
457    #[inline(always)]
458    pub fn variant(&self) -> GPIO1_RST_A {
459        match self.bits {
460            false => GPIO1_RST_A::RELEASED,
461            true => GPIO1_RST_A::ASSERTED,
462        }
463    }
464    #[doc = "Checks if the value of the field is `RELEASED`"]
465    #[inline(always)]
466    pub fn is_released(&self) -> bool {
467        *self == GPIO1_RST_A::RELEASED
468    }
469    #[doc = "Checks if the value of the field is `ASSERTED`"]
470    #[inline(always)]
471    pub fn is_asserted(&self) -> bool {
472        *self == GPIO1_RST_A::ASSERTED
473    }
474}
475#[doc = "Field `GPIO1_RST` writer - GPIO1 reset control."]
476pub type GPIO1_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, GPIO1_RST_A, O>;
477impl<'a, const O: u8> GPIO1_RST_W<'a, O> {
478    #[doc = "Bloc is not reset."]
479    #[inline(always)]
480    pub fn released(self) -> &'a mut W {
481        self.variant(GPIO1_RST_A::RELEASED)
482    }
483    #[doc = "Bloc is reset."]
484    #[inline(always)]
485    pub fn asserted(self) -> &'a mut W {
486        self.variant(GPIO1_RST_A::ASSERTED)
487    }
488}
489#[doc = "Field `PINT_RST` reader - Pin interrupt (PINT) reset control."]
490pub type PINT_RST_R = crate::BitReader<PINT_RST_A>;
491#[doc = "Pin interrupt (PINT) reset control.\n\nValue on reset: 0"]
492#[derive(Clone, Copy, Debug, PartialEq, Eq)]
493pub enum PINT_RST_A {
494    #[doc = "0: Bloc is not reset."]
495    RELEASED = 0,
496    #[doc = "1: Bloc is reset."]
497    ASSERTED = 1,
498}
499impl From<PINT_RST_A> for bool {
500    #[inline(always)]
501    fn from(variant: PINT_RST_A) -> Self {
502        variant as u8 != 0
503    }
504}
505impl PINT_RST_R {
506    #[doc = "Get enumerated values variant"]
507    #[inline(always)]
508    pub fn variant(&self) -> PINT_RST_A {
509        match self.bits {
510            false => PINT_RST_A::RELEASED,
511            true => PINT_RST_A::ASSERTED,
512        }
513    }
514    #[doc = "Checks if the value of the field is `RELEASED`"]
515    #[inline(always)]
516    pub fn is_released(&self) -> bool {
517        *self == PINT_RST_A::RELEASED
518    }
519    #[doc = "Checks if the value of the field is `ASSERTED`"]
520    #[inline(always)]
521    pub fn is_asserted(&self) -> bool {
522        *self == PINT_RST_A::ASSERTED
523    }
524}
525#[doc = "Field `PINT_RST` writer - Pin interrupt (PINT) reset control."]
526pub type PINT_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, PINT_RST_A, O>;
527impl<'a, const O: u8> PINT_RST_W<'a, O> {
528    #[doc = "Bloc is not reset."]
529    #[inline(always)]
530    pub fn released(self) -> &'a mut W {
531        self.variant(PINT_RST_A::RELEASED)
532    }
533    #[doc = "Bloc is reset."]
534    #[inline(always)]
535    pub fn asserted(self) -> &'a mut W {
536        self.variant(PINT_RST_A::ASSERTED)
537    }
538}
539#[doc = "Field `GINT_RST` reader - Group interrupt (GINT) reset control."]
540pub type GINT_RST_R = crate::BitReader<GINT_RST_A>;
541#[doc = "Group interrupt (GINT) reset control.\n\nValue on reset: 0"]
542#[derive(Clone, Copy, Debug, PartialEq, Eq)]
543pub enum GINT_RST_A {
544    #[doc = "0: Bloc is not reset."]
545    RELEASED = 0,
546    #[doc = "1: Bloc is reset."]
547    ASSERTED = 1,
548}
549impl From<GINT_RST_A> for bool {
550    #[inline(always)]
551    fn from(variant: GINT_RST_A) -> Self {
552        variant as u8 != 0
553    }
554}
555impl GINT_RST_R {
556    #[doc = "Get enumerated values variant"]
557    #[inline(always)]
558    pub fn variant(&self) -> GINT_RST_A {
559        match self.bits {
560            false => GINT_RST_A::RELEASED,
561            true => GINT_RST_A::ASSERTED,
562        }
563    }
564    #[doc = "Checks if the value of the field is `RELEASED`"]
565    #[inline(always)]
566    pub fn is_released(&self) -> bool {
567        *self == GINT_RST_A::RELEASED
568    }
569    #[doc = "Checks if the value of the field is `ASSERTED`"]
570    #[inline(always)]
571    pub fn is_asserted(&self) -> bool {
572        *self == GINT_RST_A::ASSERTED
573    }
574}
575#[doc = "Field `GINT_RST` writer - Group interrupt (GINT) reset control."]
576pub type GINT_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, GINT_RST_A, O>;
577impl<'a, const O: u8> GINT_RST_W<'a, O> {
578    #[doc = "Bloc is not reset."]
579    #[inline(always)]
580    pub fn released(self) -> &'a mut W {
581        self.variant(GINT_RST_A::RELEASED)
582    }
583    #[doc = "Bloc is reset."]
584    #[inline(always)]
585    pub fn asserted(self) -> &'a mut W {
586        self.variant(GINT_RST_A::ASSERTED)
587    }
588}
589#[doc = "Field `DMA0_RST` reader - DMA0 reset control."]
590pub type DMA0_RST_R = crate::BitReader<DMA0_RST_A>;
591#[doc = "DMA0 reset control.\n\nValue on reset: 0"]
592#[derive(Clone, Copy, Debug, PartialEq, Eq)]
593pub enum DMA0_RST_A {
594    #[doc = "0: Bloc is not reset."]
595    RELEASED = 0,
596    #[doc = "1: Bloc is reset."]
597    ASSERTED = 1,
598}
599impl From<DMA0_RST_A> for bool {
600    #[inline(always)]
601    fn from(variant: DMA0_RST_A) -> Self {
602        variant as u8 != 0
603    }
604}
605impl DMA0_RST_R {
606    #[doc = "Get enumerated values variant"]
607    #[inline(always)]
608    pub fn variant(&self) -> DMA0_RST_A {
609        match self.bits {
610            false => DMA0_RST_A::RELEASED,
611            true => DMA0_RST_A::ASSERTED,
612        }
613    }
614    #[doc = "Checks if the value of the field is `RELEASED`"]
615    #[inline(always)]
616    pub fn is_released(&self) -> bool {
617        *self == DMA0_RST_A::RELEASED
618    }
619    #[doc = "Checks if the value of the field is `ASSERTED`"]
620    #[inline(always)]
621    pub fn is_asserted(&self) -> bool {
622        *self == DMA0_RST_A::ASSERTED
623    }
624}
625#[doc = "Field `DMA0_RST` writer - DMA0 reset control."]
626pub type DMA0_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, DMA0_RST_A, O>;
627impl<'a, const O: u8> DMA0_RST_W<'a, O> {
628    #[doc = "Bloc is not reset."]
629    #[inline(always)]
630    pub fn released(self) -> &'a mut W {
631        self.variant(DMA0_RST_A::RELEASED)
632    }
633    #[doc = "Bloc is reset."]
634    #[inline(always)]
635    pub fn asserted(self) -> &'a mut W {
636        self.variant(DMA0_RST_A::ASSERTED)
637    }
638}
639#[doc = "Field `CRCGEN_RST` reader - CRCGEN reset control."]
640pub type CRCGEN_RST_R = crate::BitReader<CRCGEN_RST_A>;
641#[doc = "CRCGEN reset control.\n\nValue on reset: 0"]
642#[derive(Clone, Copy, Debug, PartialEq, Eq)]
643pub enum CRCGEN_RST_A {
644    #[doc = "0: Bloc is not reset."]
645    RELEASED = 0,
646    #[doc = "1: Bloc is reset."]
647    ASSERTED = 1,
648}
649impl From<CRCGEN_RST_A> for bool {
650    #[inline(always)]
651    fn from(variant: CRCGEN_RST_A) -> Self {
652        variant as u8 != 0
653    }
654}
655impl CRCGEN_RST_R {
656    #[doc = "Get enumerated values variant"]
657    #[inline(always)]
658    pub fn variant(&self) -> CRCGEN_RST_A {
659        match self.bits {
660            false => CRCGEN_RST_A::RELEASED,
661            true => CRCGEN_RST_A::ASSERTED,
662        }
663    }
664    #[doc = "Checks if the value of the field is `RELEASED`"]
665    #[inline(always)]
666    pub fn is_released(&self) -> bool {
667        *self == CRCGEN_RST_A::RELEASED
668    }
669    #[doc = "Checks if the value of the field is `ASSERTED`"]
670    #[inline(always)]
671    pub fn is_asserted(&self) -> bool {
672        *self == CRCGEN_RST_A::ASSERTED
673    }
674}
675#[doc = "Field `CRCGEN_RST` writer - CRCGEN reset control."]
676pub type CRCGEN_RST_W<'a, const O: u8> =
677    crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, CRCGEN_RST_A, O>;
678impl<'a, const O: u8> CRCGEN_RST_W<'a, O> {
679    #[doc = "Bloc is not reset."]
680    #[inline(always)]
681    pub fn released(self) -> &'a mut W {
682        self.variant(CRCGEN_RST_A::RELEASED)
683    }
684    #[doc = "Bloc is reset."]
685    #[inline(always)]
686    pub fn asserted(self) -> &'a mut W {
687        self.variant(CRCGEN_RST_A::ASSERTED)
688    }
689}
690#[doc = "Field `WWDT_RST` reader - Watchdog Timer reset control."]
691pub type WWDT_RST_R = crate::BitReader<WWDT_RST_A>;
692#[doc = "Watchdog Timer reset control.\n\nValue on reset: 0"]
693#[derive(Clone, Copy, Debug, PartialEq, Eq)]
694pub enum WWDT_RST_A {
695    #[doc = "0: Bloc is not reset."]
696    RELEASED = 0,
697    #[doc = "1: Bloc is reset."]
698    ASSERTED = 1,
699}
700impl From<WWDT_RST_A> for bool {
701    #[inline(always)]
702    fn from(variant: WWDT_RST_A) -> Self {
703        variant as u8 != 0
704    }
705}
706impl WWDT_RST_R {
707    #[doc = "Get enumerated values variant"]
708    #[inline(always)]
709    pub fn variant(&self) -> WWDT_RST_A {
710        match self.bits {
711            false => WWDT_RST_A::RELEASED,
712            true => WWDT_RST_A::ASSERTED,
713        }
714    }
715    #[doc = "Checks if the value of the field is `RELEASED`"]
716    #[inline(always)]
717    pub fn is_released(&self) -> bool {
718        *self == WWDT_RST_A::RELEASED
719    }
720    #[doc = "Checks if the value of the field is `ASSERTED`"]
721    #[inline(always)]
722    pub fn is_asserted(&self) -> bool {
723        *self == WWDT_RST_A::ASSERTED
724    }
725}
726#[doc = "Field `WWDT_RST` writer - Watchdog Timer reset control."]
727pub type WWDT_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, WWDT_RST_A, O>;
728impl<'a, const O: u8> WWDT_RST_W<'a, O> {
729    #[doc = "Bloc is not reset."]
730    #[inline(always)]
731    pub fn released(self) -> &'a mut W {
732        self.variant(WWDT_RST_A::RELEASED)
733    }
734    #[doc = "Bloc is reset."]
735    #[inline(always)]
736    pub fn asserted(self) -> &'a mut W {
737        self.variant(WWDT_RST_A::ASSERTED)
738    }
739}
740#[doc = "Field `RTC_RST` reader - Real Time Clock (RTC) reset control."]
741pub type RTC_RST_R = crate::BitReader<RTC_RST_A>;
742#[doc = "Real Time Clock (RTC) reset control.\n\nValue on reset: 0"]
743#[derive(Clone, Copy, Debug, PartialEq, Eq)]
744pub enum RTC_RST_A {
745    #[doc = "0: Bloc is not reset."]
746    RELEASED = 0,
747    #[doc = "1: Bloc is reset."]
748    ASSERTED = 1,
749}
750impl From<RTC_RST_A> for bool {
751    #[inline(always)]
752    fn from(variant: RTC_RST_A) -> Self {
753        variant as u8 != 0
754    }
755}
756impl RTC_RST_R {
757    #[doc = "Get enumerated values variant"]
758    #[inline(always)]
759    pub fn variant(&self) -> RTC_RST_A {
760        match self.bits {
761            false => RTC_RST_A::RELEASED,
762            true => RTC_RST_A::ASSERTED,
763        }
764    }
765    #[doc = "Checks if the value of the field is `RELEASED`"]
766    #[inline(always)]
767    pub fn is_released(&self) -> bool {
768        *self == RTC_RST_A::RELEASED
769    }
770    #[doc = "Checks if the value of the field is `ASSERTED`"]
771    #[inline(always)]
772    pub fn is_asserted(&self) -> bool {
773        *self == RTC_RST_A::ASSERTED
774    }
775}
776#[doc = "Field `RTC_RST` writer - Real Time Clock (RTC) reset control."]
777pub type RTC_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, RTC_RST_A, O>;
778impl<'a, const O: u8> RTC_RST_W<'a, O> {
779    #[doc = "Bloc is not reset."]
780    #[inline(always)]
781    pub fn released(self) -> &'a mut W {
782        self.variant(RTC_RST_A::RELEASED)
783    }
784    #[doc = "Bloc is reset."]
785    #[inline(always)]
786    pub fn asserted(self) -> &'a mut W {
787        self.variant(RTC_RST_A::ASSERTED)
788    }
789}
790#[doc = "Field `MAILBOX_RST` reader - Inter CPU communication Mailbox reset control."]
791pub type MAILBOX_RST_R = crate::BitReader<MAILBOX_RST_A>;
792#[doc = "Inter CPU communication Mailbox reset control.\n\nValue on reset: 0"]
793#[derive(Clone, Copy, Debug, PartialEq, Eq)]
794pub enum MAILBOX_RST_A {
795    #[doc = "0: Bloc is not reset."]
796    RELEASED = 0,
797    #[doc = "1: Bloc is reset."]
798    ASSERTED = 1,
799}
800impl From<MAILBOX_RST_A> for bool {
801    #[inline(always)]
802    fn from(variant: MAILBOX_RST_A) -> Self {
803        variant as u8 != 0
804    }
805}
806impl MAILBOX_RST_R {
807    #[doc = "Get enumerated values variant"]
808    #[inline(always)]
809    pub fn variant(&self) -> MAILBOX_RST_A {
810        match self.bits {
811            false => MAILBOX_RST_A::RELEASED,
812            true => MAILBOX_RST_A::ASSERTED,
813        }
814    }
815    #[doc = "Checks if the value of the field is `RELEASED`"]
816    #[inline(always)]
817    pub fn is_released(&self) -> bool {
818        *self == MAILBOX_RST_A::RELEASED
819    }
820    #[doc = "Checks if the value of the field is `ASSERTED`"]
821    #[inline(always)]
822    pub fn is_asserted(&self) -> bool {
823        *self == MAILBOX_RST_A::ASSERTED
824    }
825}
826#[doc = "Field `MAILBOX_RST` writer - Inter CPU communication Mailbox reset control."]
827pub type MAILBOX_RST_W<'a, const O: u8> =
828    crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, MAILBOX_RST_A, O>;
829impl<'a, const O: u8> MAILBOX_RST_W<'a, O> {
830    #[doc = "Bloc is not reset."]
831    #[inline(always)]
832    pub fn released(self) -> &'a mut W {
833        self.variant(MAILBOX_RST_A::RELEASED)
834    }
835    #[doc = "Bloc is reset."]
836    #[inline(always)]
837    pub fn asserted(self) -> &'a mut W {
838        self.variant(MAILBOX_RST_A::ASSERTED)
839    }
840}
841#[doc = "Field `ADC_RST` reader - ADC reset control."]
842pub type ADC_RST_R = crate::BitReader<ADC_RST_A>;
843#[doc = "ADC reset control.\n\nValue on reset: 0"]
844#[derive(Clone, Copy, Debug, PartialEq, Eq)]
845pub enum ADC_RST_A {
846    #[doc = "0: Bloc is not reset."]
847    RELEASED = 0,
848    #[doc = "1: Bloc is reset."]
849    ASSERTED = 1,
850}
851impl From<ADC_RST_A> for bool {
852    #[inline(always)]
853    fn from(variant: ADC_RST_A) -> Self {
854        variant as u8 != 0
855    }
856}
857impl ADC_RST_R {
858    #[doc = "Get enumerated values variant"]
859    #[inline(always)]
860    pub fn variant(&self) -> ADC_RST_A {
861        match self.bits {
862            false => ADC_RST_A::RELEASED,
863            true => ADC_RST_A::ASSERTED,
864        }
865    }
866    #[doc = "Checks if the value of the field is `RELEASED`"]
867    #[inline(always)]
868    pub fn is_released(&self) -> bool {
869        *self == ADC_RST_A::RELEASED
870    }
871    #[doc = "Checks if the value of the field is `ASSERTED`"]
872    #[inline(always)]
873    pub fn is_asserted(&self) -> bool {
874        *self == ADC_RST_A::ASSERTED
875    }
876}
877#[doc = "Field `ADC_RST` writer - ADC reset control."]
878pub type ADC_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PRESETCTRL0_SPEC, ADC_RST_A, O>;
879impl<'a, const O: u8> ADC_RST_W<'a, O> {
880    #[doc = "Bloc is not reset."]
881    #[inline(always)]
882    pub fn released(self) -> &'a mut W {
883        self.variant(ADC_RST_A::RELEASED)
884    }
885    #[doc = "Bloc is reset."]
886    #[inline(always)]
887    pub fn asserted(self) -> &'a mut W {
888        self.variant(ADC_RST_A::ASSERTED)
889    }
890}
891impl R {
892    #[doc = "Bit 1 - ROM reset control."]
893    #[inline(always)]
894    pub fn rom_rst(&self) -> ROM_RST_R {
895        ROM_RST_R::new(((self.bits >> 1) & 1) != 0)
896    }
897    #[doc = "Bit 3 - SRAM Controller 1 reset control."]
898    #[inline(always)]
899    pub fn sram_ctrl1_rst(&self) -> SRAM_CTRL1_RST_R {
900        SRAM_CTRL1_RST_R::new(((self.bits >> 3) & 1) != 0)
901    }
902    #[doc = "Bit 4 - SRAM Controller 2 reset control."]
903    #[inline(always)]
904    pub fn sram_ctrl2_rst(&self) -> SRAM_CTRL2_RST_R {
905        SRAM_CTRL2_RST_R::new(((self.bits >> 4) & 1) != 0)
906    }
907    #[doc = "Bit 7 - Flash controller reset control."]
908    #[inline(always)]
909    pub fn flash_rst(&self) -> FLASH_RST_R {
910        FLASH_RST_R::new(((self.bits >> 7) & 1) != 0)
911    }
912    #[doc = "Bit 8 - FMC controller reset control."]
913    #[inline(always)]
914    pub fn fmc_rst(&self) -> FMC_RST_R {
915        FMC_RST_R::new(((self.bits >> 8) & 1) != 0)
916    }
917    #[doc = "Bit 11 - Input Mux reset control."]
918    #[inline(always)]
919    pub fn mux_rst(&self) -> MUX_RST_R {
920        MUX_RST_R::new(((self.bits >> 11) & 1) != 0)
921    }
922    #[doc = "Bit 13 - I/O controller reset control."]
923    #[inline(always)]
924    pub fn iocon_rst(&self) -> IOCON_RST_R {
925        IOCON_RST_R::new(((self.bits >> 13) & 1) != 0)
926    }
927    #[doc = "Bit 14 - GPIO0 reset control."]
928    #[inline(always)]
929    pub fn gpio0_rst(&self) -> GPIO0_RST_R {
930        GPIO0_RST_R::new(((self.bits >> 14) & 1) != 0)
931    }
932    #[doc = "Bit 15 - GPIO1 reset control."]
933    #[inline(always)]
934    pub fn gpio1_rst(&self) -> GPIO1_RST_R {
935        GPIO1_RST_R::new(((self.bits >> 15) & 1) != 0)
936    }
937    #[doc = "Bit 18 - Pin interrupt (PINT) reset control."]
938    #[inline(always)]
939    pub fn pint_rst(&self) -> PINT_RST_R {
940        PINT_RST_R::new(((self.bits >> 18) & 1) != 0)
941    }
942    #[doc = "Bit 19 - Group interrupt (GINT) reset control."]
943    #[inline(always)]
944    pub fn gint_rst(&self) -> GINT_RST_R {
945        GINT_RST_R::new(((self.bits >> 19) & 1) != 0)
946    }
947    #[doc = "Bit 20 - DMA0 reset control."]
948    #[inline(always)]
949    pub fn dma0_rst(&self) -> DMA0_RST_R {
950        DMA0_RST_R::new(((self.bits >> 20) & 1) != 0)
951    }
952    #[doc = "Bit 21 - CRCGEN reset control."]
953    #[inline(always)]
954    pub fn crcgen_rst(&self) -> CRCGEN_RST_R {
955        CRCGEN_RST_R::new(((self.bits >> 21) & 1) != 0)
956    }
957    #[doc = "Bit 22 - Watchdog Timer reset control."]
958    #[inline(always)]
959    pub fn wwdt_rst(&self) -> WWDT_RST_R {
960        WWDT_RST_R::new(((self.bits >> 22) & 1) != 0)
961    }
962    #[doc = "Bit 23 - Real Time Clock (RTC) reset control."]
963    #[inline(always)]
964    pub fn rtc_rst(&self) -> RTC_RST_R {
965        RTC_RST_R::new(((self.bits >> 23) & 1) != 0)
966    }
967    #[doc = "Bit 26 - Inter CPU communication Mailbox reset control."]
968    #[inline(always)]
969    pub fn mailbox_rst(&self) -> MAILBOX_RST_R {
970        MAILBOX_RST_R::new(((self.bits >> 26) & 1) != 0)
971    }
972    #[doc = "Bit 27 - ADC reset control."]
973    #[inline(always)]
974    pub fn adc_rst(&self) -> ADC_RST_R {
975        ADC_RST_R::new(((self.bits >> 27) & 1) != 0)
976    }
977}
978impl W {
979    #[doc = "Bit 1 - ROM reset control."]
980    #[inline(always)]
981    pub fn rom_rst(&mut self) -> ROM_RST_W<1> {
982        ROM_RST_W::new(self)
983    }
984    #[doc = "Bit 3 - SRAM Controller 1 reset control."]
985    #[inline(always)]
986    pub fn sram_ctrl1_rst(&mut self) -> SRAM_CTRL1_RST_W<3> {
987        SRAM_CTRL1_RST_W::new(self)
988    }
989    #[doc = "Bit 4 - SRAM Controller 2 reset control."]
990    #[inline(always)]
991    pub fn sram_ctrl2_rst(&mut self) -> SRAM_CTRL2_RST_W<4> {
992        SRAM_CTRL2_RST_W::new(self)
993    }
994    #[doc = "Bit 7 - Flash controller reset control."]
995    #[inline(always)]
996    pub fn flash_rst(&mut self) -> FLASH_RST_W<7> {
997        FLASH_RST_W::new(self)
998    }
999    #[doc = "Bit 8 - FMC controller reset control."]
1000    #[inline(always)]
1001    pub fn fmc_rst(&mut self) -> FMC_RST_W<8> {
1002        FMC_RST_W::new(self)
1003    }
1004    #[doc = "Bit 11 - Input Mux reset control."]
1005    #[inline(always)]
1006    pub fn mux_rst(&mut self) -> MUX_RST_W<11> {
1007        MUX_RST_W::new(self)
1008    }
1009    #[doc = "Bit 13 - I/O controller reset control."]
1010    #[inline(always)]
1011    pub fn iocon_rst(&mut self) -> IOCON_RST_W<13> {
1012        IOCON_RST_W::new(self)
1013    }
1014    #[doc = "Bit 14 - GPIO0 reset control."]
1015    #[inline(always)]
1016    pub fn gpio0_rst(&mut self) -> GPIO0_RST_W<14> {
1017        GPIO0_RST_W::new(self)
1018    }
1019    #[doc = "Bit 15 - GPIO1 reset control."]
1020    #[inline(always)]
1021    pub fn gpio1_rst(&mut self) -> GPIO1_RST_W<15> {
1022        GPIO1_RST_W::new(self)
1023    }
1024    #[doc = "Bit 18 - Pin interrupt (PINT) reset control."]
1025    #[inline(always)]
1026    pub fn pint_rst(&mut self) -> PINT_RST_W<18> {
1027        PINT_RST_W::new(self)
1028    }
1029    #[doc = "Bit 19 - Group interrupt (GINT) reset control."]
1030    #[inline(always)]
1031    pub fn gint_rst(&mut self) -> GINT_RST_W<19> {
1032        GINT_RST_W::new(self)
1033    }
1034    #[doc = "Bit 20 - DMA0 reset control."]
1035    #[inline(always)]
1036    pub fn dma0_rst(&mut self) -> DMA0_RST_W<20> {
1037        DMA0_RST_W::new(self)
1038    }
1039    #[doc = "Bit 21 - CRCGEN reset control."]
1040    #[inline(always)]
1041    pub fn crcgen_rst(&mut self) -> CRCGEN_RST_W<21> {
1042        CRCGEN_RST_W::new(self)
1043    }
1044    #[doc = "Bit 22 - Watchdog Timer reset control."]
1045    #[inline(always)]
1046    pub fn wwdt_rst(&mut self) -> WWDT_RST_W<22> {
1047        WWDT_RST_W::new(self)
1048    }
1049    #[doc = "Bit 23 - Real Time Clock (RTC) reset control."]
1050    #[inline(always)]
1051    pub fn rtc_rst(&mut self) -> RTC_RST_W<23> {
1052        RTC_RST_W::new(self)
1053    }
1054    #[doc = "Bit 26 - Inter CPU communication Mailbox reset control."]
1055    #[inline(always)]
1056    pub fn mailbox_rst(&mut self) -> MAILBOX_RST_W<26> {
1057        MAILBOX_RST_W::new(self)
1058    }
1059    #[doc = "Bit 27 - ADC reset control."]
1060    #[inline(always)]
1061    pub fn adc_rst(&mut self) -> ADC_RST_W<27> {
1062        ADC_RST_W::new(self)
1063    }
1064    #[doc = "Writes raw bits to the register."]
1065    #[inline(always)]
1066    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1067        self.0.bits(bits);
1068        self
1069    }
1070}
1071#[doc = "Peripheral reset control 0.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [presetctrl0](index.html) module"]
1072pub struct PRESETCTRL0_SPEC;
1073impl crate::RegisterSpec for PRESETCTRL0_SPEC {
1074    type Ux = u32;
1075}
1076#[doc = "`read()` method returns [presetctrl0::R](R) reader structure"]
1077impl crate::Readable for PRESETCTRL0_SPEC {
1078    type Reader = R;
1079}
1080#[doc = "`write(|w| ..)` method takes [presetctrl0::W](W) writer structure"]
1081impl crate::Writable for PRESETCTRL0_SPEC {
1082    type Writer = W;
1083}
1084#[doc = "`reset()` method sets PRESETCTRL0 to value 0"]
1085impl crate::Resettable for PRESETCTRL0_SPEC {
1086    #[inline(always)]
1087    fn reset_value() -> Self::Ux {
1088        0
1089    }
1090}