1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"DMAC Module Activation"]
28unsafe impl ::core::marker::Send for super::Dma {}
29unsafe impl ::core::marker::Sync for super::Dma {}
30impl super::Dma {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "DMA Module Activation Register"]
38 #[inline(always)]
39 pub const fn dmast(&self) -> &'static crate::common::Reg<self::Dmast_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Dmast_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46}
47#[doc(hidden)]
48#[derive(Copy, Clone, Eq, PartialEq)]
49pub struct Dmast_SPEC;
50impl crate::sealed::RegSpec for Dmast_SPEC {
51 type DataType = u8;
52}
53
54#[doc = "DMA Module Activation Register"]
55pub type Dmast = crate::RegValueT<Dmast_SPEC>;
56
57impl Dmast {
58 #[doc = "DMAC Operation Enable"]
59 #[inline(always)]
60 pub fn dmst(
61 self,
62 ) -> crate::common::RegisterField<
63 0,
64 0x1,
65 1,
66 0,
67 dmast::Dmst,
68 dmast::Dmst,
69 Dmast_SPEC,
70 crate::common::RW,
71 > {
72 crate::common::RegisterField::<
73 0,
74 0x1,
75 1,
76 0,
77 dmast::Dmst,
78 dmast::Dmst,
79 Dmast_SPEC,
80 crate::common::RW,
81 >::from_register(self, 0)
82 }
83}
84impl ::core::default::Default for Dmast {
85 #[inline(always)]
86 fn default() -> Dmast {
87 <crate::RegValueT<Dmast_SPEC> as RegisterValue<_>>::new(0)
88 }
89}
90pub mod dmast {
91
92 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
93 pub struct Dmst_SPEC;
94 pub type Dmst = crate::EnumBitfieldStruct<u8, Dmst_SPEC>;
95 impl Dmst {
96 #[doc = "DMAC activation is disabled."]
97 pub const _0: Self = Self::new(0);
98
99 #[doc = "DMAC activation is enabled."]
100 pub const _1: Self = Self::new(1);
101 }
102}