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