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"Event Link Controller"]
28unsafe impl ::core::marker::Send for super::Elc {}
29unsafe impl ::core::marker::Sync for super::Elc {}
30impl super::Elc {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "Event Link Controller Register"]
38 #[inline(always)]
39 pub const fn elcr(&self) -> &'static crate::common::Reg<self::Elcr_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Elcr_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "Event Link Software Event Generation Register %s"]
48 #[inline(always)]
49 pub const fn elsegr(
50 &self,
51 ) -> &'static crate::common::ClusterRegisterArray<
52 crate::common::Reg<self::Elsegr_SPEC, crate::common::RW>,
53 2,
54 0x2,
55 > {
56 unsafe {
57 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x2usize))
58 }
59 }
60 #[inline(always)]
61 pub const fn elsegr0(
62 &self,
63 ) -> &'static crate::common::Reg<self::Elsegr_SPEC, crate::common::RW> {
64 unsafe {
65 crate::common::Reg::<self::Elsegr_SPEC, crate::common::RW>::from_ptr(
66 self._svd2pac_as_ptr().add(0x2usize),
67 )
68 }
69 }
70 #[inline(always)]
71 pub const fn elsegr1(
72 &self,
73 ) -> &'static crate::common::Reg<self::Elsegr_SPEC, crate::common::RW> {
74 unsafe {
75 crate::common::Reg::<self::Elsegr_SPEC, crate::common::RW>::from_ptr(
76 self._svd2pac_as_ptr().add(0x4usize),
77 )
78 }
79 }
80
81 #[doc = "Event Link Setting Register %s"]
82 #[inline(always)]
83 pub const fn elsr(
84 &self,
85 ) -> &'static crate::common::ClusterRegisterArray<
86 crate::common::Reg<self::Elsr_SPEC, crate::common::RW>,
87 6,
88 0x4,
89 > {
90 unsafe {
91 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x1cusize))
92 }
93 }
94 #[inline(always)]
95 pub const fn elsr23(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
96 unsafe {
97 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
98 self._svd2pac_as_ptr().add(0x1cusize),
99 )
100 }
101 }
102 #[inline(always)]
103 pub const fn elsr24(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
104 unsafe {
105 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
106 self._svd2pac_as_ptr().add(0x20usize),
107 )
108 }
109 }
110 #[inline(always)]
111 pub const fn elsr25(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
112 unsafe {
113 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
114 self._svd2pac_as_ptr().add(0x24usize),
115 )
116 }
117 }
118 #[inline(always)]
119 pub const fn elsr26(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
120 unsafe {
121 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
122 self._svd2pac_as_ptr().add(0x28usize),
123 )
124 }
125 }
126 #[inline(always)]
127 pub const fn elsr27(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
128 unsafe {
129 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
130 self._svd2pac_as_ptr().add(0x2cusize),
131 )
132 }
133 }
134 #[inline(always)]
135 pub const fn elsr28(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
136 unsafe {
137 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
138 self._svd2pac_as_ptr().add(0x30usize),
139 )
140 }
141 }
142}
143#[doc(hidden)]
144#[derive(Copy, Clone, Eq, PartialEq)]
145pub struct Elcr_SPEC;
146impl crate::sealed::RegSpec for Elcr_SPEC {
147 type DataType = u8;
148}
149
150#[doc = "Event Link Controller Register"]
151pub type Elcr = crate::RegValueT<Elcr_SPEC>;
152
153impl Elcr {
154 #[doc = "All Event Link Enable"]
155 #[inline(always)]
156 pub fn elcon(
157 self,
158 ) -> crate::common::RegisterField<
159 7,
160 0x1,
161 1,
162 0,
163 elcr::Elcon,
164 elcr::Elcon,
165 Elcr_SPEC,
166 crate::common::RW,
167 > {
168 crate::common::RegisterField::<
169 7,
170 0x1,
171 1,
172 0,
173 elcr::Elcon,
174 elcr::Elcon,
175 Elcr_SPEC,
176 crate::common::RW,
177 >::from_register(self, 0)
178 }
179}
180impl ::core::default::Default for Elcr {
181 #[inline(always)]
182 fn default() -> Elcr {
183 <crate::RegValueT<Elcr_SPEC> as RegisterValue<_>>::new(0)
184 }
185}
186pub mod elcr {
187
188 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
189 pub struct Elcon_SPEC;
190 pub type Elcon = crate::EnumBitfieldStruct<u8, Elcon_SPEC>;
191 impl Elcon {
192 #[doc = "All the event link operations are disabled."]
193 pub const _0: Self = Self::new(0);
194
195 #[doc = "All the event link operations are enabled."]
196 pub const _1: Self = Self::new(1);
197 }
198}
199#[doc(hidden)]
200#[derive(Copy, Clone, Eq, PartialEq)]
201pub struct Elsegr_SPEC;
202impl crate::sealed::RegSpec for Elsegr_SPEC {
203 type DataType = u8;
204}
205
206#[doc = "Event Link Software Event Generation Register %s"]
207pub type Elsegr = crate::RegValueT<Elsegr_SPEC>;
208
209impl Elsegr {
210 #[doc = "Software Event Generation"]
211 #[inline(always)]
212 pub fn seg(
213 self,
214 ) -> crate::common::RegisterField<
215 0,
216 0x1,
217 1,
218 0,
219 elsegr::Seg,
220 elsegr::Seg,
221 Elsegr_SPEC,
222 crate::common::W,
223 > {
224 crate::common::RegisterField::<
225 0,
226 0x1,
227 1,
228 0,
229 elsegr::Seg,
230 elsegr::Seg,
231 Elsegr_SPEC,
232 crate::common::W,
233 >::from_register(self, 0)
234 }
235
236 #[doc = "SEG Bit Write Enable"]
237 #[inline(always)]
238 pub fn we(
239 self,
240 ) -> crate::common::RegisterField<
241 6,
242 0x1,
243 1,
244 0,
245 elsegr::We,
246 elsegr::We,
247 Elsegr_SPEC,
248 crate::common::RW,
249 > {
250 crate::common::RegisterField::<
251 6,
252 0x1,
253 1,
254 0,
255 elsegr::We,
256 elsegr::We,
257 Elsegr_SPEC,
258 crate::common::RW,
259 >::from_register(self, 0)
260 }
261
262 #[doc = "ELSEGR Register Write Disable"]
263 #[inline(always)]
264 pub fn wi(
265 self,
266 ) -> crate::common::RegisterField<
267 7,
268 0x1,
269 1,
270 0,
271 elsegr::Wi,
272 elsegr::Wi,
273 Elsegr_SPEC,
274 crate::common::W,
275 > {
276 crate::common::RegisterField::<
277 7,
278 0x1,
279 1,
280 0,
281 elsegr::Wi,
282 elsegr::Wi,
283 Elsegr_SPEC,
284 crate::common::W,
285 >::from_register(self, 0)
286 }
287}
288impl ::core::default::Default for Elsegr {
289 #[inline(always)]
290 fn default() -> Elsegr {
291 <crate::RegValueT<Elsegr_SPEC> as RegisterValue<_>>::new(128)
292 }
293}
294pub mod elsegr {
295
296 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
297 pub struct Seg_SPEC;
298 pub type Seg = crate::EnumBitfieldStruct<u8, Seg_SPEC>;
299 impl Seg {
300 #[doc = "Not generate a software event."]
301 pub const _0: Self = Self::new(0);
302
303 #[doc = "Generate a software event."]
304 pub const _1: Self = Self::new(1);
305 }
306 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
307 pub struct We_SPEC;
308 pub type We = crate::EnumBitfieldStruct<u8, We_SPEC>;
309 impl We {
310 #[doc = "Write to SEG bit disabled."]
311 pub const _0: Self = Self::new(0);
312
313 #[doc = "Write to SEG bit enabled."]
314 pub const _1: Self = Self::new(1);
315 }
316 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
317 pub struct Wi_SPEC;
318 pub type Wi = crate::EnumBitfieldStruct<u8, Wi_SPEC>;
319 impl Wi {
320 #[doc = "Write to ELSEGR register enabled."]
321 pub const _0: Self = Self::new(0);
322
323 #[doc = "Write to ELSEGR register disabled."]
324 pub const _1: Self = Self::new(1);
325 }
326}
327#[doc(hidden)]
328#[derive(Copy, Clone, Eq, PartialEq)]
329pub struct Elsr_SPEC;
330impl crate::sealed::RegSpec for Elsr_SPEC {
331 type DataType = u16;
332}
333
334#[doc = "Event Link Setting Register %s"]
335pub type Elsr = crate::RegValueT<Elsr_SPEC>;
336
337impl Elsr {
338 #[doc = "Event Link Select"]
339 #[inline(always)]
340 pub fn els(
341 self,
342 ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Elsr_SPEC, crate::common::RW> {
343 crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Elsr_SPEC,crate::common::RW>::from_register(self,0)
344 }
345}
346impl ::core::default::Default for Elsr {
347 #[inline(always)]
348 fn default() -> Elsr {
349 <crate::RegValueT<Elsr_SPEC> as RegisterValue<_>>::new(0)
350 }
351}