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 = "DMAC Error Channel Register"]
48 #[inline(always)]
49 pub const fn dmechr(
50 &self,
51 ) -> &'static crate::common::Reg<self::Dmechr_SPEC, crate::common::RW> {
52 unsafe {
53 crate::common::Reg::<self::Dmechr_SPEC, crate::common::RW>::from_ptr(
54 self._svd2pac_as_ptr().add(64usize),
55 )
56 }
57 }
58}
59#[doc(hidden)]
60#[derive(Copy, Clone, Eq, PartialEq)]
61pub struct Dmast_SPEC;
62impl crate::sealed::RegSpec for Dmast_SPEC {
63 type DataType = u8;
64}
65
66#[doc = "DMA Module Activation Register"]
67pub type Dmast = crate::RegValueT<Dmast_SPEC>;
68
69impl Dmast {
70 #[doc = "DMAC Operation Enable"]
71 #[inline(always)]
72 pub fn dmst(
73 self,
74 ) -> crate::common::RegisterField<
75 0,
76 0x1,
77 1,
78 0,
79 dmast::Dmst,
80 dmast::Dmst,
81 Dmast_SPEC,
82 crate::common::RW,
83 > {
84 crate::common::RegisterField::<
85 0,
86 0x1,
87 1,
88 0,
89 dmast::Dmst,
90 dmast::Dmst,
91 Dmast_SPEC,
92 crate::common::RW,
93 >::from_register(self, 0)
94 }
95}
96impl ::core::default::Default for Dmast {
97 #[inline(always)]
98 fn default() -> Dmast {
99 <crate::RegValueT<Dmast_SPEC> as RegisterValue<_>>::new(0)
100 }
101}
102pub mod dmast {
103
104 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
105 pub struct Dmst_SPEC;
106 pub type Dmst = crate::EnumBitfieldStruct<u8, Dmst_SPEC>;
107 impl Dmst {
108 #[doc = "DMAC activation is disabled."]
109 pub const _0: Self = Self::new(0);
110
111 #[doc = "DMAC activation is enabled."]
112 pub const _1: Self = Self::new(1);
113 }
114}
115#[doc(hidden)]
116#[derive(Copy, Clone, Eq, PartialEq)]
117pub struct Dmechr_SPEC;
118impl crate::sealed::RegSpec for Dmechr_SPEC {
119 type DataType = u32;
120}
121
122#[doc = "DMAC Error Channel Register"]
123pub type Dmechr = crate::RegValueT<Dmechr_SPEC>;
124
125impl Dmechr {
126 #[doc = "DMAC Error channel"]
127 #[inline(always)]
128 pub fn dmech(
129 self,
130 ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, Dmechr_SPEC, crate::common::R> {
131 crate::common::RegisterField::<0,0x7,1,0,u8,u8,Dmechr_SPEC,crate::common::R>::from_register(self,0)
132 }
133
134 #[doc = "DMAC Error channel Security Attribution Monitor"]
135 #[inline(always)]
136 pub fn dmechsam(
137 self,
138 ) -> crate::common::RegisterField<
139 8,
140 0x1,
141 1,
142 0,
143 dmechr::Dmechsam,
144 dmechr::Dmechsam,
145 Dmechr_SPEC,
146 crate::common::R,
147 > {
148 crate::common::RegisterField::<
149 8,
150 0x1,
151 1,
152 0,
153 dmechr::Dmechsam,
154 dmechr::Dmechsam,
155 Dmechr_SPEC,
156 crate::common::R,
157 >::from_register(self, 0)
158 }
159
160 #[doc = "DMAC Error Status"]
161 #[inline(always)]
162 pub fn dmesta(
163 self,
164 ) -> crate::common::RegisterField<
165 16,
166 0x1,
167 1,
168 0,
169 dmechr::Dmesta,
170 dmechr::Dmesta,
171 Dmechr_SPEC,
172 crate::common::RW,
173 > {
174 crate::common::RegisterField::<
175 16,
176 0x1,
177 1,
178 0,
179 dmechr::Dmesta,
180 dmechr::Dmesta,
181 Dmechr_SPEC,
182 crate::common::RW,
183 >::from_register(self, 0)
184 }
185}
186impl ::core::default::Default for Dmechr {
187 #[inline(always)]
188 fn default() -> Dmechr {
189 <crate::RegValueT<Dmechr_SPEC> as RegisterValue<_>>::new(0)
190 }
191}
192pub mod dmechr {
193
194 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
195 pub struct Dmechsam_SPEC;
196 pub type Dmechsam = crate::EnumBitfieldStruct<u8, Dmechsam_SPEC>;
197 impl Dmechsam {
198 #[doc = "Secure channel"]
199 pub const _0: Self = Self::new(0);
200
201 #[doc = "Non-secure channel"]
202 pub const _1: Self = Self::new(1);
203 }
204 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
205 pub struct Dmesta_SPEC;
206 pub type Dmesta = crate::EnumBitfieldStruct<u8, Dmesta_SPEC>;
207 impl Dmesta {
208 #[doc = "No DMA transfer error occurred"]
209 pub const _0: Self = Self::new(0);
210
211 #[doc = "DMA transfer error occurred"]
212 pub const _1: Self = Self::new(1);
213 }
214}